MacOSlib - ObjC error?

Hi all,

I just downloaded the latest MacOSlib, double-clicked on macoslib.rbvcp, and hit run. It starts compiling and then throws a wobble:


#if TargetCocoa
declare sub setAnimationBehavior lib CocoaLib selector “setAnimationBehavior:” (obj_id as Ptr, behavior as NSWindowAnimationBehavior)

setAnimationBehavior self, value     // <- ObjC error

#pragma unused value

End Set[/code]

Any idea where I’m going wrong?



What is the error?

Are you by chance running Snow Leopard?

Yes, I am.

It is marked in the code: “ObjC error”

Yes, I understand, but what is the ObjC error?

That’s the problem; setAnimationBehavior: wasn’t added until 10.7. I’ve created an issue for this at Issues · macoslib/macoslib · GitHub .

It should be an ObjCException with the message being something about the object not responding to the selector setAnimationBehavior:.

I have fixed the problem in the current macoslib version.

Thanks Charles.