Re: me and my do not refer to your script's class
Re: me and my do not refer to your script's class
- Subject: Re: me and my do not refer to your script's class
- From: Shane Stanley <email@hidden>
- Date: Sun, 26 Dec 2010 17:22:19 +1100
- Thread-topic: me and my do not refer to your script's class
On 26/12/10 1:57 PM, "Dave" <email@hidden> wrote:
> The following causes nothing to happen, not even a log message. It's as though
> Applescript is treating it as a call to a run handler (which would explain the
> silence) instead of an Objective-C method invoke.
>
>> performSelector_withObject_afterDelay_("ReProbe:", missing value, 5)
It works fine here -- I wonder if the problem is in the handler you're
calling. This is what I'm using:
on ReProbe_(whatever)
log "ReProbe:"
end ReProbe_
> The following lines all print out: <Test2AppDelegate @0x2005fabe0: OSAID(5)>
>
> on applicationWillFinishLaunching_(aNotification)
>
> log me
> log |description|()
> log me's |description|()
>
> But the following lines print: Test2AppDelegate
>
> on applicationWillFinishLaunching_(aNotification)
>
> log current application's class "Test2AppDelegate"
> log current application's class "Test2AppDelegate"'s |description|()
>
> And "me" tests not equal to the longer expression, so these can't be the same
> objects.
They aren't the same: the first is the app delegate object, which is an
instance of the class, while the second is the class itself. Generally, you
want to call methods on an instance of a class rather than the class itself.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden