objc.ivar.[double, integer, etc] undocumented?

Issue #145 resolved
Nick Devenish
created an issue


Trying to understand binding of variables, I came across the CurrencyConvBinding example, which explicitly instantiates a double variable:

import objc
from Foundation import NSObject

class Converter (NSObject):
    exchangeRate = objc.ivar.double()
    dollarsToConvert = objc.ivar.double()

However, the only reference I can find in the documentation is the section on objc.ivar() in http://pythonhosted.org/pyobjc/api/module-objc.html#types. Is this behaviour/the defaults documented anywhere other than the example?

Comments (4)

  1. Ronald Oussoren repo owner

    Good catch. This isn't documented at the moment.

    This works for all basic C types, as well as for C structures exposed by framework wrappers (that is, objc.ivar.NSRect works once you import Foundation).

    I'll add proper documentation for this.

  2. Log in to comment