[Pythonmac-SIG] NSUserDefaults still causing crash on MOSXI
Zachery Bir
zbir at urbanape.com
Fri Apr 7 04:44:04 CEST 2006
Still getting this with Mac OS X Intel, using Ronald's new 2.4.3
Universal Python and Bob's recent py2app work (pulled in with trunk
of PyObjC).
It will now at least get NSUserDefaults.SharedDefaults(), but dies
trying to get the persistent domain. I've uploaded a new
TestUserDefaults.zip to my site:
<http://www.urbanape.com/downloads/TestUserDefaults.zip>
The only thing different from before is the illegal instruction comes
a bit later:
from objc import YES, NO, selector
from PyObjCTools import NibClassBuilder, AppHelper
from Foundation import *
from AppKit import *
NibClassBuilder.extractClasses(u'MainMenu')
class TestUserDefaultsAppDelegate(NibClassBuilder.AutoBaseClass):
def awakeFromNib(self):
self.output.setStringValue_(u'Success!')
def init(self):
self = super(TestUserDefaultsAppDelegate, self).init()
self.bundleIdent = NSBundle.mainBundle().bundleIdentifier()
NSUserDefaults.resetStandardUserDefaults()
self.sud = NSUserDefaults.standardUserDefaults()
pdomain = self.sud.persistentDomainForName_(self.bundleIdent)
return self
AppHelper.runEventLoop(argv=[])
Thanks,
Zac
More information about the Pythonmac-SIG
mailing list