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: Eloy D. <e....@su...> - 2008-02-28 18:42:57
|
Hi Knud, Iirc you need to hookup the undo menu item to the first repsonder, which is correctly set in the normal templates. Eloy On 28 feb 2008, at 19:09, Knud Hinnerk Möller wrote: > Hi, > > another thing I just discovered: if you create a basic ObjC coredata > app from the appropriate template in XCode, you'll get undo support. > If you create the same application with RubyCocoa (using the XCode > template again), you don't. Are there some settings I need to set > before undo support works? Or is this a bug in RubyCocoa? > > Cheers, > Knud > ------------------------------------------------- > Knud Möller, MA > +353 - 91 - 495086 > Smile Group: http://smile.deri.ie > Digital Enterprise Research Institute > National University of Ireland, Galway > Institiúid Taighde na Fiontraíochta Digití > Ollscoil na hÉireann, Gaillimh > > > ------------------------------------------------------------------------- > 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: Knud H. M. <knu...@de...> - 2008-02-28 18:20:31
|
Hi, another thing I just discovered: if you create a basic ObjC coredata app from the appropriate template in XCode, you'll get undo support. If you create the same application with RubyCocoa (using the XCode template again), you don't. Are there some settings I need to set before undo support works? Or is this a bug in RubyCocoa? Cheers, Knud ------------------------------------------------- Knud Möller, MA +353 - 91 - 495086 Smile Group: http://smile.deri.ie Digital Enterprise Research Institute National University of Ireland, Galway Institiúid Taighde na Fiontraíochta Digití Ollscoil na hÉireann, Gaillimh |
From: Knud H. M. <knu...@de...> - 2008-02-27 18:21:14
|
Hi all, I'm trying to implement something with dependent keys in core data. I try to follow the documentation at: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/DependentKeys.html Basically, I implement a subclass of NSManagedObject which includes a custom method "fullName" for the dependent key (fullname depends of "firstName" and "lastName"). To make it work, I need to call setKeys:triggerChangeNotificationsForDependentKey: on my subclass. I implemented this in ObjC, and it works just fine: @implementation DKTEntity + (void)initialize { [self setKeys: [NSArray arrayWithObjects: @"firstName", @"lastName", nil] triggerChangeNotificationsForDependentKey:@"fullName"]; } - (NSString *)fullName { return [NSString stringWithFormat: @"%@ %@", [self firstName], [self lastName]]; } @end Now I tried to do the same in RubyCocoa, like this: class DKTEntity < OSX::NSManagedObject def DKTEntity.initialize DKTEntity .setKeys_triggerChangeNotificationsForDependentKey(["firstName", "lastName"], "fullName") end def fullName # this is the definition of the dependent key fullName return "#{firstName} #{lastName}" end end However, this results in an ugly crash upon startup: 2008-02-27 17:35:41.473 DependentKeysTest[1178:10b] AppDelegate#rbValueForKey: RuntimeError: Ruby object `OSX::DKTEntity_DKTEntity_' doesn't respond to the ObjC selector `initialize', the method either doesn't exist or is private I'm new to RubyCocoa (and Ruby) and have no real clue as to what the problem is here? Is it the way I override the initialize class method? I tried other idioms, but the error remains the same. I also tried to call setKeys... outside any initialize method, like so: class DKTEntity < OSX::NSManagedObject DKTEntity .setKeys_triggerChangeNotificationsForDependentKey(["firstName", "lastName"], "fullName") ... end This doesn't crash, but unfortunately doesn't seem to have any effect at all (fullName will remain unspecified). If you want to play around with the code, look here: ObjC version: http://sw.deri.org/~knud/stuff/DependentKeyTestObjC.zip Ruby version: http://sw.deri.org/~knud/stuff/DependentKeysTest.zip Any help appreciated! Cheers, Knud ------------------------------------------------- Knud Möller, MA +353 - 91 - 495086 Smile Group: http://smile.deri.ie Digital Enterprise Research Institute National University of Ireland, Galway Institiúid Taighde na Fiontraíochta Digití Ollscoil na hÉireann, Gaillimh |
From: Laurent S. <lsa...@ap...> - 2008-02-15 20:24:09
|
It is not possible to override the system version from the binary installer, and it's definitely not recommended. You can however, by using the sources tarball, and passing the right options to install.rb, override it. Beware that everything in /System belongs to the system and Apple is susceptible to perform any operation on its content via a software update, assuming that you never touched anything there. It is safe to install RubyCocoa in /Library, because applications will load the /Library version first since it's first in the framework load path. Laurent On Feb 15, 2008, at 12:20 PM, Harvie Griffith Jr. wrote: > Laurent, > > What if I want the installer to put it over top of the system version, > what options do I feed the installer? > > Thanks, > > Sam Griffith > > On Feb 15, 2008, at 1:29 PM, Laurent Sansonetti wrote: > >> Hi, >> >> I am honored to announce the immediate release of RubyCocoa 0.13.2. >> >> RubyCocoa is a Mac OS X framework that allows Cocoa programming in >> the >> object-oriented scripting language Ruby. In other words, it is a >> bridge that let you access Objective-C objects from Ruby, and vice- >> versa. >> >> You can learn more about RubyCocoa on our website: >> >> http://rubycocoa.sf.net >> >> A source tarball as well as binary installers for Mac OS X 10.4 and >> 10.5 are provided. >> >> This is mostly a bugs fix release, addressing a few critical >> issues. A >> few enhancements are nevertheless available as well. All users are >> encouraged to upgrade, and report us feedback. >> >> Mac OS X 10.5, Leopard, is as you can see supported by this release. >> Installing this release using the binary installer or manually with >> the default build parameters won't override the system version of >> RubyCocoa that ships with Leopard, it will go in /Library while the >> system version is in /System. >> >> (Very recently, the system version of RubyCocoa in Mac OS X 10.5 was >> updated to 0.13.1, via the 10.5.2 software update.) >> >> The release notes are following. Enjoy! >> >> Laurent >> >> New features: >> - New sample: Growl. >> - New NSSize methods: #/, #*, #+, #- >> - New NSPoint methods: #+, #- >> - ActiveRecordSetController now allows to destroy a multiple >> selection. >> >> Bug fixes: >> - Fixed a bug when direct-overriding a method in a subclass of an >> Objective-C class that implements the method. >> - Fixed a bug when returning C array (CARY) in struct. >> - Migrated from STR2CSTR() to StringValuePtr(). >> - Marked some local VALUE variables as volatile to make sure they >> will >> stay on stack and won't be collected by mistake. >> - Made NSNumber#float? deprecated and added integer? to conform to >> Number#integer?. >> - Fixed a bug, NSString#scan(regexp){block} passed String to its >> block >> argument. It should be NSString. >> - Fixed a bug, NSString#split returned an array contains immutable >> NSString sometimes. >> - Fixed a bug, NSArray#delete always yielded a block. >> - NSNumber#to_f should use doubleValue. >> - ActiveRecord: Made speed improvements in the way records in a has >> many association are created. >> - ActiveRecord: Fixed a bug where calling #to_activerecord_proxy on >> the same record object would return a new different proxy object and >> thus resulting in a kvo error. The proxy instance is now cached in >> the >> record itself. >> - ActiveRecord: Fixed bug on case-sensitive filesystems where >> 'FileUtils' was required instead of 'fileutils'. >> - gen_bridge_doc: updated to read latest Apple docs. >> - Fixed a build problem, libffi should be built always for >> macosx-deployment-target=10.4. >> - Build process is now able to generate a release package for Tiger >> on Leopard. >> - Cannot handle objc types with qualifiers such as (in|out|inout). >> - Removed ENV['BRIDGE_SUPPORT_PATH']= debug calls in samples. >> - Resume caching method arguments of objc callbacks. >> >> ------------------------------------------------------------------------- >> 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 > > > ------------------------------------------------------------------------- > 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: Harvie G. Jr. <sta...@ma...> - 2008-02-15 20:20:21
|
Laurent, What if I want the installer to put it over top of the system version, what options do I feed the installer? Thanks, Sam Griffith On Feb 15, 2008, at 1:29 PM, Laurent Sansonetti wrote: > Hi, > > I am honored to announce the immediate release of RubyCocoa 0.13.2. > > RubyCocoa is a Mac OS X framework that allows Cocoa programming in the > object-oriented scripting language Ruby. In other words, it is a > bridge that let you access Objective-C objects from Ruby, and vice- > versa. > > You can learn more about RubyCocoa on our website: > > http://rubycocoa.sf.net > > A source tarball as well as binary installers for Mac OS X 10.4 and > 10.5 are provided. > > This is mostly a bugs fix release, addressing a few critical issues. A > few enhancements are nevertheless available as well. All users are > encouraged to upgrade, and report us feedback. > > Mac OS X 10.5, Leopard, is as you can see supported by this release. > Installing this release using the binary installer or manually with > the default build parameters won't override the system version of > RubyCocoa that ships with Leopard, it will go in /Library while the > system version is in /System. > > (Very recently, the system version of RubyCocoa in Mac OS X 10.5 was > updated to 0.13.1, via the 10.5.2 software update.) > > The release notes are following. Enjoy! > > Laurent > > New features: > - New sample: Growl. > - New NSSize methods: #/, #*, #+, #- > - New NSPoint methods: #+, #- > - ActiveRecordSetController now allows to destroy a multiple > selection. > > Bug fixes: > - Fixed a bug when direct-overriding a method in a subclass of an > Objective-C class that implements the method. > - Fixed a bug when returning C array (CARY) in struct. > - Migrated from STR2CSTR() to StringValuePtr(). > - Marked some local VALUE variables as volatile to make sure they will > stay on stack and won't be collected by mistake. > - Made NSNumber#float? deprecated and added integer? to conform to > Number#integer?. > - Fixed a bug, NSString#scan(regexp){block} passed String to its block > argument. It should be NSString. > - Fixed a bug, NSString#split returned an array contains immutable > NSString sometimes. > - Fixed a bug, NSArray#delete always yielded a block. > - NSNumber#to_f should use doubleValue. > - ActiveRecord: Made speed improvements in the way records in a has > many association are created. > - ActiveRecord: Fixed a bug where calling #to_activerecord_proxy on > the same record object would return a new different proxy object and > thus resulting in a kvo error. The proxy instance is now cached in the > record itself. > - ActiveRecord: Fixed bug on case-sensitive filesystems where > 'FileUtils' was required instead of 'fileutils'. > - gen_bridge_doc: updated to read latest Apple docs. > - Fixed a build problem, libffi should be built always for > macosx-deployment-target=10.4. > - Build process is now able to generate a release package for Tiger > on Leopard. > - Cannot handle objc types with qualifiers such as (in|out|inout). > - Removed ENV['BRIDGE_SUPPORT_PATH']= debug calls in samples. > - Resume caching method arguments of objc callbacks. > > ------------------------------------------------------------------------- > 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: Laurent S. <lau...@gm...> - 2008-02-15 19:29:29
|
Hi, I am honored to announce the immediate release of RubyCocoa 0.13.2. RubyCocoa is a Mac OS X framework that allows Cocoa programming in the object-oriented scripting language Ruby. In other words, it is a bridge that let you access Objective-C objects from Ruby, and vice-versa. You can learn more about RubyCocoa on our website: http://rubycocoa.sf.net A source tarball as well as binary installers for Mac OS X 10.4 and 10.5 are provided. This is mostly a bugs fix release, addressing a few critical issues. A few enhancements are nevertheless available as well. All users are encouraged to upgrade, and report us feedback. Mac OS X 10.5, Leopard, is as you can see supported by this release. Installing this release using the binary installer or manually with the default build parameters won't override the system version of RubyCocoa that ships with Leopard, it will go in /Library while the system version is in /System. (Very recently, the system version of RubyCocoa in Mac OS X 10.5 was updated to 0.13.1, via the 10.5.2 software update.) The release notes are following. Enjoy! Laurent New features: - New sample: Growl. - New NSSize methods: #/, #*, #+, #- - New NSPoint methods: #+, #- - ActiveRecordSetController now allows to destroy a multiple selection. Bug fixes: - Fixed a bug when direct-overriding a method in a subclass of an Objective-C class that implements the method. - Fixed a bug when returning C array (CARY) in struct. - Migrated from STR2CSTR() to StringValuePtr(). - Marked some local VALUE variables as volatile to make sure they will stay on stack and won't be collected by mistake. - Made NSNumber#float? deprecated and added integer? to conform to Number#integer?. - Fixed a bug, NSString#scan(regexp){block} passed String to its block argument. It should be NSString. - Fixed a bug, NSString#split returned an array contains immutable NSString sometimes. - Fixed a bug, NSArray#delete always yielded a block. - NSNumber#to_f should use doubleValue. - ActiveRecord: Made speed improvements in the way records in a has many association are created. - ActiveRecord: Fixed a bug where calling #to_activerecord_proxy on the same record object would return a new different proxy object and thus resulting in a kvo error. The proxy instance is now cached in the record itself. - ActiveRecord: Fixed bug on case-sensitive filesystems where 'FileUtils' was required instead of 'fileutils'. - gen_bridge_doc: updated to read latest Apple docs. - Fixed a build problem, libffi should be built always for macosx-deployment-target=10.4. - Build process is now able to generate a release package for Tiger on Leopard. - Cannot handle objc types with qualifiers such as (in|out|inout). - Removed ENV['BRIDGE_SUPPORT_PATH']= debug calls in samples. - Resume caching method arguments of objc callbacks. |
From: Brian M. <ma...@ex...> - 2008-02-15 17:04:58
|
Your code snapshot works for me. I've done some reorganization of my files, and now I can only find the Objective-C version of my test program, even in Time Machine. Trying to reconstruct the Ruby version produces a program that also works. Most likely I did something wrong. Sorry for the false bug report. On Feb 8, 2008, at 6:56 PM, kimura wataru wrote: > Hi, > > It works for me on 10.5.1. > LSEnvironment is available for apps launched via Launch Service. > - double-click in Finder > - launch with "open" command > > LSEnvironment is not available without Launch Service. > - "Run" on Xcode > - execute YourApp.app/Contents/MacOS/YourApp directly > > > On Thu, 7 Feb 2008 13:01:14 -0600, Brian Marick wrote: >> Using RubyCocoa from Leopard (10.5.1) : >> >> You can declare environment variables in a Cocoa app's Info.plist >> file >> like this: >> >> <key>LSEnvironment</key> >> <dict> >> <key>VEX</key> >> <string>acious!</string> >> </dict> >> >> In an Objective-C app, that value carries over into the environment: >> >> NSDictionary *env = [[NSProcessInfo processInfo] environment]; >> NSLog(@"====Here is the value of VEX in the processInfo >> environment: %@", >> [env objectForKey:@"VEX"]); > -- > kimura wataru > > ------------------------------------------------------------------------- > 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 ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Justin S. <sto...@gm...> - 2008-02-15 14:24:36
|
That worked. Thank you for the assist. On Fri, Feb 15, 2008 at 12:13 AM, Satoshi Nakagawa <sna...@in...> wrote: > Hi, > > The delegate method of NSSpeechSynthesizer is > "speechSynthesizer:didFinishSpeaking:". > So try this: > > def speechSynthesizer_didFinishSpeaking(sender, success) > NSLog(@"Finished speaking"); > end > > -- > Satoshi Nakagawa > > > > On 2008/02/15, at 12:07, Justin Stone wrote: > > > I'm trying to port a simple objective-c application (from a book on > > cocoa in os x) to Ruby in Xcode. Basically the application takes a > > line of text and then says the line (out loud). This all works fine > > but I'm having trouble figuring out how to do the delegate to make the > > stop button disable itself when the app finishes saying the line. > > Here's the code: > > > > require 'osx/cocoa' > > include OSX > > > > class Speak < NSObject > > ib_outlets :textField, :stopButton > > > > def initialize > > @speechSynth = NSSpeechSynthesizer.alloc().initWithVoice_(nil) > > @speechSynth.setDelegate_(self) > > end > > > > ib_action :say do |sender| > > blah = @textField.stringValue() > > > > if blah.empty? > > return > > end > > > > @stopButton.setEnabled_(true) > > if (rand(10)+1) == 1 > > @speechSynth.startSpeakingString_("I'm not going to say that") > > else > > @speechSynth.startSpeakingString_(blah) > > end > > > > NSLog("Have started to say: #{blah}\n") > > end > > > > ib_action :stop do |sender| > > NSLog("Stopping.") > > @speechSynth.stopSpeaking > > end > > > > def didFinishSpeaking(sender) > > NSLog("Finished Speaking.") > > @stopButton.setDisabled_(true) > > end > > end > > > > > > It compiles and runs fine. The only thing that doesn't work is > > didFinishSpeaking is not called by @speechSynth when it finishes > > speaking. Any ideas on what I'm doing wrong? > > > > ------------------------------------------------------------------------- > > 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 > > > ------------------------------------------------------------------------- > 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: Satoshi N. <sna...@in...> - 2008-02-15 05:13:15
|
Hi, The delegate method of NSSpeechSynthesizer is "speechSynthesizer:didFinishSpeaking:". So try this: def speechSynthesizer_didFinishSpeaking(sender, success) NSLog(@"Finished speaking"); end -- Satoshi Nakagawa On 2008/02/15, at 12:07, Justin Stone wrote: > I'm trying to port a simple objective-c application (from a book on > cocoa in os x) to Ruby in Xcode. Basically the application takes a > line of text and then says the line (out loud). This all works fine > but I'm having trouble figuring out how to do the delegate to make the > stop button disable itself when the app finishes saying the line. > Here's the code: > > require 'osx/cocoa' > include OSX > > class Speak < NSObject > ib_outlets :textField, :stopButton > > def initialize > @speechSynth = NSSpeechSynthesizer.alloc().initWithVoice_(nil) > @speechSynth.setDelegate_(self) > end > > ib_action :say do |sender| > blah = @textField.stringValue() > > if blah.empty? > return > end > > @stopButton.setEnabled_(true) > if (rand(10)+1) == 1 > @speechSynth.startSpeakingString_("I'm not going to say that") > else > @speechSynth.startSpeakingString_(blah) > end > > NSLog("Have started to say: #{blah}\n") > end > > ib_action :stop do |sender| > NSLog("Stopping.") > @speechSynth.stopSpeaking > end > > def didFinishSpeaking(sender) > NSLog("Finished Speaking.") > @stopButton.setDisabled_(true) > end > end > > > It compiles and runs fine. The only thing that doesn't work is > didFinishSpeaking is not called by @speechSynth when it finishes > speaking. Any ideas on what I'm doing wrong? > > ------------------------------------------------------------------------- > 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: s.ross <cw...@gm...> - 2008-02-15 03:09:52
|
May I ask whether AR is a realistic alternative for Rubycocoa? I'm wondering whether it injects complexities into distribution of an app. Or do you just freeze a version into a lib directory and require it directly from there? Thx On Feb 14, 2008, at 3:02 PM, Ferhat Ayaz wrote: > Hi Laurent, thanks :) This was a real headache. > > ----- Original Message ---- > From: Eloy Duran <e....@su...> > To: rub...@li... > Sent: Wednesday, February 13, 2008 10:39:07 PM > Subject: Re: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord > 1.15.x compatibility. > > Hi Ferhat, > > Thank Laurent for this one :) > > Eloy > > On 13 feb 2008, at 22:13, Ferhat Ayaz wrote: > >> Hi Eloy, >> >> thank you!!! >> >> Ferhat >> >> >> ----- Original Message ---- >> From: Eloy Duran <e....@su...> >> To: rub...@li... >> Sent: Wednesday, February 13, 2008 8:40:06 PM >> Subject: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord 1.15.x >> compatibility. >> >> Hi, >> >> For all the people that were seeing errors like this with >> ActiveRecordProxy: >> "NoMethodError: undefined method `reflect_on_all_associations' for >> NilClass" >> >> This has now been fixed in RubyCocoa svn r2191. >> But it will probably be released in the very near future as a >> binary release. >> >> Eloy >> >> >> -----Inline Attachment Follows----- >> >> ------------------------------------------------------------------------- >> 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/ >> >> >> -----Inline Attachment Follows----- >> >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> Never miss a thing. Make Yahoo your homepage. >> ------------------------------------------------------------------------- >> 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 > > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------- > 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/ > > > -----Inline Attachment Follows----- > > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. > Try it > now > .------------------------------------------------------------------------- > 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: Justin S. <sto...@gm...> - 2008-02-15 03:07:28
|
I'm trying to port a simple objective-c application (from a book on cocoa in os x) to Ruby in Xcode. Basically the application takes a line of text and then says the line (out loud). This all works fine but I'm having trouble figuring out how to do the delegate to make the stop button disable itself when the app finishes saying the line. Here's the code: require 'osx/cocoa' include OSX class Speak < NSObject ib_outlets :textField, :stopButton def initialize @speechSynth = NSSpeechSynthesizer.alloc().initWithVoice_(nil) @speechSynth.setDelegate_(self) end ib_action :say do |sender| blah = @textField.stringValue() if blah.empty? return end @stopButton.setEnabled_(true) if (rand(10)+1) == 1 @speechSynth.startSpeakingString_("I'm not going to say that") else @speechSynth.startSpeakingString_(blah) end NSLog("Have started to say: #{blah}\n") end ib_action :stop do |sender| NSLog("Stopping.") @speechSynth.stopSpeaking end def didFinishSpeaking(sender) NSLog("Finished Speaking.") @stopButton.setDisabled_(true) end end It compiles and runs fine. The only thing that doesn't work is didFinishSpeaking is not called by @speechSynth when it finishes speaking. Any ideas on what I'm doing wrong? |
From: Ferhat A. <fer...@ya...> - 2008-02-14 23:03:01
|
Hi Laurent, thanks :) This was a real headache. ----- Original Message ---- From: Eloy Duran <e....@su...> To: rub...@li... Sent: Wednesday, February 13, 2008 10:39:07 PM Subject: Re: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord 1.15.x compatibility. Hi Ferhat, Thank Laurent for this one :) Eloy On 13 feb 2008, at 22:13, Ferhat Ayaz wrote: Hi Eloy, thank you!!! Ferhat ----- Original Message ---- From: Eloy Duran <e....@su...> To: rub...@li... Sent: Wednesday, February 13, 2008 8:40:06 PM Subject: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord 1.15.x compatibility. Hi, For all the people that were seeing errors like this with ActiveRecordProxy: "NoMethodError: undefined method `reflect_on_all_associations' for NilClass" This has now been fixed in RubyCocoa svn r2191.But it will probably be released in the very near future as a binary release. Eloy -----Inline Attachment Follows----- ------------------------------------------------------------------------- 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/ -----Inline Attachment Follows----- _______________________________________________ Rubycocoa-talk mailing list Rub...@li... https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk Never miss a thing. Make Yahoo your homepage. ------------------------------------------------------------------------- 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 -----Inline Attachment Follows----- ------------------------------------------------------------------------- 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/ -----Inline Attachment Follows----- _______________________________________________ Rubycocoa-talk mailing list Rub...@li... https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
From: Axel M. R. <rub...@ro...> - 2008-02-14 14:04:17
|
Hi Naoki and Patrick, Sorry for my late reaction and thanks for your responses. I will try to make a BridgeSupport file first. If that fails, I'll wrap an Objective C class around the callback code. At 12:02 -0800 12-02-2008, Naoki Hiroshima wrote: >My silly hack with IOKit that you can find at >http://n.h7a.org/hacks/rubycocoa/ may or may not help you. I am looking at your code to see where it might help me, but at the moment it is too far above my ruby abilities to understand. Maybe later. Thanks for sharing it. Axel -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: Eloy D. <e....@su...> - 2008-02-13 21:39:16
|
Hi Ferhat, Thank Laurent for this one :) Eloy On 13 feb 2008, at 22:13, Ferhat Ayaz wrote: > Hi Eloy, > > thank you!!! > > Ferhat > > > ----- Original Message ---- > From: Eloy Duran <e....@su...> > To: rub...@li... > Sent: Wednesday, February 13, 2008 8:40:06 PM > Subject: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord 1.15.x > compatibility. > > Hi, > > For all the people that were seeing errors like this with > ActiveRecordProxy: > "NoMethodError: undefined method `reflect_on_all_associations' for > NilClass" > > This has now been fixed in RubyCocoa svn r2191. > But it will probably be released in the very near future as a binary > release. > > Eloy > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------- > 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/ > > > -----Inline Attachment Follows----- > > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > Never miss a thing. Make Yahoo your homepage. > ------------------------------------------------------------------------- > 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: Ferhat A. <fer...@ya...> - 2008-02-13 21:13:50
|
Hi Eloy, thank you!!! Ferhat ----- Original Message ---- From: Eloy Duran <e....@su...> To: rub...@li... Sent: Wednesday, February 13, 2008 8:40:06 PM Subject: [Rubycocoa-talk] ActiveRecordProxy & ActiveRecord 1.15.x compatibility. Hi, For all the people that were seeing errors like this with ActiveRecordProxy: "NoMethodError: undefined method `reflect_on_all_associations' for NilClass" This has now been fixed in RubyCocoa svn r2191.But it will probably be released in the very near future as a binary release. Eloy -----Inline Attachment Follows----- ------------------------------------------------------------------------- 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/ -----Inline Attachment Follows----- _______________________________________________ Rubycocoa-talk mailing list Rub...@li... https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ |
From: Eloy D. <e....@su...> - 2008-02-13 19:40:14
|
Hi, For all the people that were seeing errors like this with ActiveRecordProxy: "NoMethodError: undefined method `reflect_on_all_associations' for NilClass" This has now been fixed in RubyCocoa svn r2191. But it will probably be released in the very near future as a binary release. Eloy |
From: Sal S. <sal...@gm...> - 2008-02-13 01:44:39
|
anyone else getting KERN_ACCESS_ERRORS using threads ala NSTask since 10.5.2? require 'osx/cocoa' class CmdTask attr_accessor :task_obj, :status TASK_DONE = 1<<0 TASK_TERM = 1<<1 TASK_COMP = TASK_DONE|TASK_TERM end class CmdRunner attr_accessor :delegate, :start, :finished, :data def initialize end def run_command(cmd, args) @task = OSX::NSTask.alloc.init @pipe = OSX::NSPipe.alloc.init @pipH = @pipe.fileHandleForReading @task.setLaunchPath(cmd) @task.setStandardError(@pipe) @task.setStandardOutput(@pipe) @task.setArguments(args) center = OSX::NSNotificationCenter.defaultCenter center .addObserver_selector_name_object (self,'readPipe:',OSX::NSFileHandleReadCompletionNotification,nil) center .addObserver_selector_name_object (self,'statusPipe:',OSX::NSTaskDidTerminateNotification,nil) @pipH.readInBackgroundAndNotify @task.launch @delegate.send(@start) @taskd = CmdTask.new @taskd.task_obj = @task @taskd.status = 0 end def readPipe(ntf) inData = ntf.userInfo.objectForKey(OSX::NSFileHandleNotificationDataItem) if inData.length > 0 then ntf.object.readInBackgroundAndNotify str = OSX::NSString.alloc.initWithData_encoding(inData, OSX::NSASCIIStringEncoding) puts "R: #{str}" @delegate.send(@data, str.to_ruby) else taskDone(CmdTask::TASK_DONE) end end def statusPipe(ntf) @exit_status = ntf.object.terminationStatus taskDone(CmdTask::TASK_TERM) end def taskDone(flag) s = (@taskd.status.to_i | flag) @taskd.status = s if @taskd.status == CmdTask::TASK_COMP cleanup @delegate.send(@finished,@exit_status) end end def terminate if @task && @task.isRunning @task.terminate end end def cleanup center = OSX::NSNotificationCenter.defaultCenter center.removeObserver(self) @taskd.task_obj = nil @taskd = nil @pipe = nil end end -- That code worked in 10.5.1, not it crashes in 10.5.2 or totally hangs the app On Feb 12, 2008, at 5:49 AM, rub...@li... wrote: > Send Rubycocoa-talk mailing list submissions to > rub...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > or, via email, send a message with subject or body 'help' to > rub...@li... > > You can reach the person managing the list at > rub...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Rubycocoa-talk digest..." > > > Today's Topics: > > 1. Info.plist LSEnvironment does not set ENV, > processInfo.environment (Brian Marick) > 2. Draft chapter of RubyCocoa book (Brian Marick) > 3. Re: Info.plist LSEnvironment does not set ENV, > processInfo.environment (kimura wataru) > 4. Re: Info.plist LSEnvironment does not set ENV, > processInfo.environment (Brian Marick) > 5. Re: Info.plist LSEnvironment does not set ENV, > processInfo.environment (kimura wataru) > 6. iokit support? (Axel M. Roest) > 7. iokit support? (Axel M. Roest) > 8. Re: standaloneify.rb tool (Rich Warren) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 7 Feb 2008 13:01:14 -0600 > From: Brian Marick <ma...@ex...> > Subject: [Rubycocoa-talk] Info.plist LSEnvironment does not set ENV, > processInfo.environment > To: rubycocoa rubycocoa <rub...@li...> > Message-ID: <23C...@ex...> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > Using RubyCocoa from Leopard (10.5.1) : > > You can declare environment variables in a Cocoa app's Info.plist file > like this: > > <key>LSEnvironment</key> > <dict> > <key>VEX</key> > <string>acious!</string> > </dict> > > In an Objective-C app, that value carries over into the environment: > > NSDictionary *env = [[NSProcessInfo processInfo] environment]; > NSLog(@"====Here is the value of VEX in the processInfo > environment: %@", > [env objectForKey:@"VEX"]); > > NSDictionary *lsEnv = [[NSBundle mainBundle] > objectForInfoDictionaryKey: @"LSEnvironment"]; > NSLog(@"====Here is the value of VEX from the Info.plist > environment: %@", > [lsEnv objectForKey:@"VEX"]); > > > Feb 7 12:34:56 frex Test[1660]: ====Here is the value of VEX in the > processInfo environment: acious! > Feb 7 12:34:56 frex Test[1660]: ====Here is the value of VEX from the > Info.plist environment: acious! > > > However, the value from Info.plist doesn't seem to make it into ENV. > More surprisingly, it doesn't make it into the Cocoa processInfo > environment: > > $stderr.puts "==== Here is the value of VEX in the environment:" > $stderr.puts ENV['VEX'].inspect > > $stderr.puts "==== The value of VEX in the processInfo > environment:" > cocoa_env = NSProcessInfo.processInfo.environment > $stderr.puts cocoa_env.objectForKey("VEX") > > $stderr.puts "==== The value of VEX in Info.plist:" > plist_env = > NSBundle.mainBundle.objectForInfoDictionaryKey("LSEnvironment") > $stderr.puts plist_env.objectForKey("VEX") > > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > ==== Here is the value of VEX in the environment: > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > nil > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > ==== The value of VEX in the processInfo environment: > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > nil > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > ==== The value of VEX in Info.plist: > Feb 7 12:49:45 frex [0x0-0xc70c7].com.exampler.StatusbarApp[1689]: > acious! > > > ----- > Brian Marick, independent consultant > Mostly on agile methods with a testing slant > www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > > > > ------------------------------ > > Message: 2 > Date: Fri, 8 Feb 2008 15:17:00 -0600 > From: Brian Marick <ma...@ex...> > Subject: [Rubycocoa-talk] Draft chapter of RubyCocoa book > To: rubycocoa rubycocoa <rub...@li...> > Message-ID: <65C...@ex...> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > I'm writing a book on RubyCocoa for the Pragmatic Bookshelf, publisher > of many fine titles. <http://www.pragprog.com/titles> > > I'm ready for people to take a look at a chapter. It's actually the > second chapter. The preceding introduction, covering prerequisites, > the general plan of the book, its goals, what "Cocoa" is, etc. -- that > will probably be written last. > > But to orient yourselves: > > - I assume you know Ruby, but nothing about Objective-C, Cocoa, or > building apps on the Mac. > > - Rather than build the exposition from the outside-in, teaching you > first how to draw user interfaces, I'm working from Ruby up. I start > with Ruby, then begin adding Cocoa ideas and tools onto it. > > - Especially in the beginning of the book, I want people to start > changing code and seeing what happens. Might as well take advantage of > Ruby's fast edit-run loop. > > The chapter and associated code are distributed as a disk image: http://www.exampler.com/tmp/drafts/draft-of-2008-02-08.dmg > > What am I looking for? Don't bother with typos, misspellings, grammar, > awkwardly-placed figures, and the like: those will all get changed > later. I'm interested in two things: > > 1. Did the approach work for you? Did this chapter flow in a pleasing > and sensible way? Is there information inexplicably missing? > > 2. Where did you get confused or stuck, in either the text or the "try > this yourself" sections? Why? What would have helped? > > Thanks. > > Further announcements will go only to the mailing list: > http://groups.google.com/group/rubycocoa-book > > ----- > Brian Marick, independent consultant > Mostly on agile methods with a testing slant > www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > > > > ------------------------------ > > Message: 3 > Date: Sat, 9 Feb 2008 09:56:20 +0900 > From: kimura wataru <ki...@us...> > Subject: Re: [Rubycocoa-talk] Info.plist LSEnvironment does not set > ENV, processInfo.environment > To: rub...@li... > Message-ID: <200...@us...> > Content-Type: text/plain; charset=us-ascii > > Hi, > > It works for me on 10.5.1. > LSEnvironment is available for apps launched via Launch Service. > - double-click in Finder > - launch with "open" command > > LSEnvironment is not available without Launch Service. > - "Run" on Xcode > - execute YourApp.app/Contents/MacOS/YourApp directly > > > On Thu, 7 Feb 2008 13:01:14 -0600, Brian Marick wrote: >> Using RubyCocoa from Leopard (10.5.1) : >> >> You can declare environment variables in a Cocoa app's Info.plist >> file >> like this: >> >> <key>LSEnvironment</key> >> <dict> >> <key>VEX</key> >> <string>acious!</string> >> </dict> >> >> In an Objective-C app, that value carries over into the environment: >> >> NSDictionary *env = [[NSProcessInfo processInfo] environment]; >> NSLog(@"====Here is the value of VEX in the processInfo >> environment: %@", >> [env objectForKey:@"VEX"]); > -- > kimura wataru > > > > ------------------------------ > > Message: 4 > Date: Sat, 9 Feb 2008 12:56:41 -0600 > From: Brian Marick <ma...@ex...> > Subject: Re: [Rubycocoa-talk] Info.plist LSEnvironment does not set > ENV, processInfo.environment > To: rub...@li... > Message-ID: <4AE...@ex...> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > > On Feb 8, 2008, at 6:56 PM, kimura wataru wrote: > >> Hi, >> >> It works for me on 10.5.1. >> > > Can you send me the App bundle you used? I want to see what I'm doing > differently. > > > > ----- > Brian Marick, independent consultant > Mostly on agile methods with a testing slant > www.exampler.com, www.exampler.com/blog, www.twitter.com/marick > > > > > ------------------------------ > > Message: 5 > Date: Sun, 10 Feb 2008 11:57:33 +0900 > From: kimura wataru <ki...@us...> > Subject: Re: [Rubycocoa-talk] Info.plist LSEnvironment does not set > ENV, processInfo.environment > To: rub...@li... > Message-ID: <200...@us...> > Content-Type: text/plain; charset=us-ascii > > Hi Brian, > > I uploaded an archive of the Xcode project I tested > onto the following URL. > > http://kirika.la.coocan.jp/archive/misc/LSEnv.zip > > On Sat, 9 Feb 2008 12:56:41 -0600, Brian Marick wrote: >> >> On Feb 8, 2008, at 6:56 PM, kimura wataru wrote: >> >>> Hi, >>> >>> It works for me on 10.5.1. >>> >> >> Can you send me the App bundle you used? I want to see what I'm doing >> differently. >> > -- > kimura wataru > > > > ------------------------------ > > Message: 6 > Date: Mon, 11 Feb 2008 13:14:12 +0100 > From: "Axel M. Roest" <ax...@ro...> > Subject: [Rubycocoa-talk] iokit support? > To: rub...@li... > Message-ID: <p06240804c3d5e8241bc5@[192.168.8.100]> > Content-Type: text/plain; charset="us-ascii" ; format="flowed" > > Hi, > I want to incorporate Obj-C classes from AMSerialPort > <http://www.harmless.de/cocoa.php> in my RubyCocoa project. The > problem is that these refer to IOkit classes, and use CoreFoundation > char* string constants (kIOSerialBSDModemType), which are not > available in Ruby. > > The reference in Obj-C is: > #import <IOKit/serial/IOSerialKeys.h> > // note: the constants are C strings, so use '@' or CFSTR to convert, > for example: > // NSArray *ports = [[AMSerialPort sharedPortList] > serialPortsOfType:@kIOSerialBSDModemType]; > // NSArray *ports = [[AMSerialPort sharedPortList] > serialPortsOfType:(NSString*)CFSTR(kIOSerialBSDModemType)]; > > How do I do this in RubyCocoa? > I can try to hack around these for now, but I would prefer a more > portable solution. > > Is it possible to easily add IOKit or CoreFoundation support to > RubyCocoa? > Or is it better to make an Obj-C bridge class in my project that > interfaces with the AMSerialPort class? > > Oh, and I tried to use the really old ruby SerialPort > <http://ruby-serialport.rubyforge.org/> implementation, but > multi-threading that to get serial input does not seem to work as > well as the AMSerialPort class. > > Thanks > > Axel > -- > _________________________ > Axel Roest > axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 > > > > ------------------------------ > > Message: 7 > Date: Mon, 11 Feb 2008 16:49:00 +0100 > From: "Axel M. Roest" <rub...@ro...> > Subject: [Rubycocoa-talk] iokit support? > To: rub...@li... > Message-ID: <p06240800c3d61ed9a0f7@[172.16.42.206]> > Content-Type: text/plain; charset="us-ascii" ; format="flowed" > > Hi, > I want to incorporate Obj-C classes from AMSerialPort > <http://www.harmless.de/cocoa.php> in my RubyCocoa project. The > problem is that these refer to IOkit classes, and use CoreFoundation > char* string constants (kIOSerialBSDModemType), which are not > available in Ruby. > > The reference in Obj-C is: > #import <IOKit/serial/IOSerialKeys.h> > // note: the constants are C strings, so use '@' or CFSTR to convert, > for example: > // NSArray *ports = [[AMSerialPort sharedPortList] > serialPortsOfType:@kIOSerialBSDModemType]; > // NSArray *ports = [[AMSerialPort sharedPortList] > serialPortsOfType:(NSString*)CFSTR(kIOSerialBSDModemType)]; > > How do I do this in RubyCocoa? > I can try to hack around these for now, but I would prefer a more > portable solution. > > Is it possible to easily add IOKit or CoreFoundation support to > RubyCocoa? > Or is it better to make an Obj-C bridge class in my project that > interfaces with the AMSerialPort class? > > Oh, and I tried to use the really old ruby SerialPort > <http://ruby-serialport.rubyforge.org/> implementation, but > multi-threading that to get serial input does not seem to work as > well as the AMSerialPort class. > > Thanks > > Axel > -- > _________________________ > Axel Roest > axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 > > > > ------------------------------ > > Message: 8 > Date: Tue, 12 Feb 2008 00:49:18 -1000 > From: Rich Warren <rw...@gm...> > Subject: Re: [Rubycocoa-talk] standaloneify.rb tool > To: rub...@li... > Message-ID: <665...@gm...> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > Ok, I'm giving up (at least temporarily). > > Standaloneify just doens't seem to play well with Leopard. > > I edited rb_main.rb to add the RubyCocoa and all the main Ruby > libraries back into the $LOAD_PATH. This let me run the application on > my development machine. However, when I tried to move it to another > computer, it refused to run. > > I spend a lot of time playing with the load paths, but kept getting > odd errors, and never got it to work right. It always complained about > an uninitialized constant OSX::NSString::NKF. Nothing I tried could > get around this. > > So I had XCode copy the RubyCocoa bundle into the application--but > that wouldn't even run locally (I probably have to add the Ruby > libraries back into the path again...or maybe copy the Ruby framework > into the app...but that's starting to get ridiculous). > > It doesn't really matter for this project. But, it would be nice to > have some way of bundling the gems I'm using into the app itself. > > Any suggestions? > > -Rich- > > On Feb 4, 2008, at 2:44 AM, Eloy Duran wrote: > >> After you've added the copy files build phase, >> you'll need to drag RubyCocoa.framework into that "copy files build >> phase" too. >> >> However, if your app works with the default Leopard RubyCococa >> and you're only targeting Leopard, then I would not bundle it >> but rather fix your load path problem. >> >> So if you look at the rb_,main.rb file of your standaloneified >> bundle, >> at the top you'll see some code that was added by Standaloneify. >> Underneath that do something like: >> $LOAD_PATH.unshift("/Library/Ruby/Site/1.8") >> >> Then you should probably be able to do: require 'osx/cocoa' >> >> Cheers, >> Eloy >> >> On 4 feb 2008, at 10:28, Rich Warren wrote: >> >>> Ok, I tried to bundle the RubyCocoa framework, but Xcode won't seem >>> to >>> let me. >>> >>> I added a new copy files build phase. >>> I set the destination to "Frameworks". >>> I then added an existing framework, and selected RubyCocoa >>> >>> The "Add" button is highlighted. But pressing it doesn't seem to do >>> anything. >>> >>> Clearly I'm doing something wrong here. How do I bundle RubyCocoa >>> into >>> my app? >>> >>> -Rich- >>> >>> On Feb 3, 2008, at 10:54 PM, Eloy Duran wrote: >>> >>>> Hi Rich, >>>> >>>> It's true that andy Leopard install will have RubyCocoa installed. >>>> However iirc standaloneify will completely empty your load path >>>> before starting the application. >>>> This means that unless you've bundled the framework it won't be >>>> found. >>>> So my guess is that you haven't bundled the framework inside your >>>> app, >>>> which is ok of course, but in wich case you'll have to edit your >>>> rb_main.rb >>>> file after it has been standalonified to setup the correct load >>>> path >>>> or maybe >>>> even better; instead of doing "require 'osx/cocoa'" try to specify >>>> the >>>> full path. >>>> >>>> Cheers, >>>> Eloy >>>> >>>> On 4 feb 2008, at 02:12, Rich Warren wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm trying to embed some RubyGem libraries into a stand alone app. >>>>> According to the web site, I used the following command: >>>>> >>>>> ruby standaloneify.rb -d RubyRSS_StandAlone.app RubyRSS.app >>>>> >>>>> Everything seemed fine. But when I tried to run the stand alone >>>>> app, >>>>> It fails to launch. I get the following message in the console: >>>>> >>>>> 2/3/08 3:03:57 PM >>>>> [0x0 >>>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] / >>>>> Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/ >>>>> Resources/ >>>>> rb_main.rb:25:in `require': no such file to load -- osx/cocoa >>>>> (LoadError) >>>>> >>>>> 2/3/08 3:03:57 PM >>>>> [0x0 >>>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] >>>>> from /Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/ >>>>> Resources/rb_main.rb:25 >>>>> >>>>> 2/3/08 3:03:57 PM com.apple.launchd[63] >>>>> ([0x0 >>>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278]) >>>>> Exited with exit code: 1 >>>>> >>>>> If I'm reading this right, it's having trouble finding the osx/ >>>>> cocoa >>>>> library. However, since I'm working on Leopard, all Leopard >>>>> machines >>>>> should have osx/cocoa installed by default, right? >>>>> >>>>> Am I doing something wrong? How do I get standaloneify to work on >>>>> Leopard? >>>>> >>>>> Thanks, >>>>> >>>>> -Rich- >>>>> >>>>> ------------------------------------------------------------------------- >>>>> 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 >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> 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 >>> >>> >>> ------------------------------------------------------------------------- >>> 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 >> >> >> ------------------------------------------------------------------------- >> 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 > > > > > ------------------------------ > > ------------------------------------------------------------------------- > 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 > > > End of Rubycocoa-talk Digest, Vol 21, Issue 14 > ********************************************** |
From: Naoki H. <n+r...@h7...> - 2008-02-12 20:02:35
|
Hey, This may not apply any more but the last time I've tried (several months ago, though), it didn't work for IOKit. So, I ended up making up bridgesupport file manually. And since some of IOKit APIs need something you cannot get via any frameworks, such as a return value of mach_task_self(), if you happen to need it, you will need to write a ruby extension by yourself, anyway. My silly hack with IOKit that you can find at http://n.h7a.org/hacks/rubycocoa/ may or may not help you. -- Hiroshima On 2/12/08, Patrick Geiller <pge...@wa...> wrote: > > > > Hello, > > > How do I do this in RubyCocoa? > > Is it possible to easily add IOKit or CoreFoundation support to > > RubyCocoa? > > You can try to generate a BridgeSupport file yourself. Look here for > gen_bridge_metadata. > > http://sourceforge.net/mailarchive/forum.php?thread_name=F4912E39-A3E6-4179-A765-80855C77049A%40wanadoo.fr&forum_name=rubycocoa-talk > > > -Patrick > > > ------------------------------------------------------------------------- > 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: Patrick G. <pge...@wa...> - 2008-02-12 15:59:08
|
> Hello, > How do I do this in RubyCocoa? > Is it possible to easily add IOKit or CoreFoundation support to > RubyCocoa? You can try to generate a BridgeSupport file yourself. Look here for gen_bridge_metadata. http://sourceforge.net/mailarchive/forum.php?thread_name=F4912E39-A3E6-4179-A765-80855C77049A%40wanadoo.fr&forum_name=rubycocoa-talk -Patrick |
From: Neil S. <ne...@ha...> - 2008-02-12 12:12:32
|
Rich Warren wrote: > Ok, I'm giving up (at least temporarily). > > Standaloneify just doens't seem to play well with Leopard. That would explain why a standaloneify-using app of mine I'm told fails in 10.5. I wish I had a copy to do some work on it myself, heh. -- 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: Rich W. <rw...@gm...> - 2008-02-12 10:49:22
|
Ok, I'm giving up (at least temporarily). Standaloneify just doens't seem to play well with Leopard. I edited rb_main.rb to add the RubyCocoa and all the main Ruby libraries back into the $LOAD_PATH. This let me run the application on my development machine. However, when I tried to move it to another computer, it refused to run. I spend a lot of time playing with the load paths, but kept getting odd errors, and never got it to work right. It always complained about an uninitialized constant OSX::NSString::NKF. Nothing I tried could get around this. So I had XCode copy the RubyCocoa bundle into the application--but that wouldn't even run locally (I probably have to add the Ruby libraries back into the path again...or maybe copy the Ruby framework into the app...but that's starting to get ridiculous). It doesn't really matter for this project. But, it would be nice to have some way of bundling the gems I'm using into the app itself. Any suggestions? -Rich- On Feb 4, 2008, at 2:44 AM, Eloy Duran wrote: > After you've added the copy files build phase, > you'll need to drag RubyCocoa.framework into that "copy files build > phase" too. > > However, if your app works with the default Leopard RubyCococa > and you're only targeting Leopard, then I would not bundle it > but rather fix your load path problem. > > So if you look at the rb_,main.rb file of your standaloneified bundle, > at the top you'll see some code that was added by Standaloneify. > Underneath that do something like: > $LOAD_PATH.unshift("/Library/Ruby/Site/1.8") > > Then you should probably be able to do: require 'osx/cocoa' > > Cheers, > Eloy > > On 4 feb 2008, at 10:28, Rich Warren wrote: > >> Ok, I tried to bundle the RubyCocoa framework, but Xcode won't seem >> to >> let me. >> >> I added a new copy files build phase. >> I set the destination to "Frameworks". >> I then added an existing framework, and selected RubyCocoa >> >> The "Add" button is highlighted. But pressing it doesn't seem to do >> anything. >> >> Clearly I'm doing something wrong here. How do I bundle RubyCocoa >> into >> my app? >> >> -Rich- >> >> On Feb 3, 2008, at 10:54 PM, Eloy Duran wrote: >> >>> Hi Rich, >>> >>> It's true that andy Leopard install will have RubyCocoa installed. >>> However iirc standaloneify will completely empty your load path >>> before starting the application. >>> This means that unless you've bundled the framework it won't be >>> found. >>> So my guess is that you haven't bundled the framework inside your >>> app, >>> which is ok of course, but in wich case you'll have to edit your >>> rb_main.rb >>> file after it has been standalonified to setup the correct load path >>> or maybe >>> even better; instead of doing "require 'osx/cocoa'" try to specify >>> the >>> full path. >>> >>> Cheers, >>> Eloy >>> >>> On 4 feb 2008, at 02:12, Rich Warren wrote: >>> >>>> Hi, >>>> >>>> I'm trying to embed some RubyGem libraries into a stand alone app. >>>> According to the web site, I used the following command: >>>> >>>> ruby standaloneify.rb -d RubyRSS_StandAlone.app RubyRSS.app >>>> >>>> Everything seemed fine. But when I tried to run the stand alone >>>> app, >>>> It fails to launch. I get the following message in the console: >>>> >>>> 2/3/08 3:03:57 PM >>>> [0x0 >>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] / >>>> Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/Resources/ >>>> rb_main.rb:25:in `require': no such file to load -- osx/cocoa >>>> (LoadError) >>>> >>>> 2/3/08 3:03:57 PM >>>> [0x0 >>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278] >>>> from /Users/rikiwarren/Desktop/RubyRSS_StandAlone.app/Contents/ >>>> Resources/rb_main.rb:25 >>>> >>>> 2/3/08 3:03:57 PM com.apple.launchd[63] >>>> ([0x0 >>>> -0x31031].com.apple.rubycocoa.NEWCOREDATAPROJECT.RubyRSSApp[278]) >>>> Exited with exit code: 1 >>>> >>>> If I'm reading this right, it's having trouble finding the osx/ >>>> cocoa >>>> library. However, since I'm working on Leopard, all Leopard >>>> machines >>>> should have osx/cocoa installed by default, right? >>>> >>>> Am I doing something wrong? How do I get standaloneify to work on >>>> Leopard? >>>> >>>> Thanks, >>>> >>>> -Rich- >>>> >>>> ------------------------------------------------------------------------- >>>> 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 >>> >>> >>> ------------------------------------------------------------------------- >>> 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 >> >> >> ------------------------------------------------------------------------- >> 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 > > > ------------------------------------------------------------------------- > 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: Axel M. R. <rub...@ro...> - 2008-02-11 15:49:24
|
Hi, I want to incorporate Obj-C classes from AMSerialPort <http://www.harmless.de/cocoa.php> in my RubyCocoa project. The problem is that these refer to IOkit classes, and use CoreFoundation char* string constants (kIOSerialBSDModemType), which are not available in Ruby. The reference in Obj-C is: #import <IOKit/serial/IOSerialKeys.h> // note: the constants are C strings, so use '@' or CFSTR to convert, for example: // NSArray *ports = [[AMSerialPort sharedPortList] serialPortsOfType:@kIOSerialBSDModemType]; // NSArray *ports = [[AMSerialPort sharedPortList] serialPortsOfType:(NSString*)CFSTR(kIOSerialBSDModemType)]; How do I do this in RubyCocoa? I can try to hack around these for now, but I would prefer a more portable solution. Is it possible to easily add IOKit or CoreFoundation support to RubyCocoa? Or is it better to make an Obj-C bridge class in my project that interfaces with the AMSerialPort class? Oh, and I tried to use the really old ruby SerialPort <http://ruby-serialport.rubyforge.org/> implementation, but multi-threading that to get serial input does not seem to work as well as the AMSerialPort class. Thanks Axel -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: Axel M. R. <ax...@ro...> - 2008-02-11 12:14:31
|
Hi, I want to incorporate Obj-C classes from AMSerialPort <http://www.harmless.de/cocoa.php> in my RubyCocoa project. The problem is that these refer to IOkit classes, and use CoreFoundation char* string constants (kIOSerialBSDModemType), which are not available in Ruby. The reference in Obj-C is: #import <IOKit/serial/IOSerialKeys.h> // note: the constants are C strings, so use '@' or CFSTR to convert, for example: // NSArray *ports = [[AMSerialPort sharedPortList] serialPortsOfType:@kIOSerialBSDModemType]; // NSArray *ports = [[AMSerialPort sharedPortList] serialPortsOfType:(NSString*)CFSTR(kIOSerialBSDModemType)]; How do I do this in RubyCocoa? I can try to hack around these for now, but I would prefer a more portable solution. Is it possible to easily add IOKit or CoreFoundation support to RubyCocoa? Or is it better to make an Obj-C bridge class in my project that interfaces with the AMSerialPort class? Oh, and I tried to use the really old ruby SerialPort <http://ruby-serialport.rubyforge.org/> implementation, but multi-threading that to get serial input does not seem to work as well as the AMSerialPort class. Thanks Axel -- _________________________ Axel Roest axelloroestello@{AIM/MSN} - Skype:axellofono - XOIP: 084-8749988 |
From: kimura w. <ki...@us...> - 2008-02-10 02:57:54
|
Hi Brian, I uploaded an archive of the Xcode project I tested onto the following URL. http://kirika.la.coocan.jp/archive/misc/LSEnv.zip On Sat, 9 Feb 2008 12:56:41 -0600, Brian Marick wrote: > > On Feb 8, 2008, at 6:56 PM, kimura wataru wrote: > >> Hi, >> >> It works for me on 10.5.1. >> > > Can you send me the App bundle you used? I want to see what I'm doing > differently. > -- kimura wataru |
From: Brian M. <ma...@ex...> - 2008-02-09 18:56:56
|
On Feb 8, 2008, at 6:56 PM, kimura wataru wrote: > Hi, > > It works for me on 10.5.1. > Can you send me the App bundle you used? I want to see what I'm doing differently. ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |