Mailing Lists: Apple Mailing Lists

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

IB Palette loading problem



Hi John,

It's a bit counter intuitive. But take the following line out:

[self associateObject:_customControl ofType:IBViewPboardType
withView:repImage];

You also don't have to init and alloc _customControl

In IB for the palette view.  (Given that you are associating it to a
IBViewPboardType I am going to assume PSMTabBarControlPalette is a view of
some sort.)  Simply drag a NSCustomView onto the palette and then go to the
class inspector (command-5) and change the class to your
PSMTabBarControlPalette class.  It should then be a light blue square with "
PSMTabBarControlPalette" written on it. Since it's a view it should have a
drawRect: and it will draws itself once loaded into IB.

If you are confused the best is to learn by example, take a look at
bMoviePalette in Developer/Examples/InterfaceBuilder and look closely at the
SoundFileWell, that is what your trying to achieve with your view.

P.S. Apple has a fear of name-space collisions so avoid using their naming
convention of declaring private variables with an underscore
"_customControl".

Regards,
Conor Dearden
www.bruji.com


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

This email sent to 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.