On Mar 14, 2012, at 1:12 AM, Andreas Grosam wrote:
> The more OO like approach is to create corresponding sub subclasses for class
> "Transport", e.g. AirTransport, GroundTransport, and possibly a factory class
> which creates such instances.
Yup. I’ve learned over time that “switch(something-
On Mar 9, 2012, at 1:29 AM, Prime Coderama wrote:
> I have references to 'ground' and 'air' in multiple files. It is usually used
> in this context, but not always.
>> if ([transport.type isEqualToString:@"ground"]) {
>>// do something for automobiles
>> }
>> else if ([transport.type isEq
I just do a #define in the header like
#define kDictionayKey1 @"key1"
#define kDictionaryKey2 @"key2"
then use it somewhere in the .m file
foo = [myDic objectForKey:kDictionaryKey1];
and so on...
On Mar 8, 2012, at 6:29 PM, Prime Coderama wrote:
> I have references to 'ground' and 'air' in mu
On Mar 8, 2012, at 4:29 PM, Prime Coderama wrote:
> I have references to 'ground' and 'air' in multiple files. It is usually used
> in this context, but not always.
>> if ([transport.type isEqualToString:@"ground"]) {
>>// do something for automobiles
>> }
>> else if ([transport.type isEq
I have references to 'ground' and 'air' in multiple files. It is usually used
in this context, but not always.
> if ([transport.type isEqualToString:@"ground"]) {
> // do something for automobiles
> }
> else if ([transport.type isEqualToString:@"air"]) {
> // do something else for pl