This is Ruby, where everything is an expression. If you're going to be clever,
why not go all the way?
---
def is_macruby?; defined?(RUBY_ENGINE) && RUBY_ENGINE == 'macruby'; end
if is_macruby?
framework 'Foundation'
else
require 'uri'
COMPONENTS = [:scheme, :userinfo, :host, :port, :regis
Hi Mark,
No, NSURL and URI are not bridged.
I do not recommend using NSURL in a file that should also run under MRI because
of the MacRuby calling syntax for Objective-C selectors, which won't compile
under normal rubies. So, it would be better to isolate the NSURL code in a
special file and r
A more efficient version of that class:
class HackURI
if RUBY_ENGINE == 'macruby'
def initialize(uri)
@url = NSURL.URLWithString uri
end
else
def initialize(uri)
@url = URI.parse uri
Hi devs,
I am trying to write a gem so that it will run on MRI and MacRuby, but still be
able to take advantage of MacRuby things like Cocoa and GCD.
I was playing around with some URI related stuff and I cannot find much
documentation on whether NSURL and URI objects have been bridged for MacR
Ok. I'll do this later when i was home : )
On Oct 8, 2010, at 10:17 AM, Laurent Sansonetti wrote:
> Hi,
>
> Could you reduce the problems to simple .rb scripts and attach them to a new
> ticket?
>
> We are working on a new version of BridgeSupport which will add missing
> metadata (I believe i
Hi,
Could you reduce the problems to simple .rb scripts and attach them to a new
ticket?
We are working on a new version of BridgeSupport which will add missing
metadata (I believe it will fix your CoreText problems), but we will need to
verify.
In the interim, you can wrap CoreText APIs in O
Hi
I'm doing some work with CoreText with macruby ,and i had some question
1. CTline and some other `struct` does not have a ruby class ,the
ctline.class is __NSCFType
, not like the CGRect struct,in macruby ,the class is CGRecct ,so i can
reopen the class ,and add some help methods.
2. the CT
Okay, I modified the document a tiny bit making note of the return value of
#apply!, and the SecurityError exception it can
raise:
http://github.com/robgleeson/macruby_website/blob/Sandbox_class_tutorial/content/documentation/the-sandbox-class.txt
___
M
On 7 Oct 2010, at 10:49, Nick Ludlam wrote:
> Hi Rob,
> I like the tutorial, it's nicely short and concise. One thing I'd like to see
> is the expected outcome of running the code you've placed within the text.
> Could you include this information underneath the code blocks?
>
> I'm imagining
Hi Rob,
I like the tutorial, it's nicely short and concise. One thing I'd like to see
is the expected outcome of running the code you've placed within the text.
Could you include this information underneath the code blocks?
I'm imagining that most people would try this out using the interactive
On 7 Oct 2010, at 07:55, Matt Aimonetti wrote:
> Thx I'll merge the article asap (after a quick sanity check).
>
> - Matt
>
> Sent from my iPhone
>
Thanks Matt.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosfo
11 matches
Mail list logo