Trapping for iOS errors?

Mike Kerner MikeKerner at roadrunner.com
Sat Nov 9 22:52:53 CET 2013


by the way, John, once you put debugging code in your scripts, the easiest
way to watch is to either go into the simulator and in the debug menu open
the system log, or have your device connected to your computer, then go
into xcode, and from the window menu pick "Organizer", then for the device
you have connected, look at the console.


On Sat, Nov 9, 2013 at 4:44 PM, Mike Kerner <MikeKerner at roadrunner.com>wrote:

> That is correct.  It's a PITA, and I reminded Kevin about it a couple of
> weeks ago.
>
> The easiest way to debug ios LC apps at this time is to use PUT statements
> in your code.  That will put messages on the console.
>
> You can either have a debug mode that you check for the puts, or you can
> put #debug after the line so that you can find it and comment it out later
> when you want to go live.
>
> In my experience, about half of my total lines in an iOS app (these are
> apps that I have been working on for a year, so the amount of debugging
> grows) tend to be related to debugging on one level or another, because if
> it's not one thing that I'm tracking down, it's another, so I just comment
> out the debugging lines.
>
>
> so, either set a global or custom property for debugging, e.g.
> on preOpenStack
>    global debugMode
>    put true into debug mode # or false if we don't want to debug
>    if debugMode then put "debug mode"
> .
> .
> .
> end preOpenStack
>
> on mouseUp
>    global debugMode
>    if debugMode then put "in mouseUp for x"
> end mouseUp
>
>
>
> or, if you don't want to use a custom property or global,
>
> on mouseUp
>    put "in mouseUp for x" #debug
> end mouseUp
>
> and then you have to go through and comment out your debug lines later.
>
>
> On Sat, Nov 9, 2013 at 12:13 PM, JOHN PATTEN <johnpatten at me.com> wrote:
>
>> Hi All…
>>
>> From what i can tell, when you script a LiveCode app and the script is
>> not written correctly, the resulting iOS application will just “do nothing”
>> when an event attempts to drive that script. iOS just gracefully ignores
>> the code.
>>
>> For example, in iOS something like:
>>
>> on mouseUp
>> answe “helllo”
>> end mouseUP
>>
>> The resulting iOS app just, essentially ignores this. Is there any way to
>> catch the iOS error flag and then act on that error?
>>
>> Thank you!
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list