• 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
Re: AppleScript-ObjC Bridge Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-ObjC Bridge Question


  • Subject: Re: AppleScript-ObjC Bridge Question
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 30 Oct 2015 11:07:54 +1100

On 30 Oct 2015, at 1:14 AM, Dave <email@hidden> wrote:
>
> Using the AppleScript-ObjC bridge is it possible to define an init method in the .applescript file and have it called like a normal Cocoa init?

Sure. If you create a document-based ASObjC project, you'll see an example:

	on init()
		continue init()

		-- Add your subclass-specific initialization here.
		-- If an error occurs here, return missing value.

		return me
	end init


> Is it possible to use different init methods, e.g.
>
> -(id) initWithParameterDictionary:(NSDictionary*) theParameterDictionary;

Yes, as long as the parameters are objects and not primitive types.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


_______________________________________________

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: AppleScript-ObjC Bridge Question
      • From: Dave <email@hidden>
References: 
 >AppleScript-ObjC Bridge Question (From: Dave <email@hidden>)

  • Prev by Date: Re: Presenting NSWindowController/NSWindow Pair as a Sheet?
  • Next by Date: Hiding tab bar causes web content in pushed view to slide down
  • Previous by thread: AppleScript-ObjC Bridge Question
  • Next by thread: Re: AppleScript-ObjC Bridge Question
  • Index(es):
    • Date
    • Thread