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 |