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: custom hiview in NIB and Leopard



I have verified, that if I move my class registration to before I load my NIB, then I get the correct behavior.
Your assumption therefore seems correct.
Thanks,
Jesper Storm Bache


-----Original Message-----
From: carbon-dev-bounces+jsbache=email@hidden on behalf of Eric Schlegel
Sent: Thu 11/1/2007 4:54 PM
To: Chinh Nguyen
Cc: email@hidden
Subject: Re: custom hiview in NIB and Leopard
 

On Nov 1, 2007, at 9:52 AM, Chinh Nguyen wrote:

> I've got a custom hiview in a window stored in a NIB.  The custom  
> hiview is embedded in just the content hiview of the window.  I  
> HIObjectRegisterSubclass(myclassid, kHIViewClassID, ...), then load  
> the NIB.  In Tiger, my construct proc/event handler is called  
> correctly.  In Leopard, the construct proc/event handler is never  
> called.  On Tiger, I'm using Xcode 2.4.1; Xcode 3.0 on Leopard.   
> The Leopard install is a fresh install (not an upgrade).

I debugged this using a sample app that Jesper provided and it looks  
like this will happen if you're loading the nib file that specifies  
the custom class ID before you actually register that class. This  
used to work, but in Leopard we go down a different path if the class  
isn't already registered and wind up creating a generic HIObject  
rather than an instance of your class. That's a bug, and I'll fix it,  
hopefully for a Leopard software update. However, until then, I think  
you can work around this by registering your custom classes before  
loading your nib file. Please try that and let me know whether it  
works for you.

-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


 _______________________________________________
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: 
 >custom hiview in NIB and Leopard (From: Chinh Nguyen <email@hidden>)
 >Re: custom hiview in NIB and Leopard (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.