• 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: Mon, 02 Nov 2015 09:45:23 +1100

On 2 Nov 2015, at 12:59 AM, Dave <email@hidden> wrote:
>
> Yes, I was looking at it, but I’m confused how it knows the difference between self and super?

I misread you code. If you really want to do this:

-(void) initWithParam:(NSString*) theParam
{
self = [self initWithParam:theParam andAnotherParam:nil];
if (self == nil)
	return;

//  Do something

return self;
}

Then try something like:

	on initWithParam:theParam
		my initWithParam:theParam andAnotherParam:(missing value)
		-- do something
		return me
	end init

Only use continue if the method is also defined in the AS class.

But unless you have to init the subclass that way, it would be a lot simpler to do a simple alloc()'s init(), and then set the (inherited) properties of the result.

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

  • Prev by Date: Re: AppleScript-ObjC Bridge Question
  • Next by Date: EXC_BAD_ACCESS puzzle when not running as test bundle
  • Previous by thread: Re: AppleScript-ObjC Bridge Question
  • Next by thread: Another AppleScript-ObjC Bridge Question
  • Index(es):
    • Date
    • Thread