PDA

View Full Version : Stringfield does not work like previous version.



Oberoten
October 4th, 2020, 07:20
When putting down a stringfield in a ruleset based on CoreRPG you can write in it if you click it but it does not use a default value if one is provided.

This does not show up.



<stringfield name="Label1">
<bounds>52,51,27,20</bounds>
<center />
<static text="Show My Label" />
<font>sheetlabel</font>
</stringfield>


whereas a stringcontrol work straight of. This of course makes some trouble when updating older rulesets to FGU.



<stringcontrol name="Label1">
<bounds>52,51,27,20</bounds>
<center />
<static textres="charsheet_main_Label1_LabelCaption" />
<font>sheetlabel</font>
</stringcontrol>

Moon Wizard
October 4th, 2020, 07:40
That should work looking at the code. Do you have a simple extension that exhibits this issue I can test?

Thanks,
JPG

Oberoten
October 4th, 2020, 08:05
That should work looking at the code. Do you have a simple extension that exhibits this issue I can test?

Thanks,
JPG

It has certainly been confusing. Especialy updating some of my older rulesets. (Turns out I use a LOT of Stringfields and then get mostly blank charactersheets)

https://www.dropbox.com/s/loj4eqiicc8jvgt/WH4e.ext?dl=0 <--- Mini Extension to show of missbehaviour.

- Obe

Moon Wizard
October 4th, 2020, 18:10
Ah, I see what is happening.

In FGU, I see that I had updated the static tag to not be used for fields that are database-linked. This is because these fields would be overwritten every time the window is opened in the database, instead of storing any data changes between sessions. It creates a problematic situation in usage, so I disabled "static" for database-linked stringfields to keep this from being done inadvertently. Static will only work for stringcontrols right now.

Changing any stringfield using a static tag to stringcontrol will actually speed up your window creation times, since they no longer need to create and manage database links.

Regards,
JPG

Oberoten
October 4th, 2020, 19:27
Okay, good practice to do it this way. Some extra work finding all the static ones but I guess that notepadd++ should fix that for me quick enough.
Will also tell the author of the ruleset wizard since it affects his product.
- Obe