[MacRuby-devel] RoxorReturnFromBlockException*

2011-03-30 Thread Martin Hawkins
>From what I can read in the archives, this was raised about 18 months ago. Loosely following Matt's book, I've written the following code: def showOpenPanel( sender) openPanel = NSOpenPanel.openPanel openPanel.setCanChooseDirectories( false) openPanel.setShowsHiddenFiles( NSUserDefaults.

Re: [MacRuby-devel] Creating an Objective-C bundle to use with MacRuby

2011-03-29 Thread Martin Hawkins
Thomas, I don't understand why you think I forgot the .m file - as I said - I followed Matt's instructions, which include creating the .m file, and it didn't work! Martin ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.mac

[MacRuby-devel] Foundation/Foundation.h: No such file or directory

2011-03-21 Thread Martin Hawkins
I started a new project today - MacRuby Document Based Application. I made the usual start up noises - git repo., etc. When I built the project just to check I'd done nothing stupid, I got 'failed - 33 errors' with the error above. (Thinks - it's going to be one of those days!) A quick check in Pr

Re: [MacRuby-devel] Documentation

2011-03-05 Thread Martin Hawkins
dan - that's an idea but I think the natural place would be macruby - documentation. Martin ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Re: [MacRuby-devel] Documentation

2011-03-04 Thread Martin Hawkins
So - how to proceed? I think the best place to publish would be the documentation page on the MacRuby site. Are there publication guidelines? Specific tools that need to be used? Who 'owns' the site? ___ MacRuby-devel mailing list MacRuby-devel@lists.ma

Re: [MacRuby-devel] Documentation

2011-03-04 Thread Martin Hawkins
> On Fri, Mar 4, 2011 at 1:49 AM, Martin Hawkins > wrote: > >> Is there an 'official' macruby documentation site? (Apart from the >> MacRuby Documentation page) >> It strikes me that there is a ton of gold dust in this forum that >> really needs to

[MacRuby-devel] Documentation

2011-03-04 Thread Martin Hawkins
Is there an 'official' macruby documentation site? (Apart from the MacRuby Documentation page) It strikes me that there is a ton of gold dust in this forum that really needs to be pulled together so that people can access it easily. ___ MacRuby-devel mail

[MacRuby-devel] Creating an Objective-C bundle to use with MacRuby

2011-03-03 Thread Martin Hawkins
I presume I'm doing something really dopey and apologies if that is the case. I've been following Matt Aimonetti's excellent instructions on the MacRuby site with the above title - I'm attempting to wrap Uli Kusterer's UKKQueue library. I've followed the instructions - the bundle builds ok; it bui

Re: [MacRuby-devel] BridgeSupport stack overflow

2011-03-03 Thread Martin Hawkins
Just to confirm; I have created a 'Do Nothing' MacRuby app from scratch (which literally does nothing except show the vanilla window). Built with the --bs option added to the embed script, this runs ok on 10.6.6 and crashes in the same way as described above on 10.6. I tried removing files from th

[MacRuby-devel] BridgeSupport stack overflow

2011-02-28 Thread Martin Hawkins
I have an application that needs to access some constants - KeyDirectObject from AppleEvents.h, requiring AE.bridgesupport; and KInternetEventClass and KAEGetURL from InternetConfig.h, requiring HIServices.bridgesupport. I had to upgrade to the BridgeSupport Preview 3 for the constants to be 'seen'

[MacRuby-devel] NSLocalizedString

2011-02-21 Thread Martin Hawkins
I'm taking a look at the Apple Sample code called PhotoSearch. In DateCell.m, there is a use of NSLocalizedString as follows: - (NSString *)todayString { return NSLocalizedString(@"Today", @"Today title string"); } I translated this as: def todayString return NSLocalizedString( "Today",

Re: [MacRuby-devel] BridgeSupport Requirement

2011-02-09 Thread Martin Hawkins
You are right. I don't know what I was thinking - I included the .bridgesupport files for the frameworks I was using but the problem lay outside that - as you say, in HIServices. I'll amend the build and try again and let you know the result. Thanks for persisting :) On Feb 9, 10:21 am, Laurent S

Re: [MacRuby-devel] BridgeSupport Requirement

