FROM : cocoa-dev
DATE : Fri Nov 05 22:40:31 2004
On Nov 5, 2004, at 2:32PM, Shaun Wexler wrote:
> On Nov 5, 2004, at 12:07 PM, Matt Gillette wrote:
>
>> I know this is nitpicking, but you should use the class method to
>> prevent misspelling and it gives quick notification if the class
>> changed names.
>>
>> [window isKindOfClass:[NSDrawerWindow class]]
>
> Your "quick notification" will be when your app crashes when it fails
> to link against AppKit.
>
>> On Nov 5, 2004, at 10:17 AM, Shaun Wexler wrote:
>>> [window isKindOfClass:NSClassFromString(@"NSDrawerWindow")]
>
> NSDrawerWindow is a private AppKit class, which requires access to its
> header, or your own declaration of an interface. Using
> NSClassFromString() will not break if the private class does not
> exist, returning Nil, whereas it would crash if you had directly
> linked against it.
What about recursing through [[window parentWindow] drawers] and seeing
if any of the drawers match the window? You should be able to compare
their content views if nothing else.
-Frank
------------------------------------
Frank M. Midgley
<email_removed>
http://homepage.mac.com/knarf/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (<email_removed>)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev 1657ankeen.com
This email sent to <email_removed>
DATE : Fri Nov 05 22:40:31 2004
On Nov 5, 2004, at 2:32PM, Shaun Wexler wrote:
> On Nov 5, 2004, at 12:07 PM, Matt Gillette wrote:
>
>> I know this is nitpicking, but you should use the class method to
>> prevent misspelling and it gives quick notification if the class
>> changed names.
>>
>> [window isKindOfClass:[NSDrawerWindow class]]
>
> Your "quick notification" will be when your app crashes when it fails
> to link against AppKit.
>
>> On Nov 5, 2004, at 10:17 AM, Shaun Wexler wrote:
>>> [window isKindOfClass:NSClassFromString(@"NSDrawerWindow")]
>
> NSDrawerWindow is a private AppKit class, which requires access to its
> header, or your own declaration of an interface. Using
> NSClassFromString() will not break if the private class does not
> exist, returning Nil, whereas it would crash if you had directly
> linked against it.
What about recursing through [[window parentWindow] drawers] and seeing
if any of the drawers match the window? You should be able to compare
their content views if nothing else.
-Frank
------------------------------------
Frank M. Midgley
<email_removed>
http://homepage.mac.com/knarf/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (<email_removed>)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev 1657ankeen.com
This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Tim Conkling | Nov 5, 09:36 | |
| ??? a.k.a. James C… | Nov 5, 15:16 | |
| Shaun Wexler | Nov 5, 19:17 | |
| Matt Gillette | Nov 5, 21:07 | |
| Shaun Wexler | Nov 5, 21:32 | |
| cocoa-dev | Nov 5, 22:40 | |
| Frank Midgley | Nov 5, 22:40 |






Cocoa mail archive

