No, you can’t. There is no way to accomplish that. If that is event-based callbacks, try use delegation and/or target-action.
On Apr 7, 2014, at 18:00, jonat...@mugginsoft.com wrote: > I have a function like macro: > > #define DBDispatchMonoEvent(KLASS, NAME) \ > do { \ > [DBManagedEvent dispatchEventFromMonoSender:monoSender \ > eventArgs:monoEventArgs \ > targetClass:[KLASS class] \ > targetSelectorName: NAME]; \ > } while (NO); > > > Which is used like so: > > @interface MyObject : MyClass > @end > > @implementation MyObject > > static void managedEvent_ItemAdded(MonoObject* monoSender, MonoObject* > monoEventArgs) > { > DBDispatchMonoEvent(MyClass, @"eventSender:itemAdded:”); > } > @end > > In every case the dispatch macro targets the surrounding class. > So I would like to reduce the call site invocation to: > > static void managedEvent_ItemAdded(MonoObject* monoSender, MonoObject* > monoEventArgs) > { > DBDispatchMonoEvent(@"eventSender:itemAdded:”); > } > > Can I do this? > Is there a macro in the vein of __FILE__, __FUNCTION__ that returns the > encompassing class for any statement? > I have been unable to turn anything up. > > 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/xcvista%40me.com > > This email sent to xcvi...@me.com
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ 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