Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Switching Layouts by PopUpMenu or PopUpList


This topic is 7182 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Been searching posts to accomplish switching layouts by PopupMenu...Am I asking alot to be able to have a one-click selection, how could this not be a feature of FMP?...So does someone have an example (to download) of a function, script, script parameter whatever so that I (a person trying to understand FMP) can understand.

For clarity: Need a PopUpMenu that has the names of the layouts that the person clicks once and they are instantly brought to that layout.

This is a great forum thanks to all that take the time!

Posted

I seem to have found a way, I created one field "GoToScreenPopup" (text), a ValueList reflecting the layout names and this script:

Go to Field[...GoToScreenPopup]

Pause/Resume Script [Duration (seconds):1]

If[...GoToScreenPopup = "Home"]

Go to Layout["Home" (...)]

Set Field [...GoToScreenPopup "Home"]

Else If

Go to Layout["Home" (...)]

Set Field [...GoToScreenPopup "Home"]

and so forth till

End If

Clear [...GoToScreenPopup]

Select

And another thing I discovered was to place the field on the layout using

the exact color as the background which makes it invisible make sure the type is also the same color then you can place a button over it or above it to run the script. Result: One button push brings up PopupMenu; another click for the layout selection and it goes straight to the layout. Same as a normal PopupMenu.

Can someone tell me if there is a hidden flaw in what I created or did I find

the elusive popupmenu beast. (Ok even if I didnt let me enjoy this, its been 2 days of struggle)

Posted

Added on the first line of the script:

Clear[select;...GOtoScreen Popup]

clears popupmenu from showing previous selection plus if someone clicks on button

accidently it doesn't force them to the previous selection. Unless you want to remember the last choice for some reason, then leave out clear.

Posted

Am I asking alot to be able to have a one-click selection, how could this not be a feature of FMP?

Treat yourself with one week with KDE and the next with Gnome under linux, and you'll start to appreciate that some general guidelines for userinterfaces might be observed. Since FMInc is an daughter company of Apple where such matters is clearly defined perhaps could the ownership be playing a role:

http://developer.apple.com/documentation..._section_1.html

In essence is it an efford to make user prepared to the scope his/her actions can lead to ...and not to a guess how much damage an interface object can cause in worse case. Apple stresses in particular a...

Forgiveness

Encourage people to explore your application by building in forgiveness

Posted

Soren, thanks for your wisdom...maybe you can explain it to me someday.

A wrinkle has surfaced for this script in MacOSX (works fine in WinXP) the popupmenu has to be a popuplist and the delay should be indefinitely or the menu wont stay open, now the problem is to NOT have the user have to click enter after the selection...any thoughts?

Posted

There are examples available of using pop-ups for firing scripts and layout navigation. I've used them in several solutions in vs. 6. I haven't used either with vs. 7 yet (I use event triggers) but believe with slight modification (changing Status() to Get() etc), would perform the same.

The best example of implementing this, which is fully xplat, can be found at Nightwing Enterprises called Pop-Up Layout Menu for Navigation and it's partner demo Pop-up Script Menu. They are in fp5 format but the theory is same for 7. It involves stacking a popup menu and popup list (in specific stacking and tab order) and then testing the platform within the script and popping the correct one. This is still very important to understand in 7 also for xplat design.

I found the exercise of decyphering these demos to be one of the most valuable I've undertaken. BTW, you don't need to hard-code your layout names within your script. Check out those demos and you'll see what I mean. wink.gif

LaRetta

Posted

The best example of implementing this, which is fully xplat, can be found at Nightwing Enterprise

Cough...fully isn't quite the word!! Please note the tiny word "fixed" in following:

http://developer.apple.com/documentation...nListsWork.html

Further more it's not a popup since they....:

Contains nouns (things) or adjectives (states or attributes), but not verbs (commands); use pull-down menus for commands

From here:

http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html

--sd

This topic is 7182 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.