on 2008-05-05 6:55 PM, J. Todd Slack at [EMAIL PROTECTED] wrote: > Does anyone have an example of how to put Obj-C (like an NSStatusItem) > in with C?
When you implement a function outside of an Objective-C class, but you want the function to have access to things that are inside the class, you can pass the class object into the function as a parameter. When you call the function from inside the class, you pass 'self' in the parameter. 'Self' is just a pointer, after all; you might have to type it as void* in the function parameter. I name the parameter 'self' in my code, so that the function feels like it's a method implemented inside the class, but you could name it anything. -- Bill Cheeseman - [EMAIL PROTECTED] Quechee Software, Quechee, Vermont, USA www.quecheesoftware.com PreFab Software - www.prefabsoftware.com _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
