nagyistoce / legonxtremote

Automatically exported from code.google.com/p/legonxtremote
Other
0 stars 0 forks source link

sharedInstance #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
it would be cool if you could have a shared instance of the NXT object, that 
way you can call it 
directly, something like 

static NXT *sharedNXT;

+(NXT *) sharedInstance
{
    if(sharedNXT == nil)
        sharedNXT = [[NXT alloc] init];
    return sharedNXT;
}

then you would just call [NXT sharedInstance].

Original issue reported on code.google.com by CAlva...@gmail.com on 15 Feb 2009 at 12:22