Hi Laurent, I had tried only on the testing branch. It works well with trunk. Thanks! -- Satoshi Nakagawa On 2008/03/05, at 2:03, Laurent Sansonetti wrote:
Hi Satoshi-san!
I added support for that in trunk a few days ago. But the changes have not been merged into the testing branch yet (I plan to do that as soon as possible).
Did you try testing or trunk? In my environment (trunk), your sample works great.
Laurent
On Mar 4, 2008, at 3:54 AM, Satoshi Nakagawa wrote:
Hi,
I have tried to use NSTableView. In it's dataSource, tableView(table, objectValueForTableColumn:col, row:row) crashed while numberOfRowsInTableView seemed working well.
class AppController < NSObject def numberOfRowsInTableView(sender) puts 'numberOfRowsInTableView' 10 end
def tableView(table, objectValueForTableColumn:col, row:row) puts 'tableView:objectValueForTableColumn:row:' 'test' end end
Project: http://limechat.net/macruby/TableTest.zip
[Session started at 2008-03-04 20:43:39 +0900.] numberOfRowsInTableView numberOfRowsInTableView
[Session started at 2008-03-04 20:43:40 +0900.] tableView:objectValueForTableColumn:row: tableView:objectValueForTableColumn:row: Loading program into debugger… GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin".Program loaded. sharedlibrary apply-load-rules all Attaching to program: `/Users/psychs/dev/macruby/TableTest/build/ Release/TableTest.app/Contents/MacOS/TableTest', process 7382. (gdb) where #0 rb_objc_boot_ocid (ocid=0x1) at objc.m:675 #1 0x002a0427 in rb_objc_ocid_to_rval (ocval=<value temporarily unavailable, due to optimizations>, rbval=0xbfffd454) at objc.m:710 #2 0x002a122f in rb_ruby_to_objc_closure_handler (cif=0x92240c0, resp=0xbfffd4d0, args=0xbfffd480, userdata=0x0) at objc.m:941 #3 0x925ec424 in ffi_closure_SYSV () #4 0x95cb1f32 in -[NSTableView _dataSourceValueForColumn:row:] () #5 0x95c34480 in -[NSTableView preparedCellAtColumn:row:] () #6 0x95c342e4 in -[NSTableView _drawContentsAtRow:column:withCellFrame:] () #7 0x95c3381a in -[NSTableView drawRow:clipRect:] () #8 0x95bd8b87 in -[NSTableView drawRowIndexes:clipRect:] () #9 0x95bd766a in -[NSTableView drawRect:] () #10 0x95c67bbe in -[NSView _drawRect:clip:] () #11 0x95c66751 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #12 0x95c66aa5 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #13 0x95c66aa5 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #14 0x95c66aa5 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #15 0x95c66aa5 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #16 0x95c650b4 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #17 0x95c649f7 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #18 0x95c6152d in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView :] () #19 0x95ba1f09 in -[NSView displayIfNeeded] () #20 0x95ba1ab9 in -[NSWindow displayIfNeeded] () #21 0x95c5d681 in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] () #22 0x95c5d0d8 in -[NSWindow orderWindow:relativeTo:] () #23 0x95c8efcd in -[NSWindow orderFront:] () #24 0x95b6ffdb in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] () #25 0x95b660ec in loadNib () #26 0x95b65a4d in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] () #27 0x95b65690 in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] () #28 0x95b655ce in +[NSBundle(NSNibLoading) loadNibNamed:owner:] () #29 0x95b6527e in NSApplicationMain () #30 0x925ec1dd in .LCFI1 () #31 0x925ec771 in ffi_call () #32 0x002a0b10 in bs_function_dispatch (argc=2, argv=0x30050, recv=16894416) at objc.m:1323 #33 0x00288325 in call_cfunc (func=0x2a0890 <bs_function_dispatch>, recv=16894416, len=<value temporarily unavailable, due to optimizations>, argc=2, argv=0x30050) at vm_insnhelper.c:282 #34 0x00296030 in vm_call_method (th=0x1013fe0, cfp=0xaff88, num=2, blockptr=0x1, flag=2145, id=10661, mn=0x151f260, recv=16894416, klass=16894448) at vm_insnhelper.c:372 #35 0x0028f8a8 in vm_eval (th=0x1013fe0, initial=0) at insns.def:1085 #36 0x0029524c in vm_eval_body (th=0x1013fe0) at vm.c:1149 #37 0x00295521 in rb_iseq_eval (iseqval=17502336) at vm.c:1358 #38 0x001d1434 in ruby_exec_node (n=0x10b0d20, file=0x10afc21 "/ Users/ psychs/dev/macruby/TableTest/build/Release/TableTest.app/Contents/ Resources/rb_main.rb") at eval.c:235 #39 0x001d6a0f in ruby_run_node (n=0x10b0d20) at eval.c:265 #40 0x0029f91a in macruby_main (path=0x1ff4 "rb_main.rb", argc=3, argv=0x409260) at objc.m:2117 #41 0x00001ff2 in main (argc=1, argv=0x1) at /Users/psychs/dev/ macruby/ TableTest/main.m:14 Current language: auto; currently objective-c (gdb) frame #0 rb_objc_boot_ocid (ocid=0x1) at objc.m:675 675 if (rb_objc_is_non_native((VALUE)ocid)) {
-- Satoshi Nakagawa
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel