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?



Hi Eric,

I'm using HIViewGetKind function to find out the kind of various HIViews and noticed that kHIViewWindowContentID's kind 'cnvw' is not in the headers.

The intention is that you just use the constant "kHIViewWindowContentID", and don't use the actual four-char code. In theory, that would let us change the four-char code if necessary. In practice, that's virtually impossible, because apps probably hardcode the four-char code at times. We'd still discourage doing that, though.

If I understand it properly, I'm supposed to use kHIViewWindowContentID and find 'cnvw' from it dynamically.



If I use the following method I get appl/upan:

    GetRootControl( GetControlOwner( hiView ), &rootControl );
    err = GetControlData( rootControl,
                          kControlEntireControl,
                          kControlKindTag,
                          sizeof(ControlKind),
                          &ck,
                          &size);

SIZE IS SET TO NONSENSE. BUG!
---------------------------------------
This method gives appl/cnvw:

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

    err = GetControlData( contentViewRef,
                          kControlEntireControl,
                          kControlKindTag,
                          sizeof(ControlKind),
                          &ck,
                          &size);

SIZE IS SET TO 8. OK!
----------------------------------------
This method gives appl/cnvw as well:

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

  err = HIViewGetKind( contentViewRef, &contentViewKind );
----------------------------------------

Thanks,

  Tomas
--
# Ing. Tomas Zahradnicky, Jr.
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
_______________________________________________
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>)



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.