discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSTableView and data cell formatter


From: Fred Kiefer
Subject: Re: NSTableView and data cell formatter
Date: Fri, 20 Feb 2015 23:08:46 +0100

The interesting bit is that the cell in frame #1 and #30 are different. The 
method description only gets called if the formatter of a cell is nil. This 
means, the second cell doesn't know about your special formatter, which results 
in the wrong display. But why are there two separate cells involved and why 
doesn't the second one have a formatter?
OK, I just found the teason for the later, there is a copy and paste error in 
the copyWithZone: method of NSCell, which I am going to fix now. Maybe this 
resolves your issue.

Fred

On the road

Am 20.02.2015 um 20:52 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:

> Hoi Fred,
> 
> (sorry for the double mails, I need to remove your private mail each time)
> 
> Fred Kiefer wrote:
>> What you could do now is run TalkSoup in gdb and set a breakpoint on the 
>> description method of the class Channel, you may need to define that method, 
>> if it doesn't exist. As soon as the code hits your breakpoint, get the stack 
>> trace and report back.
> I subclassed the method, put an NSLog and got the stacktrace easily.
> 
> This is the trace as soon as a cell is selected. It is very long, I thought 
> of a loop, but not.
> 
> #0  -[ChannelUser description] (self=0x84ee028,
>    _cmd=0xb541ba28 <_OBJC_SELECTOR_TABLE+296>) at Models/Channel.m:131
> #1  0xb50b5972 in -[NSCell setObjectValue:] (self=0x8524be0,
>    _cmd=0xb53fba00 <_OBJC_SELECTOR_TABLE+128>, object=0x84ee028)
>    at NSCell.m:378
> #2  0xb506849d in -[NSActionCell setObjectValue:] (self=0x8524be0,
>    _cmd=0xb54e8750 <_OBJC_SELECTOR_TABLE+2576>, anObject=0x84ee028)
>    at NSActionCell.m:228
> #3  0xb5243677 in -[GSTheme(Drawing) drawTableViewRow:clipRect:inView:] (
>    self=0x822eb20, _cmd=0xb5499c48 <_OBJC_SELECTOR_TABLE+2248>, rowIndex=1,
>    clipRect=..., view=0x857a028) at GSThemeDrawing.m:3149
> #4  0xb519d074 in -[NSTableView drawRow:clipRect:] (self=0x857a028,
>    _cmd=0xb54e86b8 <_OBJC_SELECTOR_TABLE+2424>, rowIndex=1, clipRect=...)
>    at NSTableView.m:4992
> #5  0xb5240c35 in -[GSTheme(Drawing) drawTableViewRect:inView:] (
>    self=0x822eb20, _cmd=0xb5499c68 <_OBJC_SELECTOR_TABLE+2280>, aRect=...,
>    view=0x857a028) at GSThemeDrawing.m:2976
> #6  0xb519d240 in -[NSTableView drawRect:] (self=0x857a028,
>    _cmd=0xb54b7b40 <_OBJC_SELECTOR_TABLE+2112>, aRect=...)
>    at NSTableView.m:5023
> #7  0xb51e792a in -[NSView displayRectIgnoringOpacity:inContext:] (
>    self=0x857a028, _cmd=0xb54b7b30 <_OBJC_SELECTOR_TABLE+2096>, aRect=...,
>    context=0x854bb10) at NSView.m:2570
> #8  0xb51dc6ab in -[NSView displayRectIgnoringOpacity:] (self=0x857a028,
>    _cmd=0xb54b7b20 <_OBJC_SELECTOR_TABLE+2080>, aRect=...) at NSView.m:2519
> #9  0xb51e751f in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x857a028, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2450
> #10 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x853c1e8, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #11 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x85222a8, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #12 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x8507448, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #13 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x8577540, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #14 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x8543b40, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #15 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x854cac0, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #16 0xb51e7751 in -[NSView displayIfNeededInRectIgnoringOpacity:] (
>    self=0x854aac0, _cmd=0xb54b7b10 <_OBJC_SELECTOR_TABLE+2064>, aRect=...)
>    at NSView.m:2476
> #17 0xb51dc576 in -[NSView displayIfNeededInRect:] (self=0x854aac0,
>    _cmd=0xb54b7b08 <_OBJC_SELECTOR_TABLE+2056>, aRect=...) at NSView.m:2428
> #18 0xb51dc3e7 in -[NSView displayIfNeeded] (self=0x854aac0,
>    _cmd=0xb54beb18 <_OBJC_SELECTOR_TABLE+2456>) at NSView.m:2410
> #19 0xb51ee63f in -[NSWindow displayIfNeeded] (self=0x854a9b0,
>    _cmd=0xb54be508 <_OBJC_SELECTOR_TABLE+904>) at NSWindow.m:2431
> #20 0xb51ecf88 in -[NSWindow(GNUstepPrivate) _handleAutodisplay] (
>    self=0x854a9b0, _cmd=0xb54be520 <_OBJC_SELECTOR_TABLE+928>)
>    at NSWindow.m:189
> #21 0xb51f7fab in +[NSWindow(GNUstepPrivate) _handleAutodisplay:] (
>    self=0xb5405720 <_OBJC_Class_NSIconWindow>,
>    _cmd=0xb54be530 <_OBJC_SELECTOR_TABLE+944>, bogus=0x0) at NSWindow.m:218
> #22 0xb7c3102a in -[NSObject performSelector:withObject:] (
>    self=0xb5405720 <_OBJC_Class_NSIconWindow>,
>    _cmd=0xb7f7c678 <_OBJC_SELECTOR_TABLE+56>,
>    aSelector=0xb54be530 <_OBJC_SELECTOR_TABLE+944>, anObject=0x0)
>    at NSObject.m:2049
> #23 0xb7c67449 in -[GSRunLoopPerformer fire] (self=0x8523ef8,
>    _cmd=0xb7f7c748 <_OBJC_SELECTOR_TABLE+264>) at NSRunLoop.m:110
> #24 0xb7c6c079 in -[NSRunLoop(Private) _checkPerformers:] (self=0x81ce398,
>    _cmd=0xb7f7c880 <_OBJC_SELECTOR_TABLE+576>, context=0x81d57a0)
>    at NSRunLoop.m:495
> #25 0xb7c68ee5 in -[NSRunLoop runMode:beforeDate:] (self=0x81ce398,
>    _cmd=0xb54c71a0 <_OBJC_SELECTOR_TABLE+416>,
>    mode=0xb54cfb68 <_OBJC_INSTANCE_1>, date=0x81d3f10) at NSRunLoop.m:1267
> #26 0xb520a8a5 in -[GSDisplayServer(EventOps) 
> getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x81b82b0, 
> _cmd=0xb4e70ad8 <_OBJC_SELECTOR_TABLE+24>,
>    mask=134217958, limit=0x81d3f10, mode=0xb54cfb68 <_OBJC_INSTANCE_1>,
>    flag=1 '\001') at GSDisplayServer.m:1040
> #27 0xb4df6fa5 in -[XGServer(X11Ops) 
> getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x81b82b0, 
> _cmd=0xb5404c38 <_OBJC_SELECTOR_TABLE+824>,
>    mask=134217958, limit=0x81d3f10, mode=0xb54cfb68 <_OBJC_INSTANCE_1>,
>    flag=1 '\001') at XGServerEvent.m:2571
> #28 0xb5083667 in DPSPeekEvent (mode=<optimized out>, limit=<optimized out>,
>    mask=<optimized out>, ctxt=<optimized out>)
>    at ../Headers/Additions/GNUstepGUI/GSDisplayServer.h:207
> #29 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (
>    self=0x81a2328, _cmd=0xb541bc90 <_OBJC_SELECTOR_TABLE+912>,
>    mask=134217958, expiration=0x81d3f10, mode=0xb54cfb68 <_OBJC_INSTANCE_1>,
>    flag=1 '\001') at NSApplication.m:2161
> #30 0xb50b9c4b in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] (
>    self=0x8573140, _cmd=0xb5499a78 <_OBJC_SELECTOR_TABLE+1784>,
>    theEvent=0xb541bc90 <_OBJC_SELECTOR_TABLE+912>, cellFrame=...,
>    controlView=0x857a028, flag=0 '\000') at NSCell.m:1669
> #31 0xb519c1da in -[NSTableView _trackCellAtColumn:row:withEvent:] (
>    self=0x857a028, _cmd=0xb5499b00 <_OBJC_SELECTOR_TABLE+1920>,
>    columnIndex=0, rowIndex=1, theEvent=0x856bf78) at NSTableView.m:3478
>    flag=1 '\001') at NSApplication.m:2161
> #30 0xb50b9c4b in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] (
>    self=0x8573140, _cmd=0xb5499a78 <_OBJC_SELECTOR_TABLE+1784>,
>    theEvent=0xb541bc90 <_OBJC_SELECTOR_TABLE+912>, cellFrame=...,
>    controlView=0x857a028, flag=0 '\000') at NSCell.m:1669
> #31 0xb519c1da in -[NSTableView _trackCellAtColumn:row:withEvent:] (
>    self=0x857a028, _cmd=0xb5499b00 <_OBJC_SELECTOR_TABLE+1920>,
>    columnIndex=0, rowIndex=1, theEvent=0x856bf78) at NSTableView.m:3478
> ---Type <return> to continue, or q <return> to quit---
> #32 0xb51a7730 in -[NSTableView mouseDown:] (
>    self=0xb5499b00 <_OBJC_SELECTOR_TABLE+1920>,
>    _cmd=0xb54bef90 <_OBJC_SELECTOR_TABLE+3600>, theEvent=0x856bf78)
>    at NSTableView.m:3821
> #33 0xb51fbea4 in -[NSWindow sendEvent:] (self=0x854a9b0,
>    _cmd=0xb5405280 <_OBJC_SELECTOR_TABLE+2432>, theEvent=0x856bf78)
>    at NSWindow.m:3900
> #34 0xb507e3b6 in -[NSApplication sendEvent:] (self=0x81a2328,
>    _cmd=0xb54051b8 <_OBJC_SELECTOR_TABLE+2232>, theEvent=0x856bf78)
>    at NSApplication.m:2105
> #35 0xb5081b1e in -[NSApplication run] (self=0x81a2328,
>    _cmd=0xb555f3d8 <_OBJC_SELECTOR_TABLE+472>) at NSApplication.m:1562
> #36 0xb5510ab6 in -[GNUstepOutput run] (self=0x8199748,
>    _cmd=0x80562d0 <_OBJC_SELECTOR_TABLE+144>) at GNUstepOutput.m:408
> #37 0x08048c6a in main () at main.m:95
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

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