on 2005-08-05 5:07 PM, Guy English at email@hidden wrote:
> When I examine the class of the KBPerson
> I've returning it's a NSKVONotifying_KBPerson. I'd hate to think that
> the KVO stuff is scewing up the mapping to my AppleScript class.
> Surely that's something that has come up before.
I haven't found that to be a problem. The only area where problems arise
that I've noticed is when using keyPath instead of fetch. The Core Data
documentation is pretty clear that keyPath can give you a fault instead of
an object in various circumstances, and it seems clear to me that faults
fail in AppleScript because they don't implement -objectSpecifier and other
required things. So I try to use fetch or direct object access instead of
keyPaths when AppleScript is involved. I surely don't have all the details
straight yet.
> You mention a few conventions and rules. Using 'id' and 'ID ', 'name'
> and 'pnam'. Some of that seems cultural ( 'id' in favour of 'uniqueID'
> ) and some seems like it should be documented ( 'pnam' ). I've looked
> through a fair amount of AppleScript docs recently and haven't seen
> this stuff. Is there someplace I can look to find a) conventions
> AppleScripters expect and b) littles rules like the 'pnam' that can
> bite me?
Using 'ID ' and 'pnam' as four-char codes is not a convention or
"cultural" recommendation, but a Cocoa AppleScript requirement. It is
definitely mentioned somewhere in the documentation, but I can't point you
to it. I think using 'id' instead of 'uniqueID' as the name of the ID
property exposed in your dictionary may be cultural, but culture is VERY
important in AppleScript.
The documentation has gotten a lot better, but there are still gaps. As has
been the case with AppleScript throughout the 10 or 12 years I've been at
it, it is a "trial and error" language. Just keep trying. Once you feel
you've got the hang of some part of it, please write up and publish your
findings -- and revise them as soon as your readers tell you what you got
wrong. The rest of us will benefit! In the long run, I've found that the
effort that AppleScript requires pays off.
I'll be publishing my AppleScript Core Data sample code somewhere before too
long. Stay tuned.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden