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

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

Recommended Posts

Posted

This is my attempt at a script extending the "ipad/iphone aware" script hosted at filemakers website. 

http://help.filemaker.com/app/answers/detail/a_id/8079 )

***It requires that one uses the convention LayoutName_Ipad, LayoutName_Iphone, with the pc/mac layouts not having the "_" suffix. Of course the convention can be changed. 
Also the fm website triggers the script with the FirstWindowOpen. I am not sure why they've elected this. Surely the check should be performed at every layout, and then the user is taken to the iphone/ipad counterpart.**

If [ PatternCount ( Get ( ApplicationVersion ) ; "Go_iPad" ) = 1 ]

Go to Layout [ If( Right( Get(LayoutName); 4) = "Ipad"; Get(LayoutName); Get(LayoutName) & "_Ipad") ]

Else If [ PatternCount ( Get ( ApplicationVersion ) ; "Go" ) = 1 ]

Go to Layout [ If( Right( Get(LayoutName); 6) = "Iphone"; Get(LayoutName); Get(LayoutName) & "_Iphone") 

]

Else

Go to Layout [ Get(LayoutName) & "_Ipad" ]

End If

Exit Script [ ]

Posted

Presumably, once you're on the starting layout optimized for a given device, the navigation available to a user could only take them to other layouts also optimized for the same device — thus only the OnFirstWindowOpen trigger is needed if the design of the solution accommodates that approach. This is particularly handy if the interfaces for different devices are different enough that some layouts for one device don't have an equivalent for the other. iPhone interfaces usually have more layouts than iPad interfaces with equivalent functionality, in my experience.

  • Like 1
Posted

Presumably, once you're on the starting layout optimized for a given device, the navigation available to a user could only take them to other layouts also optimized for the same device — thus only the OnFirstWindowOpen trigger is needed if the design of the solution accommodates that approach.

Is there a straightfoward way to do that? I suppose this is the better solution, instead of opting to check the layout. Would you need additional scripting to do so?

 

This is particularly handy if the interfaces for different devices are different enough that some layouts for one device don't have an equivalent for the other.

 

It's a much neater approach, albeit how simple is it to implement?

 

 

iPhone interfaces usually have more layouts than iPad interfaces with equivalent functionality, in my experience.

 

For sure. Well, if one were to use the afforementioned approach in the expanded script, one could add an _1_, _2_, _n_ etc. after the layout name and before the _idevice suffix (are layout names case sensitive, btw?)

 

Anyway, I 'd love to hear how others are going about with scripting the idevices into the layouts.

This topic is 4042 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.