 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jun 26, 2010 1:28 am
[321B] Problem with pre-3.21 static db records. |
I have some db record variables that hold flag definitons. Now, when I open the editor and view the variables, they get converted to string lists then they get recoverted to database records. The problem with that is that now the key is index into the list, and the value is the old key.
This problem didn't exist in 3.20 or previous releases. Variables have been around for more than a year now and their contents haven't changed. |
|
_________________ Sic itur ad astra. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Jun 26, 2010 2:18 am |
As always, I need to see the exact XML of the variables that are not working in 3.21. Please run a previous version and post the XML that is generated by the previous version so that I can try to reproduce this.
My guess is that the variables are marked as Auto instead of properly marked as "Record" types. |
|
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jun 26, 2010 3:23 am |
OK, here is the 320B version of the variable:
| Code: |
<var name="ufDefs" type="Record" id="50">
<value>isHasDual=512|isHoldingSpecialPortal=16|isDefaultUser=8|isWeaponsMaster=32|isSetWimpy=2048|isMarried=256|isTrackMoons=64|isHasAmulet=2|isHasPortalSlot=1|isLockMapEnabled=1024|isUseHyperExits=128|isPortalsAreEnabled=4</value>
<json>{"isHasDual":512,"isHoldingSpecialPortal":16,"isDefaultUser":8,"isWeaponsMaster":32,"isSetWimpy":2048,"isMarried":256,"isTrackMoons":64,"isHasAmulet":2,"isHasPortalSlot":1,"isLockMapEnabled":1024,"isUseHyperExits":128,"isPortalsAreEnabled":4}</json>
</var>
|
This variable displays correctly in the editor (vartype of Database record) and performs as expected.
I have now re-installed 3.21 and the variable is also correct.
| Code: |
<var name="ufDefs" type="Record" id="50">
<value>isHasDual=512|isHoldingSpecialPortal=16|isDefaultUser=8|isWeaponsMaster=32|isSetWimpy=2048|isMarried=256|isTrackMoons=64|isHasAmulet=2|isHasPortalSlot=1|isLockMapEnabled=1024|isUseHyperExits=128|isPortalsAreEnabled=4</value>
<json>{"isHasDual":512,"isHoldingSpecialPortal":16,"isDefaultUser":8,"isWeaponsMaster":32,"isSetWimpy":2048,"isMarried":256,"isTrackMoons":64,"isHasAmulet":2,"isHasPortalSlot":1,"isLockMapEnabled":1024,"isUseHyperExits":128,"isPortalsAreEnabled":4}</json>
</var>
|
However, after switching tabs, from Data Record to XML to JSON and then back to Data Record
the view is now blank, so is the JSON view. However, the XML view is still correct. But essentially the data is gone. |
|
_________________ Sic itur ad astra. |
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jun 26, 2010 3:37 am |
NOTE: The problem is worse than I thought. If I click on other variables in the editor, values get copied to other variables. So there is probably nothingwrong with the variable I posted above, but it is a general editor problem.
After reloading the variable. I went to another variable (an expanded string), when I came back to the variable in question, the
Data Record tab had been replace with a Text tab. I then changed the variable type to Auto Type and it displayed correctly again.
To reproduce the problem one must click on the JSON tab first, change to a setting which has a different variable type and
then return to the original setting. Now the setting has the characteristics of the last variable viewed. The key is that the JSON
tab must be clicked in the sequence. By selecting Auto Type the variable is restored to its true type. Sometimes, the value of
the last viewed setting gets copied to the current setting. From what I can see the problem is in the tab operation. Whatever tab on
clicks on last, it gets carried to the next setting one views. So if one clicks on Data Record and moves on to a Text
variable, the string variable gets treated as a data record. |
|
_________________ Sic itur ad astra. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sun Jun 27, 2010 3:36 pm |
Could somebody else also help with reproducing this and post a clear procedure for it?
|
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Jun 27, 2010 4:09 pm |
I just tried this and it worked just fine for me.
|
|
_________________ Asati di tempari! |
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Mon Jun 28, 2010 12:50 am |
It fails for me.
To get it to fail, I do this:
I go to a setting which is a Data Record.
I switch to the JSON tab.
I then select a setting which is a TEXT.
I switch back and forth between the db record setting and the database record.
Eventually you will see the Data Record tab has been replaced by the Text tab.
If you select the that Text tab the db record will be displayed as a string.
This may or may not cause the setting to become corrupted. I haven't figured out how to consistently make it do so.
I just did it before this post so I know it is not my imagination. |
|
_________________ Sic itur ad astra. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 29, 2010 4:32 pm |
OK, I finally was able to reproduce this. Seems to work find with AutoType settings, but not with settings that have the type "String (literal)" or "String (expanded)".
Here is the specific steps that I used:
1) Open CMUD, close Sessions, open Settings Editor and paste this XML into the Tree View:
| Code: |
<window name="untitled">
<uid>{189D4896-7EAC-4B2B-A43D-3D30FD973F19}</uid>
<packages>untitled</packages>
<var name="ufDefs" type="Record" id="1">
<value>isHasDual=512|isHoldingSpecialPortal=16|isDefaultUser=8|isWeaponsMaster=32|isSetWimpy=2048|isMarried=256|isTrackMoons=64|isHasAmulet=2|isHasPortalSlot=1|isLockMapEnabled=1024|isUseHyperExits=128|isPortalsAreEnabled=4</value>
<json>{"isHasDual":512,"isHoldingSpecialPortal":16,"isDefaultUser":8,"isWeaponsMaster":32,"isSetWimpy":2048,"isMarried":256,"isTrackMoons":64,"isHasAmulet":2,"isHasPortalSlot":1,"isLockMapEnabled":1024,"isUseHyperExits":128,"isPortalsAreEnabled":4}</json>
</var>
<var name="abc" type="String" id="2">this is text</var>
</window> |
2) Now click on the "ufDefs" setting in the tree view on the left
3) Click the JSON tab
4) Now click the "abc" variable in the tree view on the left.
Notice that the first tab that *should* say "Text" still says "Data Record".
Added to bug list. |
|
|
|
 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|