Groundspeak Forums: How to debug cartridges for the iPhone - Groundspeak Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to debug cartridges for the iPhone

#1 User is offline   charlenni 

  • Charlenni
  • Group: +Premium Members
  • Posts: 108
  • Joined: 21-October 07

Posted 28 February 2012 - 07:42 AM

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)

#2 User is offline   Ranger Fox 

  • Wherigo Illuminati
  • Group: Moderators
  • Posts: 1847
  • Joined: 05-April 06

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.

#3 User is offline   bretina 

  • wherigo.bretina.net
  • Group: +Premium Members
  • Posts: 63
  • Joined: 14-May 09

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()


View Postcharlenni, 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)


#4 User is offline   bretina 

  • wherigo.bretina.net
  • Group: +Premium Members
  • Posts: 63
  • Joined: 14-May 09

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")


View Postbretina, 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()


View Postcharlenni, 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)



#5 User is offline   charlenni 

  • Charlenni
  • Group: +Premium Members
  • Posts: 108
  • Joined: 21-October 07

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 User is offline   bretina 

  • wherigo.bretina.net
  • Group: +Premium Members
  • Posts: 63
  • Joined: 14-May 09

Posted 10 September 2012 - 10:31 AM

View PostRanger 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.


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
  • You cannot start a new topic
  • You cannot reply to this topic