Re: Size limit on Xcode projects?
Re: Size limit on Xcode projects?
- Subject: Re: Size limit on Xcode projects?
- From: Shane Stanley <email@hidden>
- Date: Tue, 27 Nov 2012 21:02:36 +1100
On 27/11/2012, at 7:06 PM, Brian Christmas <email@hidden> wrote:
> You were right, I've tried to build an ObjC project out of my applescript, and quickly ran out of room. Nasty results!
>
> I can split the script into two quite easily, but even after reading your book, I'm not sure about the following..
>
> What initializing code do I need to add to the second script? It will be purely a collection of handlers that the main script needs to access.
You can just put them in a separate script file.
>
> 1. How do I go about calling the handlers?
Let's say the second class file is called Misc.applescript. You can call its handlers as class methods like this:
set x to current application's Misc's doSomething_(y)
You have to follow the Cocoa naming convention of one underscore per argument, and you have to coerce the values at each end. So if doSomething takes a string, it would usually need to start:
on doSomething_(y)
set y to y as text
...
And if the value returned is a string you need to coerce x to a string, like:
set x to current application's Misc's doSomething_(y) as text
> 2. How doI pass parameters to the second script?
See above.
>
> 3. I've been though your book twice, and I think page 183 is what I need, but can't understand how to progress.
More like pages 181-182. And chapter 7 covers how to create the second class file in some detail.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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