Re: [MacRuby-devel] spotlight - MDItemRef

2009-11-04 Thread Alan Skipp
I was also unaware of NSMetadataItem, but it seems that the only way of acquiring such an object is from the result of a spotlight search. There doesn't seem to be a way of creating an NSMetadataItem from a file path or url, as you can do with MDItemRef – though there is a distinct possibility that

Re: [MacRuby-devel] spotlight - MDItemRef

2009-11-04 Thread Ruben Fonseca
Hey Eloy! On Oct 30, 2009, at 9:50 PM, Eloy Duran wrote: Hey, Forgive me that I haven't read the complete thread, so ignore this if it's not a possibility. But couldn't you use NSMetadataItem etc? You know what this silence means don't you? :) I had no idea about NSMetadataItem.. Ho

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-30 Thread Eloy Duran
Hey, Forgive me that I haven't read the complete thread, so ignore this if it's not a possibility. But couldn't you use NSMetadataItem etc? Eloy On 30 okt 2009, at 13:12, Ruben Fonseca wrote: Hi Lauren! On Oct 29, 2009, at 8:17 PM, Laurent Sansonetti wrote: It would definitely be interes

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-30 Thread Ruben Fonseca
Hi Lauren! On Oct 29, 2009, at 8:17 PM, Laurent Sansonetti wrote: It would definitely be interesting to share the wrappers, but I don't know if bundling them as part of MacRuby is a good idea. If we start doing that we would have to make sure all wrappers are consistent. And these wrappers

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Laurent Sansonetti
Hi Ruben, On Oct 29, 2009, at 8:44 AM, Ruben Fonseca wrote: Hi Laurent. Just a quick question. On Oct 28, 2009, at 12:31 AM, Laurent Sansonetti wrote: Hi Alan, I'm afraid the MD* APIs haven't been covered by BridgeSupport yet, so it may not be possible to call it directly from MacRuby at

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Josh Ballanco
Hi Ruben, On Oct 29, 2009, at 11:07 AM, Ruben Fonseca wrote: Finally, as to your later question, there actually *is* a MacRuby API for GCD currently in the 0.5 beta and nightly builds. Yes I know. That's why I've asked if it makes sense to include more wrappers to other C APIs into Macruby

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Ruben Fonseca
Hi Josh! On Oct 29, 2009, at 5:48 PM, Josh Ballanco wrote: Hi Ruben, Using an Objective-C class in a MacRuby script is the first step in both recipes currently posted to the MacRuby website (http://www.macruby.org/documentation.html ). Your choices are either to add a "dummy" Init_foo{} fun

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Josh Ballanco
Hi Ruben, Using an Objective-C class in a MacRuby script is the first step in both recipes currently posted to the MacRuby website (http://www.macruby.org/documentation.html ). Your choices are either to add a "dummy" Init_foo{} function and make a foo.bundle from the class or compile the Ob

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread B. Ohr
Hi Ruben! However I'm still curious about the daily non-Xcode scripts. Image I want to write a macruby script that uses my Objective-C helper class. What's the easiest way to accomplish that outside XCode? Ruben Like you I played around a little with this issue. My current state is: If

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Ruben Fonseca
Hi Alan! Thank you, that's very simple. However I'm still curious about the daily non-Xcode scripts. Image I want to write a macruby script that uses my Objective-C helper class. What's the easiest way to accomplish that outside XCode? Ruben On Oct 29, 2009, at 11:43 AM, Alan Skipp wrote:

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Ruben Fonseca
Hi Alan! Thank you, that's very simple. However I'm still curious about the daily non-Xcode scripts. Image I want to write a macruby script that uses my Objective-C helper class. What's the easiest way to accomplish that outside XCode? Ruben On Oct 29, 2009, at 11:43 AM, Alan Skipp wrote:

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Ruben Fonseca
Hi Laurent. Just a quick question. On Oct 28, 2009, at 12:31 AM, Laurent Sansonetti wrote: Hi Alan, I'm afraid the MD* APIs haven't been covered by BridgeSupport yet, so it may not be possible to call it directly from MacRuby at this point. I would recommend to file a bug at http:// bugre

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Alan Skipp
It's really simple, you just need to create an Objective-C class in your macruby application (header and implementation file). You can then use it in your ruby code without any hassle, it's great. For example, if you create an Objective-C class called 'MetaDataHelper', you can use it like this: hel

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Ruben Fonseca
Hi Laurent! On Oct 28, 2009, at 12:31 AM, Laurent Sansonetti wrote: and to wrap this C API into an Objective-C class that you can call from MacRuby in the meantime. Laurent Just a quick question. Imagine I have an Objective-C class that wraps that API. How can I then use it on a Macruby

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-28 Thread John Shea
I always assumed (with no direct evidence) that it was because in Ruby, constants have to start with an uppercase letter, and so to match various method signatures/types sent through BridgeSupport, constant types must be passed as constant types. Anyway for supported frameworks capitalising

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-28 Thread Joshua Ballanco
Not a dumb question at all, just one of those "Ruby-isms" that will take some adjusting to if you're coming from a C/C++/Obj-C background. In Ruby, Constants always start with a Capital letter. Therefore, all of the kFooBarBaz constants from Cocoa get translated as KFooBarBaz. Actually, tha

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-28 Thread Allison Newman
I'm probably asking a really dumb question here - but I haven't used bridgesupport very much... Is there a reason why the constant in the example that fails starts with an upper case K, rather than keeping the lower case k given in the framework? Alli On Wednesday, October 28, 2009, at 01:31AM

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-27 Thread Laurent Sansonetti
Hi Alan, I'm afraid the MD* APIs haven't been covered by BridgeSupport yet, so it may not be possible to call it directly from MacRuby at this point. I would recommend to file a bug at http://bugreporter.apple.com so that we can consider this for a future Mac OS X release, and to wrap thi