You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One additional detail - once you've got your err object, you can turn it into an actual ObjCInstance of whatever type you want by using:
error = NSError(err)
That is - if all you have is a pointer to an ObjC instance, you can create a wrapped object using the Python constructor for the relevant class. You can then invoke methods on the ObjC instance as you would one that you had instantiated using NSError.alloc().init() or NSError.new().
It is common in Cocoa API for a method to have an “out parameter”, e.g. an
NSError **
parameter that is used to return an error when a call fails.Taking the deserialisation method in
NSJSONSerialization
for example, this methodcan be called like this in Objective-C:
And the equivalent with Rubicon-objc would be
NB:
err = None
will not work sincebyref
expects a ctypes instance, and does not automatically convertNone
to a NULL pointer.The text was updated successfully, but these errors were encountered: