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: Eloy D. <elo...@gm...> - 2007-06-20 15:19:44
|
Hey Stephyn, It's in svn: http://rubycocoa.svn.sourceforge.net/viewvc/rubycocoa/branches/users/hisa/junk/CocoaRepl/ Cheers, Eloy On 6/20/07, Stephyn Butcher <ste...@co...> wrote: > > Dear group, > > I noticed that HOJIMOTO Hisa uses an interesting app in his > demonstrations. I think the name is "CocoaRuby" and looks like it has > 2 panels, one for Ruby code and one for the method results. He > changes the title of the window, spawns other windows, etc. > > I was wondering if it was generally available. > > I know that Hisa contributes to this list so he might see this note. > I sent him an email but you never know how aggressive some SPAM > filters are. > > Cheers, > Steve > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Jon B. <jo...@jo...> - 2007-06-20 15:13:57
|
I may have answered my own question ... return self.retain On Jun 20, 2007, at 10:56 AM, Jon Baer wrote: > Hi, > > I need to implement something which requires the NSCopying protocol > + want to know if attr_accessor will handle this automatically or > if returning self is how this would/should work: > > def copyWithZone > OSX::NSLog "Copy with zone called" > return self > end > > My object was a normal Ruby object but since it requires this > method Ive extending OSX::NSObject and wondering if this will > automagically work for doing this, any ideas or pointers? > > Thanks. > > - Jon > |
From: Stephyn B. <ste...@co...> - 2007-06-20 15:13:22
|
Dear group, I noticed that HOJIMOTO Hisa uses an interesting app in his demonstrations. I think the name is "CocoaRuby" and looks like it has 2 panels, one for Ruby code and one for the method results. He changes the title of the window, spawns other windows, etc. I was wondering if it was generally available. I know that Hisa contributes to this list so he might see this note. I sent him an email but you never know how aggressive some SPAM filters are. Cheers, Steve |
From: Jon B. <jo...@jo...> - 2007-06-20 14:56:17
|
Hi, I need to implement something which requires the NSCopying protocol + want to know if attr_accessor will handle this automatically or if returning self is how this would/should work: def copyWithZone OSX::NSLog "Copy with zone called" return self end My object was a normal Ruby object but since it requires this method Ive extending OSX::NSObject and wondering if this will automagically work for doing this, any ideas or pointers? Thanks. - Jon |
From: Jon B. <jo...@gm...> - 2007-06-20 12:59:11
|
Need clarification. Can someone tell me if this is correct form/way (it does work): def tableView_willDisplayCell_forTableColumn_row(tableView, cell, tableColumn, row) OSX::NSLog("Table view will display cell for table column called") case tableColumn.identifier when "pic_square" OSX::NSLog("Drawing pic_square for row " + row.to_s) OSX::NSLog(@friends[row].pic_square.to_s) if (@friends[row].pic_square.length > 0) then url = OSX::NSURL.URLWithString(@friends[row].pic_square.to_s) image = OSX::NSImage.alloc.initWithContentsOfURL(url) cell.setObjectValue(image) return cell else return cell end end end Im trying to figure out if I do need to return the cell, the docs say void, can I just modify the cells @ will + they are retained? Thanks. - Jon |
From: Jon B. <jo...@gm...> - 2007-06-20 12:52:19
|
Growl .. rawr!!! On Jun 20, 2007, at 7:22 AM, Tim Perrett wrote: > Ahh interesting, what framework was causing the conflict out of > interest? > > Thanks > > Tim > > On 20 Jun 2007, at 12:05, Jon Baer wrote: > >> Turns out my problem was related to a newer SDK of a Framework I was >> using so I was making bad delegate calls. The error is now gone. > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Tim P. <he...@ti...> - 2007-06-20 11:24:00
|
Ahh interesting, what framework was causing the conflict out of interest? Thanks Tim On 20 Jun 2007, at 12:05, Jon Baer wrote: > Turns out my problem was related to a newer SDK of a Framework I was > using so I was making bad delegate calls. The error is now gone. |
From: Jon B. <jo...@gm...> - 2007-06-20 11:05:55
|
Im on 10.4.9 w/ macport ruby + svn copy of rc latest. Turns out my problem was related to a newer SDK of a Framework I was using so I was making bad delegate calls. The error is now gone. - Jon On Jun 20, 2007, at 3:51 AM, Tim Perrett wrote: > Jon you also said you are seeing that error, what config are you > using? If there is indeed a problem with the bridge how is it you are > getting that error whilst I don't seem to be? > |
From: Tim P. <he...@ti...> - 2007-06-20 07:53:07
|
hmmm thats interesting. I dont see it do that... I am running 10.4.9, on the new MacBookPro. When I change it to only return false, I get what you would expect... you only see the root, and it has no triangle. Laurent: the xcode project was posted onto RubyCocoa.com, here is the link... http://rubycocoa.com/files/outline-views/OutlineMeRuby.zip Jon you also said you are seeing that error, what config are you using? If there is indeed a problem with the bridge how is it you are getting that error whilst I don't seem to be? Cheers Tim On 20 Jun 2007, at 08:42, Dave Baldwin wrote: > Yes and when I make the change > > def outlineView_isItemExpandable(outlineView, item) > return false > end > > in OLDataSource.rb there is no difference to the behaviour. > > My suspicion that this isn't going across the bridge correctly is > just that it is the only thing left in the path. > I am running Ruby 1.8.2 (default apple install) on a G4. RubyCocoa > was prebuilt. > > Dave. |
From: Tim P. <he...@ti...> - 2007-06-20 07:46:24
|
On 19 Jun 2007, at 20:49, Pierce T. Wetter III wrote: > > If you have a list of objects you need to display. You can drag an > "ArrayContoller" into your nib file, and if you tell it its an > "Entity", it automatically fetches the data via CoreData. If you do > the core data tutorial, they show dragging an entity into Interface > builder which builds a lot of that stuff automatically for you. Just a quick note about this... I understand about creating an ArrayController and so on in the nib, using that method instantiates said array controller i understand. Lets say I had an ArrayController called "myArray", and I wanted to do something with the objects inside that array from within my programming how would I do that? If I was working within the class that was designated as the "FileOwner" of the nib, would i then just be able to use @myArray to get at it? Thanks Tim |
From: Dave B. <dav...@3d...> - 2007-06-20 07:42:25
|
On 19 Jun 2007, at 22:53, Tim Perrett wrote: > Hey Dave > > I actually wrote that example and it appears to run ok for me? I am > running the latest version of ruby cocoa also. The method you detail > which is part of the delegate actually calls this on the node: > > return @children.count > 0 ? true : false > > which, should give the correct behavior - i.e. if its false that > makes sure there is no triangle which is the default. Even when i > added a print statement to check the output i get the correct true or > false value. What makes you think they are not going over the bridge > correctly? > > When you download the demo fresh, and just build it, do you still see > the odd behavior you explain? Yes and when I make the change def outlineView_isItemExpandable(outlineView, item) return false end in OLDataSource.rb there is no difference to the behaviour. My suspicion that this isn't going across the bridge correctly is just that it is the only thing left in the path. I am running Ruby 1.8.2 (default apple install) on a G4. RubyCocoa was prebuilt. Dave. > > Thanks > > Tim > > On 19 Jun 2007, at 22:45, Dave Baldwin wrote: > >> RubyCocoa.com has a nice demo of outline views: http://rubycocoa.com/ >> outline-views >> >> The screen shot shows an expanded hierarchy with nodes with no >> children not having the disclosure triangle, as expected. Running >> the demo always shows disclosure triangles for every node, even those >> with no children. >> >> The return value of outlineView_isItemExpandable is always being >> treated as if it were YES. It looks like the Ruby true and false >> values are not being converted to YES and NO going across the bridge >> and trying to use OSX::NO instead just caused errors. >> >> I have the same error in my own app that uses outline views and I >> have confirmed Cocoa AppKit OutlineView example that the >> outlineView_isItemExpandable method controls the presence or absence >> of the disclosure triangle. >> >> I am using RubyCocoa-0.11.1 >> >> Dave. >> >> >> >> >> >> --------------------------------------------------------------------- >> - >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Andrei D. <adr...@gm...> - 2007-06-20 05:47:38
|
Yeah, maybe "using" it is a big strong. I just realised that I *don't* really use it, and I have another question :). Supposing that I didn't have libffi installed, how do install the one in misc/libffi ? the build process only creates the .a, but when compiling rubycocoa.bundle -dynamic is specified etc. I uninstalled libffi, and then, when running I get a complaint that libffi.dylib does not exist. I tried running the usual steps of configure etc, but i think there should be some options, because I get errors in configure "install-sh can't be found in ./../../" Thanks, Andrei On 6/20/07, Laurent Sansonetti <lsa...@ap...> wrote: > > Hi Andrei, > > On Jun 19, 2007, at 2:37 PM, Andrei DRAGOMIR wrote: > > > Hello everyone. > > > > > > I have a really strange issue with rubycocoa (svn version) and > > describe it here, in hope that someone can help me > > > > So, I downloaded rubycocoa from svn, config / setup / install, and > > any sample I try crashes. When running with -d, I get something like > > this in output: > > > > ----- > > > ruby -d HelloWorld.rb > > ... > > load of stuff that works > > ... > > 2007-06-19 22:00:23.359 ruby[7850] OBJWRP : ocm_closure_handler ... > > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : decoding method > > encoding '@ 12@0:4@8' manually > > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : retval -> @ > > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : skipping first two args > > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : argc -> 1 > > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : arg[0] -> @ > > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > > (NSBundle.bundleWithPath:): args_count=1 ret_type=@ > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 1 given 1 > > delta 2 > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : arg[0] (0x8304) : @ > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : retval (0x9fcf0037) : @ > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : allocated 4 bytes for > > the result > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call 0x9fcc66ca with > > 3 args > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call done > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : getting return value > > (0xbfffc570 of type '@') > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : got return value > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi dispatch done > > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > > (bundleWithPath:) done > > 2007-06-19 22:00: 23.360 ruby[7850] OBJWRP : ocm_closure_handler ok > > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_closure_handler ... > > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : decoding method > > encoding 'c8@0:4' manually > > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : retval -> c > > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : skipping first two args > > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : argc -> 0 > > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > > (NSBundle#load): args_count=0 ret_type=c > > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : found metadata description > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 0 given 0 > > delta 2 > > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : detected 0 array length > > argument(s) > > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : coercing result from > > octype 'c' to octype 'B' > > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : retval (0x9fcf0037) : B > > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : allocated 1 bytes for > > the result > > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : ffi_call 0x9fcf5752 with > > 2 args > > Illegal instruction > > ... > > > > I have succeeded in tracking down the issue up to the call to > > <#NSBundle ... >.oc_load, where the NSBundle instance is AppKit. > > > > This is called from Framework/Resources/ruby/osx/objc.cocoa.rb, in > > the line : OSX.require_framework('AppKit') > > > > More to the point, the offending code is in oc_import.rb, in the > > require_framework function: > > > > def require_framework... > > bundle, path = _bundle_path_for_framework(framework) > > bundle.oc_load > > if not bundle.isLoaded? then > > raise ArgumentError, "Can't load framework '#{framework}'" > > end > > > > > > My configuration: MBP Core duo 2, Tiger 10.4.9, ruby 1.8.6 from > > macports. > > > > I also have libffi 2.1 from macports, but I modified the pre- > > config.rb script to use the one in /opt/local. I suspect that that > > is where the problem is from, but the problem reproduces with both > > (the one in misc, and the one in macports). > > > > Any ideas / help would be highly appreciated. > > Are you sure you tried using the version in misc/libffi? This is the > first report of this kind that has been submitted yet and I suspect a > problem in your build environment. > > On the other side, the libffi version in macports is different from > the version we have, on many points, and you should always use the > version we provide, on systems below or equal to Tiger. > > Thanks, > Laurent > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: <jea...@gm...> - 2007-06-20 05:46:08
|
On 6/19/07, Jon Baer <jo...@gm...> wrote: > > Anyone have tips on how to figure out what causes this? > > Exception raised during posting of notification. Ignored. > exception: *** -[NSCFDictionary setObject:forKey:]: attempt to insert > nil value the cocoa documentation is indispensable and entirely invaluable when developing cocoa applications regardless of the implementation language. this is a cocoa-level exception, the documentation for NSMutableDictionary says: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableDictionary/setObject:forKey : Raises an NSInvalidArgumentException if aKey or anObject is nil. If you need to represent a nil value in the dictionary, use NSNull. cheers, jean-pierre |
From: Jon B. <jo...@gm...> - 2007-06-20 03:05:17
|
Nope, feel free to include. Will upload more when I get a chance. Thanks. - Jon On Jun 19, 2007, at 10:18 PM, Laurent Sansonetti wrote: > Hi Jon, > > This is a cool example :-) > > Would you mind if I commit it to the official samples repository? > > # This would mean that it would be covered by the RubyCocoa license. > > Thanks, > Laurent > > On Jun 19, 2007, at 10:30 AM, Jon Baer wrote: > >> Hi, >> >> I threw together a small Drag + Drop sample app, you can grab it >> here: >> >> http://jonbaer.textdriven.com/rubycocoa/SimpleDrag.zip >> >> Let me know if it was what you were looking for. >> >> (Forgive mistakes, still learning) >> >> - Jon >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Laurent S. <lsa...@ap...> - 2007-06-20 02:21:30
|
Hi Jon, Would it be possible to post here an Xcode sample project that reproduces the problem, so we can investigate further? Thanks, Laurent On Jun 19, 2007, at 3:39 PM, Jon Baer wrote: > Id like to second that (might be related), I have been noticing this > error message lately: > > 2007-06-19 18:30:28.131 FBMenuBar[2281] Exception raised during > posting of notification. Ignored. exception: *** -[NSCFDictionary > setObject:forKey:]: attempt to insert nil value > > If I wrap setObject_forKey + trap it I get this: > > /Users/jonbaer/Desktop/FBMenuBar/build/Debug/FBMenuBar.app/Contents/ > Resources/rb_main.rb:28:in `NSApplicationMain': undefined method > `new_with_ocid' for false:FalseClass (NoMethodError) > from /Users/jonbaer/Desktop/FBMenuBar/build/Debug/FBMenuBar.app/ > Contents/Resources/rb_main.rb:28 > > I don't know if that helps or is really part of something I did but I > also upgraded to latest svn. I am overriding an NSPanel and > returning false for a few methods, is this right? > > - Jon > > On Jun 19, 2007, at 5:45 PM, Dave Baldwin wrote: > >> RubyCocoa.com has a nice demo of outline views: http://rubycocoa.com/ >> outline-views >> >> The screen shot shows an expanded hierarchy with nodes with no >> children not having the disclosure triangle, as expected. Running >> the demo always shows disclosure triangles for every node, even those >> with no children. >> >> The return value of outlineView_isItemExpandable is always being >> treated as if it were YES. It looks like the Ruby true and false >> values are not being converted to YES and NO going across the bridge >> and trying to use OSX::NO instead just caused errors. >> >> I have the same error in my own app that uses outline views and I >> have confirmed Cocoa AppKit OutlineView example that the >> outlineView_isItemExpandable method controls the presence or absence >> of the disclosure triangle. >> >> I am using RubyCocoa-0.11.1 >> >> Dave. >> >> >> >> >> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Laurent S. <lsa...@ap...> - 2007-06-20 02:19:01
|
Hi Jon, This is a cool example :-) Would you mind if I commit it to the official samples repository? # This would mean that it would be covered by the RubyCocoa license. Thanks, Laurent On Jun 19, 2007, at 10:30 AM, Jon Baer wrote: > Hi, > > I threw together a small Drag + Drop sample app, you can grab it here: > > http://jonbaer.textdriven.com/rubycocoa/SimpleDrag.zip > > Let me know if it was what you were looking for. > > (Forgive mistakes, still learning) > > - Jon > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Laurent S. <lsa...@ap...> - 2007-06-20 02:15:17
|
Hi Andrei, On Jun 19, 2007, at 2:37 PM, Andrei DRAGOMIR wrote: > Hello everyone. > > > I have a really strange issue with rubycocoa (svn version) and > describe it here, in hope that someone can help me > > So, I downloaded rubycocoa from svn, config / setup / install, and > any sample I try crashes. When running with -d, I get something like > this in output: > > ----- > > ruby -d HelloWorld.rb > ... > load of stuff that works > ... > 2007-06-19 22:00:23.359 ruby[7850] OBJWRP : ocm_closure_handler ... > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : decoding method > encoding '@ 12@0:4@8' manually > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : retval -> @ > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : skipping first two args > 2007-06-19 22:00:23.359 ruby[7850] DATACNV : argc -> 1 > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : arg[0] -> @ > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > (NSBundle.bundleWithPath:): args_count=1 ret_type=@ > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 1 given 1 > delta 2 > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : arg[0] (0x8304) : @ > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : retval (0x9fcf0037) : @ > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : allocated 4 bytes for > the result > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call 0x9fcc66ca with > 3 args > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call done > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : getting return value > (0xbfffc570 of type '@') > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : got return value > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi dispatch done > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > (bundleWithPath:) done > 2007-06-19 22:00: 23.360 ruby[7850] OBJWRP : ocm_closure_handler ok > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_closure_handler ... > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : decoding method > encoding 'c8@0:4' manually > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : retval -> c > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : skipping first two args > 2007-06-19 22:00:23.360 ruby[7850] DATACNV : argc -> 0 > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send > (NSBundle#load): args_count=0 ret_type=c > 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : found metadata description > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 0 given 0 > delta 2 > 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : detected 0 array length > argument(s) > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : coercing result from > octype 'c' to octype 'B' > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : retval (0x9fcf0037) : B > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : allocated 1 bytes for > the result > 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : ffi_call 0x9fcf5752 with > 2 args > Illegal instruction > ... > > I have succeeded in tracking down the issue up to the call to > <#NSBundle ... >.oc_load, where the NSBundle instance is AppKit. > > This is called from Framework/Resources/ruby/osx/objc.cocoa.rb, in > the line : OSX.require_framework('AppKit') > > More to the point, the offending code is in oc_import.rb, in the > require_framework function: > > def require_framework... > bundle, path = _bundle_path_for_framework(framework) > bundle.oc_load > if not bundle.isLoaded? then > raise ArgumentError, "Can't load framework '#{framework}'" > end > > > My configuration: MBP Core duo 2, Tiger 10.4.9, ruby 1.8.6 from > macports. > > I also have libffi 2.1 from macports, but I modified the pre- > config.rb script to use the one in /opt/local. I suspect that that > is where the problem is from, but the problem reproduces with both > (the one in misc, and the one in macports). > > Any ideas / help would be highly appreciated. Are you sure you tried using the version in misc/libffi? This is the first report of this kind that has been submitted yet and I suspect a problem in your build environment. On the other side, the libffi version in macports is different from the version we have, on many points, and you should always use the version we provide, on systems below or equal to Tiger. Thanks, Laurent |
From: Jon B. <jo...@gm...> - 2007-06-19 22:40:21
|
Id like to second that (might be related), I have been noticing this error message lately: 2007-06-19 18:30:28.131 FBMenuBar[2281] Exception raised during posting of notification. Ignored. exception: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value If I wrap setObject_forKey + trap it I get this: /Users/jonbaer/Desktop/FBMenuBar/build/Debug/FBMenuBar.app/Contents/ Resources/rb_main.rb:28:in `NSApplicationMain': undefined method `new_with_ocid' for false:FalseClass (NoMethodError) from /Users/jonbaer/Desktop/FBMenuBar/build/Debug/FBMenuBar.app/ Contents/Resources/rb_main.rb:28 I don't know if that helps or is really part of something I did but I also upgraded to latest svn. I am overriding an NSPanel and returning false for a few methods, is this right? - Jon On Jun 19, 2007, at 5:45 PM, Dave Baldwin wrote: > RubyCocoa.com has a nice demo of outline views: http://rubycocoa.com/ > outline-views > > The screen shot shows an expanded hierarchy with nodes with no > children not having the disclosure triangle, as expected. Running > the demo always shows disclosure triangles for every node, even those > with no children. > > The return value of outlineView_isItemExpandable is always being > treated as if it were YES. It looks like the Ruby true and false > values are not being converted to YES and NO going across the bridge > and trying to use OSX::NO instead just caused errors. > > I have the same error in my own app that uses outline views and I > have confirmed Cocoa AppKit OutlineView example that the > outlineView_isItemExpandable method controls the presence or absence > of the disclosure triangle. > > I am using RubyCocoa-0.11.1 > > Dave. > > > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Sal S. <sal...@gm...> - 2007-06-19 22:26:19
|
thanks that was exactly what I was looking for -Sal |
From: Tim P. <he...@ti...> - 2007-06-19 21:54:52
|
Hey Dave I actually wrote that example and it appears to run ok for me? I am running the latest version of ruby cocoa also. The method you detail which is part of the delegate actually calls this on the node: return @children.count > 0 ? true : false which, should give the correct behavior - i.e. if its false that makes sure there is no triangle which is the default. Even when i added a print statement to check the output i get the correct true or false value. What makes you think they are not going over the bridge correctly? When you download the demo fresh, and just build it, do you still see the odd behavior you explain? Thanks Tim On 19 Jun 2007, at 22:45, Dave Baldwin wrote: > RubyCocoa.com has a nice demo of outline views: http://rubycocoa.com/ > outline-views > > The screen shot shows an expanded hierarchy with nodes with no > children not having the disclosure triangle, as expected. Running > the demo always shows disclosure triangles for every node, even those > with no children. > > The return value of outlineView_isItemExpandable is always being > treated as if it were YES. It looks like the Ruby true and false > values are not being converted to YES and NO going across the bridge > and trying to use OSX::NO instead just caused errors. > > I have the same error in my own app that uses outline views and I > have confirmed Cocoa AppKit OutlineView example that the > outlineView_isItemExpandable method controls the presence or absence > of the disclosure triangle. > > I am using RubyCocoa-0.11.1 > > Dave. > > > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Tim P. <he...@ti...> - 2007-06-19 21:47:49
|
For sure I totally agree - it can be very difficult to keep it all black and white, especially when there are a lot of IB outlets kicking about I tend to find :) Thanks for your advice, i'll make the changes and let the list know how it goes!!! All the best Tim On 19 Jun 2007, at 20:49, Pierce T. Wetter III wrote: > But its rarely so cut and dried as to where to put things because > MVC rarely maps well to precise divisions. |
From: Dave B. <dav...@3d...> - 2007-06-19 21:45:36
|
RubyCocoa.com has a nice demo of outline views: http://rubycocoa.com/ outline-views The screen shot shows an expanded hierarchy with nodes with no children not having the disclosure triangle, as expected. Running the demo always shows disclosure triangles for every node, even those with no children. The return value of outlineView_isItemExpandable is always being treated as if it were YES. It looks like the Ruby true and false values are not being converted to YES and NO going across the bridge and trying to use OSX::NO instead just caused errors. I have the same error in my own app that uses outline views and I have confirmed Cocoa AppKit OutlineView example that the outlineView_isItemExpandable method controls the presence or absence of the disclosure triangle. I am using RubyCocoa-0.11.1 Dave. |
From: Andrei D. <adr...@gm...> - 2007-06-19 21:37:49
|
Hello everyone. I have a really strange issue with rubycocoa (svn version) and describe it here, in hope that someone can help me So, I downloaded rubycocoa from svn, config / setup / install, and any sample I try crashes. When running with -d, I get something like this in output: ----- > ruby -d HelloWorld.rb ... load of stuff that works ... 2007-06-19 22:00:23.359 ruby[7850] OBJWRP : ocm_closure_handler ... 2007-06-19 22:00:23.359 ruby[7850] DATACNV : decoding method encoding '@ 12@0:4@8' manually 2007-06-19 22:00:23.359 ruby[7850] DATACNV : retval -> @ 2007-06-19 22:00:23.359 ruby[7850] DATACNV : skipping first two args 2007-06-19 22:00:23.359 ruby[7850] DATACNV : argc -> 1 2007-06-19 22:00:23.360 ruby[7850] DATACNV : arg[0] -> @ 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send ( NSBundle.bundleWithPath:): args_count=1 ret_type=@ 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 1 given 1 delta 2 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : arg[0] (0x8304) : @ 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : retval (0x9fcf0037) : @ 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : allocated 4 bytes for the result 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call 0x9fcc66ca with 3 args 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi_call done 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : getting return value (0xbfffc570 of type '@') 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : got return value 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : ffi dispatch done 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send (bundleWithPath:) done 2007-06-19 22:00: 23.360 ruby[7850] OBJWRP : ocm_closure_handler ok 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_closure_handler ... 2007-06-19 22:00:23.360 ruby[7850] DATACNV : decoding method encoding 'c8@0:4' manually 2007-06-19 22:00:23.360 ruby[7850] DATACNV : retval -> c 2007-06-19 22:00:23.360 ruby[7850] DATACNV : skipping first two args 2007-06-19 22:00:23.360 ruby[7850] DATACNV : argc -> 0 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : ocm_send (NSBundle#load): args_count=0 ret_type=c 2007-06-19 22:00:23.360 ruby[7850] OBJWRP : found metadata description 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : argc expected 0 given 0 delta 2 2007-06-19 22:00:23.360 ruby[7850] LIBFFI : detected 0 array length argument(s) 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : coercing result from octype 'c' to octype 'B' 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : retval (0x9fcf0037) : B 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : allocated 1 bytes for the result 2007-06-19 22:00:23.361 ruby[7850] LIBFFI : ffi_call 0x9fcf5752 with 2 args Illegal instruction ... I have succeeded in tracking down the issue up to the call to <#NSBundle ... >.oc_load, where the NSBundle instance is AppKit. This is called from Framework/Resources/ruby/osx/objc.cocoa.rb, in the line : OSX.require_framework('AppKit') More to the point, the offending code is in oc_import.rb, in the require_framework function: def require_framework... bundle, path = _bundle_path_for_framework(framework) bundle.oc_load if not bundle.isLoaded? then raise ArgumentError, "Can't load framework '#{framework}'" end My configuration: MBP Core duo 2, Tiger 10.4.9, ruby 1.8.6 from macports. I also have libffi 2.1 from macports, but I modified the pre-config.rbscript to use the one in /opt/local. I suspect that that is where the problem is from, but the problem reproduces with both (the one in misc, and the one in macports). Any ideas / help would be highly appreciated. Thanks in advance Andrei |
From: Pierce T. W. I. <pi...@tw...> - 2007-06-19 19:50:05
|
On Jun 19, 2007, at 11:37 AM, Tim Perrett wrote: > Thanks Pierce, thats really helpfull > > I think i will use coredata for this project I am doing as it seems > to fit the bill! > > Otherwise, when your choosing how to set up the coredata application, > I am getting a little conufussed with is how to best arrange my > application, and also how to reference coredata arrays that we > instansiate in the nib files in the ruby code? is it by name? If you have a list of objects you need to display. You can drag an "ArrayContoller" into your nib file, and if you tell it its an "Entity", it automatically fetches the data via CoreData. If you do the core data tutorial, they show dragging an entity into Interface builder which builds a lot of that stuff automatically for you. Basic idea behind CoreData & bindings is that you bind things by a name. Say you have a really simple interface: a checkbox. Let's say the value of the checkbox is whether or not to explode. Now normally to implement the UI, you would have to: 1. Setup the checkbox with the value of the "shouldExplode" variable. 2. Monitor when the user clicked on the checkbox. Usually you would map this to an action, then in the action, you would have to pull the new value of the checkbox, then update the variable. 3. Re-setup the checkbox everytime you change shouldExplode. What bindings do is let you bind the checkbox to the value of "shouldExplode" on some object. Then the UI will call shouldExplode() to get the value, and call setShouldExplode to set the value. The binding stuff can be chained, so if the shouldExplode variable is 5 objects deep, and you bind to: object1.object2.object3.object4.object5.shouldExplode, that's just the same thing as: object1().object2().object3().object4().object5().shouldExplode() That is, Key-Value-Coding is really just a convention on how to find stuff, plus some optimizations behind the scenes to be really fast. Key Value Observing is built on top of KVC to let you see when certain things change, which is how bindings work. So if you bind a checkbox to shouldExplode, and you change that value in code, the checkbox knows to update. Conversely when the checkbox changes, it knows to update the value. It gets more complicated when you have an array of things and a table view showing a scrolling list of checkboxes, but in that case, you're effectively putting a for loop in there. The binding is a bit weird to me because you bind at the column level down. So the binding will look something like: arrayController.arrangedObjects.shouldExplode Which tells a table view: arrangedObjects has a list of objects, bind the checkbox value to shouldExplode for all of them. > > > The model holds the data mapping stuff, so thats fine I understand > how that works with the gui. Then I am going to have a controller to > actually execute the actions (probably with a managed object alias > like in Eloys screen cast for then accessing the other array) and > feed back to the gui with the relevant outlets. Is it ok to have a > WindowController subclass do this? So it would be the nibs owner as > well. In Frictionless ActionBrowser is just a regular NSObject. I suppose it could have been a WindowController subclass (and I would have gotten some default behavior I probably need) but its not required. I have it as the nibs owner and its also the delegate for a number of views. I'll probably have to separate some of the delegate functionality out into other objects. > I know that all sounds so vauge, I am new to writing cocoa > applications so I guess this is more of a general question on how do > you arrange things when you start having a various windows and > objects kicking around. For the most part I presume that the bulk of > the code for actually making 'things work' would go in that windows > WindowControler? That would keep in with the MVC model, yes. But its rarely so cut and dried as to where to put things because MVC rarely maps well to precise divisions. Pierce |
From: Tim P. <he...@ti...> - 2007-06-19 18:39:28
|
Thanks Pierce, thats really helpfull I think i will use coredata for this project I am doing as it seems to fit the bill! Otherwise, when your choosing how to set up the coredata application, I am getting a little conufussed with is how to best arrange my application, and also how to reference coredata arrays that we instansiate in the nib files in the ruby code? is it by name? The model holds the data mapping stuff, so thats fine I understand how that works with the gui. Then I am going to have a controller to actually execute the actions (probably with a managed object alias like in Eloys screen cast for then accessing the other array) and feed back to the gui with the relevant outlets. Is it ok to have a WindowController subclass do this? So it would be the nibs owner as well. I know that all sounds so vauge, I am new to writing cocoa applications so I guess this is more of a general question on how do you arrange things when you start having a various windows and objects kicking around. For the most part I presume that the bulk of the code for actually making 'things work' would go in that windows WindowControler? Any advice is very much welcomed!!! Tim |