Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Switching Layouts by PopUpMenu or PopUpList

Featured Replies

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!

If you want to go directly to the layout with a click in a pop-up menu I'm quite sure you need a plug in, for an example Dacons menucontrol.

If you are up to one click more, there are certainly solutions to do it by your own....

  • Author

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)

  • Author

If someone could explain how to make this global so it can be applied on any layout that would make this even better.

  • Author

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.

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

  • Author

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?

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

  • Author

Thanks for the info LaRetta. I'm checking it out.

fastest...

Try this little demo. I've posted this before but it sounds like it may be what you're looking for. It's for FM7 only

EventDriven_v3.zip

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.