2011-02-09 Thread Martin Hawkins
Laurent, Your suggestion didn't work. We've taken to defining the constants locally (it's KInternetEventClass KAEGetURL for NSAppleEventManager that are causing all this). I'm having difficulty testing this because I'm relying on a third party to do so - I had to upgrade both my iMac and Powerbook

Re: [MacRuby-devel] BridgeSupport Requirement

2011-02-08 Thread Martin Hawkins
Thank you for the replies. > > On 8/02/2011, at 10:50 PM, Laurent Sansonetti wrote: > > >> Hi Martin, > > >> There is a way: if you copy the .bridgesupport files of your system inside > >> your application's bundle, under the Resources/BridgeSupport directory, > >> MacRuby should look at them in

[MacRuby-devel] BridgeSupport Requirement

2011-02-08 Thread Martin Hawkins
I installed BridgeSupport Preview 3 in order to resolve some issues related to errors looking up constant values. The new BridgeSupport worked fine and the application I have been working runs fine. I have 'embedded' MacRuby so that it can be distributed but here I come unstuck. When run on a comp

[MacRuby-devel] Trying to use spotlight programmatically

2011-02-07 Thread Martin Hawkins
This is really beyond the remit of this group, but I thought I'd try here first as you guys are so helpful! I'm trying to use spotlight programmatically. I've downloaded the sample apps and used ideas from those - the code works fine in MacRuby. Where I'm coming unstuck is when I try to search ma

Re: [MacRuby-devel] MacRuby Book expectations

2011-02-04 Thread Martin Hawkins
Jean_Denis has obviously put a lot of thought into his post and I, for one, fully endorse eveything he says! I don't expect the Macruby book to tell me how to program in either Ruby or Objective-C, but I do expect it to tell me how about the specific issues that are involved with using Macruby. I'

[MacRuby-devel] How to detect Cylons with MacRuby

2011-01-30 Thread Martin Hawkins
I was just looking for info relating to debugging when I re-discovered this post. In it, there's a suggestion that somebody might work on XCode integration. Has there been any development around debugging? ___ MacRuby-devel mailing list MacRuby-devel@list

Re: [MacRuby-devel] Gems again; signing records

2011-01-29 Thread Martin Hawkins
It's great to see this discussion. As a developer, I just want to ‘require "bananas"’ and see it work. I come from a Rails background, so I know that gem dependencies can create all sorts of problems. As Macruby becomes more popular, these problems are going to become more apparent as the diversity

Re: [MacRuby-devel] Gems again; signing records

2011-01-28 Thread Martin Hawkins
t success. wrt CFUUID, that's helpful and I'll look at that. I was just looking at NSProcessInfo, which has a globallyUniqueString method. On Jan 28, 6:25 pm, Joshua Ballanco wrote: > On Fri, Jan 28, 2011 at 12:41 PM, Martin Hawkins > wrote: > > > In rb_main.rb > >

[MacRuby-devel] Gems again; signing records

2011-01-28 Thread Martin Hawkins
I know this has been asked before but his is driving me nuts.It' s been a frustrating day; I've been trying to use the UUID gem and have still not been able to 'require' it successfully. I have installed uuid using macgem and have unpacked it to a vendor directory, so I now have : vendor -- macadd

[MacRuby-devel] Test problem

2011-01-27 Thread Martin Hawkins
I have a Classes/Helpers/Constants.rb module . Several classes use it, so the following is common in my code:e.g # File: Record.rb require 'Constants' include Constants class Record end I have a test for Record.rb that worked prior to to my introduction of Constants: require 'test/unit' class Re

Re: [MacRuby-devel] Bizarre behaviour with an instance variable

2011-01-27 Thread Martin Hawkins
le as an instance variable, but as a local > variable. Hence the error “undefined local variable or method > `theProjectRoot'” :) > > If you change the block like this, all should be good: > >     map {|f| @theProjectRoot.stringByAppendingPathComponent(f) } >

[MacRuby-devel] Bizarre behaviour with an instance variable

2011-01-27 Thread Martin Hawkins
I find the following behaviour a little bizarre: At the macirb prompt (0.8) fileManager = NSFileManager.defaultManager @theProjectRoot = '/Users/martin/work/macruby/lots_of_files' => "/Users/martin/work/macruby/lots_of_files" >> filenames = fileManager.contentsOfDirectoryAtPath(@theProjectRoot, >>

Re: [MacRuby-devel] What's happened to Dispatch::Job?

2011-01-20 Thread Martin Hawkins
stions welcome tho. > > > I'd like to make sure people know when I push an update. I'm also thinking > > about offering a diff of the changes so one can easily see the > > modifications. > > > - Matt > > > On Thu, Jan 20, 2011 at 9:48 AM, Mart

Re: [MacRuby-devel] What's happened to Dispatch::Job?

2011-01-20 Thread Martin Hawkins
wrote: > Note that I also updated the book to reflect the change. > > - Matt > > Sent from my iPhone > > On Jan 20, 2011, at 8:07, "Ernest N. Prabhakar, Ph.D." > wrote: > > > > > > > Hi Martin, > > > On Jan 20, 2011, at 7:58 AM, Martin H

Re: [MacRuby-devel] What's happened to Dispatch::Job?

2011-01-20 Thread Martin Hawkins
gt;> but I guess it had the Job class as well since I also don't have it (using > >> a 0.9 nightly build). > > >> Someone who has better knowledge than me might be able to answer your > >> questions more thoroughly. > > >> Mark Rada > >>

[MacRuby-devel] What's happened to Dispatch::Job?

2011-01-20 Thread Martin Hawkins
I was looking at the short intro to GCD in Matt's book 'Macruby - The Definitive Guide' I have macruby 0.8 and I come across an immediate problem macirb --simple-prompt >> require 'dispatch' LoadError: no such file to load -- dispatch However, it knows about Dispatch: macirb --simple-prom

Re: [MacRuby-devel] BridgeSupport v2

2011-01-19 Thread Martin Hawkins
I've just applied Preview3 and the error has gone away - I've updated the ticket. My two questions about reverting to an earlier version of BridgeSupport and incorporating into the build process still hold however. On Jan 18, 1:24 pm, Martin Hawkins wrote: > Laurent, > I've

Re: [MacRuby-devel] BridgeSupport v2

2011-01-18 Thread Martin Hawkins
if you can, > please try to reduce the problem to a simple project and attach it to a new > ticket. We will investigate. > > At this point, regressions in the Cocoa support of MacRuby must be quickly > identified and fixed. > > Laurent > > On Jan 14, 2011, at 8:43 AM, Marti

[MacRuby-devel] BridgeSupport v2

2011-01-14 Thread Martin Hawkins
I installed the v2 Preview of BridgeSupport a couple of days ago to solve a particular problem with accessing constant values, which it did. I have now found that what was working code now seems to be broken - representedObject in a NSCell object consistently returns nil. I didn't expect the Bridge

Re: [MacRuby-devel] Custom URL scheme (again)

2011-01-11 Thread Martin Hawkins
Caio wins again! Thanks - I was sure I had tried that already. Need to be a bit more organised I think... Thanks again. On Jan 11, 4:49 pm, Caio Chassot wrote: > On 2011-01-11, at 14:30 , Martin Hawkins wrote: > > >   sharedAEManager.setEventHandler(self, >

[MacRuby-devel] Custom URL scheme (again)

2011-01-11 Thread Martin Hawkins
I went back to this today to take it a step further and found my way blocked - it seems to be a MacRuby thing because this is trivial to implement in Objective-C. This code is now: framework 'Cocoa' class AppDelegate def initialize registerExperimental @eventDescriptor = NSAppleEventDes

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
That seems to have fixed it! Many thanks to you all for your help. On Jan 10, 7:59 pm, Caio Chassot wrote: > Try installing the latest bridge support. > > http://bridgesupport.macosforge.org/trac/wiki/Releases > > On 2011-01-10, at 17:18 , Martin Hawkins wrote: > > >

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
/ enum { kInternetEventClass = 'GURL', kAEGetURL = 'GURL', kAEFetchURL = 'FURL', keyAEAttaching= 'Atch' }; On Jan 10, 7:18 pm, Martin Hawkins wrote: > Now that's inte

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
amework 'Cocoa' => true irb(main):004:0> KInternetEventClass NameError: uninitialized constant KInternetEventClass On Jan 10, 7:06 pm, Caio Chassot wrote: > On 2011-01-10, at 16:47 , Martin Hawkins wrote: > > > > > Excellent Caio - thanks. > > Now I'

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
hy that error has resurfaced. On Jan 10, 6:28 pm, Caio Chassot wrote: > On 2011-01-10, at 15:52 , Martin Hawkins wrote: > > > > > Thanks Matt, I've got the book but missed that point. > > Any suggestions re my second issue. i.e. translating the selector part > &

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
Joel, I've also got to change getURL to def getURL(event, returnEvent) # do something with event here to parse the url end so I go with your suggestion, I'm going to get 'wrong number of arguments (0 for 2)' On Jan 10, 5:59 pm, Joel Reymont wrote: > On Jan 10, 2

Re: [MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
380373/ch01.html#_constant_names > > - Matt > > On Mon, Jan 10, 2011 at 9:05 AM, Martin Hawkins > wrote: > > > > > I'm trying to create a custom URL scheme following the instructions > > herehttp://www.cocoadev.com/index.pl?HowToRegisterURLHandlerand in > >

[MacRuby-devel] Custom url scheme

2011-01-10 Thread Martin Hawkins
I'm trying to create a custom URL scheme following the instructions here http://www.cocoadev.com/index.pl?HowToRegisterURLHandler and in the Cocoa Scripting Guide p108. I've not been getting anywhere! I've got at least two problems here: (I'm running OS X 10.6.6 with MacRuby 0.8) # Attempt #1 # Ap

Re: [MacRuby-devel] Help with QT syntax

2009-09-07 Thread Martin Hawkins
Thanks. Murphy's Law said that I 'saw the light' as soon as I sent the message. Happily my solution was the same as the one you sent.Thanks for the Textmate tip. Martin 2009/9/7 John Labovitz > On 7 Sep 2009, at 9:45 AM, Martin Hawkins wrote: > > I've been going t

[MacRuby-devel] Help with QT syntax

2009-09-07 Thread Martin Hawkins
I've been going through the MyRecorder example in the QTKit Capture Programming Guide (which works fine) but am having problems with the MacRuby syntax for the following: - (void)captureOutput:(QTCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL