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: Stephyn B. <ste...@co...> - 2008-08-03 02:30:18
|
Dear all, Thank you for your forbearance...as I'm not sure this is exactly a RubyCocoa question. I've written an application that quite successfully uses a bunch of NSArrayControllers to manipulate a bunch of models using Bindings. However, one part of the application requires a user to manipulate something that is best represented as a tree. Therefore, I'm using the NSOutlineView. I'm not using the NSTreeController based many comments and posts I've seen on the Internet which say to avoid it especially if the user is manipulating the tree. Based on an example I found online, "OutlineMeRuby", I successfully implemented a NSOutlineView and DataSource that do what I want them to do. The problem is that now, I'm trying to integrate this editor into the other, binding-based editors of my application. So that when someone selects a Model in one tab, they can start editing one of the properties of that Model, which is a tree. The actual building of the tree is complicated because the nodes that are actually displayed are a facade for the real tree. So basically, I have my DataSource do this: class FaultTreeDataSource < NSObject ib_outlets :outlineView, :tests, :testsAlias, :modelsAlias def awakeFromNib self.bind_toObject_withKeyPath_options_( "root", @modelsAlias, "selection.entry", nil) end @root = nil def root=( object) @root = object NSLog( "the root was set to #{@root}") @outlineView.reloadItem @root end def root NSLog( "root getter is returning #{@root}") @root end # more methods for DataSource, addChild, etc. end Based on the NSLog output, the root object is most definitely being set through the bindings and it is a FaultTreeDisplayNode. For the longest time, I couldn't get the NSOutlineView to acknowledge the @root object at all. Even though this same code worked previously without bindings. Now I'm getting the following error when I click the tab that displays the NSOutlineView: 2008-08-02 22:13:48.481 FaultTreeDiagnosis[1682:10b] root is <FaultTreeDisplayNode: 0x5c8000> 2008-08-02 22:13:48.482 FaultTreeDiagnosis[1682:10b] root getter is returning <FaultTreeDisplayNode: 0x5c8000> 2008-08-02 22:13:48.482 FaultTreeDiagnosis[1682:10b] *** - [FaultTreeDisplayNode copyWithZone:]: unrecognized selector sent to instance 0x5c8000 /Users/stephyn/Desktop/rubycocoa/projects/FaultTreeDiagnosis/build/ Debug/FaultTreeDiagnosis.app/Contents/Resources/rb_main.rb:22:in `NSApplicationMain': NSInvalidArgumentException - *** - [FaultTreeDisplayNode copyWithZone:]: unrecognized selector sent to instance 0x5c8000 (OSX::OCException) from /Users/stephyn/Desktop/rubycocoa/projects/FaultTreeDiagnosis/ build/Debug/FaultTreeDiagnosis.app/Contents/Resources/rb_main.rb:22 I have no idea why the FaultTreeDisplayNode is being sent the copyWithZone selector nor have I ever seen anything that requires you to do so for either Bindings or DataSources. Any ideas? Cheers, Steve |
From: Benjamin J. <bhj...@gm...> - 2008-07-31 18:00:48
|
The segfaults are seemingly at random. They all end either at search_method or at st_lookup, which is the part which checks the hash table for selectors ot figure out which method to send the notification to. We're calling them on the main thread with performSelectorOnMainThread: so it's not a cross-thread issue. Is this some object which is being hit by GC? We're calling GC.disable while this code is running. st_lookup(table, key, value) st_table *table; register st_data_t key; st_data_t *value; { unsigned int hash_val, bin_pos; register st_table_entry *ptr; hash_val = do_hash(key, table); # CRASHES HERE!!!!!!!!!! FIND_ENTRY(table, ptr, hash_val, bin_pos); if (ptr == 0) { return 0; } else { if (value != 0) *value = ptr->record; return 1; } } Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000002 Thread 0 Crashed: 0 libruby.dylib 0x0030a0ac st_lookup + 11 (st.c:250) 1 libruby.dylib 0x002a0958 search_method + 56 (eval.c:494) 2 libruby.dylib 0x002a09ba rb_get_method_body + 39 (eval.c:515) |
From: Tim P. <he...@ti...> - 2008-07-30 09:17:40
|
Hey all, For completeness, heres what was happening: It was important to call ObjectSpace.garbage_collect() on on each timer itteration to clean up the junk, and also, it appears that somewhere deep inside ruby std lib (net/http) there must be a call to fork() or something which was causing issues, as when i replaced the native ruby code with cocoa NSURLConnection stuff the issues stopped and the app became stable. Also, code blocks (do ... end), they were causing issues too - when I removed them that improved stability also. It would be good to try and understand the specific of this behavior - might anyone be able to enlighten me? Cheers Tim |
From: Patrick G. <pge...@wa...> - 2008-07-29 13:06:09
|
> Open the xcode project, build and go. If you fire up instruments and > just monitor the process, see how its leaking memory and incrementally > increasing its footprint - and all its doing is printing a message to > the console! > > Thoughts? I don't see its footprint climbing, #Net remains stable. "Overall bytes" does grow, but it's counting all allocations since startup, including released memory. There is a small leak, 3x16 bytes of GeneralBlock-16. If you have memory problems, you can try to call GC.start to manually start garbage collection. If you don't do that when using Core Image filters, your app's mem profile will grow huge then drop flat when collection happens. -Patrick |
From: Tim P. <he...@ti...> - 2008-07-29 10:00:45
|
Possibly. I dont know enough about it to say either way. Check this out: http://download.timperrett.com/pub/leaking-memory.zip Open the xcode project, build and go. If you fire up instruments and just monitor the process, see how its leaking memory and incrementally increasing its footprint - and all its doing is printing a message to the console! Thoughts? Cheers Tim On 29 Jul 2008, at 10:19, Jonathan del Strother wrote: > Now... I have no idea if that applies at all to rubycocoa, but is it > possible that's along the lines of what you're seeing? |
From: Jonathan d. S. <mai...@st...> - 2008-07-29 09:19:08
|
A while back, rmagick had 'leaks' where, if I remember correctly, it would allocate a huge chunk of memory on the C side of things for loading the image. The ruby code would finish with its handle to the image, and the handle would end up in the garbage collection bin. Once the handle was disposed, the image buffer memory would be correctly deallocated. So, not a leak as such, but the problem appeared because ruby doesn't bother GCing until it reaches 8MB of uncollected stuff, IIRC. Ruby's collector only knew about the size of the handle (ie a 4 byte pointer), and knew nothing about the huge buffer connected to it on the C side of the bridge, so garbage collection was never triggered. Now... I have no idea if that applies at all to rubycocoa, but is it possible that's along the lines of what you're seeing? On Tue, Jul 29, 2008 at 10:10 AM, Tim Perrett <he...@ti...> wrote: > Sorry for the late reply - I've just got around to doing this. It > appears that over time, all the objects are increasing there memory > footprint? > > It almost looks like RC is not releasing them at all? > > Cheers > > Tim > > > On 25 Jul 2008, at 18:18, Chris McGrath wrote: > >> Tried running it under instruments to see what's increasing? > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Tim P. <he...@ti...> - 2008-07-29 09:10:34
|
Sorry for the late reply - I've just got around to doing this. It appears that over time, all the objects are increasing there memory footprint? It almost looks like RC is not releasing them at all? Cheers Tim On 25 Jul 2008, at 18:18, Chris McGrath wrote: > Tried running it under instruments to see what's increasing? |
From: Tim P. <he...@ti...> - 2008-07-28 13:25:08
|
Hey all, Just thought id post this as it might prove useful for someone. http://blog.timperrett.com/2008/7/28/programatically-adding-applications-to-the-login-items Cheers Tim |
From: Patrick G. <pge...@wa...> - 2008-07-26 13:21:17
|
> Thanks Patrick. I did not find anything similar in my bridgesupport > files (RubyCocoa.framework/Resources/BridgeSupport/*). Each framework stores its own .bridgesupport file. QTKit's is here : /System/Library/Frameworks/QTKit.framework/Versions/A/Resources/ BridgeSupport/QTKit.bridgesupport > Then I tried this: > > sudo gen_bridge_metadata -d -f /System/Library/Frameworks/ > QTKit.framework/ -o /System/Library/Frameworks/RubyCocoa.framework/ > Resources/BridgeSupport/QTKit.bridgesupport > > And failed with alot errors :), then decided to just step back and > write the damn program in ObjectiveC. Thanks anyway! Ok :) |
From: Mihael <mih...@gm...> - 2008-07-26 09:25:13
|
>> >> After investigating alot, so it seems, there is no "kQTFileType3GPP" >> or "KQTFileType3GPP" defined after requiring the QTKit. > > QTKit's .bridgesupport file does show the constant, but only for 64 > bits : > > <enum name='kQTFileType3GPP' value64='862417008'/> > > I guess you should rebuild the .bridgesupport file yourself with > gen_bridge_metada. Thanks Patrick. I did not find anything similar in my bridgesupport files (RubyCocoa.framework/Resources/BridgeSupport/*). Then I tried this: sudo gen_bridge_metadata -d -f /System/Library/Frameworks/ QTKit.framework/ -o /System/Library/Frameworks/RubyCocoa.framework/ Resources/BridgeSupport/QTKit.bridgesupport And failed with alot errors :), then decided to just step back and write the damn program in ObjectiveC. Thanks anyway! |
From: Allison N. <dem...@ma...> - 2008-07-26 08:16:20
|
Stephyn, You have to be very careful using YAML with NSObjects - YAML doesn't know how to save the NSObject part of the object, or at least, it doesn't know how to reinitialise the object correctly when you do a YAML.load. When I ran into a similar problem (I was trying to use YAML data with an NSOutlineView), I eventually solved it by implementing the NSCoding protocol. The code looks like this: def encodeWithCoder(coder) coder.encodeObject_forKey(@exercise_machines, "exercise_machines") coder.encodeObject_forKey(@programs, "programs") coder.encodeObject_forKey(@schedules, "schedules") end def initWithCoder(coder) init @exercise_machines = coder.decodeObjectForKey("exercise_machines") @programs = coder.decodeObjectForKey("programs") @schedules = coder.decodeObjectForKey("schedules") self end def save NSLog("Saving archive") result = NSKeyedArchiver.archiveRootObject_toFile_(self, FILE_NAME) end def load lib = NSKeyedUnarchiver.unarchiveObjectWithFile(FILE_NAME) end Otherwise you get all sorts of bad things happening - objects that blow up when loading, objects that die when the NSTable tries to call NSObject methods on your YAML-loaded objects etc etc. Bad things. Hope that helps. Alli Le 26 juil. 08 à 08:06, Stephyn Butcher a écrit : > Hi all, > > I have a very simple app I'm trying to write to spike out some key > portions of an app I'm planning to write. > > The application is not document based but I do want to be able to > save and load the object model. The "preferred" form is YAML with > import/export using XML. The application is dirt simple. Just an > array of Friends visible through a NSTable and the Friend objects > themselves which can be edited. > > I can successfully save the @friends array as a YAML file > (saveFriends)...but I get thrown into the debugger every time I > tried to load a YAML file (openFriends). I've narrowed it down to > YAML::load as the line that crashes (I can read the file, and print > out the contents to NSLog just fine). > > Any ideas? > > If you're curious and want to kick the tires, you can download the > project at http://homepage.mac.com/stephyn/Friends.zip > > Thanks a bunch. > > Cheers, > Steve > > > ---Friend.rb > require 'osx/cocoa' > > class Friend < OSX::NSObject > include OSX > > kvc_accessor :name, :email, :cell > > def init > if super_init > @name = "New Friend" > @email = "New Email" > @cell = "New Cell" > self > end > end > end > > ---AppController.rb > require 'osx/cocoa' > require 'yaml' > > class AppController < OSX::NSObject > include OSX > > kvc_accessor :friends > > def init > if super_init > @friends = NSMutableArray.array > self > end > end > > def saveFriends( sender) > friends = @friends.to_ruby > > panel = NSSavePanel.savePanel > if panel.runModal == NSFileHandlingPanelOKButton > filename = panel.filename.to_ruby > else > return > end > File.open( filename, "w") { |file| file.puts friends.to_yaml} > end > ib_action :saveFriends > > def openFriends( sender) > panel = NSOpenPanel.openPanel > if panel.runModal == NSFileHandlingPanelOKButton > filename = panel.filename.to_ruby > else > return > end > @friends = YAML::load( File.open( filename, "r")) > end > ib_action :openFriends > end > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Stephyn B. <ste...@gm...> - 2008-07-26 06:06:50
|
Hi all, I have a very simple app I'm trying to write to spike out some key portions of an app I'm planning to write. The application is not document based but I do want to be able to save and load the object model. The "preferred" form is YAML with import/ export using XML. The application is dirt simple. Just an array of Friends visible through a NSTable and the Friend objects themselves which can be edited. I can successfully save the @friends array as a YAML file (saveFriends)...but I get thrown into the debugger every time I tried to load a YAML file (openFriends). I've narrowed it down to YAML::load as the line that crashes (I can read the file, and print out the contents to NSLog just fine). Any ideas? If you're curious and want to kick the tires, you can download the project at http://homepage.mac.com/stephyn/Friends.zip Thanks a bunch. Cheers, Steve ---Friend.rb require 'osx/cocoa' class Friend < OSX::NSObject include OSX kvc_accessor :name, :email, :cell def init if super_init @name = "New Friend" @email = "New Email" @cell = "New Cell" self end end end ---AppController.rb require 'osx/cocoa' require 'yaml' class AppController < OSX::NSObject include OSX kvc_accessor :friends def init if super_init @friends = NSMutableArray.array self end end def saveFriends( sender) friends = @friends.to_ruby panel = NSSavePanel.savePanel if panel.runModal == NSFileHandlingPanelOKButton filename = panel.filename.to_ruby else return end File.open( filename, "w") { |file| file.puts friends.to_yaml} end ib_action :saveFriends def openFriends( sender) panel = NSOpenPanel.openPanel if panel.runModal == NSFileHandlingPanelOKButton filename = panel.filename.to_ruby else return end @friends = YAML::load( File.open( filename, "r")) end ib_action :openFriends end |
From: Patrick G. <pge...@wa...> - 2008-07-25 19:11:33
|
> After investigating alot, so it seems, there is no "kQTFileType3GPP" > or "KQTFileType3GPP" defined after requiring the QTKit. QTKit's .bridgesupport file does show the constant, but only for 64 bits : <enum name='kQTFileType3GPP' value64='862417008'/> I guess you should rebuild the .bridgesupport file yourself with gen_bridge_metada. -Patrick |
From: Chris M. <ch...@oc...> - 2008-07-25 17:18:52
|
On 25 Jul 2008, at 16:56, Tim Perrett wrote: > Hey All, > > Is there any benefit of explicitly calling release within RubyCocoa? I > know the framework handles memory clean up automagically, but I was > wondering what the benefits might be of doing it myself? > Things would get very crashy if you do that as I understand it. > I have a little app that just seems to increase its memory footprint > overtime it does an action; hence why I was wondering if there would > be any benefit of being explicit with memory management? > Tried running it under instruments to see what's increasing? > Cheers > > Tim Cheers, Chris |
From: Tim P. <he...@ti...> - 2008-07-25 15:56:25
|
Hey All, Is there any benefit of explicitly calling release within RubyCocoa? I know the framework handles memory clean up automagically, but I was wondering what the benefits might be of doing it myself? I have a little app that just seems to increase its memory footprint overtime it does an action; hence why I was wondering if there would be any benefit of being explicit with memory management? Cheers Tim |
From: Mihael <mih...@gm...> - 2008-07-25 10:59:48
|
Hey cool people! I am trying to export quicktime movies in a command line program. The objective-c code would look like this QTMovie *movie = [QTMovie movieWithFile:@"/tmp/mymovie.mov" error:nil]; NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], QTMovieExport, [NSNumber numberWithLong:kQTFileType3GPP], QTMovieExportType, nil]; [movie writeToFile:@"/tmp/mymovie.3gp" withAttributes:dictionary]; So I tried doing it like this: movie.writeToFile_withAttributes( myMovieFile3GPP, { 'QTMovieExport'=>true, 'QTMovieExportType'=> kQTFileType3GPP }.to_ns ) And failed. After investigating alot, so it seems, there is no "kQTFileType3GPP" or "KQTFileType3GPP" defined after requiring the QTKit. I tried this in irb (with require osx/cocoa and qtkit): >> dict = NSDictionary .dictionaryWithObjectsAndKeys( NSNumber.numberWithBool(true), QTMovieExport, NSNumber.numberWithLong(kQTFileType3GPP), QTMovieExportType, nil) NameError: undefined local variable or method `kQTFileType3GPP' for #<Object:0x389a0> from (irb):38 from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ oc_types.rb:61 >> dict = NSDictionary .dictionaryWithObjectsAndKeys( NSNumber.numberWithBool(true), QTMovieExport, NSNumber.numberWithLong(KQTFileType3GPP) NameError: uninitialized constant KQTFileType3GPP from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ oc_import.rb:169:in `const_missing' from (irb):39 from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ oc_types.rb:61 How can I get these constants or why are they missing? (actually all from QTKitDefines.h) Thanks for any answers :) Mihael |
From: Aaron V. <gru...@gm...> - 2008-07-24 00:03:19
|
Hi all, I'm not to reading this list, so hopefully this isn't already a well-known fact, but I wanted to share a trick that I spent a few brain cells discovering: I've been using Dr. Nic's rbiphonetest < http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/ > to write rspec specs and stories for an obj-c cocoa app. I came across two problems when trying to use mock objects to test obj-c classes. 1) aMock = mock("a"); aMock.stub!(:methodThatReturnsInt).and_return(42); In this case (and I don't claim to understand what's behind the scenes), the 42 gets cast incorrectly when it's passed off to obj-c, since rubycocoa thinks it's returning an object instead of an int. The solution: class MockA < OSX::NSObject objc_method :methodThatReturnsInt, "i@:" end aMock = mock("a"); aMock.stub!(:methodThatReturnsInt).and_return(42); 2) aMock = mock("a"); # This is a mock of an obj-c class, OSX::A aMock.stub!(:methodThatReturnsInt).and_return(42); OSX::MyObjCClass.alloc.init.doSomethingWithA(aMock); This is only a problem if MyObjCClass has some logic in it that is checking [aMock isKindOfClass:[A class]]. But here's a way to work around it and make a Spec::Mocks object that obj-c thinks is a subclass of MyObjCClass. The trick is to create a subclass of MyObjCClass and then reimplement all it's methods to call super.super.method so that the call will eventually get back to Spec::Mocks' monkey-patching and our stubs and should_receive's will work. class MockA < OSX::A def methodThatReturnsInt return super.super.methodThatReturnsInt end end aMock = mock("a"); aMock.stub!(:methodThatReturnsInt).and_return(42); OSX::MyObjCClass.alloc.init.doSomethingWithA(aMock); And now we can write specs for obj-c code that calls isKindOfClass: ! (Note that the previous objc_method trick is no longer necessary.) === That's all! I hope someone finds this interesting or useful. I'd also appreciate any alternative suggestions from those who have inner knowledge of rubycocoa or rspec. Cheers, --Aaron V. |
From: yvon.thoraval <yvo...@gm...> - 2008-07-23 12:41:57
|
Le 23 juil. 08 à 11:43, Tim Perrett a écrit : > Hey guys, > > Can anyone point me in the right direction with how to save / write to > Plist's? Alternatively, a simple method of persisting some basic data > in XML form on the filesystem. > here is a small ruby script saving my SHELL ENV vars into ~/.MacOSX/ environment.plist : ------------------------------------------------------------------------ ------------------------------------------------ #!/usr/bin/env ruby -w # update_environment_plist require 'fileutils' require 'plist' NOW = Time.now.strftime( "%y_%m_%d__%H_%M_%S" ) MACOSX_ENV_PLIST = "#{ENV['HOME']}/.MacOSX/environment.plist" FORBID_LIST = [ "HOME", "LOGNAME", "OLDPWD", "PWD", "SECURITYSESSIONID", "SHELL", "SHLVL", "USER", "_" ] FileUtils.touch "#{MACOSX_ENV_PLIST}" if !FileTest.exists?( "# {MACOSX_ENV_PLIST}" ) BACKUP = "#{ENV['HOME']}/.MacOSX/environment_#{NOW}.plist" FileUtils.mv( "#{MACOSX_ENV_PLIST}", "#{BACKUP}") zsh_h={} ENV.each{ |k,v| zsh_h[k] = v if !FORBID_LIST.include?( k ) } zsh_h.save_plist( "#{MACOSX_ENV_PLIST}" ) FileUtils.chmod( 0644, "#{MACOSX_ENV_PLIST}" ) ------------------------------------------------------------------------ ------------------------------------------------ best, Yvon |
From: Eloy D. <elo...@gm...> - 2008-07-23 09:55:40
|
plist = OSX::NSMutableDictionary.dictionaryWithContentsOfFile('/path/ to/plist') plist['foo'] = 'bar' plist.writeToFile_atomically('/path/to/output/plist', true) Cheers, Eloy On Jul 23, 2008, at 11:43 AM, Tim Perrett wrote: > Hey guys, > > Can anyone point me in the right direction with how to save / write to > Plist's? Alternatively, a simple method of persisting some basic data > in XML form on the filesystem. > > Cheers > > Tim > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Tim P. <he...@ti...> - 2008-07-23 09:44:18
|
Hey guys, Can anyone point me in the right direction with how to save / write to Plist's? Alternatively, a simple method of persisting some basic data in XML form on the filesystem. Cheers Tim |
From: Rod S. <rsc...@xm...> - 2008-07-23 04:54:49
|
I'm trying to follow the procedures for embedding RubyCocoa on the RubyCocoa site. This used to work for me, but it's no longer working. Right now it even crashes on my Intel box. I'm wondering if something changed in the development tools to break this. I'm using the latest Xcode which is 3.1. Here's the crash report Process: PackRat [97452] Path: /Users/rod/Development/Projects/infiniteNIL/Build/ Release/PackRat.app/Contents/MacOS/PackRat Identifier: com.infinitenil.packrat Version: ??? (???) Code Type: X86 (Native) Parent Process: launchd [109] Date/Time: 2008-07-22 22:50:45.228 -0600 OS Version: Mac OS X 10.5.4 (9E17) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x916f2b9e __kill + 10 1 libSystem.B.dylib 0x91769ec2 raise + 26 2 libSystem.B.dylib 0x9177947f abort + 73 3 libruby.1.dylib 0x000f88db rb_check_type + 0 4 libruby.1.dylib 0x0017523f sigsegv + 0 5 libSystem.B.dylib 0x916f109b _sigtramp + 43 6 ??? 0xffffffff 0 + 4294967295 7 libruby.1.dylib 0x0021ca0c rb_intern + 43 8 libruby.1.dylib 0x001d8973 rb_define_module + 32 9 nkf.bundle 0x0070655b Init_nkf + 35 10 libruby.1.dylib 0x000f6ad9 dln_load + 285 11 libruby.1.dylib 0x0010c480 rb_require_safe + 630 12 libruby.1.dylib 0x0010be16 rb_f_require + 35 13 libruby.1.dylib 0x00108d1e call_cfunc + 314 14 libruby.1.dylib 0x0010838f rb_call0 + 1084 15 libruby.1.dylib 0x001098b7 rb_call + 699 16 libruby.1.dylib 0x0010242b rb_eval + 10029 17 libruby.1.dylib 0x000fcda0 eval_node + 96 18 libruby.1.dylib 0x0010b5f9 rb_load + 1245 19 libruby.1.dylib 0x0010c41e rb_require_safe + 532 20 libruby.1.dylib 0x0010be16 rb_f_require + 35 21 libruby.1.dylib 0x00108d1e call_cfunc + 314 22 libruby.1.dylib 0x0010838f rb_call0 + 1084 23 libruby.1.dylib 0x001098b7 rb_call + 699 24 libruby.1.dylib 0x0010242b rb_eval + 10029 25 libruby.1.dylib 0x000fcda0 eval_node + 96 26 libruby.1.dylib 0x0010b5f9 rb_load + 1245 27 libruby.1.dylib 0x0010c41e rb_require_safe + 532 28 libruby.1.dylib 0x0010be16 rb_f_require + 35 29 libruby.1.dylib 0x00108d1e call_cfunc + 314 30 libruby.1.dylib 0x0010838f rb_call0 + 1084 31 libruby.1.dylib 0x001098b7 rb_call + 699 32 libruby.1.dylib 0x0010242b rb_eval + 10029 33 libruby.1.dylib 0x000fcda0 eval_node + 96 34 libruby.1.dylib 0x0010b5f9 rb_load + 1245 35 libruby.1.dylib 0x0010c41e rb_require_safe + 532 36 libruby.1.dylib 0x0010be16 rb_f_require + 35 37 libruby.1.dylib 0x00108d1e call_cfunc + 314 38 libruby.1.dylib 0x0010838f rb_call0 + 1084 39 libruby.1.dylib 0x001098b7 rb_call + 699 40 libruby.1.dylib 0x0010242b rb_eval + 10029 41 libruby.1.dylib 0x000fcda0 eval_node + 96 42 libruby.1.dylib 0x0010b5f9 rb_load + 1245 43 libruby.1.dylib 0x0010c41e rb_require_safe + 532 44 libruby.1.dylib 0x0010be16 rb_f_require + 35 45 libruby.1.dylib 0x00108d1e call_cfunc + 314 46 libruby.1.dylib 0x0010838f rb_call0 + 1084 47 libruby.1.dylib 0x001098b7 rb_call + 699 48 libruby.1.dylib 0x0010242b rb_eval + 10029 49 libruby.1.dylib 0x000fcda0 eval_node + 96 50 libruby.1.dylib 0x000fd402 ruby_exec_internal + 196 51 libruby.1.dylib 0x000fd453 ruby_exec + 22 52 libruby.1.dylib 0x000fd480 ruby_run + 43 53 com.apple.rubycocoa 0x0008fe56 RBApplicationMain + 227 54 com.infinitenil.packrat 0x00002d9e main + 32 55 com.infinitenil.packrat 0x00002d62 _start + 216 56 com.infinitenil.packrat 0x00002c89 start + 41 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x9177943f ecx: 0xbfffc43c edx: 0x916f2b9e edi: 0x0072cc6c esi: 0xbfffcbf0 ebp: 0xbfffc458 esp: 0xbfffc43c ss: 0x0000001f efl: 0x00000282 eip: 0x916f2b9e cs: 0x00000007 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0xffe2a1d8 Binary Images: 0x1000 - 0x38ff7 +com.infinitenil.packrat 1.6.3 (180M) <d6c61b7c59b2591e5d650bc13fe916cc> /Users/rod/Development/Projects/ infiniteNIL/Build/Release/PackRat.app/Contents/MacOS/PackRat 0x56000 - 0x57ffe +com.yourcompany.yourcocoaframework ??? (1.0) <c82ceb867277149bbf0ecabc55765ccd> /Users/rod/Development/Projects/ infiniteNIL/Build/Release/PackRat.app/Contents/Frameworks/ INFoundation.framework/Versions/A/INFoundation 0x5d000 - 0x65fff +com.infinitenil.inappkit ??? (1.0) <3e0e87514fd9d1d6d70f0b5b3a35ae73> /Users/rod/Development/Projects/ infiniteNIL/Build/Release/PackRat.app/Contents/Frameworks/ INAppKit.framework/Versions/A/INAppKit 0x6e000 - 0x7afff +net.brockerhoff.RBSplitView.Framework 1.1.4 (1.1.4) <ff12eebc96873b8ef2a481094fe7d0ec> /Users/rod/Development/ Projects/infiniteNIL/Build/Release/PackRat.app/Contents/Frameworks/ RBSplitView.framework/Versions/A/RBSplitView 0x82000 - 0xa0ff7 com.apple.rubycocoa 0.13.2 (0.13.2) /Users/ rod/Development/Projects/infiniteNIL/Build/Release/PackRat.app/ Contents/Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa 0xe7000 - 0x1a2ffb +libruby.1.dylib ??? (???) /Users/rod/ Development/Projects/infiniteNIL/Build/Release/PackRat.app/Contents/ Resources/libruby.1.dylib 0x1ce000 - 0x26cffb libruby.1.dylib ??? (???) <3017afafed990ab3cb3035c6e2757700> /usr/lib/libruby.1.dylib 0x2cd000 - 0x2cdfff CoreFoundation.dylib ??? (???) /System/ Library/Frameworks/CoreFoundation.framework/Resources/BridgeSupport/ CoreFoundation.dylib 0x2d3000 - 0x2d3ff3 Foundation.dylib ??? (???) /System/Library/ Frameworks/Foundation.framework/Resources/BridgeSupport/Foundation.dylib 0x700000 - 0x72cff5 +nkf.bundle ??? (???) <b8807fa0d9ee6d1d8902922386fba7d6> /Users/rod/Development/Projects/ infiniteNIL/Build/Release/PackRat.app/Contents/lib/nkf.bundle 0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <7af47d3b00b2268947563c7fa8c59a07> /usr/lib/dyld 0x90105000 - 0x9010cfe9 libgcc_s.1.dylib ??? (???) <f53c808e87d1184c0f9df63aef53ce0b> /usr/lib/libgcc_s.1.dylib 0x9010d000 - 0x90144fff com.apple.SystemConfiguration 1.9.2 (1.9.2) <8b26ebf26a009a098484f1ed01ec499c> /System/Library/Frameworks/ SystemConfiguration.framework/Versions/A/SystemConfiguration 0x90145000 - 0x901a2ffb libstdc++.6.dylib ??? (???) <04b812dcec670daa8b7d2852ab14be60> /usr/lib/libstdc++.6.dylib 0x901a3000 - 0x901acfff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <d3180f9edbd9a5e6f283d6156aa3c602> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/ Versions/A/SpeechRecognition 0x901ad000 - 0x909aafef com.apple.AppKit 6.5.3 (949.33) <84b236f43802f4c15011513d18efa101> /System/Library/Frameworks/ AppKit.framework/Versions/C/AppKit 0x909ab000 - 0x909abffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/ Accelerate 0x909ac000 - 0x91048fff com.apple.CoreGraphics 1.351.31 (???) <c97a42498636b2596764e48669f98e00> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics 0x912b2000 - 0x9136cfe3 com.apple.CoreServices.OSServices 226.5 (226.5) <7e10d25c615a39fe1ab4d48e24a3b555> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/OSServices.framework/ Versions/A/OSServices 0x91371000 - 0x913f0ff5 com.apple.SearchKit 1.2.0 (1.2.0) <277b460da86bc222785159fe77e2e2ed> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/ Versions/A/SearchKit 0x913f1000 - 0x91430fef libTIFF.dylib ??? (???) <6d0f80e9d4d81f3f64c876aca005bd53> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libTIFF.dylib 0x91431000 - 0x914ffff3 com.apple.JavaScriptCore 5525.18 (5525.18) <672d1c7f16a4300addabeff4830f5024> /System/Library/Frameworks/ JavaScriptCore.framework/Versions/A/JavaScriptCore 0x91500000 - 0x91500ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/ Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x91501000 - 0x9155bff7 com.apple.CoreText 2.0.2 (???) <9fde11f84a72e890bbf2aa8b0b13b79a> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/ Versions/A/CoreText 0x9155c000 - 0x9163bfff libobjc.A.dylib ??? (???) <a53206274b6c2d42691f677863f379ae> /usr/lib/libobjc.A.dylib 0x9163c000 - 0x91682fef com.apple.Metadata 10.5.2 (398.18) <adbb3a14e8f7da444e16d2fd61862771> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/Metadata.framework/ Versions/A/Metadata 0x91683000 - 0x917e3ff3 libSystem.B.dylib ??? (???) <a12f397abf2285077b89bd726bff5b18> /usr/lib/libSystem.B.dylib 0x917e4000 - 0x9186ffff com.apple.framework.IOKit 1.5.1 (???) <60cfc4b175c4ef60bb8e9036716a29f4> /System/Library/Frameworks/ IOKit.framework/Versions/A/IOKit 0x918d7000 - 0x918f2ff3 libPng.dylib ??? (???) <c0484bec6e2432b406755591924fe664> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libPng.dylib 0x918f3000 - 0x91913ff2 libGL.dylib ??? (???) /System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x91a4c000 - 0x91ad8ff7 com.apple.LaunchServices 289.2 (289.2) <3577886e3a6d56ee3949850c4fde76c9> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/ Versions/A/LaunchServices 0x91ad9000 - 0x91addfff libmathCommon.A.dylib ??? (???) /usr/lib/ system/libmathCommon.A.dylib 0x91ade000 - 0x91e74fff com.apple.QuartzCore 1.5.3 (1.5.3) <1b65c05f89e81a499302fd63295b242d> /System/Library/Frameworks/ QuartzCore.framework/Versions/A/QuartzCore 0x91edf000 - 0x91f19fff com.apple.coreui 1.1 (61) /System/Library/ PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x91f1a000 - 0x91f73ff7 libGLU.dylib ??? (???) /System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x91f74000 - 0x91f78fff libGIF.dylib ??? (???) <d4234e6f5e5f530bdafb969157f1f17b> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libGIF.dylib 0x91f79000 - 0x92253ff3 com.apple.CoreServices.CarbonCore 786.4 (786.4) <059c4803a7a95e3c1a95a332baeb1edf> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/ Versions/A/CarbonCore 0x92261000 - 0x92261ffb com.apple.installserver.framework 1.0 (8) / System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/ InstallServer 0x92589000 - 0x925b6feb libvDSP.dylib ??? (???) <b232c018ddd040ec4e2c2af632dd497f> /System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/ libvDSP.dylib 0x925b7000 - 0x92631ff8 com.apple.print.framework.PrintCore 5.5.3 (245.3) <222dade7b33b99708b8c09d1303f93fc> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore 0x9263e000 - 0x92648feb com.apple.audio.SoundManager 3.9.2 (3.9.2) <0f2ba6e891d3761212cf5a5e6134d683> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/ A/CarbonSound 0x9267e000 - 0x927c4ff7 com.apple.ImageIO.framework 2.0.2 (2.0.2) <77dfee73f4c0d230425a5151ee0bce05> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/ImageIO 0x927c5000 - 0x927e3fff libresolv.9.dylib ??? (???) <0629b6dcd71f4aac6a891cbe26253e85> /usr/lib/libresolv.9.dylib 0x92887000 - 0x92944fff com.apple.WebKit 5525.18 (5525.18) <7e41e38368974ed048c2f027a961dbd4> /System/Library/Frameworks/ WebKit.framework/Versions/A/WebKit 0x92945000 - 0x92970fe7 libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib 0x92971000 - 0x929a0fe3 com.apple.AE 402.2 (402.2) <e01596187e91af5d48653920017b8c8e> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x929a1000 - 0x929f1ff7 com.apple.HIServices 1.7.0 (???) <f7e78891a6d08265c83dca8e378be1ea> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices 0x929f2000 - 0x92a00ffd libz.1.dylib ??? (???) <5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib 0x92c86000 - 0x92f01fe7 com.apple.Foundation 6.5.5 (677.19) <bfd4ebea1a7739dd6b523f15dca01a37> /System/Library/Frameworks/ Foundation.framework/Versions/C/Foundation 0x93006000 - 0x93008fff com.apple.securityhi 3.0 (30817) <2b2854123fed609d1820d2779e2e0963> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/ SecurityHI 0x93009000 - 0x93009ffa com.apple.CoreServices 32 (32) <2fcc8f3bd5bbfc000b476cad8e6a3dd2> /System/Library/Frameworks/ CoreServices.framework/Versions/A/CoreServices 0x93044000 - 0x93454fef libBLAS.dylib ??? (???) /System/Library/ Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/ Versions/A/libBLAS.dylib 0x93455000 - 0x93479fff libxslt.1.dylib ??? (???) <4933ddc7f6618743197aadc85b33b5ab> /usr/lib/libxslt.1.dylib 0x9347a000 - 0x9350dff3 com.apple.ApplicationServices.ATS 3.3 (???) <064eb6d96417afa38a80b1735c4113aa> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/ Versions/A/ATS 0x9355d000 - 0x9391bfea libLAPACK.dylib ??? (???) /System/Library/ Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/ Versions/A/libLAPACK.dylib 0x9391c000 - 0x93aeafff com.apple.security 5.0.4 (34102) <f01d6cbd6a0f24f6c13952ed448e77d6> /System/Library/Frameworks/ Security.framework/Versions/A/Security 0x93aeb000 - 0x93b01fff com.apple.DictionaryServices 1.0.0 (1.0.0) <ad0aa0252e3323d182e17f50defe56fc> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/ DictionaryServices.framework/Versions/A/DictionaryServices 0x93b08000 - 0x93b46ff7 libGLImage.dylib ??? (???) <093b1b698ca93a0380f5fa262459ea28> /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x93b6b000 - 0x93bc7ff7 com.apple.htmlrendering 68 (1.1.3) <fe87a9dede38db00e6c8949942c6bd4f> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/ Versions/A/HTMLRendering 0x93bfd000 - 0x93c13fe7 com.apple.CoreVideo 1.5.1 (1.5.1) <ed7bb95fb94817ea3212090aac5c65f3> /System/Library/Frameworks/ CoreVideo.framework/Versions/A/CoreVideo 0x93c25000 - 0x93c4dfff libcups.2.dylib ??? (???) <ece20dff2a2c8ed3ae6ef735ef440c37> /usr/lib/libcups.2.dylib 0x93c80000 - 0x93c90fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) <06d8fc0307314f8ffc16f206ad3dbf44> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x93c91000 - 0x93c97fff com.apple.print.framework.Print 218.0.2 (220.1) <8bf7ef71216376d12fcd5ec17e43742c> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x93c98000 - 0x93ca4fe7 com.apple.opengl 1.5.6 (1.5.6) <125de77ea2434a91364e79a0905a7771> /System/Library/Frameworks/ OpenGL.framework/Versions/A/OpenGL 0x93ca5000 - 0x93d38fff com.apple.ink.framework 101.3 (86) <bf3fa8927b4b8baae92381a976fd2079> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x93d3a000 - 0x93de1feb com.apple.QD 3.11.52 (???) <c72bd7bd2ce12694c3640a731d1ad878> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/QD.framework/ Versions/A/QD 0x93e13000 - 0x9411aff7 com.apple.HIToolbox 1.5.3 (???) <e36f5c553e5a32f64b7eb458dadadc71> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/ HIToolbox 0x9411b000 - 0x9424dfff com.apple.CoreFoundation 6.5.3 (476.14) <7ef7f5db09ff6dd0135a6165872803cc> /System/Library/Frameworks/ CoreFoundation.framework/Versions/A/CoreFoundation 0x9424e000 - 0x94300ffb libcrypto.0.9.7.dylib ??? (???) <330b0e48e67faffc8c22dfc069ca7a47> /usr/lib/libcrypto.0.9.7.dylib 0x94301000 - 0x943e2ff7 libxml2.2.dylib ??? (???) <1baef3d4972ee789d8fa6c1fa44da45c> /usr/lib/libxml2.2.dylib 0x943e3000 - 0x948b6ffe libGLProgrammability.dylib ??? (???) <475db64244e011cd8811e076035b2632> /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x948bd000 - 0x9496dfff edu.mit.Kerberos 6.0.12 (6.0.12) <1dc515ebe407292db8e603938c72d4e8> /System/Library/Frameworks/ Kerberos.framework/Versions/A/Kerberos 0x94aa2000 - 0x94b29ff7 libsqlite3.0.dylib ??? (???) <6978bbcca4277d6ae9f042beff643f7d> /usr/lib/libsqlite3.0.dylib 0x94c3f000 - 0x94cbbfeb com.apple.audio.CoreAudio 3.1.0 (3.1) <70bb7c657061631491029a61babe0b26> /System/Library/Frameworks/ CoreAudio.framework/Versions/A/CoreAudio 0x94cbc000 - 0x94cc3ffe libbsm.dylib ??? (???) <d25c63378a5029648ffd4b4669be31bf> /usr/lib/libbsm.dylib 0x94cc4000 - 0x94d4efe3 com.apple.DesktopServices 1.4.6 (1.4.6) <94d1a28b351b7dff77becadab0967772> /System/Library/PrivateFrameworks/ DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x94d85000 - 0x953d5fff com.apple.WebCore 5525.18.1 (5525.18.1) <9fcf69305c5b48dd8a5cb77107f66c7a> /System/Library/Frameworks/ WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/ WebCore 0x953d6000 - 0x9549dff2 com.apple.vImage 3.0 (3.0) /System/Library/ Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/ Versions/A/vImage 0x9549e000 - 0x954e0fef com.apple.NavigationServices 3.5.2 (163) <91844980804067b07a0b6124310d3f31> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/ Versions/A/NavigationServices 0x954e1000 - 0x95563ff3 com.apple.CFNetwork 330.4 (330.4) <ce5b085df34a78b7f198aff9db5b52ec> /System/Library/Frameworks/ CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/ Versions/A/CFNetwork 0x95564000 - 0x95567fff com.apple.help 1.1 (36) <b507b08e484cb89033e9cf23062d77de> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x95568000 - 0x95570fff com.apple.DiskArbitration 2.2.1 (2.2.1) <75b0c8d8940a8a27816961dddcac8e0f> /System/Library/Frameworks/ DiskArbitration.framework/Versions/A/DiskArbitration 0x95571000 - 0x95571fff com.apple.Carbon 136 (136) <98a5e3bc0c4fa44bbb09713bb88707fe> /System/Library/Frameworks/ Carbon.framework/Versions/A/Carbon 0x95926000 - 0x95945ffa libJPEG.dylib ??? (???) <0cfb80109d624beb9ceb3c43b6c5ec10> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libJPEG.dylib 0x95946000 - 0x95948ff5 libRadiance.dylib ??? (???) <20eadb285da83df96c795c2c5fa20590> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libRadiance.dylib 0x959ad000 - 0x95a92ff3 com.apple.CoreData 100.1 (186) <8e28162ef2288692615b52acc01f8b54> /System/Library/Frameworks/ CoreData.framework/Versions/A/CoreData 0x95a93000 - 0x95aabfff com.apple.openscripting 1.2.6 (???) <b8e553df643f2aec68fa968b3b459b2b> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/ Versions/A/OpenScripting 0x95aac000 - 0x95aacffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/ Frameworks/vecLib.framework/Versions/A/vecLib 0x95aad000 - 0x95aaeffc libffi.dylib ??? (???) <a3b573eb950ca583290f7b2b4c486d09> /usr/lib/libffi.dylib 0x95aaf000 - 0x95aafff8 com.apple.ApplicationServices 34 (34) <8f910fa65f01d401ad8d04cc933cf887> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/ApplicationServices 0x95ab0000 - 0x95ac4ff3 com.apple.ImageCapture 4.0 (5.0.0) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ ImageCapture.framework/Versions/A/ImageCapture 0x95ac5000 - 0x95bfdff7 libicucore.A.dylib ??? (???) <5031226ea28b371d8dfdbb32acfb48b5> /usr/lib/libicucore.A.dylib 0x95bfe000 - 0x95c0effc com.apple.LangAnalysis 1.6.4 (1.6.4) <8b7831b5f74a950a56cf2d22a2d436f6> /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis 0x95d8f000 - 0x95e0cfef libvMisc.dylib ??? (???) /System/Library/ Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/ Versions/A/libvMisc.dylib 0x96fc6000 - 0x970eafe3 com.apple.audio.toolbox.AudioToolbox 1.5.1 (1.5.1) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/ AudioToolbox 0x970eb000 - 0x971b6fff com.apple.ColorSync 4.5.0 (4.5.0) /System/ Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync 0x97258000 - 0x97258ffc com.apple.audio.units.AudioUnit 1.5 (1.5) / System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x97259000 - 0x9725efff com.apple.CommonPanels 1.2.4 (85) <ea0665f57cd267609466ed8b2b20e893> /System/Library/Frameworks/ Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/ A/CommonPanels 0x972a9000 - 0x972a9ff8 com.apple.Cocoa 6.5 (???) <e064f94d969ce25cb7de3cfb980c3249> /System/Library/Frameworks/ Cocoa.framework/Versions/A/Cocoa 0xc0000000 - 0xc000efff +com.growl.growlwithinstallerframework 1.1.1 (1.1.1) <dd41a36bcb6bf5913515b3d4875927d5> /Users/rod/Development/ Projects/infiniteNIL/Build/Release/PackRat.app/Contents/Frameworks/ Growl-WithInstaller.framework/Versions/A/Growl-WithInstaller 0xfffe8000 - 0xfffebfff libobjc.A.dylib ??? (???) /usr/lib/ libobjc.A.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/ libSystem.B.dylib |
From: Patrick H. <ph...@gm...> - 2008-07-22 18:52:34
|
I know these are actually Carbon (C not ObjectiveC) functions; however, I also believe they are the only way to setup a global hotkey. Does anyone have some example code of thing this from within a ruby cocoa application? Thanks pth |
From: Axel M. R. <rub...@ro...> - 2008-07-21 21:13:08
|
I have a ruby class that returns some boolean value back to an Obj-C class. However, the values in the obj-C class are all wrong! I have two methods in ruby: def ret_true true end def ret_false false end And I've defined a protocol to call back the Ruby methods from Obj-C @protocol Profiler -(BOOL) ret_true; -(BOOL) ret_false; @end Then, when I call the ruby methods, like this: - (void) testBoolean:(id)testrb { BOOL tst = [testrb ret_true]; NSLog (@"true: %d",tst); tst = [testrb ret_false]; NSLog (@"false: %d",tst); } I get the following output (!) "we're giving a bool to Obj-C" 2008-07-21 23:06:13.763 StringData[19788:10b] true: 0 2008-07-21 23:06:13.767 StringData[19788:10b] false: -8 Thus, true is represented as 0, and false as -8, which is exactly the wrong way around. Am I missing something important here? I've put a Xcode sample package on http://axel.nu/Boolean.zip Hopefully someone can shed some light on the correct bridge behaviour, so I can remove my patch code. Axel -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: Patrick G. <pge...@wa...> - 2008-07-14 14:46:10
|
> Doing this gives me an ObjcPtr object that wraps up that instance. > Whenever I now attempt to manipulate or query that instance (eg. by > calling API related methods), I get errors messages indicating that > the method doesn't exist - this is presumably due to the fact that > RubyCocoa knows nothing about the methods in CSIdentity? CSIdentity is part of OSServices. That framework has no BridgeSupport file, Ruby won't be able to call it. You'll need to generate that BridgeSupport file yourself with gen_bridge_metadata, and distribute it with your app. http://rubycocoa.sourceforge.net/FrameworkBridgeSupport -Patrick |
From: Pim S. <pi...@li...> - 2008-07-14 13:18:23
|
Hi Eloy, I will try this for sure. Specially the deployment features sound great. regards, Pim Op 11 jul 2008, om 12:12 heeft Eloy Duran het volgende geschreven: > Hi, > > I've just released Rucola 0.5 > > Rucola is a light weight framework that helps you write RubyCocoa > apps. > It allows you to build, test, and deploy applications using rake > commands, > eliminating the need to use XCode for the most common tasks. > > Rucola provides a set of generators to help you generate controllers, > window controllers, > and document-based applications. It also provides APIs for > simplifying some of Objective-C's > ways of doing things. > > New in this release: > Dependency resolver: > * You can now specify your dependencies in environment.rb and they > will resolved and vendored in release mode. > This applies to gems and any other ruby lib. Because of this > agnostic system there might still be some edge cases, for this purpose > there's the possibility to specify exceptions. > * In release mode RubyGems will NOT be loaded even if it's required at > some point. This results in application startup time going from ~3 > bounces in the dock to ~1. > > Deploying: > * Added rake task for packaging a release build in a dmg > * Added rake task for uploading via scp, adding others is easy. > * Added rake task for creating a Sparkle appcast file. > * Added rake task that looks for textile files in ReleaseNotes/ > AppName_Version and creates HTML for Sparkle. > > Others: > * Added Rucola::FSEvents which is a rubyesque wrapper around FSEvents. > * Added Rucola::Reloader, which uses Rucola::FSEvents to watch the > app/ > controllers path for modifications and reloads the class. > In debug mode this will be enabled by default, you can override > this setting on the `config` of Initializer. > * Added the Rucola::Log class and an extension to Kernel to access it > easily. (Manfred Stienstra) > * Added Rucola::TestCase which is a test case mixin, like the one in > Rails, which sets up a test case for a controller, defines helper > methods and creates stubs for all ib_outlets that are defined in the > controller. > * Added support for ruby-debug. If a call is made to Kernel.debugger > and the RUBYCOCOA_ENV is 'debug', then the ruby-debug library will be > required and ran. > * NSImage.imageNamed will also look in app/assets for a given image > name. > * Added a script/console script which will run a irb console with the > application loaded. (Jelle Helsen) > * Added a simple model generator, which is simply a subclass of > NSObject. > > http://rucola.rubyforge.org/ > > Cheers, > Eloy > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |