On 2014-11-16 12:16, Christian Schneider wrote:
I am just stumbling over adding class objects to an array:

I get an error when trying to add class objects to an NSArray because
e.g. NSString.class does not conform to ObjcObject. There is some
functions in the API that require arrays of class objects, e.g. in

NSPasteboard pb = NSPasteboard.generalPasteboard() ;
NSArray classes = NSArray.arrayWithObjects(NSString.class,
NSAttributedString.class, null) ;
NSString pbItem = cast(NSString)
pb.readObjectsForClasses_options(classes, null).lastObject() ;

Do you get a compile time error or runtime error?

/Jacob Carlborg

Reply via email to