I'm trying to create a preprocessor macro to simplify a bit of code that I'm continually using. The code just creates a dictionary and then posts a notification. Like so:
NSDictionary* dict = [NSDictionary dictionaryWithObject:@"This is a test"
forKey:@"debugMessage"];
[[NSNotificationCenter defaultCenter] postNotificationName:@"FLRDebugViewLog"
object:self
userInfo:dict];
I'd love to create a macro so that I could just type:
MBDebug(@"This is a test",self);
i.e. just passing in the message and object I want to post. How would I accomplish this?