[MacRuby-devel] Help with QT syntax

John Labovitz johnl at johnlabovitz.com
Mon Sep 7 09:58:12 PDT 2009


On 7 Sep 2009, at 9:45 AM, Martin Hawkins wrote:

> 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
>    forConnections:(NSArray *)connections
>    dueToError:(NSError *)error


I don't see anything tricky here that would make this difficult to  
implement in MacRuby:

	def captureOutput(captureOutput, didFinishRecordingToOutputFileAtURL:  
outputFileURL, forConnections: connections, dueToError: error)
		...
	end

(Note that I cheated here: I copied the ObjC method signature and used  
TextMate's "m<tab>" function to automatically convert it to MacRuby!)

--John


More information about the MacRuby-devel mailing list