Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Port of Apple's Sketch sample to MacRuby
Ruby Objective-C
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
English.lproj
Ruby Sketch.xcodeproj
Arrow.tiff
Circle.tiff
Cross.tiff
Draw2App.icns
Draw2File.icns
Info.plist
InfoPlist.strings
Line.tiff
README
Rakefile
ReadMe.rtf
Rectangle.tiff
SKTAppDelegate.rb
SKTCircle.rb
SKTDocument.rb
SKTError.rb
SKTGraphic.rb
SKTGraphicView.rb
SKTGrid.rb
SKTImage.rb
SKTLine.rb
SKTObserver.rb
SKTRectangle.rb
SKTRenderingView.rb
SKTText.rb
SKTToolPaletteController.rb
SKTWindowController.rb
SKTZoomingScrollView.rb
Sketch.scriptSuite
Sketch.sdef
TextGraphic.tiff
main.m
rb_main.rb

README

This is a port of the Apple sample program "Sketch" to MacRuby.  It is based on the version of Sketch shipped as part to the developer tools for Snow Leopard.  

The MacRuby version closely follows the Objective C version  with the following differences:

1. Ruby idioms have been used where this made sense.

2. Proxy objects have been used as observers.  The ObjC Sketch uses the objects directly and then uses the context parameter to select the appropriate response in a large switch statement.  Apart from being ugly the context parameters was set to the address of a static unique static string for the relevant classes and this doesn't translate nicely to Ruby.

3. The script support has been stripped out.

I am adding in no licensing, copying or use restrictions.  This is unsupported code and you use at your own risk.  Apple's licensing restrictions still apply.

The xcode project can be used to build and run Ruby-Sketch as normal.  If you prefer not to use xcode then  the Rakefile can be used to build and run the app.  This works with macrake as well as rake.

Dave Baldwin.
Something went wrong with that request. Please try again.