• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa Apple Script Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa Apple Script Problem


  • Subject: Cocoa Apple Script Problem
  • From: John Nairn <email@hidden>
  • Date: Fri, 19 Dec 2008 10:11:19 -0800

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa Apple Script Problem
      • From: <email@hidden>
  • Prev by Date: Re: [Q] How to let the pasteboard know a file type?
  • Next by Date: Re: Is NSKeyedArchiver portable / reliable?
  • Previous by thread: Re: Is NSKeyedArchiver portable / reliable?
  • Next by thread: Re: Cocoa Apple Script Problem
  • Index(es):
    • Date
    • Thread