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: Jon B. <jo...@gm...> - 2007-07-16 15:00:37
|
Hi, for past 2 weeks or so its been a little hard to get to updates from trunk ... [MacBook-Pro:~/WORKAREA/SVN_HOME/rubycocoa]$ svn up svn: PROPFIND request failed on '/svnroot/rubycocoa/trunk/src' svn: PROPFIND of '/svnroot/rubycocoa/trunk/src': Could not resolve hostname `svn.sourceforge.net': No address associated with nodename (https://svn.sourceforge.net) [MacBook-Pro:~/WORKAREA/SVN_HOME/rubycocoa]$ ping svn.sourceforge.net ping: cannot resolve svn.sourceforge.net: Unknown host Just wondering, anyone else w/ similar issues? - Jon |
From: Jon B. <jo...@gm...> - 2007-07-16 02:50:23
|
I just "rubycocoa new TestApp", build + get this: [MacBook-Pro:~/TestApp/build/Release/TestApp.app/Contents/MacOS]$ ./ TestApp --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.9.4] [MacBook-Pro:~/TestApp/build/Release/TestApp.app/Contents/MacOS]$ I think (?) the point behind a bundled Ruby w/ your RC app is to not have to need the end user to touch any files or need to set anything and use a shipping Ruby capable of running on both PPC/Intel. I just downloaded the one-click (http://rubyosx.rubyforge.org/) and extract using Pacifist to a /VM directory under my project, how can I get it to use that ruby instead of system ruby? - Jon On Jul 15, 2007, at 7:41 PM, Fujimoto Hisa wrote: > YOURAPP/Contents/MacOS/YOURAPP is almost same as the ruby command. > > e.g. > $ /Applications/TMPresents.app/Contents/MacOS/TMPresents --version > ruby 1.8.2 (2004-12-25) [universal-darwin8.0] > > TMPresents.app is a RubyCocoa app. > > main.m of a typical RubyCocoa app is: > int main(int argc, const char *argv[]) { > return RBApplicationMain("rb_main.rb", argc, argv); > } > > RBApplicationMain is a traditional API. And RBApplicationInit is an > alternative modern API: > > int main(int argc, const char *argv[]) { > RBApplicationInit("rb_main.rb", argc, argv, nil); > return NSApplicationMain(argc, argv); > } > > rb_main.rb: > require 'osx/cocoa' > OSX.init_for_bundle do |bdl, param, log| > # param - the 4th argument of RBApplicationInit as optional data > # log - nslog wrapper for this block > > # initialize/loadin your ruby programs here. > log.info("bdl=%p, param=%p", bdl, param) > require 'your_ruby_programs' > ... > end > end > > -- > hisa > > On 7/16/07, Tim Perrett <he...@ti...> wrote: >> rb_main.rb doesnt have a shebang line so I dont think that would >> work? Having said that if it doesnt have a shebang line how does RC >> know where the ruby bin is? Or is that somehow embedded inside the >> framework when it is built? >> >> Tim >> >> >> >> On 15 Jul 2007, at 21:21, Rupert BARROW wrote: >> >>> I should think : just change the '#! /usr/bin/env ruby' in >>> rb_main.rb to point to the packaged ruby in your app, no ? >>> >>> Rup >> >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > > -- > hisa > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: <jea...@gm...> - 2007-07-16 01:48:29
|
On 7/14/07, Jon Baer <jo...@gm...> wrote: > > Last time I checked it was Intel only, still seems to be the case ... > > [MacBook-Pro:~/Desktop]$ wget -q > http://svn.joyent.com/opensource/slingshot/osx/VM/bin/ruby > [MacBook-Pro:~/Desktop]$ file ruby > ruby: Mach-O executable i386 > bugger, quite right - how about slingshot's gem/plugin bundling capabilities? is standaloneify working for others now? cheers, jean-pierre |
From: Fujimoto H. <hi...@fo...> - 2007-07-15 23:41:33
|
YOURAPP/Contents/MacOS/YOURAPP is almost same as the ruby command. e.g. $ /Applications/TMPresents.app/Contents/MacOS/TMPresents --version ruby 1.8.2 (2004-12-25) [universal-darwin8.0] TMPresents.app is a RubyCocoa app. main.m of a typical RubyCocoa app is: int main(int argc, const char *argv[]) { return RBApplicationMain("rb_main.rb", argc, argv); } RBApplicationMain is a traditional API. And RBApplicationInit is an alternative modern API: int main(int argc, const char *argv[]) { RBApplicationInit("rb_main.rb", argc, argv, nil); return NSApplicationMain(argc, argv); } rb_main.rb: require 'osx/cocoa' OSX.init_for_bundle do |bdl, param, log| # param - the 4th argument of RBApplicationInit as optional data # log - nslog wrapper for this block # initialize/loadin your ruby programs here. log.info("bdl=%p, param=%p", bdl, param) require 'your_ruby_programs' ... end end -- hisa On 7/16/07, Tim Perrett <he...@ti...> wrote: > rb_main.rb doesnt have a shebang line so I dont think that would > work? Having said that if it doesnt have a shebang line how does RC > know where the ruby bin is? Or is that somehow embedded inside the > framework when it is built? > > Tim > > > > On 15 Jul 2007, at 21:21, Rupert BARROW wrote: > > > I should think : just change the '#! /usr/bin/env ruby' in > > rb_main.rb to point to the packaged ruby in your app, no ? > > > > Rup > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > -- hisa |
From: Tim P. <he...@ti...> - 2007-07-15 22:05:26
|
rb_main.rb doesnt have a shebang line so I dont think that would work? Having said that if it doesnt have a shebang line how does RC know where the ruby bin is? Or is that somehow embedded inside the framework when it is built? Tim On 15 Jul 2007, at 21:21, Rupert BARROW wrote: > I should think : just change the '#! /usr/bin/env ruby' in > rb_main.rb to point to the packaged ruby in your app, no ? > > Rup |
From: Rupert B. <rup...@fr...> - 2007-07-15 20:24:08
|
Tim, Le 15 juil. 07 =C3=A0 15:55, = rub...@li... =20 a =C3=A9crit : > Further to what we have been talking about on this list we could take > a universial ruby distribution and put that inside our application > couldn't we? Having said that, how would RC know to use the ruby > within the application? I should think : just change the '#! /usr/bin/env ruby' in rb_main.rb =20= to point to the packaged ruby in your app, no ? Rup |
From: Jon B. <jo...@gm...> - 2007-07-15 17:26:52
|
Not sure about this but here is my guess: If you create a folder VM under your project and lay down all the files this installer provides and include the universal builds of your gems and then somehow modify your PATH to run only that Ruby executable under VM folder (im guessing this will have to occur within main.m), you would really get standalone app with your own Ruby distro. Since you can have a file ~/.MacOSX/environment.plist I wonder if there might be something RC developer could add to Info.plist that could tweak the PATH setting? (Or this might be something which can be done already?) Like you said before this will definitely add nice bloat to your project but @ least you can guarantee / provide your own runtime for users not familiar w/ Ruby setup < 10.4. - Jon On Jul 15, 2007, at 7:27 AM, Tim Perrett wrote: > Is it just me or does that read as if its a universal version of ruby? > > Ive just tried it installing it, and it appears that it installs ruby > in /usr/local/bin > > tim-perretts-computer:/usr/local/bin timperrett$ ./ruby -v > ruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0] > > Further to what we have been talking about on this list we could take > a universial ruby distribution and put that inside our application > couldn't we? Having said that, how would RC know to use the ruby > within the application? > > Cheers > > Tim > > > On 15 Jul 2007, at 03:06, Jon Baer wrote: > >> Just curious, has anyone tried running RubyCocoa apps with this >> package? >> >> http://rubyosx.rubyforge.org/ >> >> - Jon > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Motohiro T. <mo...@gm...> - 2007-07-15 15:39:49
|
> This looks weird and unusual. I feel too :) I don't have any resources to grub QCPatch design cause that is not publicized by Apple ;) Everything I know so far is a collection of lots of web searches and observations of QuartzComposer behavior.It seems the QuartzComposer framework collects all ports by their names (prefixed by input/output) when a QCPatch instance is initialized. Anyway, If adding/removing ports at any runtime is available by some API, that will be enough for me. I will try digging more. Cheers, 2007/7/16, Laurent Sansonetti <lsa...@ap...>: > This is unfortunately not supported yet :( > > However, I don't really know QCPatch, but is it really necessary to > provide instance variables in the superclass? This looks weird and > unusual. Generally in superclasses you provide methods but not > instance variables. > > Do you have a pointer to the mechanism behind QCPatch and this > instance variable stuff? I could not find on google. > > Thanks, > Laurent > > On Jul 15, 2007, at 4:50 PM, Motohiro Takayama wrote: > > > Hi, > > > > I want to publish some member variables in Ruby class to Objective-C. > > How can I do that ? > > > > in QuartzComposer framework, member named "input***" in custom class > > are automatically detected at runtime, like this: > > > > @interface MyCustomPatch : QCPatch > > { > > QCStringPort *inputFoo; > > } > > > > I wrote Ruby class like: > > > > class MyRubyCustomPatch < OSX::QCPatch > > attr_accessor :inputFoo > > ... > > end > > > > but "inputFoo" is not detected. > > > > I tried to wrote *.h for MyRubyCustomPatch class in Objective-C to > > publish inputFoo, but it was no use... > > > > > > sorry for my continuous posts. m(_ _)m > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Laurent S. <lsa...@ap...> - 2007-07-15 15:23:28
|
On Jul 15, 2007, at 5:19 PM, Satoshi Nakagawa wrote: > Hi Laurent. > >> objc_method :getInt, ['int'] >> >> The second argument of objc_method is supposed to be an Array. I will >> fix the method to accept a String. > > I think it might be difficult. > Because the second argument accepts a string in raw encodings like > 'i@:'. True, I also figured that. Let's keep the current behavior. Looks like I wrote too fast :-) Laurent |
From: Satoshi N. <sna...@in...> - 2007-07-15 15:19:31
|
Hi Laurent. > objc_method :getInt, ['int'] > > The second argument of objc_method is supposed to be an Array. I will > fix the method to accept a String. I think it might be difficult. Because the second argument accepts a string in raw encodings like 'i@:'. -- Satoshi Nakagawa On 2007/07/15, at 22:58, Laurent Sansonetti wrote: > Oops, please try > > objc_method :getInt, ['int'] > > The second argument of objc_method is supposed to be an Array. I will > fix the method to accept a String. > > Laurent > > On Jul 15, 2007, at 3:55 PM, Motohiro Takayama wrote: > >> Laurent: >> >> Thanks for your quick reply. >> >> I tried your advice, and observed strange behavior. >> >> class Hoge < OSX::NSObject >> objc_method :getInt, 'int' >> def getInt >> 5 >> end >> end >> >> and when call this, NSLog shows: >> >> 2007-07-15 22:50:15.667 retval[7097] XXX returning ffi type void for >> unrecognized encoding 'nt' >> >> I'm wondering why "i" of int is lack... >> >> 2007/7/15, Laurent Sansonetti <lsa...@ap...>: >>> When creating a Ruby method like this, without providing its ObjC >>> runtime signature, RubyCocoa will assume that all arguments and the >>> return value are Objective-C objects (of the type 'id'). Because >>> there >>> is no way for RubyCocoa to know. This is why you get from the ObjC >>> world an NSNumber and not an "int". >>> >>> To work around this, you need to register the Ruby method into the >>> ObjC runtime: >>> >>> def getInt ... end >>> objc_method :getInt, 'int' >>> >>> This will register getInt as a method that doesn't take any argument >>> and returns a C integer. >>> >>> Usually when you are overriding an ObjC method from Ruby, or >>> implementing an ObjC informal protocol in Ruby, you don't need to use >>> objc_method. But in this special case, it is required. Fortunately, >>> most people won't need to use it. >>> >>> Laurent >>> >>> On Jul 15, 2007, at 3:01 PM, Motohiro Takayama wrote: >>> >>>> Hi, >>>> >>>> I'm wondering how to return simple "int" type value from Ruby code >>>> to >>>> Objective-C code. >>>> Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber >>>> instead of simple int. >>>> Any suggestion ? >>>> >>>> >>>> Ruby code: >>>> >>>> class Hoge < OSX::NSObject >>>> def getInt >>>> 5 >>>> end >>>> end >>>> >>>> >>>> Objective-C code: >>>> >>>> Class helper = NSClassFromString(@"Hoge"); >>>> id hoge = [[helper alloc] init]; >>>> NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge >>>> getInt] >>>> decimalValue]); >>>> >>>> >>>> and those show: >>>> >>>> 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 >>>> >>>> >>>> thanks, >>>> >>>> -- >>>> Motohiro Takayama >>>> http://blog.deadbeaf.org/ |
From: Laurent S. <lsa...@ap...> - 2007-07-15 15:09:07
|
This is unfortunately not supported yet :( However, I don't really know QCPatch, but is it really necessary to provide instance variables in the superclass? This looks weird and unusual. Generally in superclasses you provide methods but not instance variables. Do you have a pointer to the mechanism behind QCPatch and this instance variable stuff? I could not find on google. Thanks, Laurent On Jul 15, 2007, at 4:50 PM, Motohiro Takayama wrote: > Hi, > > I want to publish some member variables in Ruby class to Objective-C. > How can I do that ? > > in QuartzComposer framework, member named "input***" in custom class > are automatically detected at runtime, like this: > > @interface MyCustomPatch : QCPatch > { > QCStringPort *inputFoo; > } > > I wrote Ruby class like: > > class MyRubyCustomPatch < OSX::QCPatch > attr_accessor :inputFoo > ... > end > > but "inputFoo" is not detected. > > I tried to wrote *.h for MyRubyCustomPatch class in Objective-C to > publish inputFoo, but it was no use... > > > sorry for my continuous posts. m(_ _)m > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Motohiro T. <mo...@gm...> - 2007-07-15 14:50:48
|
Hi, I want to publish some member variables in Ruby class to Objective-C. How can I do that ? in QuartzComposer framework, member named "input***" in custom class are automatically detected at runtime, like this: @interface MyCustomPatch : QCPatch { QCStringPort *inputFoo; } I wrote Ruby class like: class MyRubyCustomPatch < OSX::QCPatch attr_accessor :inputFoo ... end but "inputFoo" is not detected. I tried to wrote *.h for MyRubyCustomPatch class in Objective-C to publish inputFoo, but it was no use... sorry for my continuous posts. m(_ _)m |
From: Motohiro T. <mo...@gm...> - 2007-07-15 14:18:55
|
Right, I got correct return value ! thank you for your help. 2007/7/15, Laurent Sansonetti <lsa...@ap...>: > Oops, please try > > objc_method :getInt, ['int'] > > The second argument of objc_method is supposed to be an Array. I will > fix the method to accept a String. > > Laurent > > On Jul 15, 2007, at 3:55 PM, Motohiro Takayama wrote: > > > Laurent: > > > > Thanks for your quick reply. > > > > I tried your advice, and observed strange behavior. > > > > class Hoge < OSX::NSObject > > objc_method :getInt, 'int' > > def getInt > > 5 > > end > > end > > > > and when call this, NSLog shows: > > > > 2007-07-15 22:50:15.667 retval[7097] XXX returning ffi type void for > > unrecognized encoding 'nt' > > > > I'm wondering why "i" of int is lack... > > > > 2007/7/15, Laurent Sansonetti <lsa...@ap...>: > >> When creating a Ruby method like this, without providing its ObjC > >> runtime signature, RubyCocoa will assume that all arguments and the > >> return value are Objective-C objects (of the type 'id'). Because > >> there > >> is no way for RubyCocoa to know. This is why you get from the ObjC > >> world an NSNumber and not an "int". > >> > >> To work around this, you need to register the Ruby method into the > >> ObjC runtime: > >> > >> def getInt ... end > >> objc_method :getInt, 'int' > >> > >> This will register getInt as a method that doesn't take any argument > >> and returns a C integer. > >> > >> Usually when you are overriding an ObjC method from Ruby, or > >> implementing an ObjC informal protocol in Ruby, you don't need to use > >> objc_method. But in this special case, it is required. Fortunately, > >> most people won't need to use it. > >> > >> Laurent > >> > >> On Jul 15, 2007, at 3:01 PM, Motohiro Takayama wrote: > >> > >>> Hi, > >>> > >>> I'm wondering how to return simple "int" type value from Ruby code > >>> to > >>> Objective-C code. > >>> Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber > >>> instead of simple int. > >>> Any suggestion ? > >>> > >>> > >>> Ruby code: > >>> > >>> class Hoge < OSX::NSObject > >>> def getInt > >>> 5 > >>> end > >>> end > >>> > >>> > >>> Objective-C code: > >>> > >>> Class helper = NSClassFromString(@"Hoge"); > >>> id hoge = [[helper alloc] init]; > >>> NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge > >>> getInt] > >>> decimalValue]); > >>> > >>> > >>> and those show: > >>> > >>> 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 > >>> > >>> > >>> thanks, > >>> > >>> -- > >>> Motohiro Takayama > >>> http://blog.deadbeaf.org/ > >>> > >>> ------------------------------------------------------------------------- > >>> This SF.net email is sponsored by DB2 Express > >>> Download DB2 Express C - the FREE version of DB2 express and take > >>> control of your XML. No limits. Just data. Click to get it now. > >>> http://sourceforge.net/powerbar/db2/ > >>> _______________________________________________ > >>> Rubycocoa-talk mailing list > >>> Rub...@li... > >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >> > >> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express > >> Download DB2 Express C - the FREE version of DB2 express and take > >> control of your XML. No limits. Just data. Click to get it now. > >> http://sourceforge.net/powerbar/db2/ > >> _______________________________________________ > >> Rubycocoa-talk mailing list > >> Rub...@li... > >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > >> > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Laurent S. <lsa...@ap...> - 2007-07-15 13:58:58
|
Oops, please try objc_method :getInt, ['int'] The second argument of objc_method is supposed to be an Array. I will fix the method to accept a String. Laurent On Jul 15, 2007, at 3:55 PM, Motohiro Takayama wrote: > Laurent: > > Thanks for your quick reply. > > I tried your advice, and observed strange behavior. > > class Hoge < OSX::NSObject > objc_method :getInt, 'int' > def getInt > 5 > end > end > > and when call this, NSLog shows: > > 2007-07-15 22:50:15.667 retval[7097] XXX returning ffi type void for > unrecognized encoding 'nt' > > I'm wondering why "i" of int is lack... > > 2007/7/15, Laurent Sansonetti <lsa...@ap...>: >> When creating a Ruby method like this, without providing its ObjC >> runtime signature, RubyCocoa will assume that all arguments and the >> return value are Objective-C objects (of the type 'id'). Because >> there >> is no way for RubyCocoa to know. This is why you get from the ObjC >> world an NSNumber and not an "int". >> >> To work around this, you need to register the Ruby method into the >> ObjC runtime: >> >> def getInt ... end >> objc_method :getInt, 'int' >> >> This will register getInt as a method that doesn't take any argument >> and returns a C integer. >> >> Usually when you are overriding an ObjC method from Ruby, or >> implementing an ObjC informal protocol in Ruby, you don't need to use >> objc_method. But in this special case, it is required. Fortunately, >> most people won't need to use it. >> >> Laurent >> >> On Jul 15, 2007, at 3:01 PM, Motohiro Takayama wrote: >> >>> Hi, >>> >>> I'm wondering how to return simple "int" type value from Ruby code >>> to >>> Objective-C code. >>> Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber >>> instead of simple int. >>> Any suggestion ? >>> >>> >>> Ruby code: >>> >>> class Hoge < OSX::NSObject >>> def getInt >>> 5 >>> end >>> end >>> >>> >>> Objective-C code: >>> >>> Class helper = NSClassFromString(@"Hoge"); >>> id hoge = [[helper alloc] init]; >>> NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge >>> getInt] >>> decimalValue]); >>> >>> >>> and those show: >>> >>> 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 >>> >>> >>> thanks, >>> >>> -- >>> Motohiro Takayama >>> http://blog.deadbeaf.org/ >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Rubycocoa-talk mailing list >>> Rub...@li... >>> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Motohiro T. <mo...@gm...> - 2007-07-15 13:55:31
|
Laurent: Thanks for your quick reply. I tried your advice, and observed strange behavior. class Hoge < OSX::NSObject objc_method :getInt, 'int' def getInt 5 end end and when call this, NSLog shows: 2007-07-15 22:50:15.667 retval[7097] XXX returning ffi type void for unrecognized encoding 'nt' I'm wondering why "i" of int is lack... 2007/7/15, Laurent Sansonetti <lsa...@ap...>: > When creating a Ruby method like this, without providing its ObjC > runtime signature, RubyCocoa will assume that all arguments and the > return value are Objective-C objects (of the type 'id'). Because there > is no way for RubyCocoa to know. This is why you get from the ObjC > world an NSNumber and not an "int". > > To work around this, you need to register the Ruby method into the > ObjC runtime: > > def getInt ... end > objc_method :getInt, 'int' > > This will register getInt as a method that doesn't take any argument > and returns a C integer. > > Usually when you are overriding an ObjC method from Ruby, or > implementing an ObjC informal protocol in Ruby, you don't need to use > objc_method. But in this special case, it is required. Fortunately, > most people won't need to use it. > > Laurent > > On Jul 15, 2007, at 3:01 PM, Motohiro Takayama wrote: > > > Hi, > > > > I'm wondering how to return simple "int" type value from Ruby code to > > Objective-C code. > > Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber > > instead of simple int. > > Any suggestion ? > > > > > > Ruby code: > > > > class Hoge < OSX::NSObject > > def getInt > > 5 > > end > > end > > > > > > Objective-C code: > > > > Class helper = NSClassFromString(@"Hoge"); > > id hoge = [[helper alloc] init]; > > NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge getInt] > > decimalValue]); > > > > > > and those show: > > > > 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 > > > > > > thanks, > > > > -- > > Motohiro Takayama > > http://blog.deadbeaf.org/ > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Laurent S. <lsa...@ap...> - 2007-07-15 13:38:49
|
When creating a Ruby method like this, without providing its ObjC runtime signature, RubyCocoa will assume that all arguments and the return value are Objective-C objects (of the type 'id'). Because there is no way for RubyCocoa to know. This is why you get from the ObjC world an NSNumber and not an "int". To work around this, you need to register the Ruby method into the ObjC runtime: def getInt ... end objc_method :getInt, 'int' This will register getInt as a method that doesn't take any argument and returns a C integer. Usually when you are overriding an ObjC method from Ruby, or implementing an ObjC informal protocol in Ruby, you don't need to use objc_method. But in this special case, it is required. Fortunately, most people won't need to use it. Laurent On Jul 15, 2007, at 3:01 PM, Motohiro Takayama wrote: > Hi, > > I'm wondering how to return simple "int" type value from Ruby code to > Objective-C code. > Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber > instead of simple int. > Any suggestion ? > > > Ruby code: > > class Hoge < OSX::NSObject > def getInt > 5 > end > end > > > Objective-C code: > > Class helper = NSClassFromString(@"Hoge"); > id hoge = [[helper alloc] init]; > NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge getInt] > decimalValue]); > > > and those show: > > 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 > > > thanks, > > -- > Motohiro Takayama > http://blog.deadbeaf.org/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Motohiro T. <mo...@gm...> - 2007-07-15 13:01:29
|
Hi, I'm wondering how to return simple "int" type value from Ruby code to Objective-C code. Ruby code passes Fixnum, and Objective-C code recieves NSCFNumber instead of simple int. Any suggestion ? Ruby code: class Hoge < OSX::NSObject def getInt 5 end end Objective-C code: Class helper = NSClassFromString(@"Hoge"); id hoge = [[helper alloc] init]; NSLog(@"%@ %d", [[hoge getInt] class], [(NSNumber *)[hoge getInt] decimalValue]); and those show: 2007-07-15 21:52:56.954 retval[5100] NSCFNumber 8448 thanks, -- Motohiro Takayama http://blog.deadbeaf.org/ |
From: Laurent S. <lsa...@ap...> - 2007-07-15 11:35:23
|
We should definitely summarize this in a wiki page on the website. We already have a page but it's empty :( If someone is willing to fill it :) http://rubycocoa.sourceforge.net/RubyFromObjectiveC Laurent On Jul 15, 2007, at 11:01 AM, Motohiro Takayama wrote: > It works, thanks ! > > I searched that information on web, because the local documents seemed > to be obsolete... > but I will look up that for now. > > 2007/7/15, Satoshi Nakagawa <sna...@in...>: >> Hi. >> >>> While writing QuartzComposer CustomPatch with RubyCocoa, I'm in >>> trouble with passing arguments from Objective-C code to Ruby. >>> How can I pass more than one arguments to Ruby code from Objective- >>> C code ? >> >> Try this: >> >> objc_method :execute_time_arguments, %w|char id double id| >> def execute_time_arguments(fp8, fp12, fp20) >> ... >> end >> >> You can see documents of RubyCocoa in your machine: >> >> /Developer/Documentation/RubyCocoa/programming.en.html (English) >> /Developer/Documentation/RubyCocoa/programming.ja.html (Japanese) >> >> -- >> Satoshi Nakagawa >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Tim P. <he...@ti...> - 2007-07-15 11:28:10
|
Is it just me or does that read as if its a universal version of ruby? Ive just tried it installing it, and it appears that it installs ruby in /usr/local/bin tim-perretts-computer:/usr/local/bin timperrett$ ./ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0] Further to what we have been talking about on this list we could take a universial ruby distribution and put that inside our application couldn't we? Having said that, how would RC know to use the ruby within the application? Cheers Tim On 15 Jul 2007, at 03:06, Jon Baer wrote: > Just curious, has anyone tried running RubyCocoa apps with this > package? > > http://rubyosx.rubyforge.org/ > > - Jon |
From: Motohiro T. <mo...@gm...> - 2007-07-15 09:01:28
|
It works, thanks ! I searched that information on web, because the local documents seemed to be obsolete... but I will look up that for now. 2007/7/15, Satoshi Nakagawa <sna...@in...>: > Hi. > > > While writing QuartzComposer CustomPatch with RubyCocoa, I'm in > > trouble with passing arguments from Objective-C code to Ruby. > > How can I pass more than one arguments to Ruby code from Objective-C code ? > > Try this: > > objc_method :execute_time_arguments, %w|char id double id| > def execute_time_arguments(fp8, fp12, fp20) > ... > end > > You can see documents of RubyCocoa in your machine: > > /Developer/Documentation/RubyCocoa/programming.en.html (English) > /Developer/Documentation/RubyCocoa/programming.ja.html (Japanese) > > -- > Satoshi Nakagawa > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |
From: Satoshi N. <sna...@in...> - 2007-07-15 07:10:07
|
Hi. > While writing QuartzComposer CustomPatch with RubyCocoa, I'm in > trouble with passing arguments from Objective-C code to Ruby. > How can I pass more than one arguments to Ruby code from Objective-C code ? Try this: objc_method :execute_time_arguments, %w|char id double id| def execute_time_arguments(fp8, fp12, fp20) ... end You can see documents of RubyCocoa in your machine: /Developer/Documentation/RubyCocoa/programming.en.html (English) /Developer/Documentation/RubyCocoa/programming.ja.html (Japanese) -- Satoshi Nakagawa |
From: Motohiro T. <mo...@gm...> - 2007-07-15 06:32:45
|
Hi, While writing QuartzComposer CustomPatch with RubyCocoa, I'm in trouble with passing arguments from Objective-C code to Ruby. How can I pass more than one arguments to Ruby code from Objective-C code ? Objective-C code: - (BOOL)execute:(id)fp8 time:(double)fp12 arguments:(id)fp20 { Class helperClass = NSClassFromString(@"CustomRubyPatch"); rubyobj_ = [[helperClass alloc] initWithQCPatch:self]; [rubyobj_ execute:fp8 time:fp12 arguments:fp20]; return YES; } and Ruby code: def execute(fp8, time, arguments) @otport.setStringValue @inport.stringValue.gsub(/Objective-C/, "Ruby") true; end when [rubyobj_ execute:...] is invoked at runtime, an exception is raised ("selector not recognized"). thanks, -- Motohiro Takayama http://blog.deadbeaf.org/ |
From: Jon B. <jo...@gm...> - 2007-07-15 02:06:50
|
Just curious, has anyone tried running RubyCocoa apps with this package? http://rubyosx.rubyforge.org/ - Jon On Jul 14, 2007, at 9:01 AM, Tim Perrett wrote: > Fantastic work Eloy! > > So to clarify, what your saying is that when you compile gems which > need ruby extensions and they are universal? > > Being able to bundle a universal ruby bin inside an RC app would > solve pretty much all the architecture problems in dealing with PPC/ > Intel differences. Both locomotive and slingshot would be interested > in that i expect! > > I know when we were chatting you mentioned distribution through mac > ports? How would one do it from source to get a universal bin? > > Cheers > > - Tim > > > On 13 Jul 2007, at 23:23, Eloy Duran wrote: > >> I have finally been able to build the whole ruby package as >> universal binaries. >> I checked if gems (or any extconf based lib) directly build as >> universals as well, which is indeed the case: > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Laurent S. <lsa...@ap...> - 2007-07-14 18:54:38
|
Seems expected, since the method is declared to return a 'unsigned char *'. So, RubyCocoa is returning you a Ruby string. However, during the conversion, some data may be lost, if there is for example a 0 byte in the middle. I think that we should change the BridgeSupport metadata to mark this method returning a 'void *' instead, so that RubyCocoa will use an ObjcPtr. Laurent On Jul 14, 2007, at 8:45 PM, Sal Scotto wrote: > When i call bitmapData im getting a string back instead of a pointer > as per the docs > > is this a bug or am i using it wrong? > > bmp = NSBitmapImageRep.alloc.initWithData(tiff) > x = ObjcPtr.new(bmp.bitmapData) > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Sal S. <sal...@gm...> - 2007-07-14 18:45:08
|
When i call bitmapData im getting a string back instead of a pointer as per the docs is this a bug or am i using it wrong? bmp = NSBitmapImageRep.alloc.initWithData(tiff) x = ObjcPtr.new(bmp.bitmapData) |