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: S. W. <sbw...@ya...> - 2009-02-10 09:34:06
|
I want to call back and forth between Ruby and ObjC objects, I've figured it out in a basic way and posted it here: http://simonwoodside.com/weblog/2009/2/10/wondeful_joy_mix_ruby_and/ However, it would be nice if on the ObjC side I could actually declare objects of a type defined on the Ruby side instead of using "id"... and have the compiler, or at least just the linker understand that. Does anyone know if it's possible? --simon PS sorry for cross-posting with the google group, but i realized that it doesn't seem to be active. |
From: S. W. <sbw...@ya...> - 2009-02-10 09:34:02
|
I want to call back and forth between Ruby and ObjC objects, I've figured it out in a basic way and posted it here: http://simonwoodside.com/weblog/2009/2/10/wondeful_joy_mix_ruby_and/ However, it would be nice if on the ObjC side I could actually declare objects of a type defined on the Ruby side instead of using "id"... and have the compiler, or at least just the linker understand that. Does anyone know if it's possible? --simon PS sorry for cross-posting with the google group, but i realized that it doesn't seem to be active. |
From: Eloy D. <elo...@gm...> - 2009-02-05 11:12:43
|
Hi, As some of you might already know, we are organizing a Ruby and Cocoa only conference in may in Amsterdam. This email is purely meant as a request for proposals, so we can work on the schedule. Once we have the details we will post an elaborate article about it on our blog. So please send your proposals or questions to me, or ping me (alloy) on IRC; #ruby-osx on freenode. The available time slots for talks range from 10 mins. to 45 mins. Cheers, Eloy |
From: Eloy D. <elo...@gm...> - 2009-01-31 14:48:57
|
> Plus, everyione here is very friendly - except > Eloy, who can't help pointing out that the long convoluted solutions > that I suggest can be replaced by one line of code - very > embarassing! :-) Hahaha, I'll try to make them at least 2 lines next time ;-) Eloy |
From: Allison N. <dem...@ma...> - 2009-01-31 08:10:23
|
No worries :-) The bad news is that no, there isn't any documentation. Not in the sense of a book, or tutorials or that sort of thing. At least, not that I'm aware of. The good news is that there are lots of good examples of RubyCocoa code for implemnting the projects in the Hillegass book. They are already on your hard drive, in /Developer/Examples/RubyCocoa That's how I figured out this problem. By the time you've run through the whole Hillegass book, you'll have found most of the gotchas - I haven't run into any new ones since finishing the book. If you've tried that and it didn't give you your answer, then of course, you can just ask here - you've probably noticed that we don't have a lot of traffic on the list, so you don't have to worry about people getting snarky. Plus, everyione here is very friendly - except Eloy, who can't help pointing out that the long convoluted solutions that I suggest can be replaced by one line of code - very embarassing! :-) Anyway, I don't think the doc situation is ever going to improve, as we're all pretty much just hanging around waiting for MacRuby to arrive in an official OS X release. But honestly, I haven't really felt that we need any... Anyway, I'm glad I was able to help :-) Alli Le 31 janv. 09 à 08:23, Steven D. Arnold a écrit : > Hey Alli, that did it! Thanks so much for the help. Is there any > documentation for these kinds of functions (e.g. are there more > besides the ones you mentioned)? > > Thanks again, that works great, I am back on track. :-) > > steven > > On Jan 28, 2009, at 2:02 PM, Allison Newman wrote: > >> Steven, >> >> Are you aware of kvc_accessor and kvc_array_accessor? >> >> For example, at the start of a class definition, when I have a class >> attribute that I want to be accessed by key value coding, I put: >> >> class Database < NSObject >> attr_accessor :last_update, :appartements, :arrondisements >> kvc_array_accessor :appartements, :arrondisements >> >> Note that the attr_accessors are necessary because I also access >> these values through normal ruby programming. >> >> kvc_array_accessor is used when the attribute to be accessed is an >> array, and kvc_accessor is used when it's just a normal attribute >> that you are accessing. >> >> I know that I got bitten by this when doing raiseman. >> >> Hope that helps, >> >> Alli >> >> >> Le 28 janv. 09 à 07:26, Steven D. Arnold a écrit : >> >>> On Jan 27, 2009, at 3:50 AM, Eloy Duran wrote: >>> >>>> Could you try copying over your source files to the Objective-C >>>> version >>>> you wrote to see if the problem might have been the xcode template >>>> that was used? >>> >>> When I try to do that, I run into a number of problems. First of >>> all, >>> the ObjC project uses XIB files rather than NIB files. The Ruby >>> program uses NIB files. I am not familiar with XIB files; I assume >>> they are something new similar to a NIB. >>> >>> Second, when I try to copy the NIB files to the ObjC project, it >>> doesn't work. The files do not appear in the Resources section, >>> which >>> is where I dropped them, and where they are located in the RubyCocoa >>> project as well. >>> >>> When I try to run the project even though the NIB files are not >>> present, I get this error: >>> >>> /Users/thoth/Source/learning/raiseman-objc/build/Debug/raiseman- >>> objc.app/Contents/MacOS/raiseman-objc >>> Undefined symbols: >>> "_RBApplicationMain", referenced from: >>> _main in main.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> "_RBApplicationMain", referenced from: >>> _main in main.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> >>> main.m looks like this: >>> >>> #import <Cocoa/Cocoa.h> >>> #import <RubyCocoa/RBRuntime.h> >>> >>> int main(int argc, char *argv[]) >>> { >>> // return NSApplicationMain(argc, (const char **) argv); >>> return RBApplicationMain("rb_main.rb", argc, argv); >>> } >>> >>> Any thoughts? >>> >>> steven >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> SourcForge Community >>> SourceForge wants to tell your story. >>> http://p.sf.net/sfu/sf-spreadtheword >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Steven D. A. <st...@ne...> - 2009-01-31 07:39:09
|
Hey Brian, what you are reading is the place where Hillegass attempt to describe how to implement undo for edits. For example, if I type in "When in the course of human events" in a text field, if I hit undo, that text should be removed. The kind of undoing that I implemented is the kind that goes right up to page 145, which is where I got stuck. In that undo, we merely manage the @employees array, that is, remove the most recent addition if undo is selected. For that kind of undoing, startObservingObject is not required. Alli's very helpful suggestion was to look at the kvc_array_accessor method as a way to inform RubyCocoa that we are employing key-value bonding on a particular element. This is not necessary in ObjC, therefore Hillegass didn't discuss it. Note that Brian Marick's book, RubyCocoa, which is still in beta on the Pragmatic Programmer's website, does discuss the issue to some degree. steven On Jan 28, 2009, at 6:45 PM, Brian Marick wrote: > I'm confused by the Objective-C version. It doesn't have the > MyDocument.m method startObservingPerson (on p. 146 of Hillegass). It > shouldn't work without setting up observing. (I can't check - won't > build in my older version of Xcode.) > > Am I looking at the wrong pages? > > On Jan 26, 2009, at 1:24 PM, Steven D. Arnold wrote: > >> Following up on my previous post related to the "raiseman" >> application covered in Aaron Hillegass's Cocoa Programming for Mac >> OS X..... I implemented the same program in Objective-C, an >> identical analogue to the program in Ruby, and it works fine in >> Objective-C. That is, the expected methods to insert and remove >> "employee" objects (see below) are called in Obj-C but not >> RubyCocoa. That tells me there is a bug in the RubyCocoa interface >> that prevents key-value coding from working properly.....or possibly >> I am missing some detail in my implementation of the RubyCocoa >> program. The Objective-C project which works fine is attached. Run >> the program, and then add several records and undo them by typing >> command-Z (or selecting undo from the Edit menu). If you do this, >> the key-value coding will work fine, that is, the following methods >> will be called to undo and redo: >> >> - (void)insertObject:(Person *)p inEmployeesAtIndex:(int)idx >> - (void)removeObjectFromEmployeesAtIndex:(int)idx >> >> The equivalent methods in the Ruby implementation are not called: >> >> def insertObject_inEmployeesAtIndex(p, index) >> def removeObjectFromEmployeesAtIndex(index) >> >> I have also tried these Ruby methods with a trailing _ just to be >> sure that's not the problem. It didn't change the result. >> >> steven >> >> >> <raiseman-objc.zip> >> >> >> >> >> On Jan 24, 2009, at 11:33 PM, Steven Arnold wrote: >> >>> Hello, I am working through the book Cocoa Programming for Mac OS X >>> by Aaron Hillegass using RubyCocoa rather than Objective-C, and I >>> am at the section where we are attempting to implement undo for the >>> add new employee and delete new employee buttons. >>> >>> My controller object as an @employees array as a member value. >>> Given this name, I have implemented, in my controller, the >>> functions: >>> >>> insertObject_inEmployeesAtIndex(p, idx), and >>> removeObjctFromEmployeesAtIndex(idx) >>> >>> According to the book, "[...] these methods will be called >>> automatically when the NSArrayController wishes ro insert or remove >>> messages." However, my functions do not seem to be getting >>> called. I have put NSLog statements to see whether they are being >>> called, but right now it appears not. >>> >>> My project is packaged below. If you have any idea what I might be >>> doing wrong, please let me know! >>> >>> eteven >>> >>> >>> <raiseman.zip> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> SourcForge Community >>> SourceForge wants to tell your story. >>> http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > > ----- > Brian Marick, independent consultant > Mostly on agile methods with a testing slant > www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Steven D. A. <st...@ne...> - 2009-01-31 07:24:18
|
Hey Alli, that did it! Thanks so much for the help. Is there any documentation for these kinds of functions (e.g. are there more besides the ones you mentioned)? Thanks again, that works great, I am back on track. :-) steven On Jan 28, 2009, at 2:02 PM, Allison Newman wrote: > Steven, > > Are you aware of kvc_accessor and kvc_array_accessor? > > For example, at the start of a class definition, when I have a class > attribute that I want to be accessed by key value coding, I put: > > class Database < NSObject > attr_accessor :last_update, :appartements, :arrondisements > kvc_array_accessor :appartements, :arrondisements > > Note that the attr_accessors are necessary because I also access > these values through normal ruby programming. > > kvc_array_accessor is used when the attribute to be accessed is an > array, and kvc_accessor is used when it's just a normal attribute > that you are accessing. > > I know that I got bitten by this when doing raiseman. > > Hope that helps, > > Alli > > > Le 28 janv. 09 à 07:26, Steven D. Arnold a écrit : > >> On Jan 27, 2009, at 3:50 AM, Eloy Duran wrote: >> >>> Could you try copying over your source files to the Objective-C >>> version >>> you wrote to see if the problem might have been the xcode template >>> that was used? >> >> When I try to do that, I run into a number of problems. First of >> all, >> the ObjC project uses XIB files rather than NIB files. The Ruby >> program uses NIB files. I am not familiar with XIB files; I assume >> they are something new similar to a NIB. >> >> Second, when I try to copy the NIB files to the ObjC project, it >> doesn't work. The files do not appear in the Resources section, >> which >> is where I dropped them, and where they are located in the RubyCocoa >> project as well. >> >> When I try to run the project even though the NIB files are not >> present, I get this error: >> >> /Users/thoth/Source/learning/raiseman-objc/build/Debug/raiseman- >> objc.app/Contents/MacOS/raiseman-objc >> Undefined symbols: >> "_RBApplicationMain", referenced from: >> _main in main.o >> ld: symbol(s) not found >> collect2: ld returned 1 exit status >> "_RBApplicationMain", referenced from: >> _main in main.o >> ld: symbol(s) not found >> collect2: ld returned 1 exit status >> >> main.m looks like this: >> >> #import <Cocoa/Cocoa.h> >> #import <RubyCocoa/RBRuntime.h> >> >> int main(int argc, char *argv[]) >> { >> // return NSApplicationMain(argc, (const char **) argv); >> return RBApplicationMain("rb_main.rb", argc, argv); >> } >> >> Any thoughts? >> >> steven >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Brian M. <ma...@ex...> - 2009-01-28 23:46:02
|
I'm confused by the Objective-C version. It doesn't have the MyDocument.m method startObservingPerson (on p. 146 of Hillegass). It shouldn't work without setting up observing. (I can't check - won't build in my older version of Xcode.) Am I looking at the wrong pages? On Jan 26, 2009, at 1:24 PM, Steven D. Arnold wrote: > Following up on my previous post related to the "raiseman" > application covered in Aaron Hillegass's Cocoa Programming for Mac > OS X..... I implemented the same program in Objective-C, an > identical analogue to the program in Ruby, and it works fine in > Objective-C. That is, the expected methods to insert and remove > "employee" objects (see below) are called in Obj-C but not > RubyCocoa. That tells me there is a bug in the RubyCocoa interface > that prevents key-value coding from working properly.....or possibly > I am missing some detail in my implementation of the RubyCocoa > program. The Objective-C project which works fine is attached. Run > the program, and then add several records and undo them by typing > command-Z (or selecting undo from the Edit menu). If you do this, > the key-value coding will work fine, that is, the following methods > will be called to undo and redo: > > - (void)insertObject:(Person *)p inEmployeesAtIndex:(int)idx > - (void)removeObjectFromEmployeesAtIndex:(int)idx > > The equivalent methods in the Ruby implementation are not called: > > def insertObject_inEmployeesAtIndex(p, index) > def removeObjectFromEmployeesAtIndex(index) > > I have also tried these Ruby methods with a trailing _ just to be > sure that's not the problem. It didn't change the result. > > steven > > > <raiseman-objc.zip> > > > > > On Jan 24, 2009, at 11:33 PM, Steven Arnold wrote: > >> Hello, I am working through the book Cocoa Programming for Mac OS X >> by Aaron Hillegass using RubyCocoa rather than Objective-C, and I >> am at the section where we are attempting to implement undo for the >> add new employee and delete new employee buttons. >> >> My controller object as an @employees array as a member value. >> Given this name, I have implemented, in my controller, the functions: >> >> insertObject_inEmployeesAtIndex(p, idx), and >> removeObjctFromEmployeesAtIndex(idx) >> >> According to the book, "[...] these methods will be called >> automatically when the NSArrayController wishes ro insert or remove >> messages." However, my functions do not seem to be getting >> called. I have put NSLog statements to see whether they are being >> called, but right now it appears not. >> >> My project is packaged below. If you have any idea what I might be >> doing wrong, please let me know! >> >> eteven >> >> >> <raiseman.zip> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Allison N. <dem...@ma...> - 2009-01-28 19:02:58
|
Steven, Are you aware of kvc_accessor and kvc_array_accessor? For example, at the start of a class definition, when I have a class attribute that I want to be accessed by key value coding, I put: class Database < NSObject attr_accessor :last_update, :appartements, :arrondisements kvc_array_accessor :appartements, :arrondisements Note that the attr_accessors are necessary because I also access these values through normal ruby programming. kvc_array_accessor is used when the attribute to be accessed is an array, and kvc_accessor is used when it's just a normal attribute that you are accessing. I know that I got bitten by this when doing raiseman. Hope that helps, Alli Le 28 janv. 09 à 07:26, Steven D. Arnold a écrit : > On Jan 27, 2009, at 3:50 AM, Eloy Duran wrote: > >> Could you try copying over your source files to the Objective-C >> version >> you wrote to see if the problem might have been the xcode template >> that was used? > > When I try to do that, I run into a number of problems. First of all, > the ObjC project uses XIB files rather than NIB files. The Ruby > program uses NIB files. I am not familiar with XIB files; I assume > they are something new similar to a NIB. > > Second, when I try to copy the NIB files to the ObjC project, it > doesn't work. The files do not appear in the Resources section, which > is where I dropped them, and where they are located in the RubyCocoa > project as well. > > When I try to run the project even though the NIB files are not > present, I get this error: > > /Users/thoth/Source/learning/raiseman-objc/build/Debug/raiseman- > objc.app/Contents/MacOS/raiseman-objc > Undefined symbols: > "_RBApplicationMain", referenced from: > _main in main.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > "_RBApplicationMain", referenced from: > _main in main.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > > main.m looks like this: > > #import <Cocoa/Cocoa.h> > #import <RubyCocoa/RBRuntime.h> > > int main(int argc, char *argv[]) > { > // return NSApplicationMain(argc, (const char **) argv); > return RBApplicationMain("rb_main.rb", argc, argv); > } > > Any thoughts? > > steven > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2009-01-28 08:13:27
|
No need to copy over the NIB, you should have a functioning one in XIB from your objc test. About the undefined symbol, have you added the RubyCocoa.framework to your project and linking to it? Eloy On 28 jan 2009, at 07:26, Steven D. Arnold wrote: > On Jan 27, 2009, at 3:50 AM, Eloy Duran wrote: > >> Could you try copying over your source files to the Objective-C >> version >> you wrote to see if the problem might have been the xcode template >> that was used? > > When I try to do that, I run into a number of problems. First of all, > the ObjC project uses XIB files rather than NIB files. The Ruby > program uses NIB files. I am not familiar with XIB files; I assume > they are something new similar to a NIB. > > Second, when I try to copy the NIB files to the ObjC project, it > doesn't work. The files do not appear in the Resources section, which > is where I dropped them, and where they are located in the RubyCocoa > project as well. > > When I try to run the project even though the NIB files are not > present, I get this error: > > /Users/thoth/Source/learning/raiseman-objc/build/Debug/raiseman- > objc.app/Contents/MacOS/raiseman-objc > Undefined symbols: > "_RBApplicationMain", referenced from: > _main in main.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > "_RBApplicationMain", referenced from: > _main in main.o > ld: symbol(s) not found > collect2: ld returned 1 exit status > > main.m looks like this: > > #import <Cocoa/Cocoa.h> > #import <RubyCocoa/RBRuntime.h> > > int main(int argc, char *argv[]) > { > // return NSApplicationMain(argc, (const char **) argv); > return RBApplicationMain("rb_main.rb", argc, argv); > } > > Any thoughts? > > steven > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Steven D. A. <st...@ne...> - 2009-01-28 06:27:21
|
On Jan 27, 2009, at 3:50 AM, Eloy Duran wrote: > Could you try copying over your source files to the Objective-C > version > you wrote to see if the problem might have been the xcode template > that was used? When I try to do that, I run into a number of problems. First of all, the ObjC project uses XIB files rather than NIB files. The Ruby program uses NIB files. I am not familiar with XIB files; I assume they are something new similar to a NIB. Second, when I try to copy the NIB files to the ObjC project, it doesn't work. The files do not appear in the Resources section, which is where I dropped them, and where they are located in the RubyCocoa project as well. When I try to run the project even though the NIB files are not present, I get this error: /Users/thoth/Source/learning/raiseman-objc/build/Debug/raiseman- objc.app/Contents/MacOS/raiseman-objc Undefined symbols: "_RBApplicationMain", referenced from: _main in main.o ld: symbol(s) not found collect2: ld returned 1 exit status "_RBApplicationMain", referenced from: _main in main.o ld: symbol(s) not found collect2: ld returned 1 exit status main.m looks like this: #import <Cocoa/Cocoa.h> #import <RubyCocoa/RBRuntime.h> int main(int argc, char *argv[]) { // return NSApplicationMain(argc, (const char **) argv); return RBApplicationMain("rb_main.rb", argc, argv); } Any thoughts? steven |
From: Eloy D. <elo...@gm...> - 2009-01-27 08:51:06
|
Hi Steven, Could you try copying over your source files to the Objective-C version you wrote to see if the problem might have been the xcode template that was used? I seem to remember some problem around this. - Eloy On Jan 27, 2009, at 9:15 AM, Steven Arnold wrote: > I tried reimplementing the same raiseman program in Objective-C, per > the book, and that worked fine. This suggests there's a bug in the > RubyCocoa handling of key-value invocation. Furthermore, I upgraded > to the latest version of RubyCocoa for the test (version 0.13.2) and I > am using Ruby 1.8.6. > > The working Objective-C file is available upon request, as is the non- > working RubyCocoa version. > > steven > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Steven A. <st...@ar...> - 2009-01-27 08:42:06
|
I tried reimplementing the same raiseman program in Objective-C, per the book, and that worked fine. This suggests there's a bug in the RubyCocoa handling of key-value invocation. Furthermore, I upgraded to the latest version of RubyCocoa for the test (version 0.13.2) and I am using Ruby 1.8.6. The working Objective-C file is available upon request, as is the non- working RubyCocoa version. steven |
From: Steven D. A. <st...@ne...> - 2009-01-26 19:48:17
|
Following up on my previous post related to the "raiseman" application covered in Aaron Hillegass's Cocoa Programming for Mac OS X..... I implemented the same program in Objective-C, an identical analogue to the program in Ruby, and it works fine in Objective-C. That is, the expected methods to insert and remove "employee" objects (see below) are called in Obj-C but not RubyCocoa. That tells me there is a bug in the RubyCocoa interface that prevents key-value coding from working properly.....or possibly I am missing some detail in my implementation of the RubyCocoa program. The Objective-C project which works fine is attached. Run the program, and then add several records and undo them by typing command-Z (or selecting undo from the Edit menu). If you do this, the key-value coding will work fine, that is, the following methods will be called to undo and redo: - (void)insertObject:(Person *)p inEmployeesAtIndex:(int)idx - (void)removeObjectFromEmployeesAtIndex:(int)idx The equivalent methods in the Ruby implementation are not called: def insertObject_inEmployeesAtIndex(p, index) def removeObjectFromEmployeesAtIndex(index) I have also tried these Ruby methods with a trailing _ just to be sure that's not the problem. It didn't change the result. steven |
From: Steven A. <st...@ar...> - 2009-01-25 05:00:30
|
Hello, I am working through the book Cocoa Programming for Mac OS X by Aaron Hillegass using RubyCocoa rather than Objective-C, and I am at the section where we are attempting to implement undo for the add new employee and delete new employee buttons. My controller object as an @employees array as a member value. Given this name, I have implemented, in my controller, the functions: insertObject_inEmployeesAtIndex(p, idx), and removeObjctFromEmployeesAtIndex(idx) According to the book, "[...] these methods will be called automatically when the NSArrayController wishes ro insert or remove messages." However, my functions do not seem to be getting called. I have put NSLog statements to see whether they are being called, but right now it appears not. My project is packaged below. If you have any idea what I might be doing wrong, please let me know! eteven |
From: Craig W. <cwi...@ma...> - 2009-01-18 23:06:13
|
> On Jan 18, 2009, at 3:22 PM, Harry Maclean wrote: > Sorry if this is an obvious or stupid question, but I have been > trying for some time to find a way of splitting a string into an > array so that each character is a member of the array. > > I initially tried using ruby's somearray = somestring.split(//), but > I got an error saying: > > NoMethodError: undefined method `empty?' for //:Regexp > /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ > oc_attachments.rb:839:in `split' > > I then tried a Cocoa approach with the > componentsSeparatedByCharactersInSet but it gave me an error also. > > Am I missing an obvious method of splitting a string into an array? Are you sure that somestring is actually a string? Your code works fine OMM. You can also use this. >> 'this is a string'.scan(/./) => ["t", "h", "i", "s", " ", "i", "s", " ", "a", " ", "s", "t", "r", "i", "n", "g"] |
From: Harry M. <har...@go...> - 2009-01-18 22:55:08
|
Sorry if this is an obvious or stupid question, but I have been trying for some time to find a way of splitting a string into an array so that each character is a member of the array. I initially tried using ruby's somearray = somestring.split(//), but I got an error saying: NoMethodError: undefined method `empty?' for //:Regexp /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_attachments.rb:839:in `split' I then tried a Cocoa approach with the componentsSeparatedByCharactersInSet but it gave me an error also. Am I missing an obvious method of splitting a string into an array? |
From: Rolando A. <fun...@gm...> - 2009-01-10 14:59:59
|
Hello all again, I think some of you might be interested: I've developed a small ruby extension, specifically designed for RubyCocoa (although it can work with plain ruby scripts) that lets you keep your code encrypted inside the application bundle. The decryption scheme is obscured, so it's not as easy as running openssl from the command line to decrypt the code, and also the decryption is made in memory, so no temporary file exposing your code is created. More info: http://www.rolando.cl/2009/01/securerequire-require-encripted-ruby.html Expect a full release during the next week. Regards, -- Rolando Abarca M. |
From: Duane J. <dua...@gm...> - 2009-01-09 20:34:32
|
Yes, it seems to be :) On Jan 9, 2009, at 11:29 AM, Rolando Abarca wrote: > hello all, > Is this list always so quiet? > -- > Rolando Abarca M. > > > > > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Rolando A. <fun...@gm...> - 2009-01-09 18:29:11
|
hello all, Is this list always so quiet? -- Rolando Abarca M. |
From: Eloy D. <elo...@gm...> - 2009-01-08 16:04:02
|
I all else fails, you can always create one by hand. See one of the many bridgesupport files in the standard frameworks. - Eloy On Jan 8, 2009, at 4:16 PM, Brian Marick wrote: > I have a tiny .m file that I use for testing. I create a bundle from > it: > > `cc -o #{basename}.bundle -bundle -framework Foundation > #{basename}.m` > > Is there a way to get metadata for that file without building a > framework? gen_bridge_metadata(1) has an example of creating metadata > from -lcurl, but I can't make it work for my .m and .h file. Should I > keep digging or give up? > > ----- > Brian Marick, independent consultant > Mostly on agile methods with a testing slant > www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Allison N. <dem...@ma...> - 2009-01-08 15:57:35
|
Hi Brian, Maybe I've misunderstood your question, but here's my understanding of things: If you are writing you're own .m file, you just make sure that it is all encapsulated in an Objective-C class, rather than using standard C. The RubyCocoa bridge then handles the objective-C class automatically. I don't know if I'm telling you something you already know, but if you have an Objective-C class, you just add its source files (.m/.h) to your RubyCocoa project, and XCode compiles them automatically for you, and you can access them from Ruby the same way you access any Cocoa classes. Hope that helps, Alli On Thursday, January 08, 2009, at 04:16PM, "Brian Marick" <ma...@ex...> wrote: >I have a tiny .m file that I use for testing. I create a bundle from it: > > `cc -o #{basename}.bundle -bundle -framework Foundation >#{basename}.m` > >Is there a way to get metadata for that file without building a >framework? gen_bridge_metadata(1) has an example of creating metadata >from -lcurl, but I can't make it work for my .m and .h file. Should I >keep digging or give up? > >----- >Brian Marick, independent consultant >Mostly on agile methods with a testing slant >www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > >------------------------------------------------------------------------------ >Check out the new SourceForge.net Marketplace. >It is the best place to buy or sell services for >just about anything Open Source. >http://p.sf.net/sfu/Xq1LFB >_______________________________________________ >Rubycocoa-talk mailing list >Rub...@li... >https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |
From: Brian M. <ma...@ex...> - 2009-01-08 15:40:07
|
I have a tiny .m file that I use for testing. I create a bundle from it: `cc -o #{basename}.bundle -bundle -framework Foundation #{basename}.m` Is there a way to get metadata for that file without building a framework? gen_bridge_metadata(1) has an example of creating metadata from -lcurl, but I can't make it work for my .m and .h file. Should I keep digging or give up? ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Eloy D. <elo...@gm...> - 2008-12-15 15:16:56
|
Hehehe :) Np, Eloy On Dec 15, 2008, at 4:03 PM, Allison Newman wrote: > Pfft! Yeah, sure, I *could* do it that way, but where's the > challenge? Where's the call to that human need to create, design, > embellish! > > Thanks Eloy, that's a much nicer solution - and as a bonus, it > brings the browser window to the foreground, and uses the preferred > browser for the system :-) > > Alli > > On Monday, December 15, 2008, at 03:21PM, "Eloy Duran" <elo...@gm... > > wrote: >> Hi Alli, >> >> Not sure if this helps you out or not, >> but if all you want to do is to open a new window with a specific URL >> you should use: >> >> NSWorkspace.sharedWorkspace.openURL() >> >> Eloy >> >> On Dec 15, 2008, at 2:08 PM, Allison Newman wrote: >> >>> Oh, never mind, I figured it out.... You have to add the object to >>> the application before modifying it's properties - apparently the >>> ScriptingBridge class of the object isn't really resolved until the >>> object is added to the application container. So this works: >>> >>> document_class = @safari.classForScriptingClass('document') >>> document = document_class.alloc.init >>> @safari.documents << document >>> document.URL = url >>> >>> >>> Alli >>> >>> >>> >>> On Monday, December 15, 2008, at 01:36PM, "Allison Newman" <dem...@ma... >>>> wrote: >>>> Hi everyone, >>>> >>>> I'm having a few problems scripting Safari from Ruby, and I'm >>>> wondering if anyone else has had any problems/found solutions. >>>> >>>> I'm trying to open a URL in Safari. My first attempt looked like >>>> this (please excuse any typos, I'm not on the computer that has the >>>> source code....) >>>> >>>> require 'osx/cocoa' >>>> include OSX >>>> >>>> OSX.require_framework 'ScriptingBridge' >>>> >>>> url = "http://www.blah.com/MyAccount.htm" >>>> >>>> @safari = >>>> SBApplication.applicationWithBundleIdentifier("com.apple.Safari") >>>> # so far, so good! >>>> >>>> # The following is no good, this gives me a document_class of >>>> SBProxyByClass >>>> document_class = @safari.classForScriptingClass('document') >>>> document = document_class.alloc.init >>>> document.URL = url >>>> @safari.documents << document >>>> >>>> # the following works, but only if Safari already has a page open - >>>> it changes this page to the new URL, which is not what I want to >>>> do, I want to open either a new window, or a new tab. It also >>>> fails if there is no document already open, as document is set to >>>> nil >>>> document = @safari.documents.last >>>> # document has a class of OSX::SafariDocument >>>> document.URL = url >>>> >>>> #The following does not work, again, the class isn't right... >>>> document = OSX::SafariDocument.alloc.init >>>> # document.class = SBProxyByClass >>>> document.URL = url >>>> @safari.documents << document >>>> >>>> >>>> So, I'm a little puzzled. Does anyone know how to do this >>>> properly? >>>> >>>> Alli >>>> >>>> ------------------------------------------------------------------------------ >>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>>> Nevada. >>>> The future of the web can't happen without you. Join us at MIX09 >>>> to help >>>> pave the way to the Next Web now. Learn more and register at >>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>>> _______________________________________________ >>>> Rubycocoa-talk mailing list >>>> Rub...@li... >>>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>> Nevada. >>> The future of the web can't happen without you. Join us at MIX09 to >>> help >>> pave the way to the Next Web now. Learn more and register at >>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> ------------------------------------------------------------------------------ >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >> Nevada. >> The future of the web can't happen without you. Join us at MIX09 >> to help >> pave the way to the Next Web now. Learn more and register at >> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > The future of the web can't happen without you. Join us at MIX09 to > help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Allison N. <dem...@ma...> - 2008-12-15 15:04:05
|
Pfft! Yeah, sure, I *could* do it that way, but where's the challenge? Where's the call to that human need to create, design, embellish! Thanks Eloy, that's a much nicer solution - and as a bonus, it brings the browser window to the foreground, and uses the preferred browser for the system :-) Alli On Monday, December 15, 2008, at 03:21PM, "Eloy Duran" <elo...@gm...> wrote: >Hi Alli, > >Not sure if this helps you out or not, >but if all you want to do is to open a new window with a specific URL >you should use: > >NSWorkspace.sharedWorkspace.openURL() > >Eloy > >On Dec 15, 2008, at 2:08 PM, Allison Newman wrote: > >> Oh, never mind, I figured it out.... You have to add the object to >> the application before modifying it's properties - apparently the >> ScriptingBridge class of the object isn't really resolved until the >> object is added to the application container. So this works: >> >> document_class = @safari.classForScriptingClass('document') >> document = document_class.alloc.init >> @safari.documents << document >> document.URL = url >> >> >> Alli >> >> >> >> On Monday, December 15, 2008, at 01:36PM, "Allison Newman" <dem...@ma... >> > wrote: >>> Hi everyone, >>> >>> I'm having a few problems scripting Safari from Ruby, and I'm >>> wondering if anyone else has had any problems/found solutions. >>> >>> I'm trying to open a URL in Safari. My first attempt looked like >>> this (please excuse any typos, I'm not on the computer that has the >>> source code....) >>> >>> require 'osx/cocoa' >>> include OSX >>> >>> OSX.require_framework 'ScriptingBridge' >>> >>> url = "http://www.blah.com/MyAccount.htm" >>> >>> @safari = >>> SBApplication.applicationWithBundleIdentifier("com.apple.Safari") >>> # so far, so good! >>> >>> # The following is no good, this gives me a document_class of >>> SBProxyByClass >>> document_class = @safari.classForScriptingClass('document') >>> document = document_class.alloc.init >>> document.URL = url >>> @safari.documents << document >>> >>> # the following works, but only if Safari already has a page open - >>> it changes this page to the new URL, which is not what I want to >>> do, I want to open either a new window, or a new tab. It also >>> fails if there is no document already open, as document is set to nil >>> document = @safari.documents.last >>> # document has a class of OSX::SafariDocument >>> document.URL = url >>> >>> #The following does not work, again, the class isn't right... >>> document = OSX::SafariDocument.alloc.init >>> # document.class = SBProxyByClass >>> document.URL = url >>> @safari.documents << document >>> >>> >>> So, I'm a little puzzled. Does anyone know how to do this properly? >>> >>> Alli >>> >>> ------------------------------------------------------------------------------ >>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>> Nevada. >>> The future of the web can't happen without you. Join us at MIX09 >>> to help >>> pave the way to the Next Web now. Learn more and register at >>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >>> >>> >> >> ------------------------------------------------------------------------------ >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >> Nevada. >> The future of the web can't happen without you. Join us at MIX09 to >> help >> pave the way to the Next Web now. Learn more and register at >> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > >------------------------------------------------------------------------------ >SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. >The future of the web can't happen without you. Join us at MIX09 to help >pave the way to the Next Web now. Learn more and register at >http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >_______________________________________________ >Rubycocoa-talk mailing list >Rub...@li... >https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |