Thread: XML sorting issue
-
April 26th, 2006, 01:36 #1
- Join Date
- Apr 2006
- Location
- Portland, OR
- Posts
- 91
XML sorting issue
Anyone know why this code is sorting my spells?
Code:<windowclass name="spelllist"> <datasource name="spells" /> <frame name="referencebox" /> <dynamic resize="vertical" /> <defaultsize width="640" height="550" /> <minimize icon="minimized_reference" /> <tooltip field="description" /> <sheetdata> <windowopencontrol> <icon normal="button_dragtarget" /> <bounds rect="25,20,20,20" /> <class name="spelllist" /> <description field="description" /> </windowopencontrol> <stringcontrol name="description"> <bounds rect="50,20,-25,20" /> </stringcontrol> <windowlist class="spellsmall"> <bounds rect="35,48,-20,-22" /> <nestdata /> </windowlist> <scroller> <bounds rect="-63,-45,45,27" /> <target name="list" /> <button normal="button_scroller" pressed="button_scroller_down" /> </scroller> </sheetdata> </windowclass>
-
April 26th, 2006, 10:12 #2
I doubt this has anything to do with the sorting but the scroller is not linked to the windowlist. The windowlist needs a name as below:
Code:<windowlist class="spellsmall" name="list" > <bounds rect="35,48,-20,-22" /> <nestdata /> </windowlist> <scroller> <bounds rect="-63,-45,45,27" /> <target name="list" /> <button normal="button_scroller" pressed="button_scroller_down" /> </scroller>
-
April 26th, 2006, 14:45 #3
- Join Date
- Apr 2006
- Location
- Portland, OR
- Posts
- 91
Originally Posted by Toadwart
Since it referances spellsmall could something there be sorting it?
Code:<windowclass name="spellsmall"> <datasource name="spell" /> <defaultsize width="600" height="20" /> <sheetdata> <windowopencontrol name="open"> <icon normal="button_openwindow" pressed="button_emptytarget" /> <bounds rect="8,0,24,24" /> <class name="spelldesc" /> <description field="name" /> </windowopencontrol> <stringcontrol name="name"> <bounds rect="50,2,300,17" /> <font name="chatfont" /> <link handler="open" /> </stringcontrol> <stringcontrol name="shortdescription"> <bounds rect="200,2,360,17" /> <font name="chatfont" /> </stringcontrol> </sheetdata> </windowclass>
Last edited by Ganadai; April 26th, 2006 at 15:06.
-
April 28th, 2006, 00:33 #4
Unless there is some default sorting thet FG is applying I can't see why that code would be sorting your spells.
What field is it sorting by? Name? Description?
-
April 28th, 2006, 02:02 #5
I beleive the reason everything is getting sorted for you is this:
The xml that is parsed is parsed based on alphabetical order, based on the order of the letters in each node that the window class is referenced to. You can see this clearly when you are looking at encounters in the db.xml files. Even though each "node" has a unique identifier, the parser will sort in ascending alphabetical order. (I.E. 1, 10, 11, 12... 2, 20, 21 etc.)
It can be a pain in the arse sometimes, but if you do not want to have your list sorted in descending order, then you can try and add something to the title to make it so it does not sort.
Hope that helps,
SandemanUltimate Licence holder
I've had FG for so LONG I DON'T KNOW HOW TO USE IT!
But I'm learning!
-
April 28th, 2006, 06:16 #6
- Join Date
- Apr 2006
- Location
- Portland, OR
- Posts
- 91
Originally Posted by Toadwart
-
April 28th, 2006, 06:17 #7
- Join Date
- Apr 2006
- Location
- Portland, OR
- Posts
- 91
Originally Posted by kalmarjan
Anyways, thank you, that worked. I just changed the node names to 01, 02, 03, 04...Last edited by Ganadai; April 28th, 2006 at 06:21.
-
April 28th, 2006, 06:32 #8
I am always glad to help... <err> get my post count up! (Legitimately, that is!)
Sandeman
BTW, that will work until you get to 100, then the silly issue will start all over again. I wonder if there is a way to put the xml tag <sort="descending" /> ?Ultimate Licence holder
I've had FG for so LONG I DON'T KNOW HOW TO USE IT!
But I'm learning!
-
April 28th, 2006, 16:02 #9
- Join Date
- Apr 2006
- Location
- Portland, OR
- Posts
- 91
Originally Posted by kalmarjan
<sort="none" />
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks