I have implemented the required methods to support creating an object in Apple Script, but it does not work as advertised.

This does work as expected

        tell front document
                make new family at end
                tell last family
                        set properties to {husband:"@I5@"}
                end tell
        end tell

This creates the object but does NOT set the properties

        tell front document
                make new family at end with properties {husband:"@I5@"}
        end tell

The family objects are tied to key-value methods using <key> = famRecords in my suite and the method getting called by both these make commands is

- (void)insertInFamRecords:(id)object

where object is the correct FAMRecord type. If "set properties to" works on an existing object, shouldn't it work when creating a new one? Do have to manuul find a way to override the make command?

Curiously this method of form insertIn<Key>Records: is not even mentioned in the "Key-Value Coding and Cocoa Scripting" section of the "Cocoa Scripting Guide." I had to find it by an error message in the Console before it was present.

---------------
John Nairn
GEDitCOM - Genealogy Software for the Macintosh
http://www.geditcom.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to