iOS Control Instantiation problem

Chris Sheffield cmsheffield at me.com
Mon Apr 9 10:28:18 EDT 2012


Console is located in /Applications/Utilities.  You can also debug this way when running your app on a device. Simply open Xcode, and under your connected device, click the Console icon. Note that the Console application is used when you're running in the simulator, and the Console in Xcode is used when running your app on a physical device. Sometimes I get confused and wonder why I'm not seeing output in one or the other. :-)

Chris


On Apr 9, 2012, at 8:12 AM, Graham Samuel wrote:

> Sorry for the waste of bandwidth - I found it in the end: it's all to do with undetected errors in the code. In one case I had a badly formed statement that compiled without problems - I had put 'to' instead of 'into' - so the rest of the handler was skipped; in another case I had called iPhoneControlSet with a bad parameter, which again caused the script to stop executing.
> 
> I find this kind of debugging tough: I am using very clunky debugging methods because I have not yet understood the following (from the LC iOS Release Notes):
> 
>> There is, however, a simple means of logging from an emulated target device. The LiveCode command form:
>> 
>> put string
>> 
>> Will write the string out to the standard error stream. These messages will be visible in Console.app when running in the simulator, and in the Console tab of the Xcode Organizer for a given target device while it is connected to the host computer.
> 
> All these tests have just been with the 5.1 iPhone simulator, and I haven't yet found the Console app. Can anyone help me?
> 
> Graham
> 
> I wrote:
> 
>> I'm trying to create some native iOS controls as part of a series of experiments, using the iPhone form factor. Among other things, I'm trying to create a scroller.  I seem to have fallen at the first fence. Within a preOpenCard handler for the first and only card in the stack, I use this bit of script which I got from an LC example ('Mobile Scroller Example') which works fine in the 5.1 iPhone simulator on my setup:
>> 
>> if the environment is not "mobile" then
>>     exit preOpenCard
>>  end if
>>     iphoneControlCreate "scroller"
>>     put the result into theScID
>> 
>> after this of course come a lot of iPhoneControlSet statements.
>> 
>> The ONLY difference that I can see between the example that works and mine is that I have invented a new name for my scroller ID. Both examples appear to have the same iOS standalone parameters, both compile apparently error-free and the Simulator launches each one quite happily. Nevertheless, I can show that in my case the ID is empty and that there's no sign of the native control appearing on the card. I tried it with a native text control too (iPhoneControlCreate "input") - same result. The control never appears and the ID is empty.
> 
> _______________________________________________
> 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





More information about the use-livecode mailing list