Rép: "Cannot save C and Objective C pointers in script"?
Rép: "Cannot save C and Objective C pointers in script"?
- Subject: Rép: "Cannot save C and Objective C pointers in script"?
- From: Yvan KOENIG <email@hidden>
- Date: Sat, 17 Sep 2016 09:32:24 +0200
Oops, yesterdays I sent my message to Tim Nelson's mailbox.Here it is for the list
Yvan KOENIG (VALLAURIS, France) samedi 17 septembre 2016 09:32:05
Le 16 sept. 2016 à 20:18, Tim Nelson < email@hidden> a écrit :
I came up with what I though would be a more concise way to use and reuse ASOC methods: on fileManager() return (current application's NSFileManager's defaultManager()) end fileManager
on contentsOfDirectory(theDirectory) return (fileManager()'s contentsOfDirectoryAtPath:theDirectory |error|:(missing value)) as list end contentsOfDirectory
However shortly after creating this a message popped up saying "Cannot save C and Objective C pointers in script". I saved it anyway and tested it. It seems to be working just fine. Is this a fluke or am I committing a serious faux pas?
To get rid of that, I doesn't let any instruction out of a handler.
The script entry is a run block calling other handlers. This way the script has nothing - properties or Objective C pointers - to save on disk when we want to save it.
The other scheme is to re-compile the script to get rid of the same properties or pointers.
If you use BridgePlus, take care to put the required load framework in the run block.
Yvan KOENIG running El Capitan 10.11.6 in French (VALLAURIS, France) vendredi 16 septembre 2016 20:36:50
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden