Re: Strange property behavior

2008-09-15 Thread atebits
> This seems, to me, to be a bug in the compiler (I can easily reproduce > it on the desktop). Please file a report at > . Yep, it's a bug all right. A report has been filed. Loren ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Strange property behavior

2008-09-15 Thread Clark Cox
On Mon, Sep 15, 2008 at 9:37 AM, Loren Brichter <[EMAIL PROTECTED]> wrote: > I'm no fan of these newfangled Objective-C 2.0 features that you > whippersnappers seem so excited about (call me old fashioned), but I'm > giving properties a shot, especially now that I'm working on some > stuff for [RED

Re: Strange property behavior

2008-09-15 Thread dreamcat7
Hmm, Here is the assembly i think we can take a guess why NSString *n = [[o someMethod] someProperty]; 0x5d42 <+0550> mov-0x28(%ebp),%edx 0x5d45 <+0553> lea0x56a8(%ebx),%eax 0x5d4b <+0559> mov(%eax),%eax 0x5d4d <+0561> mov%eax,0x4(%esp) 0x5d5

Re: Strange property behavior

2008-09-15 Thread atebits
Yes, at this line: NSString *n = [o someMethod].someProperty; the -someMethod method body is literally executed twice (control isn't handed back to the calling function until after the second "return self;". - (MyTestClass *)someMethod { NSLog(@"someMethod called"); return self; }

Strange property behavior

2008-09-15 Thread Loren Brichter
I'm no fan of these newfangled Objective-C 2.0 features that you whippersnappers seem so excited about (call me old fashioned), but I'm giving properties a shot, especially now that I'm working on some stuff for [REDACTED]. I've notice something strange with properties that I hope someone can clea