revMobile: built in?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
revMobile: built in?
I keep reading references to revMobile and was expecting to see it in the plugins list, but it is not there. Is revMobile built in?
For example, reading the iOS notes I see a reference to an iOS text field and all of its properties. Can I simply set and get those properties on a "normal" text field or do I need to use a revMobile control? I figure I am missing a file somewhere. I have the commercial version of Livecode, but I did not see it in the Community version either.
Thanks in advance,
Dale
For example, reading the iOS notes I see a reference to an iOS text field and all of its properties. Can I simply set and get those properties on a "normal" text field or do I need to use a revMobile control? I figure I am missing a file somewhere. I have the commercial version of Livecode, but I did not see it in the Community version either.
Thanks in advance,
Dale
Re: revMobile: built in?
Hi Dale,
yes, "mobile" is built-in
But no, the "mobile" properties and commands are only available in the simulator or the actual device!
You will even need to check if you are on "mobile" or the IDE will throw an error on these commands!
Like this:
Best
Klaus
yes, "mobile" is built-in

But no, the "mobile" properties and commands are only available in the simulator or the actual device!
You will even need to check if you are on "mobile" or the IDE will throw an error on these commands!

Like this:
Code: Select all
on opencard
## Do "general" opencard stuff here...
## Mobile only stuff here:
if the environment = "mobile" then
moblecontrolcreate...
### more mobile stuff...
end if
end opencard
Klaus
Re: revMobile: built in?
Thanks Klaus, that really helps. So I guess it would be best to place normal controls on the screen, and then in code use those controls' properties to help you set the properties of the mobile controls you are creating on the fly then. Hmmmm....
Re: revMobile: built in?
Hi Dale,
After using mobileControlCreate you use mobileControlSet, one of the properties that you set is the controls rectangle. You can use an object on the card (such as an image or rectangle) as a place holder while in the IDE then;
mobileControlSet "myControl","rect", the rect of image "myPlaceHolderImage"
You wont have the functionality to test the control in the IDE but you'll know it's shape and where it is. Heck it's only a field or browser or such.
hmmm... I have never tried using an input field For the IDE then setting the mobile control to that fields rect.
Simon
After using mobileControlCreate you use mobileControlSet, one of the properties that you set is the controls rectangle. You can use an object on the card (such as an image or rectangle) as a place holder while in the IDE then;
mobileControlSet "myControl","rect", the rect of image "myPlaceHolderImage"
You wont have the functionality to test the control in the IDE but you'll know it's shape and where it is. Heck it's only a field or browser or such.
hmmm... I have never tried using an input field For the IDE then setting the mobile control to that fields rect.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: revMobile: built in?
It didn't work and I am now trying to figure out how to debug something that does not exist in the IDE but only does on the simulator or device ... :^/
Re: revMobile: built in?
What does "Didn't work" mean?
Here is the lesson;
http://lessons.runrev.com/s/lessons/m/4 ... -on-mobile
It is a very complex stack, the part you need is group together in the "on inputCreate" some of that you won't need.
Simon
Here is the lesson;
http://lessons.runrev.com/s/lessons/m/4 ... -on-mobile
It is a very complex stack, the part you need is group together in the "on inputCreate" some of that you won't need.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: revMobile: built in?
The code in that stack breaks. As soon as you load it, it dumps you into the debugger.
By "doesn't work" I meant the field did not appear.
So I started simpler still. I created a new stack with a Create button and a field placeholder (a graphic so I would know where the rectangle would be). I put "answer" code in everywhere and I found out that when an error trips, all scripts in the simulator stop executing (i.e. no error message). So I dug further into the code and found the error (which the compiler/save does not catch). After a few minutes more I have a stack with radio buttons to change the keyboard, etc. and have exercised all the options. So now I need to go back to the original code and see where my fat fingers made the mistake. The main thing is that I know the concept works and that I have all the mobile libraries I need (i.e. my install is not broken).
Long story short: I used answer to debug on the simulator to see where the code stops running. Somewhere between the last successful answer and your first unsuccessful one is where the error lies.
Regards,
Dale
By "doesn't work" I meant the field did not appear.
So I started simpler still. I created a new stack with a Create button and a field placeholder (a graphic so I would know where the rectangle would be). I put "answer" code in everywhere and I found out that when an error trips, all scripts in the simulator stop executing (i.e. no error message). So I dug further into the code and found the error (which the compiler/save does not catch). After a few minutes more I have a stack with radio buttons to change the keyboard, etc. and have exercised all the options. So now I need to go back to the original code and see where my fat fingers made the mistake. The main thing is that I know the concept works and that I have all the mobile libraries I need (i.e. my install is not broken).
Long story short: I used answer to debug on the simulator to see where the code stops running. Somewhere between the last successful answer and your first unsuccessful one is where the error lies.

Regards,
Dale