[Pythonmac-SIG] PyObjC: debugging error-less crashes?
anjiro at cc.gatech.edu
Thu Jul 24 14:43:33 CEST 2008
Ronald Oussoren wrote:
>> There was a case where I had to decorate a couple of functions with
>> @objc.accessor or I got the same kind of no-error crash. Is it the
>> same cause? Is there a way to know when I need to use that vs not?
> That depends on the method names you're using. "Regular" accessors
> ("setFoo_" and "foo") should work without an objc.accessor decorator.
The methods aren't of that form, because they're not really accessor
methods as far as I understand it. The problem only occurs when I include:
undo = self.undoManager()
If I don't add @objc.accessor to someMethod_() and someReverseMethod_()
I get the unexplained crash. Those methods *do* modify an instance
variable (directly); is that why they require the accessor decorator?
More information about the Pythonmac-SIG