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: DeNigris S. <se...@cl...> - 2010-02-19 11:28:54
|
> In my RubyCocoa projects I just creat an objective C class that > contains wrapper functions around any c functions that I need. As it > is objective c, rubycocoa knows how to bridge automagically. Thanks! I tried it two ways: 1. Wrapping it in obj-C 2. Writing a C extension that opens the OSX module and inserts the method The C way seemed a little easier/more straight-forward even with gluing manually (about 9 non-comment lines): #include "ruby.h" #include <Carbon/Carbon.h> // CGSSymbolicHotKey is adopted from work by Joe Ranieri, Alacatia Labs. extern CGError CGSSetSymbolicHotKeyEnabled (int hot_key, bool is_enabled); // Function will be mapped as a class method on the OSX module static VALUE t_set_symbolic_hot_key_enabled(VALUE self, VALUE hot_key_code, VALUE is_enabled) { /* Ruby objects must be converted for use in C. Bools are probably okay, but I'm tired, lol*/ CGError result = CGSSetSymbolicHotKeyEnabled(NUM2INT(hot_key_code), is_enabled == Qtrue); return (VALUE) INT2FIX(result); } /* Every extension defines a global Init_* function * which is called when the interpreter loads it */ void Init_symbolic_hot_keys() { mOSX = rb_define_module("OSX"); // Define a module function, the C function it maps to, which takes 2 arguments (not counting self) rb_define_module_function(mOSX, "CGSSetSymbolicHotKeyEnabled", t_set_symbolic_hot_key_enabled, 2); } Sean DeNigris se...@cl... |
From: Wolfgang K. <kit...@ka...> - 2010-02-18 17:18:55
|
Hi, Thanks due to your hints, the little test is now working. I changed my error generating method so, that it returns the NSError as it would be done by the brigde by converting the pointer to an additional retrun value: require 'osx/cocoa' class Contr < OSX::NSObject include OSX ib_action :trigger def generateError # simulate an error generating NS method error = NSError.alloc.initWithDomain_code_userInfo( NSString.stringWithString('myDomainError'), 4711, nil) # return NO and the constructed NSError return 0, error end # generate_error def trigger(sender) #errorPtr = ObjcPtr.new(1000) myresult = Array.new myresult = generateError successful = myresult[0] error = myresult[1] unless successful == 1 a = NSAlert.alertWithError(error) a.runModal end # unless end # trigger end Many thanks to your appreciated help and best regards Kittekat |
From: Allison N. <dem...@ma...> - 2010-02-17 21:35:18
|
Hmmm, not really. The best resource for explaining the bridge is Brian Marick's book, and the source code. Some of the answers I gave you yesterday were based on directly reading the source code for RubyCocoa. Sometimes I know what to do because I have seen how it was done in other people's RubyCocoa code. The example code in /Developer/ Examples/RubyCocoa is a very good resource. You can also try googling the method name using RubyCocoa syntax. For example, I learned about errors being returned when I was trying to work with QTKit. So I googled "QTMovie.movieWithFile_error" and found this: http://images.apple.com/server/macosx/docs/Podcast_Producer_Workflow_Tutorial.pdf which has this code in it: # Load the first movie. first_input_movie, error = OSX::QTMovie.movieWithFile_error(first_input_path) # Check to see if the first movie opened successfully. if first_input_movie == nil or error != nil $stderr.puts "could not load first movie" exit(1) end The last thing I can think of is to follow Brian's philosophy. If you are not sure how things work, try running a test case to see. For example, for your question about NSDictionary/Hash, the best thing to do is to try the ruby way and see if it works. If not, use the Cocoa way. I still find that the best thing to do is to read the source code, but then I am a very experienced C programmer, with a fair amount of experience in generating C/Ruby bindings, so it's fairly easy for me to do that. Of course, if you get stuck, that's what the mailing list is for.... Alli Le 17 févr. 10 à 21:01, Wolfgang Kittenberger a écrit : > Hi Allison, > > I like this answer! It explains, why I was not able the get that > "17 liner" working. > > To explain the background: I try to write the examples from the > Hillegass book (Cocoa Programming ..., 3. ed) in RubyCocoa. And I > have to admit, that my Objective-C and Cocoa knowledge is very > limited. > > In chapter 20 he writes a view to a PDF file and checks then if it > worked: > > ... > NSError *error; > BOOL successful = [data writeToFile: path > options:0 > error:&error]; > if (!successful) { > NSAlert *a = [NSAlert alertWithError:error]; > [a runModal]; > } > ... > > My naive approach to test the code for the error branch was to > generate the error by myself. This brought me to use ObjcPtr#assign > to set the errorpointer as described in my mail. > > When this did not work, I looked for descriptions for the ObjcPtr > class. But I did not find it. I had a look in the source of > "cls_objcptr.m", but it was double dutch for me. > > The I tried to generate the bridge-doc, which did not work. After > your hints I did this with the last but one versions of RubyCocoa > (0.13.2) and OSX(10.5.8). Then I was really disappointed, as I did > not find there anything about > my challenge. > > Now after your explanations I can see, that I was complete on the > wrong way. I did not understand, that NSAlert.alertWithError expects > not what I tried to construct (and failed). I even did not realize, > that there existst something like a Ruby NSError. > > I learned in the RubyCocoa book from Brian Marick, that there is a > Ruby NSRange, but I did not find anything about error handling. But > due to my long years programming experience, I am convinced that > checking errors is essential. > > So can you recommend some reading to get informations as gave it in > your mail, like where I can expect the RubyCocoa bridge to convert > Ruby objects to NS objects, and where I have to do it myself (e.g. > NSDictionary instead of a Ruby hash, or NSString.stringWithString > instead of a Ruby string)? Is the link "http://rubycocoa.sourceforge.net/HowDoesTheBridgeWork > " the only resource? > > Best regards > Wolfgang > > P.S.: > After your explanation of the usage of ObjcPtr#regard_as, I have had > a second look into the source code, but I would not be able to read > this out of the eleven pages without any explaining comments. So > there did you learn it? > > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Wolfgang K. <kit...@ka...> - 2010-02-17 20:01:51
|
Hi Allison, I like this answer! It explains, why I was not able the get that "17 liner" working. To explain the background: I try to write the examples from the Hillegass book (Cocoa Programming ..., 3. ed) in RubyCocoa. And I have to admit, that my Objective-C and Cocoa knowledge is very limited. In chapter 20 he writes a view to a PDF file and checks then if it worked: ... NSError *error; BOOL successful = [data writeToFile: path options:0 error:&error]; if (!successful) { NSAlert *a = [NSAlert alertWithError:error]; [a runModal]; } ... My naive approach to test the code for the error branch was to generate the error by myself. This brought me to use ObjcPtr#assign to set the errorpointer as described in my mail. When this did not work, I looked for descriptions for the ObjcPtr class. But I did not find it. I had a look in the source of "cls_objcptr.m", but it was double dutch for me. The I tried to generate the bridge-doc, which did not work. After your hints I did this with the last but one versions of RubyCocoa (0.13.2) and OSX(10.5.8). Then I was really disappointed, as I did not find there anything about my challenge. Now after your explanations I can see, that I was complete on the wrong way. I did not understand, that NSAlert.alertWithError expects not what I tried to construct (and failed). I even did not realize, that there existst something like a Ruby NSError. I learned in the RubyCocoa book from Brian Marick, that there is a Ruby NSRange, but I did not find anything about error handling. But due to my long years programming experience, I am convinced that checking errors is essential. So can you recommend some reading to get informations as gave it in your mail, like where I can expect the RubyCocoa bridge to convert Ruby objects to NS objects, and where I have to do it myself (e.g. NSDictionary instead of a Ruby hash, or NSString.stringWithString instead of a Ruby string)? Is the link "http://rubycocoa.sourceforge.net/HowDoesTheBridgeWork" the only resource? Best regards Wolfgang P.S.: After your explanation of the usage of ObjcPtr#regard_as, I have had a second look into the source code, but I would not be able to read this out of the eleven pages without any explaining comments. So there did you learn it? |
From: Allison N. <dem...@ma...> - 2010-02-17 19:09:50
|
Sean, You might be able to generate a bridgesupport file, and use that to expose the function, but it is probably more trouble than it is worth. In my RubyCocoa projects I just creat an objective C class that contains wrapper functions around any c functions that I need. As it is objective c, rubycocoa knows how to bridge automagically. Hope that helps, Alli Envoyé de mon iPhone Le 17 févr. 2010 à 20:01, DeNigris Sean <se...@cl...> a écrit : > List, > > I want to call the undocumented function (I believe from Core > Graphics) CGSSetSymbolicHotKeyEnabled > > If I do this from Xcode with Obj-C, it gives me a compiler warning > "Implicit declaration of..." > The warning can be fixed with "extern" but the code runs fine either > way. > > However, when I try from irb: > require "osx/cocoa" > OSX::CGSSetSymbolicHotKeyEnabled(64, false) > NoMethodError: undefined method `CGSSetSymbolicHotKeyEnabled' for > OSX:Module > from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/ > objc/oc_wrapper.rb:23:in `method_missing' > from (irb):12 > > How do I get RubyCocoa to call the function? > > Thanks! > > Sean DeNigris > > > > > --- > --- > --- > --------------------------------------------------------------------- > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: DeNigris S. <se...@cl...> - 2010-02-17 19:01:25
|
List, I want to call the undocumented function (I believe from Core Graphics) CGSSetSymbolicHotKeyEnabled If I do this from Xcode with Obj-C, it gives me a compiler warning "Implicit declaration of..." The warning can be fixed with "extern" but the code runs fine either way. However, when I try from irb: require "osx/cocoa" OSX::CGSSetSymbolicHotKeyEnabled(64, false) NoMethodError: undefined method `CGSSetSymbolicHotKeyEnabled' for OSX:Module from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:23:in `method_missing' from (irb):12 How do I get RubyCocoa to call the function? Thanks! Sean DeNigris |
From: Allison N. <dem...@ma...> - 2010-02-16 21:51:11
|
Hi Wolfgang, OK, I don't think you're going to like this answer too much... Firstly, you aren't allocating enough memory for the pointer. You are initialising it with just 1 byte of memory. You need to allocate enough to be able to hold the NSError object (the real one, not the RubyCocoa proxy. So let's just allocate 1000 bytes to be sure... errorPtr = ObjcPtr.new(1000) The next problem is that you have to convince the type checking that is done during ObjcPtr.assign that the assign is ok. Here's the magic line to do that: errorPtr.regard_as("@") If you want more information on how that works, you'll have to read up on BridgeSupport The source code that you can look at to figure out how ObjcPtr works is in cls_objcptr.m and cls_objcptr.h That said, you're trying to do this the wrong way. If you try the changes that I mentioned above, your test program still won't work, because NSAlert.alertWithError expects a Ruby NSError as it's argument, not an ObjcPtr that points to an Objective-C NSError. If you have an Objective-C API that uses a pointer to a pointer to an object, have a look at what is returned by that method in RubyCocoa - normally you can simply skip that parameter when you call the function, and the object is added to the array of returned objects, so it looks a bit like this: result = NSObject.someMadeUpFunction_withError_() result = ['a result', error] At least, that's how it used to work, last time I tried to do this... The documentation is here (http://rubycocoa.sourceforge.net/WorkingWithPointers ) but I don't know if it is up to date... So, what's the deal with ObjcPtr? It is used when you need to be able to manipulate a raw memory buffer - for example trying to send an array of vertex data to an OpenGL call. That said, there are nicer ways of doing this, such as packing an array, like this: @whiteLight = [ 0.2, 0.2, 0.2, 1.0 ].pack('f*') sNote once again the funny string 'f*'. That's telling pack what format the ObjcPtr that is about to be generated should be considered as, as well as how to convert the ruby numbers. In this case, it is saying that the buffer generated by pack should be treated as a pointer to a bunch of floats. Once again, I hope that helps... Alli Le 16 févr. 10 à 20:11, Wolfgang Kittenberger a écrit : > I try to return an errorpointer as shown in http://rubycocoa.sourceforge.net/AssignValueToPointerArgument > . > > Anyway, I get a runtime error when using "errorPtr.assign(error)": > 2010-02-13 19:59:49.816 ErrorTest[4848:a0f] Contr#trigger: > TypeError: can't convert OSX::NSError into Integer > > Looks like I have to somehow tell the ObjcPtr instance, what type of > object I want to assign, perhaps when generating it. > > But I did not find any documentation about ObjcPtr.new. > > Best regards > Kittekat > > P.S.: > this is my test code.: > > require 'osx/cocoa' > class Contr < OSX::NSObject > include OSX > ib_action :trigger > > def generateError(errorPtr) > error = NSError.alloc.initWithDomain_code_userInfo( > NSString.stringWithString('myDomainError'), > 4711, nil) > errorPtr.assign(error) > end # generate_error > > def trigger(sender) > errorPtr = ObjcPtr.new(1) > generateError(errorPtr) > a = NSAlert.alertWithError(errorPtr) > a.runModal > end # trigger > end # Contr > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Wolfgang K. <kit...@ka...> - 2010-02-16 19:12:49
|
I try to return an errorpointer as shown in http://rubycocoa.sourceforge.net/AssignValueToPointerArgument. Anyway, I get a runtime error when using "errorPtr.assign(error)": 2010-02-13 19:59:49.816 ErrorTest[4848:a0f] Contr#trigger: TypeError: can't convert OSX::NSError into Integer Looks like I have to somehow tell the ObjcPtr instance, what type of object I want to assign, perhaps when generating it. But I did not find any documentation about ObjcPtr.new. Best regards Kittekat P.S.: this is my test code.: require 'osx/cocoa' class Contr < OSX::NSObject include OSX ib_action :trigger def generateError(errorPtr) error = NSError.alloc.initWithDomain_code_userInfo( NSString.stringWithString('myDomainError'), 4711, nil) errorPtr.assign(error) end # generate_error def trigger(sender) errorPtr = ObjcPtr.new(1) generateError(errorPtr) a = NSAlert.alertWithError(errorPtr) a.runModal end # trigger end # Contr |
From: Wolfgang K. <kit...@ka...> - 2010-02-16 19:05:04
|
Hello, I switched to my Leopard system (10.5.8), downloaded the RubyCocoa-0.13.2 tarball and could so generate the bridge-doc without any problems. Regards Kittekat |
From: Eloy D. <elo...@gm...> - 2010-02-16 18:00:59
|
Hi, This tool has not been updated in quite a while and since Apple changes it's doc format all the time, it was inevitable that there would be a point where this wouldn't work. So I'd suggest to just skip this step and read the docs in xcode or on apple.com. Cheers, Eloy On 15 feb 2010, at 22:58, Allison Newman wrote: > OK, I don't have Snow Leopard installed, so I can't figure this one > out. gen_bridge_doc works basically by identifying all of the key > frameworks, finding their original reference documentation, scraping > the class information out of the html files, and then reformatting > it into RubyCocoa method names. > > The bad news is that after attempting the scraping (and I don't know > if this applies to just one html file or all of them) the html > parser was not able to identify some of the key information in the > file, with a resulting exception being thrown. You could try, as a > quick hack, patching /Users/kittekat/RubyCocoa/RubyCocoa/ > RubyCocoa-1.0.1/framework/tool/gen_bridge_doc/lib/lib/class_def.rb > > I think that what is happening is that in this file, in > CocoaRef::ClassDef.output_file, it just isn't able to match the file > up to a type. Try modifying this method to return an empty string if > the type is never matched, and see what that gives you. > > Html scraping is always a delicate affair, if the format of the > scraped doc changes even slightly, the scraper tends to fail > catastrophically. as would seem to be the case here... Anyway, good > luck with debugging it further. > > Alli > > > Le 15 févr. 10 à 21:26, Wolfgang Kittenberger a écrit : > >> Hello, >> >> Great! Thanks for the hint! But behind this solved obstacle there >> is just the next: >> >> myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc >> install.rb: entering doc phase... >> ---> framework >> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby >> gen_bridge_doc.rb build ../bridge-doc >> mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ >> framework/bridge-doc >> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby >> -I../../ext/rubycocoa -I../../lib gen_bridge_doc/ >> rdocify_framework.rb '/Developer/Documentation/DocSets/ >> com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ >> Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / >> Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- >> doc/ruby >> >> Working on: ApplicationKit >> >> mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ >> framework/bridge-doc/ruby >> Processing reference file: CIColor_AppKitAdditions >> /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/tool/ >> gen_bridge_doc/lib/cocoa_ref.rb:70:in `join': can't convert nil >> into String (TypeError) >> from /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ >> tool/gen_bridge_doc/lib/cocoa_ref.rb:70:in `initialize' >> from gen_bridge_doc/rdocify_framework.rb:174:in `new' >> from gen_bridge_doc/rdocify_framework.rb:174 >> from gen_bridge_doc/rdocify_framework.rb:171:in `each' >> from gen_bridge_doc/rdocify_framework.rb:171 >> gen_bridge_doc.rb:35:in `command': 'system /System/Library/ >> Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/ >> rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/ >> Developer/Documentation/DocSets/ >> com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ >> Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / >> Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- >> doc/ruby' failed (RuntimeError) >> from gen_bridge_doc.rb:39:in `ruby' >> from gen_bridge_doc.rb:99 >> from gen_bridge_doc.rb:98:in `each' >> from gen_bridge_doc.rb:98 >> rm -rf bridge-doc >> doc failed >> hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ >> pre-doc.rb failed: >> 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ >> bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed >> try 'ruby install.rb --help' for usage >> myMini-2:RubyCocoa-1.0.1 kittekat$ >> >> Following your method by checking the source code in found in >> "cocoa_ref.rb in line 70: >> >> # Check if there is a overrides file in the override_dir for >> the given class >> class_overrides_file = File.join(File.dirname(File.expand_path >> (__FILE__)), @framework, @class_def.output_filename) >> >> Looks like some option is checked. Did not find anything about an >> override_dir in the --help output of install.rb. >> >> Anyway, here is the current configuration: >> >> myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb show >> prefix /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr >> install-prefix $prefix >> std-ruby $install-prefix/lib/ruby/1.8 >> site-ruby /Library/Ruby/Site/1.8 >> bin-dir $install-prefix/bin >> rb-dir $site-ruby >> so-dir /Library/Ruby/Site/1.8/universal-darwin10.0 >> data-dir $install-prefix/share >> ruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/bin/ruby >> ruby-prog /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/bin/ruby >> make-prog make >> without-ext no >> install-root (not specified) >> frameworks /Library/Frameworks >> xcode-extras /Library/Application Support/Developer/Shared/Xcode/ >> examples /Developer/Examples >> documentation /Developer/Documentation >> gen-bridge-support no >> build-as-embeddable yes >> ruby-header-dir /System/Library/Frameworks/Ruby.framework/Versions/ >> 1.8/usr/lib/ruby/1.8/universal-darwin10.0 >> libruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/lib/libruby.1.dylib >> ri-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/share/ri/1.8/site >> macosx-deployment-target 10.6 >> sdkroot (not specified) >> target-archs i386 x86_64 >> rubycocoa-version 1.0.1 >> rubycocoa-version-short 1.0.1 >> rubycocoa-release-date 2009-10-18 >> rubycocoa-svn-revision 2282 >> rubycocoa-framework-version A >> myMini-2:RubyCocoa-1.0.1 kittekat$ >> >> Any hint? >> >> Best regards >> Kittekat >> > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eric C. <ech...@gm...> - 2010-02-16 05:37:54
|
On Sat, Feb 13, 2010 at 11:57 AM, Eric Christopherson <ech...@gm...> wrote: > (Cross-posted to rubycocoa-talk and rubycocoa-devel. Apologies for spam.) > > The other day I found out that RubyCocoa's irb (1.8.7 on Snow Leopard, > at least) uses libedit (Editline) instead of readline to provide line > editing functions. I created a ~/.editrc file with key bindings to > match my ~/.inputrc (for readline), and they seemed to work just fine. > However, yesterday I noticed that none of my new key bindings work > anymore. The ~/.editrc file is still the same. What could have > changed? How can I make it work again? Apparently it quit working when I put comments in my .editrc (using #). Comments aren't allowed, as far as I can tell. |
From: Allison N. <dem...@ma...> - 2010-02-15 21:58:37
|
OK, I don't have Snow Leopard installed, so I can't figure this one out. gen_bridge_doc works basically by identifying all of the key frameworks, finding their original reference documentation, scraping the class information out of the html files, and then reformatting it into RubyCocoa method names. The bad news is that after attempting the scraping (and I don't know if this applies to just one html file or all of them) the html parser was not able to identify some of the key information in the file, with a resulting exception being thrown. You could try, as a quick hack, patching /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ tool/gen_bridge_doc/lib/lib/class_def.rb I think that what is happening is that in this file, in CocoaRef::ClassDef.output_file, it just isn't able to match the file up to a type. Try modifying this method to return an empty string if the type is never matched, and see what that gives you. Html scraping is always a delicate affair, if the format of the scraped doc changes even slightly, the scraper tends to fail catastrophically. as would seem to be the case here... Anyway, good luck with debugging it further. Alli Le 15 févr. 10 à 21:26, Wolfgang Kittenberger a écrit : > Hello, > > Great! Thanks for the hint! But behind this solved obstacle there > is just the next: > > myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc > install.rb: entering doc phase... > ---> framework > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > gen_bridge_doc.rb build ../bridge-doc > mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - > I../../ext/rubycocoa -I../../lib gen_bridge_doc/ > rdocify_framework.rb '/Developer/Documentation/DocSets/ > com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ > Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / > Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- > doc/ruby > > Working on: ApplicationKit > > mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc/ruby > Processing reference file: CIColor_AppKitAdditions > /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/tool/ > gen_bridge_doc/lib/cocoa_ref.rb:70:in `join': can't convert nil into > String (TypeError) > from /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ > tool/gen_bridge_doc/lib/cocoa_ref.rb:70:in `initialize' > from gen_bridge_doc/rdocify_framework.rb:174:in `new' > from gen_bridge_doc/rdocify_framework.rb:174 > from gen_bridge_doc/rdocify_framework.rb:171:in `each' > from gen_bridge_doc/rdocify_framework.rb:171 > gen_bridge_doc.rb:35:in `command': 'system /System/Library/ > Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/ > rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/ > Developer/Documentation/DocSets/ > com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ > Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' / > Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge- > doc/ruby' failed (RuntimeError) > from gen_bridge_doc.rb:39:in `ruby' > from gen_bridge_doc.rb:99 > from gen_bridge_doc.rb:98:in `each' > from gen_bridge_doc.rb:98 > rm -rf bridge-doc > doc failed > hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ > pre-doc.rb failed: > 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ > bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed > try 'ruby install.rb --help' for usage > myMini-2:RubyCocoa-1.0.1 kittekat$ > > Following your method by checking the source code in found in > "cocoa_ref.rb in line 70: > > # Check if there is a overrides file in the override_dir for > the given class > class_overrides_file = > File.join(File.dirname(File.expand_path(__FILE__)), @framework, > @class_def.output_filename) > > Looks like some option is checked. Did not find anything about an > override_dir in the --help output of install.rb. > > Anyway, here is the current configuration: > > myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb show > prefix /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr > install-prefix $prefix > std-ruby $install-prefix/lib/ruby/1.8 > site-ruby /Library/Ruby/Site/1.8 > bin-dir $install-prefix/bin > rb-dir $site-ruby > so-dir /Library/Ruby/Site/1.8/universal-darwin10.0 > data-dir $install-prefix/share > ruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/bin/ruby > ruby-prog /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/bin/ruby > make-prog make > without-ext no > install-root (not specified) > frameworks /Library/Frameworks > xcode-extras /Library/Application Support/Developer/Shared/Xcode/ > examples /Developer/Examples > documentation /Developer/Documentation > gen-bridge-support no > build-as-embeddable yes > ruby-header-dir /System/Library/Frameworks/Ruby.framework/Versions/ > 1.8/usr/lib/ruby/1.8/universal-darwin10.0 > libruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/lib/libruby.1.dylib > ri-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/share/ri/1.8/site > macosx-deployment-target 10.6 > sdkroot (not specified) > target-archs i386 x86_64 > rubycocoa-version 1.0.1 > rubycocoa-version-short 1.0.1 > rubycocoa-release-date 2009-10-18 > rubycocoa-svn-revision 2282 > rubycocoa-framework-version A > myMini-2:RubyCocoa-1.0.1 kittekat$ > > Any hint? > > Best regards > Kittekat > |
From: Wolfgang K. <kit...@ka...> - 2010-02-15 20:53:59
|
Hello, Great! Thanks for the hint! But behind this solved obstacle there is just the next: myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc install.rb: entering doc phase... ---> framework /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby gen_bridge_doc.rb build ../bridge-doc mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby Working on: ApplicationKit mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby Processing reference file: CIColor_AppKitAdditions /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/tool/gen_bridge_doc/lib/cocoa_ref.rb:70:in `join': can't convert nil into String (TypeError) from /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/tool/gen_bridge_doc/lib/cocoa_ref.rb:70:in `initialize' from gen_bridge_doc/rdocify_framework.rb:174:in `new' from gen_bridge_doc/rdocify_framework.rb:174 from gen_bridge_doc/rdocify_framework.rb:171:in `each' from gen_bridge_doc/rdocify_framework.rb:171 gen_bridge_doc.rb:35:in `command': 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Reference/ApplicationKit/' /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby' failed (RuntimeError) from gen_bridge_doc.rb:39:in `ruby' from gen_bridge_doc.rb:99 from gen_bridge_doc.rb:98:in `each' from gen_bridge_doc.rb:98 rm -rf bridge-doc doc failed hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/pre-doc.rb failed: 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed try 'ruby install.rb --help' for usage myMini-2:RubyCocoa-1.0.1 kittekat$ Following your method by checking the source code in found in "cocoa_ref.rb in line 70: # Check if there is a overrides file in the override_dir for the given class class_overrides_file = File.join(File.dirname(File.expand_path(__FILE__)), @framework, @class_def.output_filename) Looks like some option is checked. Did not find anything about an override_dir in the --help output of install.rb. Anyway, here is the current configuration: myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb show prefix /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr install-prefix $prefix std-ruby $install-prefix/lib/ruby/1.8 site-ruby /Library/Ruby/Site/1.8 bin-dir $install-prefix/bin rb-dir $site-ruby so-dir /Library/Ruby/Site/1.8/universal-darwin10.0 data-dir $install-prefix/share ruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby ruby-prog /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby make-prog make without-ext no install-root (not specified) frameworks /Library/Frameworks xcode-extras /Library/Application Support/Developer/Shared/Xcode/ examples /Developer/Examples documentation /Developer/Documentation gen-bridge-support no build-as-embeddable yes ruby-header-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 libruby-path /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib ri-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/share/ri/1.8/site macosx-deployment-target 10.6 sdkroot (not specified) target-archs i386 x86_64 rubycocoa-version 1.0.1 rubycocoa-version-short 1.0.1 rubycocoa-release-date 2009-10-18 rubycocoa-svn-revision 2282 rubycocoa-framework-version A myMini-2:RubyCocoa-1.0.1 kittekat$ Any hint? Best regards Kittekat |
From: Allison N. <dem...@ma...> - 2010-02-15 19:40:40
|
Hi Wolfgang, OK this one is an easy fix. In /Users/kittekat/RubyCocoa/RubyCocoa/ RubyCocoa-1.0.1/framework/tool there is a file called gen_bridge_doc.rb If you open it up, you'll see on line 77 why you have a problem... DOCUMENTATION_PATH = if `sw_vers -productVersion`.strip =~ /^10\.5/ '/Developer/Documentation/DocSets/ com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ Resources/Documents/documentation' else '/Developer/ADC Reference Library/documentation' end Apple changed the layout of documentation in Leopard. Unfortunately the gen_bridge_doc tool has not been updated to recognise that 10.6 now exists, so it is defaulting back to the old doc layout of 10.4 and earlier. To make doc installation work again, you just need to change the code so that it matches 10.6 rather than 10.5. Better yet would be to modify the code so that it works for any version of MacOSX from Leopard onwards, and to submit the patch to the maintainers. Hope that helps. Alli Le 15 févr. 10 à 19:43, Wolfgang Kittenberger a écrit : > I am on SnowLeopard (10.6.2) and in /Developer/Documentation/ > RubyCocoa/Frameworks/html are only a few japanese files. So I > downloaded the RubyCocoa-1.0.1 tarball. After "ruby install.rb > config" and "ruby install.rb setup" without any problems I get an > error when issuing "ruby install.rb doc": > > myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc > install.rb: entering doc phase... > ---> framework > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > gen_bridge_doc.rb build ../bridge-doc > mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - > I../../ext/rubycocoa -I../../lib gen_bridge_doc/ > rdocify_framework.rb '/Developer/ADC Reference Library/ > documentation/Cocoa/Reference/ApplicationKit/' /Users/kittekat/ > RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby > > Working on: ApplicationKit > > gen_bridge_doc/rdocify_framework.rb:29:in `open': No such file or > directory - /Developer/ADC Reference Library/documentation/Cocoa/ > Reference/ApplicationKit/Classes/ (Errno::ENOENT) > from gen_bridge_doc/rdocify_framework.rb:29:in `entries' > from gen_bridge_doc/rdocify_framework.rb:29:in `get_reference_files' > from gen_bridge_doc/rdocify_framework.rb:150 > gen_bridge_doc.rb:35:in `command': 'system /System/Library/ > Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/ > rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/ > Developer/ADC Reference Library/documentation/Cocoa/Reference/ > ApplicationKit/' /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/ > framework/bridge-doc/ruby' failed (RuntimeError) > from gen_bridge_doc.rb:39:in `ruby' > from gen_bridge_doc.rb:99 > from gen_bridge_doc.rb:98:in `each' > from gen_bridge_doc.rb:98 > rm -rf bridge-doc > doc failed > hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/ > pre-doc.rb failed: > 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ > bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed > try 'ruby install.rb --help' for usage > myMini-2:RubyCocoa-1.0.1 kittekat$ > > Did I miss to install something, or is this step broken in the > actual MAC OSX version? > > Best regards > Kittekat > > P.S.: > The Bridgedoc page (http://rubycocoa.sourceforge.net/BridgeDoc) > references an external page (http://www.superalloy.nl/blog/?p=6∞) > which does not exist. > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Wolfgang K. <kit...@ka...> - 2010-02-15 19:01:24
|
I am on SnowLeopard (10.6.2) and in /Developer/Documentation/RubyCocoa/Frameworks/html are only a few japanese files. So I downloaded the RubyCocoa-1.0.1 tarball. After "ruby install.rb config" and "ruby install.rb setup" without any problems I get an error when issuing "ruby install.rb doc": myMini-2:RubyCocoa-1.0.1 kittekat$ ruby install.rb doc install.rb: entering doc phase... ---> framework /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby gen_bridge_doc.rb build ../bridge-doc mkdir -p /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/' /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby Working on: ApplicationKit gen_bridge_doc/rdocify_framework.rb:29:in `open': No such file or directory - /Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/Classes/ (Errno::ENOENT) from gen_bridge_doc/rdocify_framework.rb:29:in `entries' from gen_bridge_doc/rdocify_framework.rb:29:in `get_reference_files' from gen_bridge_doc/rdocify_framework.rb:150 gen_bridge_doc.rb:35:in `command': 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I../../ext/rubycocoa -I../../lib gen_bridge_doc/rdocify_framework.rb '/Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/' /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/bridge-doc/ruby' failed (RuntimeError) from gen_bridge_doc.rb:39:in `ruby' from gen_bridge_doc.rb:99 from gen_bridge_doc.rb:98:in `each' from gen_bridge_doc.rb:98 rm -rf bridge-doc doc failed hook /Users/kittekat/RubyCocoa/RubyCocoa/RubyCocoa-1.0.1/framework/pre-doc.rb failed: 'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby gen_bridge_doc.rb build ../bridge-doc' failed try 'ruby install.rb --help' for usage myMini-2:RubyCocoa-1.0.1 kittekat$ Did I miss to install something, or is this step broken in the actual MAC OSX version? Best regards Kittekat P.S.: The Bridgedoc page (http://rubycocoa.sourceforge.net/BridgeDoc) references an external page (http://www.superalloy.nl/blog/?p=6∞) which does not exist. |
From: subverse <sub...@gm...> - 2010-02-13 19:50:50
|
Dear Allison, thanks for Your help - it works perfectly after replacing "Gem::Specification.list.each" with "Gem.loaded_specs". Best regards subverse |
From: Allison N. <dem...@ma...> - 2010-02-13 19:23:30
|
Subverse, Your problem is that standaloneify has not been updated to work with RubyGems 1.3.2. From the 1.3.2 release notes: * Removed Gem::Specification::list, too much process growth. Bug This comment from Eric Hodel on the RubyGems mailing list can probably help you: This method recorded every spec that was loaded even if no such gem was ever required. I suspect that what's really wanted is Gem.loaded_specs. ... Yeah, it should use Gem.loaded_specs: $ grep -nA1 \.list require2lib.rb 60: Gem::Specification.list.each do |gem| 61- if gem.loaded? So, try replacing "Gem::Specification.list" in standaloneify.rb with "Gem.loaded_specs". You should be good to go after that. Hope that helps Allison Newman Le 13 févr. 10 à 19:50, subverse a écrit : > Hi everybody, > > i have a problem with the standaloneify.rb : > > ruby standaloneify.rb -d theCypherPad.app CypherPad.app throws the > following error : > > .../Contents/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ > oc_import.rb:789:in > `method_missing': undefined method `list' for Gem::Specification > (NoMethodError) > from standaloneify.rb:102:in `find_files' > from standaloneify.rb:141 > Couldn't read dependency list > > Thank You in advance. > > Best regards. > > subverse > > > > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: subverse <sub...@gm...> - 2010-02-13 18:50:47
|
Hi everybody, i have a problem with the standaloneify.rb : ruby standaloneify.rb -d theCypherPad.app CypherPad.app throws the following error : .../Contents/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:789:in `method_missing': undefined method `list' for Gem::Specification (NoMethodError) from standaloneify.rb:102:in `find_files' from standaloneify.rb:141 Couldn't read dependency list Thank You in advance. Best regards. subverse |
From: Eric C. <ech...@gm...> - 2010-02-13 17:57:46
|
(Cross-posted to rubycocoa-talk and rubycocoa-devel. Apologies for spam.) The other day I found out that RubyCocoa's irb (1.8.7 on Snow Leopard, at least) uses libedit (Editline) instead of readline to provide line editing functions. I created a ~/.editrc file with key bindings to match my ~/.inputrc (for readline), and they seemed to work just fine. However, yesterday I noticed that none of my new key bindings work anymore. The ~/.editrc file is still the same. What could have changed? How can I make it work again? |
From: Eric C. <ech...@gm...> - 2010-02-02 06:13:35
|
Is RubyInject developed or maintained anymore? Does it work on Snow Leopard? I've had no success. I checked it out from Subversion. To get it to build, I had to make some changes to the Xcode project: 1. In mach_inject.c, change references such as e.g. remoteThreadState.srr0 to remoteThreadState.__srr0. 2. Change SDKROOT from Mac OS X 10.4 to current OS version. After that, it built fine and I put the framework in /Library/Frameworks. I can't get injection to work, though. At first I thought I might need to upgrade RubyCocoa, so I downloaded and installed 1.0.1. That didn't help, though. Here is what happens. I type "ruby --verbose ./inject.rb 0" (specifying pid 0 causes the script to launch TextEdit and attach to it) and this is the output: Injecting to pid 1899 /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50: [BUG] Bus Error ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] Abort trap During this, TextEdit launches and pops up a blank window. I have also tried running it with --debug. It shows several LoadError, NameError, and NoMethodError exceptions that don't show up otherwise. Could this be part of my problem? I'm not going to post the long debug output until I find out if there is any hope of getting this working. Thanks. |
From: Laurent S. <lau...@gm...> - 2010-02-01 02:55:46
|
Hi, After months of hard work and two successful beta releases, MacRuby 0.5 is now available. Get it here while it's still hot! MacRuby is a version of Ruby 1.9, ported to run directly on top of Mac OS X core technologies such as the Objective-C common runtime and garbage collector, the CoreFoundation framework and the LLVM compiler infrastructure. While still a work in progress, it is the goal of MacRuby to enable the creation of full-fledged Mac OS X applications which do not sacrifice performance in order to enjoy the benefits of using Ruby. You can learn more about MacRuby, and download a binary installer, from the website: http://macruby.org Or about this release more specifically, on our blog: http://www.macruby.org/blog/2010/01/31/macruby05.html Enjoy, Laurent |
From: Eric C. <ech...@gm...> - 2010-01-04 21:14:17
|
On Sun, Jan 3, 2010 at 7:04 AM, <sub...@gm...> wrote: > Hi everybody, > > i'm a ruby/rails-developer, coming from linux/win. > A few days ago i heard about rubycocoa and... bougth a mac emidiately. That's interesting! My interest in NeXTSTEP/OpenStep/GNUstep/Cocoa was a factor in my getting a Mac, but only a small one. You should also be aware of MacRuby <http://www.macruby.org/>, which appears to be on track to replace RubyCocoa some time in the future. I don't know much about it, but it's based on Ruby 1.9 and its interpreter and libraries are written directly on Cocoa so there is a tighter coupling between the two. It also supports Objective-C-like named arguments instead of the ugly underscores separating parts of the selector, as in fontWithName_size_. (It appears to extend Ruby's syntax to do so; because of this and the other peculiarities of MacRuby I wonder to what extent it really is Ruby rather than a different language.) RubyCocoa used to use key/value hashes for arguments; does anyone know why they got rid of those in favor of underscores? > This was my first contact to objective-c, cocoa, etc. - so i know pretty much nothing (I read a oreilly book about objective-c 2.0 - but that didn't help me with my problem). > > How do i set the fontfamily/fontname for a NSTextField. > I tried it in the interfae builder and in my controller_class.rb - with no result. (tried setFont < NSTextField < NSControl - think i didn't get the syntax right) > > Thanx in advance for every little hint. > > subverse |
From: <sub...@gm...> - 2010-01-04 21:00:02
|
Hi, that was exactly what i was looking for - Thank you very much. Best regards. subverse -- Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.! http://portal.gmx.net/de/go/dsl02 |
From: Brian M. <ma...@ex...> - 2010-01-04 17:46:45
|
On Jan 3, 2010, at 7:04 AM, sub...@gm... wrote: > > How do i set the fontfamily/fontname for a NSTextField. > I tried it in the interfae builder and in my controller_class.rb - with no result. (tried setFont < NSTextField < NSControl - think i didn't get the syntax right) Another way of writing this in code is like this: @comboBox.font = NSFont.fontWithName_size("Helvetica-BoldOblique", 20) You can replace setFont with Ruby's normal attribute assignment, and the trailing underscore is not (usually) required. You'd usually see a line of code like this in a controller's awakeFromNib method. I wrote a book on RubyCocoa: http://www.pragprog.com/titles/bmrc/programming-cocoa-with-ruby People seem to like it. ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |
From: Eric C. <ech...@gm...> - 2010-01-04 02:40:52
|
On Sun, Jan 3, 2010 at 7:04 AM, <sub...@gm...> wrote: > Hi everybody, > > i'm a ruby/rails-developer, coming from linux/win. > A few days ago i heard about rubycocoa and... bougth a mac emidiately. > This was my first contact to objective-c, cocoa, etc. - so i know pretty much nothing (I read a oreilly book about objective-c 2.0 - but that didn't help me with my problem). > > How do i set the fontfamily/fontname for a NSTextField. > I tried it in the interfae builder and in my controller_class.rb - with no result. (tried setFont < NSTextField < NSControl - think i didn't get the syntax right) Something like this: @textField.setFont_(NSFont.fontWithName_size_('Helvetica', 16)) Note the underscores. |