Design Pattern
Design Pattern
- Subject: Design Pattern
- From: Kevin Bracey <email@hidden>
- Date: Thu, 29 Mar 2007 21:20:16 +1200
Hi All,
I'm wanting to implement a global singular object and I'm wondering
if this is the best way to do it? I haven't used the + thing and I'm
not sure if this has any benefit over just calling [[NSApp delegate]
sharedStatus] directly.
+( UWApplicationStatus *)sharedStatus;
{
if( [[NSApp delegate] sharedStatus] == nil )
{
UWApplicationStatus *holdMe;
holdMe = [[UWApplicationStatus alloc] init];
[[NSApp delegate] setSharedStatus:holdMe];
}
return [[NSApp delegate] sharedStatus];
}
Cheers
Kevin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden