From: <mi...@ne...> - 2007-09-28 12:09:05
|
Oh! I have instanciate ProjectList into InterfaceBuilder and now "tmp2" =20 is printing. I can't instanciate ProjectCell, is it normal? Micha=EBl Le 28-sept.-07 =E0 14:03, Jon Baer a =E9crit : > Just a guess ... > > The class may not be in use @ all, you need to initiate + subclass it > w/ Interface Builder as well. > > - Jon > > On Sep 28, 2007, at 7:56 AM, Micha=EBl Villar wrote: > >> Hello everybody, >> >> I'm new on RubyCocoa and i have a little problem. >> >> First, what i want: >> Create an personnalized GUI for NSTableView. >> I have subclass it in ProjectList. >> The code of my ProjectList class : >> >> class ProjectList < OSX::NSTableView >> >> def ProjectList.cellClass >> return ProjectCell.oc_class >> end >> >> def initWithFrame(frame) >> super_initWithFrame(frame) >> return self >> end >> >> def awakeFromNib() >> self.setBackgroundColor >> (OSX::NSColor.colorWithDeviceRed_green_blue_alpha >> (228.0/255.0,237.0/255.0,246.0/255.0,1.0)); >> end >> end >> >> I use ProjectCell.oc_class instead of .class because it doesn't work >> (error) with it.. i don't know if there is another thing to do? >> >> The code of ProjectCell : >> >> class ProjectCell < OSX::NSCell >> =09 >> def drawInteriorWithFrame_inView(cellFrame,controlView) >> OSX::NSLog("tmp5"); >> end >> =09 >> def drawWithFrame_inView(cellFrame,controlView) >> OSX::NSLog("tmp4"); >> end >> >> def init >> OSX::NSLog("tmp2"); >> return self >> end >> =09 >> def awakeFromNib >> OSX::NSLog("tmp3"); >> end >> =09 >> def drawRect(aRect) >> OSX::NSLog("tmp1"); >> end >> end >> >> Nothing is printed to the debug logs.. >> >> Sorry for my bad english. >> >> Thanks a lot. >> >> Micha=EBl Villar >> >> ---------------------------------------------------------------------=20= >> - >> --- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |