Re: Web scripting key does not work
aglee <[email protected]> Thu, 21 Oct 2010 15:33:55 +0000 (GMT)
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
By the way, apologies if my replies are showing up without the proper quote levels. Something about MobileMe's web mail seems to be blowing them away even though they appear with properly nested quote levels in the editor. --Andy On Oct 21, 2010, at 11:31 AM, aglee <[email protected]> wrote: On Oct 21, 2010, at 06:11 AM, Christiaan Hofman <cmhofman@gmailcom> wrote: On Oct 21, 2010, at 5:36, Andy Lee wrote: > I noticed in the CallJS example there is a comment that says the getter and setter are not called. I was going to mention that in my testing they *were* called, at least judging by the NSLogs. But maybe I was misreading the logs, since you say scripting does indeed go through the ivars. > > Anyway, glad you at least got to the bottom of it. > > --Andy That comment is definitely wrong, it does seem to go through valueForKey: and setValue:forKey:, the accessors are indeed used, also in the CallJS sample as you can see in the logs. Perhaps it was not in an earlier OS version, this sample seems to be somewhat older. I see the example code is dated March 2007 [1]. I don't remember when key-value coding was introduced, but most of today's NSKeyValueCoding methods are documented as available since 10.3 [2], which was released months later, in October 2007 [3]. And of course @property was long after that. Probably not worth the few minutes of research, but sometimes I get curious about these things. --Andy [1] <http://developer.apple.com/library/mac/#samplecode/CallJS/Introduction/Intro.html> [2] <http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/Reference/Reference.html> [3] <http://en.wikipedia.org/wiki/Mac_OS_X_Panther> _______________________________________________ MacOSX-dev mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-dev