My idea for a dynamic solution would have been to
• get the <object name> of the slide/panel
• get the name of the <enclosing object>
• get a list of all object names on the layout
• parse out the list of names contained within <enclosing object>
• determine the position of <object name> in that list
• go to the object whose name precedes or follows <object name>
which failed me because I found no way to name the entire tab oder slide control – i.e. <enclosing object> – as opposed to individual tabs or slides.
Just the other say I read a Wikipedia article about HyperCard/HyperTalk, which I never used in the day. FM could take some pages (or would that be cards) from the things that platform was capable of doing dynamically at runtime …
erolst But how do you get the object name of a slide/panel when you are clicking a button that is contained within it?
I tried this but couldn't find a way.
You could do GetLayoutObjectAttribute ( [buttonname] ; "enclosingObject" ), however you'd have to define the button name.
Get ( ActiveLayoutObjectName ) doesn't seem to work get the the name of the button that was pressed, so you'd have to define the button name in each instance. You couldn't just use "PrevButton" and "NextButton" because once you copy the buttons, the copies become "PrevButton copy" and "NextButton copy" so you'd have to update the script in each of those instances. With the method I've used, you can copy and paste the button bar without having to change it, but the drawback is that you have to make sure the panels/slides are named properly.
If there's something I'm missing, I'm all ears...
Meanwhile, I'm voting up this idea: Sliders with optional navigation arrows
(BTW: I should mention, for those who need to worry about copyright and all that, that I attached the file in the previous message with the intent of sharing it for others to use, so please go ahead and use it if you find it useful!)
I think your objections are all valid, but I didn't even get far enough to notice them as such …
One thing I could think of is to test a list of object names against "isFrontPanel". So the order wouldn't matter if you can get the position dynamically, but you'd still have to maintain the list proper.