Well, obviously it does get called, but how do you actually define in is 
AppleScript? I mean what is the equivalent of:

-(id) init
{
self = [super init];
if (self == nil)
        return nil;

[self doSomething];

return self;
}

In AppleScript?

All the Best
Dave


> On 30 Oct 2015, at 09:46, Dave <d...@looktowindward.com> wrote:
> 
> Hi,
> 
> This is a normal Objective-C type project but calls to AppleScript files as 
> per  http://appscript.sourceforge.net/asoc.html here is an example:
> 
> LTWAppleScriptHandlerOutlook.h file:
> 
> @interface LTWAppleScriptHandlerOutlook : NSObject
> {
> }
> 
> -(NSString*) testOutlook:(NSString*) theNameString;
> -(NSString*) testOutlookAgain:(NSString*) theNameString;
> 
> @end
> *****************************************************************************************************************
> LTWAppleScriptHandlerOutlook.applescript File
> 
> 
> script LTWAppleScriptHandlerOutlook
> 
> property parent : class "NSObject"
> 
> on testOutlook_(theName)
> local myString
> 
> tell application "Microsoft Outlook"
> 
> activate
> set myString to the name of window 1
> set myString to "Hello " & myString
> 
> end tell
> 
> return myString
> end testOutlook_
> 
> 
> on testOutlookAgain_(theName)
> local myString
> 
> tell application "Microsoft Outlook"
> 
> activate
> set myString to the name of window 1
> set myString to "Hello Again " & myString
> 
> end tell
> 
> return myString
> end testOutlook_
> 
> end script
> 
> 
> I can’t seem to find any other documentation on this and was wondering if 
> init would get called if I defined it, when I execute the following:
> 
> Class                                                 myOutlookTestClass;
> LTWAppleScriptHandlerOutlook*         myOutlookTest;
> 
> myOutlookTestClass = NSClassFromString(@“ LTWAppleScriptHandlerOutlook”);
> myOutlookTest = [[myOutlookTestClass alloc] init];
> 
> 
> All the Best
> Dave
> 
> 
> 
> 
> 
> _______________________________________________
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/dave%40looktowindward.com
> 
> This email sent to d...@looktowindward.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to