|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Oct 15, 2007 1:29 pm
[2.06] Unsorted Record Variables |
It looks like the problem is mostly in the GUI for the Package Editor. Once it occurs, then an edit made in the GUI will cause the associations to be broken. I think I may have trashed pretty much all of my record variables before I caught this.
Procedure
1. Launch CMud
2. Closes Sessions Window (ESC)
3. Enter "#ADDKEY BadSort {Ba=ba|Go=go|Hu=hu|Ex=ex|Fa=fa|Al=al|Ig=ig|Ca=ca|Da=da};#SORT BadSort 0;#SHOW @BadSort" at the command line without the quotes
You will note the variable displays with all information correct
4. Open Package Editor (CTRL-G)
You will see that the display for the variable is all wrong. The values are sorted but the order of the keys has changed. If you make any changes to the variable it will save with the values mixed up, don't do that yet though.
Checking the sort box in the editor will correct the display at this point. So it would seem that the problem is only that the display of a record variable does not position the values correctly when unsorted. Leave the check box off for the moment though.
5. Change the variable type to AutoType in the Editor, then click Save Changes
6. Click on the untitled window, then back on BadSort
You will now see that all the values have shifted around. If you use "#SHOW @BadSort" in the command line and compare the Editor display with the result there you will see that the Editor is displaying everything wrong. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 15, 2007 11:09 pm |
Yuck, thanks for the report on this. Looks like something is still wrong with the caching of the hash table. I knew this hash table stuff was going to be a pain. Anyway, it's on the bug list.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Oct 16, 2007 1:20 am |
I don't think it is a problem with the caching. When you look at it after step 4, you will see the keys are in the cached order, but all the values display in the sorted order. I think it is just something wacky with the GUI. I never quite managed to make a variable that would have sorting off right from the start to see if it makes a difference.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Oct 16, 2007 7:47 pm |
Yeah, but the UI is doing something really simple. For each row (I) it is displaying %dbkey(i) for the key, and %dbvalue(i) for the value (using internal functions of course...it isn't really calling zscript). So if the keys and values don't match, then it's a pretty big problem.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Oct 20, 2007 3:24 pm |
I am still seeing this with my record variables in 2.07
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 22, 2007 7:34 pm |
Yep, this is still on the bug list. I was hoping that some of the fixed to string lists and database variables in 2.07 would help with this, but I still confirm the problem.
|
|
|
|
|
|