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: Brian M. <ma...@ex...> - 2008-05-17 19:08:42
|
It seems as if RubyCocoa's key-value observing works differently in some ways than Objective-C's would. Is this intentional? An incomplete implementation? The real question: is it stable behavior an app can depend upon? Here's the difference in the most important case (where you've declared the value with kvc_accessor): - setting the variable directly (var= or setVar) behaves like Objc: observeValueForKeyPath... is called - setting it with setValue_forKey does not: observeValueForKeyPath... is called twice (once, I assume, for willChangeValueForKey and once for didChangeValueForKey) In Objc, it'd be called once. Details: ============= Here's Objective-C: A Watcher object watches an Observed object like this: - (id) initWatching: (id) observed { [observed addObserver: self forKeyPath: @"value" options: 0 context: NULL]; return self; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { NSLog(@"observed %@\n", keyPath); } Here a third object triggers observation: Observed *observed = [[Observed alloc] init]; Watcher *watcher = [[Watcher alloc] initWatching: observed]; NSLog(@"Setting directly."); observed.value = @"new value"; // The result is "observed value" NSLog(@"Setting kvcly."); [observed setValue: @"newer value" forKey: @"value"]; // The result is "observed value" ============ The Ruby code: require 'osx/cocoa' class Observed < OSX::NSObject if ARGV[0] == 'kvc' kvc_accessor :value else attr_accessor :value end end class Watcher < OSX::NSObject def initWatching(observed) init observed.addObserver_forKeyPath_options_context(self, 'value', 0, nil) self end def observeValueForKeyPath_ofObject_change_context( keyPath, object, change, context) puts "#{object} changed #{keyPath}" end end observed = Observed.alloc.init watcher = Watcher.alloc.initWatching(observed) puts "Setting directly" observed.value = 5 # Nothing if plain accessor; sees change if kvc_accessor. puts "Setting via setValue method" observed.setValue(5) # Nothing if plain accessor; sees change if kvc_accessor. puts "setting kvcly" observed.setValue_forKey(5, 'value') # Gets two messages (presumably willChange and hasChanged) observed.removeObserver_forKeyPath(watcher, 'value') ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Aron N. <aro...@gm...> - 2008-05-13 09:50:36
|
Hi All, I'm trying to implement property validation methods (validate<Name>:error:, or, rather, validate<Name>_error in Ruby) in a Ruby class. I am able to call the validation methods directly from objc, but they are not called when running "validateValue:forKey:error:". Turning on RubyCocoa logging shows no activity on the bridge when validateValue:forKey:error: is called. I replicated the issue using a simple example. Am I missing something obvious here? I'm using the Ruby and RubyCocoa shipped with Leopard. Thanks from a newbie, Aron Sample Ruby code: require 'OSX/Cocoa' include OSX class A < NSObject kvc_accessor :prop def validateProp_error(value, error) puts "In validation" return true; end end Sample objc code: #import <Cocoa/Cocoa.h> #import <RubyCocoa/RBRuntime.h> #import <stdio.h> int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; int stat = RBApplicationInit("validate.rb", argc, argv, nil); if (stat != 0) { fprintf(stderr, "Error in ruby initialization\n"); [pool release]; return stat; } Class rubyClass = NSClassFromString(@"A"); NSObject *obj = [[rubyClass alloc] init]; // The following doesn't work: [obj validateValue: nil forKey: @"prop" error: nil]; // The following does work: // [obj validateProp: nil error: nil]; [pool release]; } |
From: Patrick G. <pge...@wa...> - 2008-05-13 09:44:08
|
>> >> Do you (or anybody else) know of a way to find out where require is >> looking for it's files? >> In terminal, sudo fs_usage -w | grep RubyCocoa will print any file matching 'RubyCocoa' along with its path. |
From: Eloy D. <elo...@gm...> - 2008-05-13 09:33:15
|
Hi Allison, You can check the load paths with the global var $:, or the more descriptive $LOAD_PATH. As you can see it is installed in my ruby site dir: % irb >> $LOAD_PATH.select {|p| File.exist? File.join(p, 'osx') } => ["/Library/Ruby/Site/1.8", "/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/lib/ruby/1.8"] Eloy On May 13, 2008, at 11:19 AM, Allison Newman wrote: > Hi Scott, > > Thanks for the reply. Sadly, my system is giving me back the same > info as yours, yet if I try "require 'osx/cocoa'" in irb, or in a > script ran from the command line, ruby tells me that it can't find > the file... > > Do you (or anybody else) know of a way to find out where require is > looking for it's files? > > Alli > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Allison N. <dem...@ma...> - 2008-05-13 09:19:25
|
Hi Scott, Thanks for the reply. Sadly, my system is giving me back the same info as yours, yet if I try "require 'osx/cocoa'" in irb, or in a script ran from the command line, ruby tells me that it can't find the file... Do you (or anybody else) know of a way to find out where require is looking for it's files? Alli |
From: Scott T. <ea...@ma...> - 2008-05-12 12:15:16
|
On May 12, 2008, at 3:08 AM, Allison Newman wrote: > I obviously use this require in every source file for my app, but if > I try that line in irb, or try to execute one of my files from the > command line, it doesn't work. What is the magic that is used to > correctly access the framework's cocoa.rb file? It should work from irb IF you're using the same version of Ruby and irb from the command line that say XCode uses when running applications. Try using "whereis ruby" and/or "whereis irb" from the command line to find out where the executable for that name is. On my machine it comes back as: /usr/bin/ruby But, if you do "ls -l /usr/bin/ruby" on that you'll find: /usr/bin/ruby -> ../../System/Library/Frameworks/Ruby.framework/ Versions/Current/usr/bin/ruby So ruby just maps down into the Ruby.framework for the system. Correspondingly, /usr/lib/ruby maps to /usr/lib/ruby -> ../../System/Library/Frameworks/Ruby.framework/ Versions/Current/usr/lib/ruby and "osx" is at "ls -l /usr/lib/ruby/1.8/osx" So if your command line Ruby or command line irb are pointing at a different version of ruby, chances are they can't find the osx directory. You'll have to investigate on your system to find out where ruby is. Scott |
From: Allison N. <dem...@ma...> - 2008-05-12 08:09:01
|
Hi, I obviously use this require in every source file for my app, but if I try that line in irb, or try to execute one of my files from the command line, it doesn't work. What is the magic that is used to correctly access the framework's cocoa.rb file? Alli |
From: <no...@sm...> - 2008-05-12 08:04:36
|
Hi, I obviously use this require in every source file for my app, but if I try that line in irb, or try to execute one of my files from the command line, it doesn't work. What is the magic that is used to correctly access the framework's cocoa.rb file? Alli |
From: kimura w. <ki...@us...> - 2008-05-11 15:00:35
|
I guess your Mac has older RubyCocoa.framework under /Library/Frameworks. You can delete this older framework. On Thu, 8 May 2008 16:56:26 -0500, Brian Marick wrote: > I've been using the RubyCocoa that comes with Leopard. I'm at 10.5.2. > > Irb shows me this version number: > > irb(main):001:0> OSX::RUBYCOCOA_VERSION > => "0.13.1" > > Printing the same thing in rb_main.rb gives me 0.11.1 > -- kimura wataru |
From: Pim S. <pi...@li...> - 2008-05-09 10:43:39
|
Op 7 mei 2008, om 17:43 heeft Eloy Duran het volgende geschreven: > Oh I totally forgot about that.... > Actually I can't even seem to find it :D > Could you send me the link? http://www.superalloy.nl/blog/2007/05/17/rubycocoa-activerecord-bindings/#comments comment of Luca. > > But I would think that that version would be installed by default on > current Leopard. > I don't think so. >>> class ProjectProxy >>> def description >>> @record.description >>> end >>> end >>> Can you give me a hint how I can change the arity in the above method? Regards, Pim |
From: Brian M. <ma...@ex...> - 2008-05-08 21:56:57
|
I've been using the RubyCocoa that comes with Leopard. I'm at 10.5.2. Irb shows me this version number: irb(main):001:0> OSX::RUBYCOCOA_VERSION => "0.13.1" Printing the same thing in rb_main.rb gives me 0.11.1 Xcode shows me that the linked RubyCocoa.framework is in /System/Library/Frameworks/RubyCocoa.framework There's one version there, A, which is also Current. The Info.plist identifies it as 0.13.1. So where is 0.11.1 coming from? ----- 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. <e....@su...> - 2008-05-07 15:45:00
|
Oh I totally forgot about that.... Actually I can't even seem to find it :D Could you send me the link? But I would think that that version would be installed by default on current Leopard. Eloy On May 7, 2008, at 3:52 PM, Pim Snel wrote: > Op 7 mei 2008, om 14:50 heeft Eloy Duran het volgende geschreven: > >> Hi Pim, >> >> This is because #description is the #inspect method in Cocoa. >> What you could do is override it with the correct arity on the >> proxy and make it return the correct value: >> >> class ProjectProxy >> def description >> @record.description >> end >> end >> >> Eloy > > Hello Eloy, > > Thanks for your fast reply. > > Overriding in the proxy does not work :( I still get the same error. > Other suggestions? I read on your website that the current rubycocoa- > trunk fixes this problem. Should I install this? > > Regards, > Pim > >> >> On May 7, 2008, at 2:20 PM, Pim Snel wrote: >>> Hello, >>> >>> I just start learning Ruby, Cocoa and RubyCocoa and I am really >>> enjoying it. Now I have a problem using the activerecord bindings. >>> I'm trying to read an existing table which contains a column named >>> 'description'. When I run the app I get the following error: >>> >>> 2008-05-07 14:10:18.150 machour[16767:10b] >>> ProjectProxy#rbValueForKey: RuntimeError: Cannot override >>> Objective-C method 'description' with Ruby method #description, >>> they should both have the same number of arguments. (expected >>> arity 0, got -1) >>> >>> When I remove the column everything works as should, but that's >>> not possible in my case. Is there a way to tackle this? >>> >>> regards, >>> Pim Snel >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >>> Don't miss this year's exciting event. There's still time to save >>> $100. >>> Use priority code J8TL2D2. >>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Pim S. <pi...@li...> - 2008-05-07 13:52:27
|
Op 7 mei 2008, om 14:50 heeft Eloy Duran het volgende geschreven: > Hi Pim, > > This is because #description is the #inspect method in Cocoa. > What you could do is override it with the correct arity on the proxy > and make it return the correct value: > > class ProjectProxy > def description > @record.description > end > end > > Eloy Hello Eloy, Thanks for your fast reply. Overriding in the proxy does not work :( I still get the same error. Other suggestions? I read on your website that the current rubycocoa- trunk fixes this problem. Should I install this? Regards, Pim > > On May 7, 2008, at 2:20 PM, Pim Snel wrote: >> Hello, >> >> I just start learning Ruby, Cocoa and RubyCocoa and I am really >> enjoying it. Now I have a problem using the activerecord bindings. >> I'm trying to read an existing table which contains a column named >> 'description'. When I run the app I get the following error: >> >> 2008-05-07 14:10:18.150 machour[16767:10b] >> ProjectProxy#rbValueForKey: RuntimeError: Cannot override Objective- >> C method 'description' with Ruby method #description, they should >> both have the same number of arguments. (expected arity 0, got -1) >> >> When I remove the column everything works as should, but that's not >> possible in my case. Is there a way to tackle this? >> >> regards, >> Pim Snel >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <e....@su...> - 2008-05-07 12:50:46
|
Hi Pim, This is because #description is the #inspect method in Cocoa. What you could do is override it with the correct arity on the proxy and make it return the correct value: class ProjectProxy def description @record.description end end Eloy On May 7, 2008, at 2:20 PM, Pim Snel wrote: > Hello, > > I just start learning Ruby, Cocoa and RubyCocoa and I am really > enjoying it. Now I have a problem using the activerecord bindings. > I'm trying to read an existing table which contains a column named > 'description'. When I run the app I get the following error: > > 2008-05-07 14:10:18.150 machour[16767:10b] > ProjectProxy#rbValueForKey: RuntimeError: Cannot override Objective- > C method 'description' with Ruby method #description, they should > both have the same number of arguments. (expected arity 0, got -1) > > When I remove the column everything works as should, but that's not > possible in my case. Is there a way to tackle this? > > regards, > Pim Snel > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Pim S. <pi...@li...> - 2008-05-07 12:20:42
|
Hello, I just start learning Ruby, Cocoa and RubyCocoa and I am really enjoying it. Now I have a problem using the activerecord bindings. I'm trying to read an existing table which contains a column named 'description'. When I run the app I get the following error: 2008-05-07 14:10:18.150 machour[16767:10b] ProjectProxy#rbValueForKey: RuntimeError: Cannot override Objective-C method 'description' with Ruby method #description, they should both have the same number of arguments. (expected arity 0, got -1) When I remove the column everything works as should, but that's not possible in my case. Is there a way to tackle this? regards, Pim Snel |
From: Eloy D. <elo...@gm...> - 2008-05-05 22:43:50
|
Hi Bryan, The framework will be loaded into the OSX namespace. So you'd have to use OSX::MyCustomObject or you can include the OSX module in the toplevel making it unnecessary to prefix with OSX:: Eloy On 6 mei 2008, at 00:38, Bryan Bonczek wrote: > I'm trying to use RubyCocoa for some automated testing of an > Objective- > C framework I have written. I successfully imported the framework > using the OSX.require_framework but I am having trouble using the > objects within the framework. Whenever I try to declare a new > variable using > > myObject = myCustomObject.alloc.init() (where myCustomObject is part > of the successfully loaded framewor) > > I keep getting "unitialized constant myCustomObject (NameError)." > What is the proper way to use the objects inside of the loaded > framework? > > > Also... I had some issues with relative paths and the > require_framework method. Is there any way to pass a relative path to > this method? > > > Thanks, > > Bryan > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Bryan B. <bry...@sa...> - 2008-05-05 22:38:21
|
I'm trying to use RubyCocoa for some automated testing of an Objective- C framework I have written. I successfully imported the framework using the OSX.require_framework but I am having trouble using the objects within the framework. Whenever I try to declare a new variable using myObject = myCustomObject.alloc.init() (where myCustomObject is part of the successfully loaded framewor) I keep getting "unitialized constant myCustomObject (NameError)." What is the proper way to use the objects inside of the loaded framework? Also... I had some issues with relative paths and the require_framework method. Is there any way to pass a relative path to this method? Thanks, Bryan |
From: Patrick G. <pge...@wa...> - 2008-05-03 10:54:20
|
> > Related question: suppose I create an object that receives > NSNotifications. In the Ruby universe, I keep no pointers to it. Is it > protected from Ruby GC? I'm not sure, I've had crashes when not keeping pointers. Manually creating a window in an application controller and not keeping a pointer -> crash. Storing it as an instance or global variable -> no more crash. If you're not sure about object lifetime, call GC.start. If your code crashes right after it, it's trying to access destroyed data : keep pointers around. If it works, you're all good ! |
From: Brian M. <ma...@ex...> - 2008-05-02 23:33:37
|
On May 2, 2008, at 5:11 PM, Patrick Geiller wrote: > Don't forget to call super when overloading. Argh. Thanks. Glad I predicted it would be something stupid. Related question: suppose I create an object that receives NSNotifications. In the Ruby universe, I keep no pointers to it. Is it protected from Ruby GC? That is, given this definition: class Receiver < NSObject def init super_init Center.addObserver_selector_name_object(self, 'handle:', "notification name", nil) self end end ... and this use... Receiver.alloc.init ... can I send "notification name", secure that the Receiver will be there to get them? And will the Receiver be garbage collected when it calls Center.removeObserver on itself? ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Patrick G. <pge...@wa...> - 2008-05-02 22:11:29
|
Don't forget to call super when overloading. > def init > Center.addObserver_selector_name_object(self, :handle_, > "notification name", nil) return super_init > end |
From: Brian M. <ma...@ex...> - 2008-05-02 21:38:49
|
Here's a program that shows a core dump when posting an NSNotification after Ruby GC. I suspect I'm doing something stupid, possibly with a selector. -------------------------------------- #!/usr/bin/env ruby require 'osx/cocoa' include OSX Center = NSNotificationCenter.defaultCenter class Receiver < NSObject def init Center.addObserver_selector_name_object(self, :handle_, "notification name", nil) end def handle(notification) puts notification end end class Sender < NSObject def announce Center.postNotificationName_object("notification name", self) end end if $0 == __FILE__ r = Receiver.alloc.init # Center.postNotificationName_object("notification name", self) Sender.alloc.init.announce # removable GC.start # removable puts "About to post" Sender.alloc.init.announce # Center.postNotificationName_object("notification name", self) puts "I survived!" end -------------------------------------- Here's the result with stock Leopard RubyCocoa (OSX::RUBYCOCOA_VERSION=> "0.13.1"): 563 $ ruby x.rb NSConcreteNotification 0x57a8f0 {name = notification name; object = <Sender: 0x2a9a30>} x.rb:30: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [universal-darwin9.0] Abort trap Most any change you make to the code prevents the core dump: - remove either of the lines marked removable. - remove the assignment to the global (but keep the alloc.init). - change the first use of Sender to post the notification directly. (Changing the second does not prevent the core dump.) I tried using addRubyMethod_withType (per http://www.rubycocoa.com/appleremote/2 ), but got all the same behavior. Here's the backtrace: #0 0x941300ea in kill$UNIX2003 () (gdb) bt #0 0x941300ea in kill$UNIX2003 () #1 0x941a73f2 in raise () #2 0x941b69af in abort () #3 0x000cdc50 in rb_bug () #4 0x0013464f in rb_gc_mark_trap_list () #5 0x9412e5eb in _sigtramp () #6 0xffffffff in ?? () #7 0x000cfe3c in rb_clear_cache_by_class () #8 0x000db695 in rb_obj_respond_to () #9 0x000db721 in rb_respond_to () #10 0x0018a3d4 in rbobj_call_ruby () #11 0x0018689a in sel_to_rbobj () #12 0x96ba8424 in ffi_prep_cif_machdep () #13 0x94345bda in NSZoneMalloc () #14 0x936e19da in _CFXNotificationResetSessionForTask () #15 0x936e1cb3 in _CFXNotificationPostNotification () #16 0x94342fd0 in NSPopAutoreleasePool () #17 0x9434c668 in _NSDescriptionWithLocaleFunc () #18 0x96ba81dd in ffi_call_SYSV () #19 0x96ba8771 in ffi_call () #20 0x00196a6c in rb_ffi_dispatch () #21 0x00181b65 in objcptr_s_new_with_cptr () #22 0x00182e44 in init_mdl_OCObjWrapper () #23 0x96ba8424 in ffi_prep_cif_machdep () #24 0x000da18c in rb_eval_string_wrap () #25 0x000dad6a in rb_eval_string_wrap () #26 0x000d80da in rb_eval_string_wrap () #27 0x000e706e in rb_load_protect () #28 0x000e709f in ruby_exec () #29 0x000e70cb in ruby_run () #30 0x00001fff in main () ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Axel M. R. <ax...@ro...> - 2008-04-25 21:27:10
|
At 10:52 -0700 25-04-2008, Neil Stevens wrote: > >Or just include a second, tiny Objective C binary that you can then exec. That is also a good idea. A friend suggested an AppleScript, like in system('osascript -e 'tell application "Finder" to display dialog "You need Leopard to use this application" '); Thanks for all the suggestions everyone. It's good to think 'out-of-the-box' sometimes. -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: Neil S. <ne...@ha...> - 2008-04-25 17:53:16
|
Patrick Geiller wrote: >> Probably because the NSApp environment is not yet ready, but how do >> I otherwise inform the user in a Maclike way that she needs to >> upgrade? >> >> tail -f /var/log/system.log is not what I call userfriendly ;-) > > How about system("open file:///someHtmlPageInYourBundle.html") to open > an html page with some info and a link to Leopard ? Or just include a second, tiny Objective C binary that you can then exec. -- Neil Stevens - ne...@ha... If you're seeing shades of gray, it's because you're not looking close enough to see the black and white dots. |
From: Axel M. R. <rub...@ro...> - 2008-04-25 14:31:38
|
At 16:22 +0200 25-04-2008, Patrick Geiller wrote: >How about system("open file:///someHtmlPageInYourBundle.html") to open >an html page with some info and a link to Leopard ? Ouch, dirty. I like it however! thx for the suggestion. Axel -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: Patrick G. <pge...@wa...> - 2008-04-25 14:23:16
|
> Probably because the NSApp environment is not yet ready, but how do > I otherwise inform the user in a Maclike way that she needs to > upgrade? > > tail -f /var/log/system.log is not what I call userfriendly ;-) How about system("open file:///someHtmlPageInYourBundle.html") to open an html page with some info and a link to Leopard ? |