Page 1 of 1
gonextfield
Posted: Thu Jan 07, 2016 4:50 pm
by marksmithhfx
I've got some extra time available and thought I would use some of it revisiting some old livecode stacks. I notice in one that I have used the construct "gonextfield" extensively throughout the stack, like hundreds of times. I was curious about this and looked it up but could find no reference to anything like it. There is a "go" command which can be combined with elements like "next" and "card (for "go next card") but nowhere could I fund it all strung together. Does it actually do anything? (ie. gonextfield) or is it just sitting there as another example of an unused LC container?
I know I am rusty. Interesting what fresh eyes can allow you to see.
Thanks
Re: gonextfield
Posted: Thu Jan 07, 2016 5:05 pm
by FourthWorld
That's a custom command. If it's not throwing a "handler not found error", it's defined somewhere in your scripts.
You might try selecting it and choosing "Lookup Definition" from the right-click menu. If it's not found it may be in a backscript or behavior or library loaded later on, so you can use a breakpoint in the debugger to trace it out.
Re: gonextfield
Posted: Thu Jan 07, 2016 8:22 pm
by dunbarx
Hi.
Also, run "Find and Replace..." from the edit menu. But as Richard says, if it is a backScript or other esoteric location outside of all open stack files, that utility will not find it.
Craig Newman
Re: gonextfield
Posted: Thu Jan 07, 2016 11:15 pm
by marksmithhfx
You were correct; it was defined in a behavior script. Of course it was hopelessly naive (something about adding 1 to me and going to that field number) which would fail most of the time, and is probably not even necessary anyway. I've started removing it and seeing how LC handles moving from field to field under various conditions: a long term experiment.
Mark
Re: gonextfield
Posted: Fri Jan 08, 2016 1:26 am
by dunbarx
Good.
How did you find it?
Craig