PDA

View Full Version : Trying to make a new reference window



RTFallen
June 17th, 2014, 11:08
I have the window layout done, but the lua to get it to work is kicking me in the rear.

https://i30.photobucket.com/albums/c330/Resire/newreferencewindow_zpsbf30777e.png

I'm trying to get the test links to load up into the right referencetext frame. I was trying to work something out with the library linking, but not having any luck.

The zip file has the extension and the test module. Things maybe a little messed up. Just stepping away for the night after trying some things.

Any help would be appreciated.

Resire

Moon Wizard
June 17th, 2014, 23:45
Clicks not Registering

A couple things were happening to prevent the clicks from registering on the left side:
* The "over" anchor position lays out the control based on the current window size, which when initially defined is only 20.
* The string was then placed over the top, and capturing the clicks but doing nothing with them.

Here's what I've done so far:
* Moved "base" control to be defined after "name" control (which expands the window size to accommodate the placement).
* Set "name" control to "disabled" so it does not capture any user input.

Right Column

The right column is using a subwindow control, which does not support the setDatabaseNode function. Only windowlist controls do. As soon as I fixed the click on the left, I encountered the script error for this.

Check out the "reference_manual" windowclass in the 4E ruleset located in the ref/ref_manual.xml file. I think this does either exactly what you want, or very close.

Regards,
JPG

RTFallen
June 18th, 2014, 00:15
Thanks JPG

Resire

RTFallen
June 18th, 2014, 03:00
From what i can see of the "reference_manual" windowclass it is exactly what I'm looking to add into 3.5E/PFRPG ruleset. I am however still having issues getting the links to work, and it's probably an error in my xml. Is there a module that I can get that has this windowclass in use?

Errors popping up in the console:

Ruleset Error: windowcontrol: Database type mismatch for control (listlink) in windowclass (referencemanualarticle)
Ruleset Error: windowcontrol: Database type mismatch for control (listlink) in windowclass (referencemanualarticle)
Script Error: [string "referencemanualarticle:name"]:1: attempt to index field 'listlink' (a nil value)

My xml:


<testData>
<chapter>
<testChapter>
<name type="string">Text Chapter</name>
<section>
<testSection>
<name type="string">Test Section</name>
<article>
<testArticle1>
<listlink>
<class>referencetextwide</class>
<recordname>reference.testData</recordname>
</listlink>
<name type="string">Test Article 1</name>
</testArticle1>
<testArticle2>
<listlink>
<class>referencetextwide</class>
<recordname>reference.testData2</recordname>
</listlink>
<name type="string">Test Article 2</name>
</testArticle2>
</article>
</testSection>
</section>
</testChapter>
</chapter>
</testData>


Resire

RTFallen
June 18th, 2014, 17:11
Figured out my mistake. Forgot to add type="windowreference" to the listlink.

Thanks again for pointing me to that windowclass JPG.

Resire