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 |