Jump to content
Server Maintenance This Week. ×

Iphone layout wrongly appear in runtime


fode

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

Recommended Posts

HI,

I have deselected all the ipad and iphone layout under "Manage layout", then make a runtime of the sample invoices.fmp12, however when I open the runtime version, I can see the layout has changed to customer | iphone and when I change the layout to product, after click on the product button, the layout again change to product | iphone ???

Is it something that I missed or it is a bug ?

Link to comment
Share on other sites

I have also tried to delete all the lpad and iphone related layouts, and redo the "runtime" version again, the layout has changed to "startup screen" even though the startup screen layout was not selected ?

Additional problem with the same sample program invoices.fmp12, in runtime, the "Layout Selector" not working too.

Please help.

Link to comment
Share on other sites

Once you deselect a layout in Manage Layouts you still can navigate to it.

You'll need to detect the circumstances (runtime / iphone / ipad / hosted / web) in your script and then depending on the result go to the appropriate layout, using the 'If / Else If / Else' script steps.

HTH

Link to comment
Share on other sites

I must clarify that with the source, it is working perfectly, the problem only comes when I convert it into a runtime mode. I believe it is a BUG that FM support need to look into urgently.

I have tried to use the if / Else and still not good, anyone has converted into runtime program can share the solution ? [Henk, thanks for your response and suggestion]

I thought FM 12 with the additional ios/ipad/iphone stuff is great, however, it should not take away the current simplicity or increase the work load of users to convert into runtime program.

Link to comment
Share on other sites

In this file, when I assign the script "Trigger | On First Window Open" (Inside the script, it already has the If/Else selection) to the layout "startup screen", then use Developer Utilities to create a runtime version, I just got a blank screen and the "command" icon appear, that I was meant by not good. 

test4.zip

Link to comment
Share on other sites

Your OnFirstWindowOpen Script is set to the script "Trigger | On First Window"

The start layout is set to "Startup Screen"

The OnLayoutEnter Trigger of that layout is also set to "Trigger | On First Window Open"

So if your file opens this script is already triggered twice.

Then the script goes to another layout and on line 5 you do: Go To Layout [original Layout], which is "Startup Screen", then the same script is triggered again and then subsequently triggered by line 5. Thus an infinite loop is going on which keeps you on the layout and the evaluation of the platform is never happening.

 

Correct this situation and then look at the problem again.

Link to comment
Share on other sites

OK, I have removed the script "Trigger | On First Window Open" from the event OnLayoutEnter in the "Startup Screen" layout. i.e. it is back to the default/original setting except that I have added some sample records into the "customer", "product", and "invoice" tables. Previously, I did not set/add "OnFirstWindowOpen" with the script "Trigger | On First Window", I guess it is a default setting as I cannot see this "OnFirstWindowOpen" script under manage script.

 

Anyway, now is back to the error I encountered the first time, the first layout goto "customer | iphone" instead of "customer", AND, when using the "layout selector" button e.g. select product, the layout will goto "products | iphone" in runtime mode.

 

 

test4.zip

Link to comment
Share on other sites

Line 9 of your opening script is:

 

Else If [PatternCount ( Get ( ApplicationVersion ) ; "Pro" )]

 

This should be:

 

Else If [PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) or PatternCount ( Get ( ApplicationVersion ) ; "Runtime" )]

 
 
Probably the same thing with your other issue. These things are easy to see when you use Script Debugging.
Link to comment
Share on other sites

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