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: kHIViewWindowContentID kind not in headers?




On Jan 19, 2006, at 1:24 AM, Tomas Zahradnicky wrote:

I guess the question is, why do you need to know exactly what four- character constant is contained in kHIViewWindowContentID?

My app creates some object hierarchy for the entire window and there's a function that takes HIViewRef and recursively traverses everything that HIViewRef embeds. When it finds a new HIViewRef, it looks at its kind and calls appropriate construction function and there's one needed for content view as well.


----------------------------------------
This method gives appl/cnvw as well:

        HIViewFindByID( HIViewGetRoot(HIViewGetWindow(hiView)),
                        kHIViewWindowContentID,
                        &contentViewRef );

err = HIViewGetKind( contentViewRef, &contentViewKind );

How about this method?

ControlKind contentViewKind = kHIViewWindowContentID;
// contentViewKind is set to appl/cnvw

I have tried this method but kHIViewWindowContentID is ControlID wind/1 so I had to use HIViewFindByID and then HIViewGetKind.

Oh, right, I'm getting ControlKinds mixed up with ControlIDs. At any rate, that does give you another option; instead of depending on the content view's ControlKind, you could look at its ControlID insead.


-eric


_______________________________________________ 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: 
 >kHIViewWindowContentID kind not in headers? (From: Tomas Zahradnicky <email@hidden>)
 >Re: kHIViewWindowContentID kind not in headers? (From: Eric Schlegel <email@hidden>)
 >Re: kHIViewWindowContentID kind not in headers? (From: Tomas Zahradnicky <email@hidden>)
 >Re: kHIViewWindowContentID kind not in headers? (From: Eric Schlegel <email@hidden>)
 >Re: kHIViewWindowContentID kind not in headers? (From: Tomas Zahradnicky <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.