You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(1) |
Feb
(11) |
Mar
(9) |
Apr
(1) |
May
(5) |
Jun
(5) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(8) |
Nov
(9) |
Dec
(11) |
2004 |
Jan
(5) |
Feb
(2) |
Mar
(1) |
Apr
(3) |
May
(6) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(3) |
2005 |
Jan
(1) |
Feb
(7) |
Mar
(6) |
Apr
(36) |
May
(20) |
Jun
(42) |
Jul
(21) |
Aug
(12) |
Sep
(56) |
Oct
(5) |
Nov
(55) |
Dec
(53) |
2006 |
Jan
(43) |
Feb
(83) |
Mar
(98) |
Apr
(42) |
May
(68) |
Jun
(55) |
Jul
(50) |
Aug
(104) |
Sep
(13) |
Oct
(70) |
Nov
(37) |
Dec
(42) |
2007 |
Jan
(56) |
Feb
(18) |
Mar
(43) |
Apr
(80) |
May
(65) |
Jun
(149) |
Jul
(103) |
Aug
(71) |
Sep
(62) |
Oct
(67) |
Nov
(72) |
Dec
(63) |
2008 |
Jan
(64) |
Feb
(63) |
Mar
(31) |
Apr
(42) |
May
(71) |
Jun
(62) |
Jul
(37) |
Aug
(25) |
Sep
(5) |
Oct
(2) |
Nov
(7) |
Dec
(14) |
2009 |
Jan
(20) |
Feb
(15) |
Mar
(19) |
Apr
(8) |
May
(7) |
Jun
|
Jul
(37) |
Aug
(12) |
Sep
(19) |
Oct
(5) |
Nov
(1) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(24) |
Mar
(16) |
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(5) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Yvon T. <yvo...@gm...> - 2007-08-13 08:32:54
|
2007/8/12, jea...@gm... <jea...@gm...>: > > BridgeSupport - sorry :0) > OK, it was obvious ))) depending if you need to temporarily authenticate the user for admin access > or keychain, you would use different tools. > > this might be of help > http://developer.apple.com/documentation/Security/Conceptual/SecureCodingGuide/Articles/SecuritySvcs.html > > > and maybe even this (you could generate bridge support files, embed them > in the framework and embed the framework in your app): > > http://bdash.net.nz/blog/2004/08/30/example-code-mac-os-x-keychain-access-from-python/ > > cheers, > jean-pierre > then i might even use a python framework from RubyCocoa ? best, Yvon -- yvon |
From: <jea...@gm...> - 2007-08-12 17:09:39
|
On 8/12/07, Yvon Thoraval <yvo...@gm...> wrote: > > > > 2007/8/12, jea...@gm... <jea...@gm...>: > > > > On 8/10/07, Yvon Thoraval < yvo...@gm...> wrote: > > > > > i need to do a user authentification within a small RubyCocoa app. > > > > > > i'd like to save the password in a prefs file (yaml for ex) > > > > > > someone had experience with that little thing ? > > > > > > why not use the keychain / authentication framework instead of saving > > the password in a textfile? > > > > > seems to be very much complicated ??? > i'll see that point too. > > assuming the proper frameworks are exposed via BS, i'm sure there are > > keychain/authentication examples on developer.apple.com but you'd of > > course need to make the usual conversion to ruby. > > > > > what do you called "BS" ??? > BridgeSupport - sorry :0) depending if you need to temporarily authenticate the user for admin access or keychain, you would use different tools. this might be of help http://developer.apple.com/documentation/Security/Conceptual/SecureCodingGuide/Articles/SecuritySvcs.html and maybe even this (you could generate bridge support files, embed them in the framework and embed the framework in your app): http://bdash.net.nz/blog/2004/08/30/example-code-mac-os-x-keychain-access-from-python/ cheers, jean-pierre |
From: Yvon T. <yvo...@gm...> - 2007-08-12 08:13:41
|
2007/8/12, jea...@gm... <jea...@gm...>: > > On 8/10/07, Yvon Thoraval <yvo...@gm...> wrote: > > > i need to do a user authentification within a small RubyCocoa app. > > > > i'd like to save the password in a prefs file (yaml for ex) > > > > someone had experience with that little thing ? > > > why not use the keychain / authentication framework instead of saving the > password in a textfile? > seems to be very much complicated ??? i'll see that point too. assuming the proper frameworks are exposed via BS, i'm sure there are > keychain/authentication examples on developer.apple.com but you'd of > course need to make the usual conversion to ruby. > what do you called "BS" ??? thanks for your reply, best ! Yvon ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > -- yvon |
From: <jea...@gm...> - 2007-08-12 01:25:06
|
On 8/10/07, Yvon Thoraval <yvo...@gm...> wrote: > > i need to do a user authentification within a small RubyCocoa app. > > i'd like to save the password in a prefs file (yaml for ex) > > someone had experience with that little thing ? why not use the keychain / authentication framework instead of saving the password in a textfile? assuming the proper frameworks are exposed via BS, i'm sure there are keychain/authentication examples on developer.apple.com but you'd of course need to make the usual conversion to ruby. cheers, jean-pierre |
From: Diddy <mon...@ma...> - 2007-08-11 17:52:51
|
Hi, I'd like to add coredata into my existing ruby cocoa project. I tried adding in a datamodel with File->New but it throws up an error concerning managed object context. Are there some simple steps I can do, or should I start a new project and import all my ruby and cocoa classes in ta Monsta |
From: Yvon T. <yvo...@gm...> - 2007-08-10 13:08:51
|
i need to do a user authentification within a small RubyCocoa app. i'd like to save the password in a prefs file (yaml for ex) someone had experience with that little thing ? -- yvon |
From: Yvon T. <yvo...@gm...> - 2007-08-10 09:20:33
|
2007/8/9, Laurent Sansonetti <lau...@gm...>: > > > Also, did you try the 0.11.1p1 installer? i've tried it yesterday eve aznd everything works well right now ! thanks for your help. -- yvon |
From: Jon B. <jo...@gm...> - 2007-08-09 16:58:28
|
I have setup an Xgrid network @ home w/ a G5 and a few laptops (mainly for VisualHub encoding and nothing more), it is amazing technology. A cool thing I did come across was this package: http://www.tslab.se.shibaura-it.ac.jp/index.php/Software/rxgrid#y0780222 Other than that, Id have to say I have not be in a situation where I would really need so much Xgrid power, either that or the apps did not support it. I can see though somewhere in your code where it would say if Xgrid was available submit or job or else do it on your own, Im sure there is a standard way to accomplish something like that. From everything I have read it is simple TCP back and forth between controller / agents. - Jon On Aug 9, 2007, at 12:42 PM, Tim Perrett wrote: > Hey Chaps > > Im currently looking at conducting something where I am going to > either 2 or 3 xserves in place, doing some "processing". As the 2nd > or 3rd server would be for DR purposes, I then got to thinking that > it maybe I could tie them all together with Xgrid, meaning in a DR > scenario all you would need do is change the controller node to > another box and away you go? Ive never done anything with XGrid > before so ive no idea about it really, but as its for "distributed > processing" according to apple, sounds like it might be just what im > after - an easy and scalable way to conduct my processing > requirements (and handily helping with the DR) > > Has anyone on this list done RubyCocoa/XGrid work? In theory there > shouldn't be any problems going over the bridge for xgrid tasks? This > is all very speculative so any help would be great. > > Cheers > > Tim > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Tim P. <he...@ti...> - 2007-08-09 16:42:56
|
Hey Chaps Im currently looking at conducting something where I am going to either 2 or 3 xserves in place, doing some "processing". As the 2nd or 3rd server would be for DR purposes, I then got to thinking that it maybe I could tie them all together with Xgrid, meaning in a DR scenario all you would need do is change the controller node to another box and away you go? Ive never done anything with XGrid before so ive no idea about it really, but as its for "distributed processing" according to apple, sounds like it might be just what im after - an easy and scalable way to conduct my processing requirements (and handily helping with the DR) Has anyone on this list done RubyCocoa/XGrid work? In theory there shouldn't be any problems going over the bridge for xgrid tasks? This is all very speculative so any help would be great. Cheers Tim |
From: Yvon T. <yvo...@gm...> - 2007-08-09 13:31:25
|
2007/8/9, Laurent Sansonetti <lau...@gm...>: > > On 8/9/07, Yvon Thoraval <yvo...@gm...> wrote: > > i've tried to install latest rubycocoa from dmg on my iMac G5 PPC and > the > > installer refused to install the stuff (universal) why ??? > > Which version of Mac OS X do you use? I'm using the latest 10.4.10 Since you run PPC, did you > install the universal SDK from the developer tools? NO, i don't think so. need i to do that ? Also, did you try the 0.11.1p1 installer? no the 0.11, I'll try asap with the p1 one . > i've also try from tgz getting the following error : > > > > /tmp/src-0-1573.m :7: error: cannot find interface declaration for > NSObject, > > This is extremely weird. Looks like your Foundation framework is broken. > > Did you modify your system before? This is the first time I hear about > such an issue. No i didn't modify the system at all even it's a "fresh" install dating " to 5 months, fresh install means even having delete all the contents of my hard disk ;-) Thanks for your help ! Yvon Laurent > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > -- yvon |
From: Laurent S. <lau...@gm...> - 2007-08-09 10:20:13
|
On 8/9/07, Yvon Thoraval <yvo...@gm...> wrote: > i've tried to install latest rubycocoa from dmg on my iMac G5 PPC and the > installer refused to install the stuff (universal) why ??? Which version of Mac OS X do you use? Since you run PPC, did you install the universal SDK from the developer tools? Also, did you try the 0.11.1p1 installer? > i've also try from tgz getting the following error : > > /tmp/src-0-1573.m :7: error: cannot find interface declaration for NSObject, This is extremely weird. Looks like your Foundation framework is broken. Did you modify your system before? This is the first time I hear about such an issue. Laurent |
From: Yvon T. <yvo...@gm...> - 2007-08-09 09:51:50
|
i've tried to install latest rubycocoa from dmg on my iMac G5 PPC and the installer refused to install the stuff (universal) why ??? i've also try from tgz getting the following error : ~/work/RubyCocoa/RubyCocoa-0.11.1%> ruby install.rb --help Usage: ruby install.rb <global option> ruby install.rb [<global options>] <task> [<task options>] Global options: -q,--quiet suppress message outputs --verbose output messages verbosely -h,--help print this message -v,--version print version and quit --copyright print copyright and quit Tasks: config saves your configurations show shows current configuration setup compiles extention or else test tests framework doc generate documentation install installs files package make binary package into a dmg clean does `make clean' for each extention Options for config: --prefix=path path prefix of target environment [/opt/local] --install-prefix=path path prefix to install [$prefix] --std-ruby=path the directory for standard ruby libraries [$install-prefix/lib/ruby/1.8] --site-ruby=path the directory for non-standard ruby libraries [$install-prefix/lib/ruby/site_ruby/1.8] --bin-dir=path the directory for commands [$install-prefix/bin] --rb-dir=path the directory for ruby scripts [$site-ruby] --so-dir=path the directory for ruby extentions [$install-prefix/lib/ruby/site_ruby/1.8/powerpc-darwin8.9.0] --data-dir=path the directory for shared data [$install-prefix/share] --ruby-path=path path to set to #! line [/opt/local/bin/ruby] --ruby-prog=name the ruby program using for installation [/opt/local/bin/ruby] --make-prog=name the make program to compile ruby extentions [make] --without-ext does not compile/install ruby extentions [no] --install-root=path path to the root directory for Frameworks and "ProjectBuilder Extras" [] --frameworks=path path to the directory for installing RubyCocoa.framework [/Library/Frameworks] --xcode-extras=path path to the directory for "Xcode Extras" [/Library/Application Support/Apple/Developer Tools] --examples=path path to the directory for Examples [/Developer/Examples] --documentation=path path to the directory for Documentation [/Developer/Documentation] --gen-bridge-support yes, generate bridge metadata files [yes] --build-as-embeddable yes, build the framework as embeddable (with INSTALL_PATH pointing to the current application's Frameworks directory) [yes] --ruby-header-dir=path path to the ruby header directory [/opt/local/lib/ruby/1.8/powerpc-darwin8.9.0] --libruby-path=path path to the libruby file [/opt/local/lib/libruby.1.8.6.dylib] --ri-dir=path the directory for ri files [/opt/local/share/ri/1.8/site] --build-universal yes, build universal binary (requires Xcode 2.1 or later and SDK) [no] --macosx-deployment-target=version target Mac OS X version [10.4] --rubycocoa-version=name RubyCocoa version [0.11.1] --rubycocoa-version-short=name RubyCocoa version short [0.11.1] --rubycocoa-release-date=name RubyCocoa release date [2007-06-04] --rubycocoa-svn-revision=name RubyCocoa subversion revision number [1814] --rubycocoa-framework-version=name RubyCocoa Framework version name [A] --rbconfig=path your rbconfig.rb to load [running ruby's] Options for install: --no-harm only display what to do if given [off] ~/work/RubyCocoa/RubyCocoa-0.11.1%> ruby install.rb config --prefix=/opt/local install.rb: entering config phase... create ext/rubycocoa/extconf.rb create framework/GeneratedConfig.xcconfig create framework/src/objc/Version.h ---> framework create /Users/yt/work/RubyCocoa/RubyCocoa-0.11.1/framework/src/objc/osx_ruby.h ... create /Users/yt/work/RubyCocoa/RubyCocoa-0.11.1/framework/src/objc/osx_intern.h ... BSROOT="/Users/yt/work/RubyCocoa/RubyCocoa-0.11.1/framework/bridge-support" CFLAGS="" /opt/local/bin/ruby build.rb Generating BridgeSupport metadata for: CoreFoundation ... ./gen_bridge_metadata.rb:1795:in `compile_and_execute_code': Can't compile C code... aborting (RuntimeError) command was: gcc /tmp/src-0-1573.m -o /tmp/bin-0-1573 -F"/System/Library/Frameworks" -framework CoreFoundation -framework Foundation -include /tmp/src-0-1573.h 2>/tmp/log-0-1573 /tmp/src-0-1573.m:7: error: cannot find interface declaration for NSObject, superclass of __MyClass from ./gen_bridge_metadata.rb:1103:in `collect_structs_encoding' from ./gen_bridge_metadata.rb:525:in `collect' from build.rb:101 from build.rb:50:in `measure' from build.rb:101 from build.rb:62:in `each' from build.rb:62 config failed hook /Users/yt/work/RubyCocoa/RubyCocoa-0.11.1/framework/post-config.rbfailed: 'system BSROOT="/Users/yt/work/RubyCocoa/RubyCocoa-0.11.1/framework/bridge-support" CFLAGS="" /opt/local/bin/ruby build.rb' failed try 'ruby install.rb --help' for usage ~/work/RubyCocoa/RubyCocoa-0.11.1%> which ruby /opt/local/bin/ruby ~/work/RubyCocoa/RubyCocoa-0.11.1%> what is the prob ??? i have a well running ruby from MacPort under /opt/local... any idae ??? -- yvon |
From: Laurent S. <lsa...@ap...> - 2007-08-08 20:51:06
|
Oops, this message should have been sent to the -devel list and not the -talk list, sorry. Laurent On Aug 8, 2007, at 10:48 PM, Laurent Sansonetti wrote: > Hi, > > Regarding 0.12.0. Sorry I should have been released it, 2 weeks > ago, but I have been busy with so many things :-( > > I would nevertheless want to release it this Friday. It seems that > all the issues that have been reported since are addressed in trunk. > > Unless you have any objection, I will release 0.12.0 on Friday. I > will construct a special libruby.1.dylib that will work on both > Tiger PPC and Tiger Intel (that has the right $:) and embed it in > the binary installer. > > Laurent |
From: Laurent S. <lsa...@ap...> - 2007-08-08 20:48:15
|
Hi, Regarding 0.12.0. Sorry I should have been released it, 2 weeks ago, but I have been busy with so many things :-( I would nevertheless want to release it this Friday. It seems that all the issues that have been reported since are addressed in trunk. Unless you have any objection, I will release 0.12.0 on Friday. I will construct a special libruby.1.dylib that will work on both Tiger PPC and Tiger Intel (that has the right $:) and embed it in the binary installer. Laurent |
From: Eloy D. <elo...@gm...> - 2007-08-08 20:06:51
|
Thanks Satoshi-san, I don't know why I overlooked it... heh :) On 8/8/07, Satoshi Nakagawa <sna...@in...> wrote: > Hi. > > >>> require 'osx/cocoa' > > => true > >>> require 'Test.bundle' > > LoadError: Failed to lookup Init function ./Test.bundle > > from ./Test.bundle > > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > > `require' > > from (irb):2 > > How about adding Init_Test function to Test.m? > > void Init_Test() { > } > > Actually there are Init_objc_test function in objc_test.m > > void Init_objc_test(){ > // dummy initializer for ruby's `require' > } > > -- > Satoshi Nakagawa > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Satoshi N. <sna...@in...> - 2007-08-08 20:03:04
|
Hi. >>> require 'osx/cocoa' > => true >>> require 'Test.bundle' > LoadError: Failed to lookup Init function ./Test.bundle > from ./Test.bundle > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from (irb):2 How about adding Init_Test function to Test.m? void Init_Test() { } Actually there are Init_objc_test function in objc_test.m void Init_objc_test(){ // dummy initializer for ruby's `require' } -- Satoshi Nakagawa |
From: Eloy D. <elo...@gm...> - 2007-08-08 20:01:36
|
Ah shoot! I found the Init function at the end of the objc_test.m file... Ok it works now :) Cheers, Eloy On 8/8/07, Eloy Duran <elo...@gm...> wrote: > Hello, > > I was wondering what I need to do in order to compile and use a > objective-c class, like objc_test.m in the test suite of rubycocoa. > > This is my test class: > > #import <Foundation/Foundation.h> > > @interface BaconClass : NSObject > { > } > @end > > @implementation BaconClass > - (BOOL)isChunky { return YES; } > @end > > I compile it like this: > > cc -o Test.bundle -fno-common -g -fobjc-exceptions -arch ppc -arch > i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DMACOSX > -I/usr/include/libxml2 -DHAS_LIBXML2 > -I../src/rubycocoa-latest2/misc/libffi/include -framework Foundation > -bundle BaconClass.m > > This gives me a compiled bundle which I then try to use like this: > > >> require 'osx/cocoa' > => true > >> require 'Test.bundle' > LoadError: Failed to lookup Init function ./Test.bundle > from ./Test.bundle > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from (irb):2 > > But as you can see ruby fails to find the Init function.... > So what extra do I need to tell ruby to be able to use it? > > Cheers, > Eloy > |
From: Eloy D. <elo...@gm...> - 2007-08-08 19:52:44
|
Hello, I was wondering what I need to do in order to compile and use a objective-c class, like objc_test.m in the test suite of rubycocoa. This is my test class: #import <Foundation/Foundation.h> @interface BaconClass : NSObject { } @end @implementation BaconClass - (BOOL)isChunky { return YES; } @end I compile it like this: cc -o Test.bundle -fno-common -g -fobjc-exceptions -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DMACOSX -I/usr/include/libxml2 -DHAS_LIBXML2 -I../src/rubycocoa-latest2/misc/libffi/include -framework Foundation -bundle BaconClass.m This gives me a compiled bundle which I then try to use like this: >> require 'osx/cocoa' => true >> require 'Test.bundle' LoadError: Failed to lookup Init function ./Test.bundle from ./Test.bundle from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require' from (irb):2 But as you can see ruby fails to find the Init function.... So what extra do I need to tell ruby to be able to use it? Cheers, Eloy |
From: Eloy D. <elo...@gm...> - 2007-08-05 13:40:44
|
Nice :) Cheers, Eloy On 8/5/07, Alex Speller <al...@al...> wrote: > Hi Eloy, > > That worked! I guess I was barking up the wrong tree! > > Cheers, > Alex > > On 5 Aug 2007, at 13:29, Eloy Duran wrote: > > > Hey Alex, > > > > I think that what you want to do is to simply set the target of the > > NSButton to the ActiveRecordSetController instance and use a selector > > like #removeObject(obj) or #removeSelectedObjects() to tell the > > controller to remove the object. > > > > This is also how the + & - buttons work in the MailDemo sample. > > > > Hope it helps :) > > > > Cheers, > > Eloy > > > > On 8/4/07, Alex Speller <al...@al...> wrote: > >> Hi there, > >> > >> I'm having some problems setting up bindings programmatically. > >> > >> I'm trying to use a table with a (-) button in that removes it's > >> row when > >> clicked. The other table columns are bound to an > >> ActiveRecordSetController, > >> and the button column is unbound (is this right?). I then use > >> setDataCell on > >> the this column. > >> > >> This is what I've tried: > >> > >> cell = OSX::NSButtonCell.alloc.init > >> cell.objc_send( > >> :bind, "target", > >> :toObject, self, > >> :withKeyPath, "current_sale_controller", > >> :options, {"NSSelectorName" => "remove" } > >> ) > >> > >> cell.setTitle '-' > >> @remove_button_column.setDataCell cell > >> > >> This doesn't give an error, but nothing happens when you click the > >> button. > >> > >> I think it could possibly be a problem with OSX::NSSelectorName > >> not being a > >> recognized constant, which is why I used the string instead. Am I > >> on the > >> right track here? Any pointers appreciated, I've searched google > >> (a lot) > >> before asking and I'm out of ideas... > >> > >> Thanks in Advance, > >> Alex Speller > >> --------------------------------------------------------------------- > >> ---- > >> This SF.net email is sponsored by: Splunk Inc. > >> Still grepping through log files to find problems? Stop. > >> Now Search log events and configuration files using AJAX and a > >> browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >> _______________________________________________ > >> Rubycocoa-talk mailing list > >> Rub...@li... > >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >> > >> > > > > ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Alex S. <al...@al...> - 2007-08-05 13:30:17
|
Hi Eloy, That worked! I guess I was barking up the wrong tree! Cheers, Alex On 5 Aug 2007, at 13:29, Eloy Duran wrote: > Hey Alex, > > I think that what you want to do is to simply set the target of the > NSButton to the ActiveRecordSetController instance and use a selector > like #removeObject(obj) or #removeSelectedObjects() to tell the > controller to remove the object. > > This is also how the + & - buttons work in the MailDemo sample. > > Hope it helps :) > > Cheers, > Eloy > > On 8/4/07, Alex Speller <al...@al...> wrote: >> Hi there, >> >> I'm having some problems setting up bindings programmatically. >> >> I'm trying to use a table with a (-) button in that removes it's >> row when >> clicked. The other table columns are bound to an >> ActiveRecordSetController, >> and the button column is unbound (is this right?). I then use >> setDataCell on >> the this column. >> >> This is what I've tried: >> >> cell = OSX::NSButtonCell.alloc.init >> cell.objc_send( >> :bind, "target", >> :toObject, self, >> :withKeyPath, "current_sale_controller", >> :options, {"NSSelectorName" => "remove" } >> ) >> >> cell.setTitle '-' >> @remove_button_column.setDataCell cell >> >> This doesn't give an error, but nothing happens when you click the >> button. >> >> I think it could possibly be a problem with OSX::NSSelectorName >> not being a >> recognized constant, which is why I used the string instead. Am I >> on the >> right track here? Any pointers appreciated, I've searched google >> (a lot) >> before asking and I'm out of ideas... >> >> Thanks in Advance, >> Alex Speller >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2007-08-05 12:56:49
|
> > I have no idea if this is a good idea, but could this be included in > > something like oc_attachments or is that a bad idea? > > Mmh, I don't think that this is a good idea. Not everyone wants to > copy all instance variables for example upon every copy (some would > prefer to call the original setters which may encapsulate some ObjC > logic). > > The bug behind this should be fixed though. The user should not have > to call objc_method. Cool. Thanks again! Eloy |
From: Eloy D. <elo...@gm...> - 2007-08-05 12:29:09
|
Hey Alex, I think that what you want to do is to simply set the target of the NSButton to the ActiveRecordSetController instance and use a selector like #removeObject(obj) or #removeSelectedObjects() to tell the controller to remove the object. This is also how the + & - buttons work in the MailDemo sample. Hope it helps :) Cheers, Eloy On 8/4/07, Alex Speller <al...@al...> wrote: > Hi there, > > I'm having some problems setting up bindings programmatically. > > I'm trying to use a table with a (-) button in that removes it's row when > clicked. The other table columns are bound to an ActiveRecordSetController, > and the button column is unbound (is this right?). I then use setDataCell on > the this column. > > This is what I've tried: > > cell = OSX::NSButtonCell.alloc.init > cell.objc_send( > :bind, "target", > :toObject, self, > :withKeyPath, "current_sale_controller", > :options, {"NSSelectorName" => "remove" } > ) > > cell.setTitle '-' > @remove_button_column.setDataCell cell > > This doesn't give an error, but nothing happens when you click the button. > > I think it could possibly be a problem with OSX::NSSelectorName not being a > recognized constant, which is why I used the string instead. Am I on the > right track here? Any pointers appreciated, I've searched google (a lot) > before asking and I'm out of ideas... > > Thanks in Advance, > Alex Speller > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |
From: Laurent S. <lsa...@ap...> - 2007-08-04 18:25:49
|
On Aug 4, 2007, at 6:39 PM, Eloy Duran wrote: > Yes! It doesn't crash anymore and the row is added to the tableview. I > haven't had time yet to extensively play with this, but I guess it > will be ok. > > Thanks :) Okay, this is a bug in Foundation's BridgeSupport, that doesn't provide metadata for the NSCopying protocol. Fortunately this is a very edge case, but I will try to fix it the soonest possible. > So just for reference, the code I have working now is: > > def copyWithZone(zone) > copy = self.class.allocWithZone(zone).init > self.instance_variables.each do |iv| > copy.instance_variable_set iv, self.instance_variable_get(iv) > end > return copy > end > objc_method :copyWithZone, "@@:^v" > > I have no idea if this is a good idea, but could this be included in > something like oc_attachments or is that a bad idea? Mmh, I don't think that this is a good idea. Not everyone wants to copy all instance variables for example upon every copy (some would prefer to call the original setters which may encapsulate some ObjC logic). The bug behind this should be fixed though. The user should not have to call objc_method. Laurent > On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: >> Okay, that's because your cell's object value is a NSObject class >> that >> doesn't implement copyWithZone. From your first message I see that >> you >> got a crash when trying to implement it. >> >> Can you try to call: >> >> objc_method :copyWithZone, ''@@:^v" >> >> inside your Download class? >> >> Thanks, >> Laurent >> >> On Aug 4, 2007, at 6:18 PM, Eloy Duran wrote: >> >>> Yes, that's true. However the problem is not with the NSCell >>> subclass >>> (DownloadCell) but with the NSObject subclass (Download) that holds >>> the values for the cell. >>> >>> If I don't implement the copyWithZone method it exits with a method >>> not found error: >>> 2007-08-04 18:15:29.644 HellaNZB[3861] *** -[Download >>> copyWithZone:]: >>> selector not recognized [self = 0x158c2400] >>> /Users/eloy/Documents/DEVELOPMENT/RubyCocoa/Nzb/hellanzb/build/ >>> Release/HellaNZB.app/Contents/Resources/rb_main.rb:22:in >>> `NSApplicationMain': NSInvalidArgumentException - *** -[Download >>> copyWithZone:]: selector not recognized [self = 0x158c2400] >>> (OSX::OCException) >>> from /Users/eloy/Documents/DEVELOPMENT/RubyCocoa/Nzb/hellanzb/ >>> build/ >>> Release/HellaNZB.app/Contents/Resources/rb_main.rb:22 >>> >>> As you can see the class of the object that it's being called on is >>> Download which is a NSObject subclass. >>> >>> Otherwise I will create a small app and see if I can replicate the >>> problem. >>> >>> Ciao, >>> Eloy >>> >>> On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: >>>> copyWithZone: is part of the NSCopying protocol, which NSObject >>>> doesn't implement but NSCell does. >>>> >>>> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html >>>> >>>> Laurent >>>> >>>> On Aug 4, 2007, at 6:05 PM, Eloy Duran wrote: >>>> >>>>> Hey Lrz, >>>>> >>>>> That would have been very nice! :) >>>>> However unfortunately NSObject doesn't implement copyWithZone... >>>>> >>>>>>> foo = OSX::NSObject.alloc.init >>>>> => #<OSX::NSObject:0x2e00e class='NSObject' id=0x159ac60> >>>>>>> foo.objc_methods.grep(/zone/i) >>>>> => ["zone"] >>>>> >>>>> Eloy >>>>> >>>>> On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: >>>>>> Try: >>>>>> >>>>>> def copyWithZone(zone) >>>>>> copy = super_copyWithZone(zone) >>>>>> # set your attributes to copy >>>>>> # ex: >>>>>> # copy.title = self.title >>>>>> return copy >>>>>> end >>>>>> >>>>>> Laurent >>>>>> >>>>>> On Aug 4, 2007, at 5:53 PM, Eloy Duran wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I'm trying to write my own custom NSCell for a tableview. >>>>>>> However, the table view tries to call #copyWithZone on my >>>>>>> objects, >>>>>>> which are subclasses of NSObject. So I was trying to create a >>>>>>> working >>>>>>> #copyWithZone, but no matter what I do it always crashes >>>>>>> immediately. >>>>>>> For instance I have the following, but it doesn't even write to >>>>>>> the >>>>>>> console: >>>>>>> >>>>>>> def copyWithZone(zone) >>>>>>> puts 'COPY!' >>>>>>> copy = Download.allocWithZone(zone).init >>>>>>> self.instance_variables.each do |iv| >>>>>>> copy.instance_variable_set iv, self.instance_variable_get(iv) >>>>>>> end >>>>>>> return copy >>>>>>> end >>>>>>> >>>>>>> Backtrace: >>>>>>> >>>>>>> #0 0x90a594c0 in objc_msgSend () >>>>>>> #1 0xbfffc21c in ?? () >>>>>>> #2 0x0002b850 in ocid_to_rbobj () >>>>>>> #3 0x0002df10 in ocdata_to_rbobj () >>>>>>> #4 0x0003051a in ovmix_register_ruby_method () >>>>>>> #5 0x00031a98 in rbobj_call_ruby () >>>>>>> #6 0x00031075 in ovmix_register_ruby_method () >>>>>>> #7 0x0002f8b9 in init_ovmix () >>>>>>> #8 0x927fa468 in -[NSObject(NSForwardInvocation) forward::] () >>>>>>> #9 0x90a5ccc1 in _objc_msgForward () >>>>>>> #10 0x932aed02 in -[NSCell _setContents:] () >>>>>>> #11 0x932aec95 in -[NSCell setObjectValue:] () >>>>>>> #12 0x9353abaa in -[_NSPlaceholderTextFieldPlugin >>>>>>> showValue:inObject:] () >>>>>>> #13 0x93511593 in -[NSValueBinder showValue:inObject:] () >>>>>>> #14 0x93510938 in -[NSValueBinder >>>>>>> _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState >>>>>>> :] >>>>>>> () >>>>>>> #15 0x9353a287 in -[NSValueBinder >>>>>>> updateTableColumnDataCell:forDisplayAtIndex:] () >>>>>>> #16 0x9353a9ef in -[NSTextValueBinder >>>>>>> updateTableColumnDataCell:forDisplayAtIndex:] () >>>>>>> #17 0x9353a1d6 in -[_NSBindingAdaptor >>>>>>> tableColumn:willDisplayCell:row:] () >>>>>>> #18 0x93402a9d in -[NSTableView >>>>>>> _sendDelegateWillDisplayCell:forColumn:row:] () >>>>>>> #19 0x933ea065 in -[NSTableView >>>>>>> _drawContentsAtRow:column:clipRect:] >>>>>>> () >>>>>>> #20 0x933e902b in -[NSTableView drawRow:clipRect:] () >>>>>>> #21 0x933e67ce in -[NSTableView drawRowIndexes:clipRect:] () >>>>>>> #22 0x933e56a4 in -[NSTableView drawRect:] () >>>>>>> #23 0x933113b1 in -[NSView _drawRect:clip:] () >>>>>>> #24 0x9331040b in -[NSView >>>>>>> _recursiveDisplayAllDirtyWithLockFocus:visRect:] () >>>>>>> #25 0x9330f473 in -[NSView >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #26 0x93310041 in -[NSView >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #27 0x93310041 in -[NSView >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #28 0x93310041 in -[NSView >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #29 0x93310041 in -[NSView >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #30 0x9330eb78 in -[NSThemeFrame >>>>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView >>>>>>> :] >>>>>>> () >>>>>>> #31 0x9330e362 in -[NSView >>>>>>> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView >>>>>>> :] >>>>>>> () >>>>>>> #32 0x9330dc8e in -[NSView displayIfNeeded] () >>>>>>> #33 0x9330da32 in -[NSWindow displayIfNeeded] () >>>>>>> #34 0x9335dd6c in _handleWindowNeedsDisplay () >>>>>>> #35 0x9082dd6e in __CFRunLoopDoObservers () >>>>>>> #36 0x9082ce10 in CFRunLoopRunSpecific () >>>>>>> #37 0x9082cace in CFRunLoopRunInMode () >>>>>>> #38 0x92dec8d8 in RunCurrentEventLoopInMode () >>>>>>> #39 0x92debfe2 in ReceiveNextEventCommon () >>>>>>> #40 0x92debe39 in BlockUntilNextEventMatchingListInMode () >>>>>>> #41 0x93292465 in _DPSNextEvent () >>>>>>> #42 0x93292056 in -[NSApplication >>>>>>> nextEventMatchingMask:untilDate:inMode:dequeue:] () >>>>>>> #43 0x9328bddb in -[NSApplication run] () >>>>>>> #44 0x9327fd2f in NSApplicationMain () >>>>>>> #45 0x0003fc0d in ffi_call_SYSV () >>>>>>> #46 0x0003fbae in ffi_call () >>>>>>> #47 0x0003cfa0 in rb_ffi_dispatch () >>>>>>> #48 0x00035ca0 in find_bs_boxed_by_encoding () >>>>>>> #49 0x00221e09 in call_cfunc () >>>>>>> #50 0x002214f2 in rb_call0 () >>>>>>> #51 0x00222489 in rb_call () >>>>>>> #52 0x0021c34a in rb_eval () >>>>>>> #53 0x00217d9c in eval_node () >>>>>>> #54 0x00218369 in ruby_exec_internal () >>>>>>> #55 0x002183b3 in ruby_exec () >>>>>>> #56 0x002183dd in ruby_run () >>>>>>> #57 0x00033474 in RBApplicationMain () >>>>>>> #58 0x00002886 in main () >>>>>>> >>>>>>> So does somebody know of a good way of implementing this with >>>>>>> RubyCocoa? >>>>>>> >>>>>>> Cheers, >>>>>>> Eloy >>>>>>> >>>>>>> PS: I'm on svn rev 1983 >>>>>>> >>>>>>> ------------------------------------------------------------------------- >>>>>>> This SF.net email is sponsored by: Splunk Inc. >>>>>>> Still grepping through log files to find problems? Stop. >>>>>>> Now Search log events and configuration files using AJAX and a >>>>>>> browser. >>>>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>>> _______________________________________________ >>>>>>> Rubycocoa-talk mailing list >>>>>>> Rub...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------- >>>>>> This SF.net email is sponsored by: Splunk Inc. >>>>>> Still grepping through log files to find problems? Stop. >>>>>> Now Search log events and configuration files using AJAX and a >>>>>> browser. >>>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>> _______________________________________________ >>>>>> Rubycocoa-talk mailing list >>>>>> Rub...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>>>>> >>>>> >>>>> ------------------------------------------------------------------------- >>>>> This SF.net email is sponsored by: Splunk Inc. >>>>> Still grepping through log files to find problems? Stop. >>>>> Now Search log events and configuration files using AJAX and a >>>>> browser. >>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>> _______________________________________________ >>>>> Rubycocoa-talk mailing list >>>>> Rub...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by: Splunk Inc. >>>> Still grepping through log files to find problems? Stop. >>>> Now Search log events and configuration files using AJAX and a >>>> browser. >>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>> _______________________________________________ >>>> Rubycocoa-talk mailing list >>>> Rub...@li... >>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a >>> browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Alex S. <al...@al...> - 2007-08-04 17:42:03
|
Hi there, I'm having some problems setting up bindings programmatically. I'm trying to use a table with a (-) button in that removes it's row when clicked. The other table columns are bound to an ActiveRecordSetController, and the button column is unbound (is this right?). I then use setDataCell on the this column. This is what I've tried: cell = OSX::NSButtonCell.alloc.init cell.objc_send( :bind, "target", :toObject, self, :withKeyPath, "current_sale_controller", :options, {"NSSelectorName" => "remove" } ) cell.setTitle '-' @remove_button_column.setDataCell cell This doesn't give an error, but nothing happens when you click the button. I think it could possibly be a problem with OSX::NSSelectorName not being a recognized constant, which is why I used the string instead. Am I on the right track here? Any pointers appreciated, I've searched google (a lot) before asking and I'm out of ideas... Thanks in Advance, Alex Speller |
From: Eloy D. <elo...@gm...> - 2007-08-04 16:39:20
|
Yes! It doesn't crash anymore and the row is added to the tableview. I haven't had time yet to extensively play with this, but I guess it will be ok. Thanks :) So just for reference, the code I have working now is: def copyWithZone(zone) copy = self.class.allocWithZone(zone).init self.instance_variables.each do |iv| copy.instance_variable_set iv, self.instance_variable_get(iv) end return copy end objc_method :copyWithZone, "@@:^v" I have no idea if this is a good idea, but could this be included in something like oc_attachments or is that a bad idea? Cheers, Eloy PS: Going out now, so I won't be able to reply directly..... On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: > Okay, that's because your cell's object value is a NSObject class that > doesn't implement copyWithZone. From your first message I see that you > got a crash when trying to implement it. > > Can you try to call: > > objc_method :copyWithZone, ''@@:^v" > > inside your Download class? > > Thanks, > Laurent > > On Aug 4, 2007, at 6:18 PM, Eloy Duran wrote: > > > Yes, that's true. However the problem is not with the NSCell subclass > > (DownloadCell) but with the NSObject subclass (Download) that holds > > the values for the cell. > > > > If I don't implement the copyWithZone method it exits with a method > > not found error: > > 2007-08-04 18:15:29.644 HellaNZB[3861] *** -[Download copyWithZone:]: > > selector not recognized [self = 0x158c2400] > > /Users/eloy/Documents/DEVELOPMENT/RubyCocoa/Nzb/hellanzb/build/ > > Release/HellaNZB.app/Contents/Resources/rb_main.rb:22:in > > `NSApplicationMain': NSInvalidArgumentException - *** -[Download > > copyWithZone:]: selector not recognized [self = 0x158c2400] > > (OSX::OCException) > > from /Users/eloy/Documents/DEVELOPMENT/RubyCocoa/Nzb/hellanzb/build/ > > Release/HellaNZB.app/Contents/Resources/rb_main.rb:22 > > > > As you can see the class of the object that it's being called on is > > Download which is a NSObject subclass. > > > > Otherwise I will create a small app and see if I can replicate the > > problem. > > > > Ciao, > > Eloy > > > > On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: > >> copyWithZone: is part of the NSCopying protocol, which NSObject > >> doesn't implement but NSCell does. > >> > >> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html > >> > >> Laurent > >> > >> On Aug 4, 2007, at 6:05 PM, Eloy Duran wrote: > >> > >>> Hey Lrz, > >>> > >>> That would have been very nice! :) > >>> However unfortunately NSObject doesn't implement copyWithZone... > >>> > >>>>> foo = OSX::NSObject.alloc.init > >>> => #<OSX::NSObject:0x2e00e class='NSObject' id=0x159ac60> > >>>>> foo.objc_methods.grep(/zone/i) > >>> => ["zone"] > >>> > >>> Eloy > >>> > >>> On 8/4/07, Laurent Sansonetti <lsa...@ap...> wrote: > >>>> Try: > >>>> > >>>> def copyWithZone(zone) > >>>> copy = super_copyWithZone(zone) > >>>> # set your attributes to copy > >>>> # ex: > >>>> # copy.title = self.title > >>>> return copy > >>>> end > >>>> > >>>> Laurent > >>>> > >>>> On Aug 4, 2007, at 5:53 PM, Eloy Duran wrote: > >>>> > >>>>> Hello, > >>>>> > >>>>> I'm trying to write my own custom NSCell for a tableview. > >>>>> However, the table view tries to call #copyWithZone on my objects, > >>>>> which are subclasses of NSObject. So I was trying to create a > >>>>> working > >>>>> #copyWithZone, but no matter what I do it always crashes > >>>>> immediately. > >>>>> For instance I have the following, but it doesn't even write to > >>>>> the > >>>>> console: > >>>>> > >>>>> def copyWithZone(zone) > >>>>> puts 'COPY!' > >>>>> copy = Download.allocWithZone(zone).init > >>>>> self.instance_variables.each do |iv| > >>>>> copy.instance_variable_set iv, self.instance_variable_get(iv) > >>>>> end > >>>>> return copy > >>>>> end > >>>>> > >>>>> Backtrace: > >>>>> > >>>>> #0 0x90a594c0 in objc_msgSend () > >>>>> #1 0xbfffc21c in ?? () > >>>>> #2 0x0002b850 in ocid_to_rbobj () > >>>>> #3 0x0002df10 in ocdata_to_rbobj () > >>>>> #4 0x0003051a in ovmix_register_ruby_method () > >>>>> #5 0x00031a98 in rbobj_call_ruby () > >>>>> #6 0x00031075 in ovmix_register_ruby_method () > >>>>> #7 0x0002f8b9 in init_ovmix () > >>>>> #8 0x927fa468 in -[NSObject(NSForwardInvocation) forward::] () > >>>>> #9 0x90a5ccc1 in _objc_msgForward () > >>>>> #10 0x932aed02 in -[NSCell _setContents:] () > >>>>> #11 0x932aec95 in -[NSCell setObjectValue:] () > >>>>> #12 0x9353abaa in -[_NSPlaceholderTextFieldPlugin > >>>>> showValue:inObject:] () > >>>>> #13 0x93511593 in -[NSValueBinder showValue:inObject:] () > >>>>> #14 0x93510938 in -[NSValueBinder > >>>>> _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState > >>>>> :] > >>>>> () > >>>>> #15 0x9353a287 in -[NSValueBinder > >>>>> updateTableColumnDataCell:forDisplayAtIndex:] () > >>>>> #16 0x9353a9ef in -[NSTextValueBinder > >>>>> updateTableColumnDataCell:forDisplayAtIndex:] () > >>>>> #17 0x9353a1d6 in -[_NSBindingAdaptor > >>>>> tableColumn:willDisplayCell:row:] () > >>>>> #18 0x93402a9d in -[NSTableView > >>>>> _sendDelegateWillDisplayCell:forColumn:row:] () > >>>>> #19 0x933ea065 in -[NSTableView > >>>>> _drawContentsAtRow:column:clipRect:] > >>>>> () > >>>>> #20 0x933e902b in -[NSTableView drawRow:clipRect:] () > >>>>> #21 0x933e67ce in -[NSTableView drawRowIndexes:clipRect:] () > >>>>> #22 0x933e56a4 in -[NSTableView drawRect:] () > >>>>> #23 0x933113b1 in -[NSView _drawRect:clip:] () > >>>>> #24 0x9331040b in -[NSView > >>>>> _recursiveDisplayAllDirtyWithLockFocus:visRect:] () > >>>>> #25 0x9330f473 in -[NSView > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #26 0x93310041 in -[NSView > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #27 0x93310041 in -[NSView > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #28 0x93310041 in -[NSView > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #29 0x93310041 in -[NSView > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #30 0x9330eb78 in -[NSThemeFrame > >>>>> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView > >>>>> :] > >>>>> () > >>>>> #31 0x9330e362 in -[NSView > >>>>> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView > >>>>> :] > >>>>> () > >>>>> #32 0x9330dc8e in -[NSView displayIfNeeded] () > >>>>> #33 0x9330da32 in -[NSWindow displayIfNeeded] () > >>>>> #34 0x9335dd6c in _handleWindowNeedsDisplay () > >>>>> #35 0x9082dd6e in __CFRunLoopDoObservers () > >>>>> #36 0x9082ce10 in CFRunLoopRunSpecific () > >>>>> #37 0x9082cace in CFRunLoopRunInMode () > >>>>> #38 0x92dec8d8 in RunCurrentEventLoopInMode () > >>>>> #39 0x92debfe2 in ReceiveNextEventCommon () > >>>>> #40 0x92debe39 in BlockUntilNextEventMatchingListInMode () > >>>>> #41 0x93292465 in _DPSNextEvent () > >>>>> #42 0x93292056 in -[NSApplication > >>>>> nextEventMatchingMask:untilDate:inMode:dequeue:] () > >>>>> #43 0x9328bddb in -[NSApplication run] () > >>>>> #44 0x9327fd2f in NSApplicationMain () > >>>>> #45 0x0003fc0d in ffi_call_SYSV () > >>>>> #46 0x0003fbae in ffi_call () > >>>>> #47 0x0003cfa0 in rb_ffi_dispatch () > >>>>> #48 0x00035ca0 in find_bs_boxed_by_encoding () > >>>>> #49 0x00221e09 in call_cfunc () > >>>>> #50 0x002214f2 in rb_call0 () > >>>>> #51 0x00222489 in rb_call () > >>>>> #52 0x0021c34a in rb_eval () > >>>>> #53 0x00217d9c in eval_node () > >>>>> #54 0x00218369 in ruby_exec_internal () > >>>>> #55 0x002183b3 in ruby_exec () > >>>>> #56 0x002183dd in ruby_run () > >>>>> #57 0x00033474 in RBApplicationMain () > >>>>> #58 0x00002886 in main () > >>>>> > >>>>> So does somebody know of a good way of implementing this with > >>>>> RubyCocoa? > >>>>> > >>>>> Cheers, > >>>>> Eloy > >>>>> > >>>>> PS: I'm on svn rev 1983 > >>>>> > >>>>> ------------------------------------------------------------------------- > >>>>> This SF.net email is sponsored by: Splunk Inc. > >>>>> Still grepping through log files to find problems? Stop. > >>>>> Now Search log events and configuration files using AJAX and a > >>>>> browser. > >>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >>>>> _______________________________________________ > >>>>> Rubycocoa-talk mailing list > >>>>> Rub...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >>>> > >>>> > >>>> ------------------------------------------------------------------------- > >>>> This SF.net email is sponsored by: Splunk Inc. > >>>> Still grepping through log files to find problems? Stop. > >>>> Now Search log events and configuration files using AJAX and a > >>>> browser. > >>>> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >>>> _______________________________________________ > >>>> Rubycocoa-talk mailing list > >>>> Rub...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >>>> > >>> > >>> ------------------------------------------------------------------------- > >>> This SF.net email is sponsored by: Splunk Inc. > >>> Still grepping through log files to find problems? Stop. > >>> Now Search log events and configuration files using AJAX and a > >>> browser. > >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >>> _______________________________________________ > >>> Rubycocoa-talk mailing list > >>> Rub...@li... > >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >> > >> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by: Splunk Inc. > >> Still grepping through log files to find problems? Stop. > >> Now Search log events and configuration files using AJAX and a > >> browser. > >> Download your FREE copy of Splunk now >> http://get.splunk.com/ > >> _______________________________________________ > >> Rubycocoa-talk mailing list > >> Rub...@li... > >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >> > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |