Re: How does Cocoa implement delegate/callback?
Re: How does Cocoa implement delegate/callback?
- Subject: Re: How does Cocoa implement delegate/callback?
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 15 Nov 2002 13:43:50 -0500
on 02-11-15 1:08 PM, matt neuburg at email@hidden wrote:
>
The answer turns out to be the contextInfo. By packaging up the relevant info
>
into a dictionary in A-1 and handing this (retained!) as the contextinfo to
>
NSApp beginSheet, I am then able to unpackage it in A-3. Then A-3 can call the
>
right method in B and communicate to it the result of the sheet (i.e. what the
>
user did there). Thus, from B's point of view, it feels just like the two
>
methods involved are the first and last stages of NSApp beginSheet (the call
>
to beginSheet and the callback after the sheet ends).
I understand the contextInfo stuff, and I am using it more or less as you
describe.
But I'm curious to know how you're getting A to call a method in B?
Distributed objects? Apple events?
I'm using yet a third technique. A is an "assistive" app using the new
accessibility API to communicate with B's user interface elements.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.