Card won't advance on mobile

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Card won't advance on mobile

Post by SteveTX » Thu Jul 04, 2013 12:55 pm

This problem doesn't exist on desktop, it only happens when I compile for mobile.

I have one stack and two cards. card 1 is "splash", card 2 is "application". It opens correctly on card 1 "splash", but doesn't proceed from there on mobile, but works just fine on the IDE. Is there something needed to destroy cards for mobile?

Mainstack:

Code: Select all

on preOpenStack
   if the environment = "mobile" then
     mobileSetAllowedOrientations "portrait,landscape left,landscape right"
     mobileHideStatusBar
   end if
   set the alwaysBuffer of this stack to false
end preOpenStack

on openStack
   revFontLoad "Roboto-Regular.ttf"
   revFontLoad "Roboto-Condensed.ttf"
   revFontLoad "Roboto-BoldCondensed.ttf"
end openStack
card 1: "splash"

Code: Select all

on openCard
   send gotoapp to me in 2 seconds
end openCard

command gotoapp
   go card "application"
end gotoapp

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Card won't advance on mobile

Post by Klaus » Thu Jul 04, 2013 1:05 pm

Hi Steve,

a quick look into the dictionary showed me that "revFontLoad" is only supported on Mac and Windows! 8-)
So your "openstack" script will stop at that point when encountering that command!

On mobile you only need to add the font files in the standalone builder "Copy files..." tab, and they will
load and be available on iOs.

More info here: http://lessons.runrev.com/s/lessons/m/4 ... nts-on-ios


Best

Klaus

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Card won't advance on mobile

Post by SteveTX » Thu Jul 04, 2013 7:23 pm

Klaus, your suggestion worked. Thanks again!

I already had the copy files, I didn't know it would halt though for trying revFontLoad in a mobile env.

Code: Select all

on openStack
   if the environment <> "mobile" then
      revFontLoad "Roboto-Regular.ttf"
      revFontLoad "Roboto-Condensed.ttf"
      revFontLoad "Roboto-BoldCondensed.ttf"
   end if
end openStack

Post Reply