D/Objective-C 64bit

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Nov 17 05:27:10 PST 2014


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:
>
> 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


More information about the Digitalmars-d-announce mailing list