Eloy Duran
eloy.****@gmail*****
Sat May 26 23:54:56 JST 2007
> excellent, i love migrations for development but it might be overkill for > users :) One nice thing I could imagine that it would be handy for end users is in the case of an update in which the developer changed the layout of the db. Using migrations this would be solved easily no matter how old the version of the end user is. > thanks for the TODO list on the wiki too, it is nice to know what things are > planned and others might poke into and they are very welcome to do so :) > i think we could come up with some good ones, aside from migrations we could > have stuff like packaging an application (wrapping standaloneify perhaps), > and what not. > > i've written some that dynamically wrap an xcode project's targets and > configurations that might be helpful. I think you should contact cho45 with what you already have or just send it to this list directly. I'm sure any help in this area is appreciated. > excellent, for some reason i didn't think to use the default ActiveRecord > connection methods and thought there was something rubycocoa specific that i > should be using. maybe it needs its own wiki page :) For now i've added it to the ActiveRecordSupport wiki page. > ahh i see, thank you for adding some commentary on that. an > NSAttributedString isn't even a subclass of NSString (instead NSObject) so i > have no idea why/how the pure objc route gets to avoid this problem :) Well it could maybe also be serialized and stored in the db. I could imagine something like this is done with CoreData. However I decided not to go this route since my gut feeling tells me that people would like to use db's that are also accessible outside of a Cocoa environment. Especially with something like ActiveResource. But maybe there should also be an option to serialize instead of converting to a String....? > and now an odd question - if i wanted to automatically synthesize a proxy > class much like dr nic's magic models does for activerecord model classes > (dynamically generate a UI for a database), where would that be best done? > override the OSX module's const_missing method? > > module OSX > def self.const_missing(class_id) > # stuff > end > end > > how could i alias the original class method? Hmmm, good question. I'm not sure if this would be the correct way to do it, but this does work: irb(main):008:0> module OSX irb(main):009:1> class << self irb(main):010:2> def const_missing(const) irb(main):011:3> p const irb(main):012:3> super irb(main):013:3> end irb(main):014:2> end irb(main):015:1> end => nil irb(main):016:0> OSX::Blabla :Blabla NameError: uninitialized constant OSX::Blabla from (irb):12:in `const_missing' from (irb):16 from :0 But like I said, I'm not sure this is the correct way to do it..... :) Cheers, Eloy