> Of course, I can't use this code in a normal C function because there are
> references to "self" and the selector thing doesn't look like it's compatible 
> to
> C. So I could just subclass AVPlayerItem and voila, everything's fine.
I forgot to say that as long as your c function is in a .m file you can create 
and manipulate Obj-C objects freely.

void testNsObjectInCfunc() {
    NSString *q = @"Am I alive";
}

Self is just a pointer to an object so within your c Functions you can cast it 
to the right type and call methods etc at will.
Obj-C methods are C functions that receive self as a parameter.

Note that using the CF objects is generally more of a challenge than using 
NSObject objects.

Jonathan
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to