Re: [Pyobjc-dev] NSNumber doesn't seem to have a proxy for booleans
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-04-14 07:39:06
|
On 13 Apr, 2009, at 23:20, Paul Thomas wrote: > I have a category on NSNumber that I'm using and I can't access it > from Python when the NSNumber holds a bool because I get a builtin > bool rather than a proxy. > > for example: > >>>> type( NSNumber.numberWithInt_(1) ) > <class 'objc._pythonify.OC_PythonInt'> >>>> type( NSNumber.numberWithBool_(1) ) > <type 'bool'> > > What gives? Is this intentional? Any idea how to work around it? This is intentional. The proxy automaticly translates the Cocoa boolean singletons to the Python boolean singletons and vice versa. Ronald > > Paul. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |