bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bugs #8404] when using asubclass of NSButton in gorm, initWithFrame


From: Gregory John Casamento
Subject: Re: [bugs #8404] when using asubclass of NSButton in gorm, initWithFrame in the subclass is not called
Date: Thu, 1 Apr 2004 11:57:23 -0800 (PST)

Rob,

You need to override the "cellClass" method in your subclass so that the button
will initialize itself correctly.  This, I believe, is the accepted way of
doing this.

We should check current docs to make sure of this, the docs you have, from what
you told me, are somewhat dated.

Also, if this works as Markus is describing on MOSX, it should likely stay the
way it is.

GJC
 
--- Rob Burns <address@hidden> wrote:
> On 2004-04-01 14:18:41 +0700 Markus Hitter <address@hidden> wrote:
> 
> > 
> > Am 01.04.2004 um 04:29 schrieb anonymous:
> > 
> >> Summary:  when using asubclass of NSButton in gorm, initWithFrame in 
> >> the 
> >> subclass is not called
> > 
> > This is correct behaviour because an archived button is already 
> > initialised. 
> > Use -awakeFromNib instead. This matches behaviour in OS X as well.
> > 
> 
> I've changed the code to use awakeFromNib for initialization. The 
> docs, however say that initWithFrame is the designated initializer for 
> NSButton subclasses. I don't know if that has any bearing on this. The 
> remaining problem is setting the Cell to a custom subclass of 
> NSButtonCell. I've implemented +(void) initialize and +(void) 
> cellClass: to do this, but neither one of these methods has any 
> effect. Are you supposed to be able to set the cell class from within 
> IB/Gorm? I don't have a mac here to test with.
> 
> Thanks
> Rob
> 
> > 
> > Markus
> > 
> > - - - - - - - - - - - - - - - - - - -
> > Dipl. Ing. Markus Hitter
> > http://www.jump-ing.de/
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Bug-gnustep mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-gnustep
> > 
> > 
> 
> 


=====
Gregory John Casamento -- CEO/President Open Logic Corp.

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]