From: <mi...@ne...> - 2007-09-28 11:56:31
|
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=20 (OSX::NSColor.colorWithDeviceRed_green_blue_alpha=20 (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 =20 (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 |