macruby

Good resources to learn MacRuby [closed]

眉间皱痕 提交于 2019-12-09 06:14:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I do not know Ruby and I am interested to learn MacRuby. What would you recommend as your best resource (books, blogs, sites)? Found:http://www.macruby.org/ More info her from rubyconf.org Macruby talk 回答1: I found MacRuby: The Definitive Guide, by Matt Aimonetti very helpful for getting started with MacRuby.

How can I preset the filename in NSSavePanel?

余生长醉 提交于 2019-12-08 16:03:34
问题 NSSavePanel used to have a runModalForDirectory:file: method which let you preset the directory and filename for a save panel. But that is deprecated in 10.6 When creating an NSSavePanel, how can I preset the filename without using the deprecated method? 回答1: Use the setNameFieldStringValue: method, which was added in 10.6, before running the save panel. If you want to set the default directory too, you will need the setDirectoryURL: method, also added in 10.6. NSString *defaultDirectoryPath,

How do I get Textmate to use MacRuby?

南楼画角 提交于 2019-12-05 02:34:13
问题 So, how do I get Textmate to use MacRuby, a branch of 1.9.2, instead of the default Ruby in OSX, 1.8.7? 回答1: Simpler answers: Install MacRuby Go to TextMate->Preferences->Advanced->Shell Variables and add a variable named TM_RUBY set to /usr/local/bin/macruby . Alternatively, edit the PATH variable to include /usr/local/bin/ and just set TM_RUBY to macruby . If you have installed MacRuby through RVM, then instead: Generate stable wrapper: rvm wrapper macruby-0.8 macruby # creates ~/.rvm/bin

How can a nested class access a method in the outer class in Ruby?

隐身守侯 提交于 2019-12-04 15:50:03
问题 def class A def a raise "hi" #can't be reached end class B def b a() #doesn't find method a. end end end I want to invoke a from b and raise the exception. How can I? 回答1: Ruby doesn't have nested classes. The only way to inherit behavior is, well, via inheritance. If you want your code to work, you need to use a language which supports nested classes. While this is an incredibly neat and powerful feature, I unfortunately know of only two languages that have nested classes: BETA, the language

How do I get Textmate to use MacRuby?

廉价感情. 提交于 2019-12-03 17:26:21
So, how do I get Textmate to use MacRuby, a branch of 1.9.2, instead of the default Ruby in OSX, 1.8.7? Simpler answers: Install MacRuby Go to TextMate->Preferences->Advanced->Shell Variables and add a variable named TM_RUBY set to /usr/local/bin/macruby . Alternatively, edit the PATH variable to include /usr/local/bin/ and just set TM_RUBY to macruby . If you have installed MacRuby through RVM , then instead: Generate stable wrapper: rvm wrapper macruby-0.8 macruby # creates ~/.rvm/bin/macruby Set TM_RUBY to /Users/yourusername/.rvm/bin/macruby (must be the absolute path). Alternatively, edit

How can a nested class access a method in the outer class in Ruby?

末鹿安然 提交于 2019-12-03 09:50:55
def class A def a raise "hi" #can't be reached end class B def b a() #doesn't find method a. end end end I want to invoke a from b and raise the exception. How can I? Ruby doesn't have nested classes. The only way to inherit behavior is, well, via inheritance. If you want your code to work, you need to use a language which supports nested classes. While this is an incredibly neat and powerful feature, I unfortunately know of only two languages that have nested classes: BETA , the language which introduced nested classes (and its successor gbeta ) Newspeak I don't know of any other. Java has a

Can you use MacRuby to develop applications for the Mac App Store?

…衆ロ難τιáo~ 提交于 2019-12-03 08:19:19
问题 I have some basic familiarity with Objective-C, but prefer Ruby, so I'm thinking of playing around with MacRuby. Is it possible to use MacRuby to develop applications for the Mac App Store, or do I have to use Objective-C? (Note that I don't care so much about iOS/the iPhone and iPad store right now, just the Mac OS X app store.) 回答1: Short answer: Yes, you can, technically, build such an app. You need to revisit the store guidelines to know what requirements must be met to submit to the

Good resources to learn MacRuby [closed]

*爱你&永不变心* 提交于 2019-12-03 07:52:53
I do not know Ruby and I am interested to learn MacRuby. What would you recommend as your best resource (books, blogs, sites)? Found: http://www.macruby.org/ More info her from rubyconf.org Macruby talk I found MacRuby: The Definitive Guide , by Matt Aimonetti very helpful for getting started with MacRuby. ennuikiller If you don't know ruby then these 3 books will bring you up to speed relatively quickly. The nice thing is that you can use "Design Patterns in Ruby" as your primary text and the other 2 as reference texts (although you should definitely read "The Ruby Programming Language" all

Can you use MacRuby to develop applications for the Mac App Store?

南楼画角 提交于 2019-12-02 22:01:44
I have some basic familiarity with Objective-C, but prefer Ruby, so I'm thinking of playing around with MacRuby. Is it possible to use MacRuby to develop applications for the Mac App Store, or do I have to use Objective-C? (Note that I don't care so much about iOS/the iPhone and iPad store right now, just the Mac OS X app store.) Short answer: Yes, you can, technically, build such an app. You need to revisit the store guidelines to know what requirements must be met to submit to the various stores. This comes up sporadically; beyond the guidelines that @NSResponder mentioned, the reality is

MacRuby, error when using Sequel

99封情书 提交于 2019-12-02 11:21:29
问题 I have just installed Sequel using the command sudo macgem install sequel . It tells me sequel-3.18.0 was successfully installed. When I fire up xcode, and start a new MacRuby application, it sets up a target for unit tests. I have modified stub_test.rb with the following two lines: require "rubygems" require "sequel" When trying to run the unit tests, I get the following error: /Users/.../macRuby Test/Tests/run_suite.rb:1:in `<main>': super: no superclass method `require' for Sequel:Class