+SecretSquirrel-BJC Posted May 25, 2009 Share Posted May 25, 2009 This is probably a question with an obvious answer but I would appreciate some help When I create 3 commands (say A, B, C) for an item, I cannot guarantee that the commands will be shown in the order of A, B, C It doesn't seem to matter about the name or text of the command or the order in which they are defined. Thanks Quote Link to comment
+sTeamTraen Posted May 25, 2009 Share Posted May 25, 2009 I tried moving some commands around in the Lua file and even changing the GUIDs (hex strings). At one point a change which I made did have an effect, but I was unable to reproduce it. So I presume it's considered unimportant. Matters are complicated by the fact that the command verbs are listed twice. Earwigo displays commands sorted by the command verb, and puts them in that order into the Lua file. I don't know if the compiled cartridge respects the Lua file order. If it does, then a (weak) workaround when using the Groundspeak builder would be to arrange the verbs by hand just before compiling. Quote Link to comment
+SecretSquirrel-BJC Posted May 26, 2009 Author Share Posted May 26, 2009 Thanks for the response Expected but disappointing Quote Link to comment
+SecretSquirrel-BJC Posted May 26, 2009 Author Share Posted May 26, 2009 Hi Folks using techniques discussed in http://wherigobuilder.wikispaces.com/Reverse+Engineering I discovered that I could use something called CommandsArray to order the item commands how I want itmGB.CommandsArray[4] = itmGB.Commands.zcmdAboutGame -- first on menu itmGB.CommandsArray[3] = itmGB.Commands.zcmdAboutAuthor itmGB.CommandsArray[2] = itmGB.Commands.zcmdAboutBuild itmGB.CommandsArray[1] = itmGB.Commands.zcmdAboutYou -- last on menu Quote Link to comment
+SecretSquirrel-BJC Posted May 28, 2009 Author Share Posted May 28, 2009 Funnily the emulator wanted the commands listed in reverse order so that they would show up in correct order. Whereas Oregon wants commands listed the other way. Nice that the behaviour is so consistent.(sarcasm) Quote Link to comment
matejcik Posted May 28, 2009 Share Posted May 28, 2009 i might be wrong, but ... it seems to me that the sorting from CommandsArray is only a coincidence or some kind of a side-effect. in lua, when iterating over a table the obvious way, you are never guaranteed that you will get the elements in any particular order. that said, you can easily test if you're on ppc/oregon and sort the array accordingly Quote Link to comment
+MightyReek Posted April 15, 2012 Share Posted April 15, 2012 Is there any developments on this issue, lets say for Urwigo builder? Quote Link to comment
+jonny65 Posted April 18, 2012 Share Posted April 18, 2012 We have had this theme in our german board and made some tests. We determined that different devices may have different orders. Particularly with switching commands visible/invisible its impossible to make a solid order. I these case the order changes from case to case in the same cartridge ! An idea was to give the commands a "priority" attribute. Red (Prio 1) Green (Prio 2) Blue (Prio 3) I would always have the order Red-Green-Blue @yourself : in the next version ? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.