Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HIToolbars without a standard event handler



On 11/10/05 1:18 PM, Tomas Franzén didst favor us with:

> On Nov 10, 2005, at 18:57, Laurence Harris wrote:
>> You still aren't being very specific. Is this your window or the
>> application's? If it's yours, why would it matter that you're a
>> plug-in? If
>> you're adding a toolbar to a window created by the application,
>> that kind of
>> makes me cringe. I seem to recall having to make some subtle
>> changes to my
>> window code when I added toolbars, changes you won't be able to
>> accommodate
>> in your plug-in.
> 
> The window is created by the application, so it's not "mine". Don't
> cringe! :-)

Too late. LOL

> Installing a standard window handler makes the toolbar work, but the
> refreshing of the window's content (which the app handles internally)
> stops working. I suppose the app uses the old event system (the
> WaitForEvent stuff).

In general you should expect installing the standard handler to require
changes to the code that manages a window, for more reasons that just visual
issues.

> I'm not trying to do some fancy stuff here, only the equivalent of
> what the standard handler would do. I used my own handler for
> handling dragging proxy icons, and it worked good.

That's nice, but what I was saying is that there can be subtle issues that
need to be addressed when you add a toolbar to window, and not all of them
can be addressed in event handlers, even if you can figure out all the
handlers you install and what to do in them. There aren't a lot of these
issues, and you might not encounter any of them depending on how the main
application works, but then again you might. ;-)
> 
> A few specific questions:
> 1. What kind of events should I catch? I tried kEventControlClick,
> but that didn't do it. (maybe I did it incorrectly)
> 2. Should I register the event for the window or for the toolbar
> itself somehow, or for something else?
> 3. What should the event handler do? I suppose HandleControlClick
> might be in the right direction?

I use the standard handler on all my windows these days, so I can't help you
with any of this. I think Eric Schlegel will be the final authority on this
one. ;-)

Larry

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: HIToolbars without a standard event handler (From: Tomas Franzén <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.