I get errors during start up of the cartridge and I want do some debuging. I tried to use the PRINT command and looked at the file CONSOLE.LOG but found nothing.
How could I debug a cartridge for the iPhone? Any ideas?
Best regards
Dirk (Charlenni)
Page 1 of 1
How to debug cartridges for the iPhone
#2
Posted 28 February 2012 - 09:36 AM
It has been a while since I tried using the print command on an iPhone. The last time I tried, I thought it popped up message boxes.
As an alternative, I'd suggest making gratuitous use of message boxes. You can concatenate any variable's value that can be converted to a string.
As an alternative, I'd suggest making gratuitous use of message boxes. You can concatenate any variable's value that can be converted to a string.
#3
Posted 24 August 2012 - 07:43 AM
I have not tried this, but at this link:
http://wherigobuilde.../Wherigo+(Class)
There is a section about halfway down for LogMessage with types. I wonder if that would work instead of print()
http://wherigobuilde.../Wherigo+(Class)
There is a section about halfway down for LogMessage with types. I wonder if that would work instead of print()
charlenni, on 28 February 2012 - 07:42 AM, said:
I get errors during start up of the cartridge and I want do some debuging. I tried to use the PRINT command and looked at the file CONSOLE.LOG but found nothing.
How could I debug a cartridge for the iPhone? Any ideas?
Best regards
Dirk (Charlenni)
How could I debug a cartridge for the iPhone? Any ideas?
Best regards
Dirk (Charlenni)
#4
Posted 24 August 2012 - 07:44 AM
Whoops, looks like you have to create an account, anyways here is the text:
LogMessage(table)
LogMessage(text, level)
Allows messages to be added to the cartridge play log at one of the defined log levels. Parameters are the actual text and an optional log level at which the text is displayed. If level is not specified it defaults to LOGCARTRIDGE. There are two possible calling conventions: as individual parameters or as a table parameter with named values.
Examples:
Wherigo.LogMessage({Text="Enter Zone"})
Wherigo.LogMessage({Text="missing item", Level=Wherigo.LOGERROR})
Wherigo.LogMessage("Zone activated", Wherigo.LOGINFO)
Wherigo.LogMessage("no zone")
LogMessage(table)
LogMessage(text, level)
Allows messages to be added to the cartridge play log at one of the defined log levels. Parameters are the actual text and an optional log level at which the text is displayed. If level is not specified it defaults to LOGCARTRIDGE. There are two possible calling conventions: as individual parameters or as a table parameter with named values.
Examples:
Wherigo.LogMessage({Text="Enter Zone"})
Wherigo.LogMessage({Text="missing item", Level=Wherigo.LOGERROR})
Wherigo.LogMessage("Zone activated", Wherigo.LOGINFO)
Wherigo.LogMessage("no zone")
bretina, on 24 August 2012 - 07:43 AM, said:
I have not tried this, but at this link:
http://wherigobuilde.../Wherigo+(Class)
There is a section about halfway down for LogMessage with types. I wonder if that would work instead of print()
http://wherigobuilde.../Wherigo+(Class)
There is a section about halfway down for LogMessage with types. I wonder if that would work instead of print()
charlenni, on 28 February 2012 - 07:42 AM, said:
I get errors during start up of the cartridge and I want do some debuging. I tried to use the PRINT command and looked at the file CONSOLE.LOG but found nothing.
How could I debug a cartridge for the iPhone? Any ideas?
Best regards
Dirk (Charlenni)
How could I debug a cartridge for the iPhone? Any ideas?
Best regards
Dirk (Charlenni)
#5
Posted 02 September 2012 - 12:36 PM
That's a good idea. The problem is, that the iPhone player didn't write logfiles. And there goes the information from LogMessage().
#6
Posted 10 September 2012 - 10:31 AM
Ranger Fox, on 28 February 2012 - 09:36 AM, said:
It has been a while since I tried using the print command on an iPhone. The last time I tried, I thought it popped up message boxes.
As an alternative, I'd suggest making gratuitous use of message boxes. You can concatenate any variable's value that can be converted to a string.
As an alternative, I'd suggest making gratuitous use of message boxes. You can concatenate any variable's value that can be converted to a string.
Had some print()'s in my latest cartridge. Worked fine in emulator (showed up nicely in the log tab) but when it got to my iPhone it threw error messages saying something about print() not being implemented yet (or not supported, I forget).
Either way, your suggestion to use MessageBox instead is a good one. I was using print as an alternative that would not get rid of other windows (or be removed itself) but doesn't look very feasable 'in the field'.
Share this topic:
Page 1 of 1

Help








