[Pyobjc-dev] addToolTipRect has memory problem
Brought to you by:
ronaldoussoren
From: <bo...@pa...> - 2003-03-02 01:53:48
|
adding this line into TableModel2 produces weird tool tips, and eventually a sigbus error: def tableView_objectValueForTableColumn_row_( self, aTableView, aTableColumn, rowIndex): + tag = aTableView.addToolTipRect_owner_userData_(aTableView.rectOfRow_(rowIndex ), "tool tip", 1234) print "tableView:objectValueForTableColumn:row: called" return "{%s, %d}"%(aTableColumn.identifier(), rowIndex) changing it to: + tag = aTableView.addToolTipRect_owner_userData_(aTableView.rectOfRow_(rowIndex ), self, 1234) works (and produces a nice <PyModel > message), but add a description() method works even better: def description(self): return NSString.stringWithString_("tool tip") arent literal strings in a constant pool? or do they have to be retained? any ideas why the first solution fails? thanks, bob bo...@pa... |