Author Topic: Trying to make an alert with python and objc  (Read 1548 times)

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: Trying to make an alert with python and objc
« Reply #15 on: August 18, 2012, 12:18:33 pm »

Yea,  No dice :(

2012-08-18 06:17:11.521 python[24779:707] ***
 Terminating app due to uncaught exception 'N
SInvalidArgumentException', reason: '+[UIAler
tView initWithTitle: messege: delegate: cance
lButtonTitle:]: unrecognized selector sent to
 class 0x3eb8a438'


Isnt initWithTitle an instance method and not a class method?
That selector is invalid, as you left off the "otherButtonTitles:" part. And yes, it is an instance method. You need to alloc it first and then initWithCraploadOfInformation::::: after.

The reason you run it as an app is so that springboard knows about it. I think that it needs to in order to display the gui, but idk for sure.

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 81
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: Trying to make an alert with python and objc
« Reply #16 on: August 20, 2012, 12:54:23 pm »
Ok, thanks for the tips.  I found a similar project on google-code called cocoapy.  The developer made a few example scripts to use, so I modified them to work with my version and was able to dump all the available classes of UIKit with one....wow theres alot over 1,900.  Cocoapy requires python > 2.7,  plus I think my version is easier to read and understand.  So,  after I clean up somethings I should be able to distribute it with example code.