[MacRuby-devel] Interface builder

2012-02-08 Thread Dave Baldwin
Just got back to using MacRuby and trying to write an app. I use Textmate and rake to edit my code files and build an app and this works very well for me. With the earlier versions of IB you could just manually add the outlets and actions but I am at a loss as to how to do this in IB4 manually

Re: [MacRuby-devel] CNC Machine control using USB to IEEE 1284 Parallel port adapter

2012-01-18 Thread Dave Baldwin
Hi Bob, You don't really say what your final goal is so this may not suit your purpose. PC based CNC controllers are suck in the dark ages - not only for the GUI they present but in how they control the steppers via the printer port. They rely on low level Window's drivers to generate accurate

[MacRuby-devel] Progress towards 1.0?

2011-10-11 Thread Dave Baldwin
Hi, I have been away from MacRuby dev for about 6 months and I am looking to start again and I was wondering if it is still a viable development platform as development seems to have stalled. It has been a long time since the last release and looking back through the list archives I see Lauren

Re: [MacRuby-devel] Seeing errors in macrake

2011-08-25 Thread Dave Baldwin
Just use rake instead. I don't think macrake gives you anything rake doesn't do and rake has a much faster startup time. Dave. On 25 Aug 2011, at 17:12, Jeremy Smith wrote: > Is there a reason that macrake always exits so quietly on an error? macrake > -v doesn't seem to have any effect on t

Re: [MacRuby-devel] How do I get gems into XCode/MacRuby environment?

2011-04-14 Thread Dave Baldwin
I cannot help with the gems stuff but I am not sure if MacRuby supports Rails yet. It didn't a few releases ago and I don't recall anything in the more recent release notes about it. Dave. On 14 Apr 2011, at 06:44, Paul Davis wrote: > I'm past the Hello World tutorial, and want to try somethi

Re: [MacRuby-devel] is_a? method

2011-01-19 Thread Dave Baldwin
Have you tried kind_of? method, i.e. class AnArray < Array end a = AnArray.new a.kind_of? Arraywill return true a.kind_of? String will return false assuming I haven't miss understood your question. Dave. On 19 Jan 2011, at 21:06, Robert Rice wrote: >

Re: [MacRuby-devel] [MacRuby] #1112: Allowing pointers to be created and initialised directly with an integer

2011-01-15 Thread Dave Baldwin
Thanks, works a treat. Dave. On 13 Jan 2011, at 02:15, MacRuby wrote: > #1112: Allowing pointers to be created and initialised directly with an > integer > +--- > Reporter: dave.baldwin@… |Owner: lsa

Re: [MacRuby-devel] Vertex buffer objects in OpenGL

2011-01-12 Thread Dave Baldwin
Just to give an answer for anyone finding this later. On 21 Dec 2010, at 20:20, Dave Baldwin wrote: > I have an openGL program that works if I use vertex arrays to store the > geometry data, but if I convert it to use an openGL vertex buffer object then > nothing is drawn. Has a

[MacRuby-devel] Initializing Pointer.new with specific value

2011-01-10 Thread Dave Baldwin
In OpenGL some functions take pointers and these are easily handled via v = Pointer.new('f', 20) glVertexPointer(3, GL_FLOAT, 3, v) (the C prototype is void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); however in some cases this function has been over

[MacRuby-devel] Vertex buffer objects in OpenGL

2010-12-21 Thread Dave Baldwin
I have an openGL program that works if I use vertex arrays to store the geometry data, but if I convert it to use an openGL vertex buffer object then nothing is drawn. Has anyone got vertex buffer objects to work with MacRuby? I am using 0.8 on 10.6.4 (In OpenGL a vertex buffer object just ho

Re: [MacRuby-devel] converging for 1.0

2010-12-03 Thread Dave Baldwin
You don't need XC3 or XC4 to develop MacRuby - it can all be done with any editor and the command line. Using rake files makes it very easy. Look in the MacRuby sample code for Sketch and you will find an example rake file to do everything XC would do for you wrt MacRuby. Dave. On 3 Dec 2010

Re: [MacRuby-devel] Launch an app from the command line

2010-10-17 Thread Dave Baldwin
On 18 Oct 2010, at 00:49, corey johnson wrote: > On Sat, Oct 16, 2010 at 11:46 AM, Dave Baldwin > wrote: >> Assuming you have a valid app then >> >> open name.app > > That is where I'm running into problems. How do I compile my app into > a .app file with

Re: [MacRuby-devel] Launch an app from the command line

2010-10-16 Thread Dave Baldwin
On 16 Oct 2010, at 19:04, corey johnson wrote: > I'm trying to figure out how to launch a macruby app (with a cocoa UI) > from the command line without relying on xcode or xcodebuild. The > problem i'm running into is that the NSBundle.mainBundle is not being > set when I run the app from the com

Re: [MacRuby-devel] MacRuby port of Sketch sample

2010-08-17 Thread Dave Baldwin
it would be very > helpful. Done. Dave. > > Laurent > > On Aug 16, 2010, at 1:29 PM, Dave Baldwin wrote: > >> Hi Laurent. >> >> Thanks for the kind words. >> >> Just added a rakefile to the project so it can be build without using xcode. >

Re: [MacRuby-devel] MacRuby port of Sketch sample

2010-08-16 Thread Dave Baldwin
github version that you would like to see backported in the MacRuby > repository at some point. > > Thanks a lot for working on this. I think it will be very informative for > people to be able to compare this version with the Objective-C variant. > > Laurent > > On

[MacRuby-devel] MacRuby port of Sketch sample

2010-08-02 Thread Dave Baldwin
I have completed porting the Apple sample "Sketch" to MacRuby and it can be found here: http://github.com/davebaldwin/Ruby-Sketch As far as I can tell it behaves in an identical way to the original Sketch example (excluding scripting support). I am happy for this to become part of the MacRuby

[MacRuby-devel] NSKVONotifying_ proxy class

2010-07-29 Thread Dave Baldwin
I am trying to find the class name of a KVO compliant class I have created (called test below). I am assuming that MacRuby inserts a proxy class in front of my class to implement the KVO protocol. How do I get the name of my original class? puts test.class gives some class reference address

Re: [MacRuby-devel] Building Cocoa Apps with MacRuby

2010-06-19 Thread Dave Baldwin
Hi Dan, Good writeup. I basically do as Michael Jackson has described, but with Textmate. I would also like to dispense with XCode. I have moved away from Hot Cocoa as it seems to be dead or unloved, but also found IB much easier to use in the end. Looking at the rakefile in your Touchstone

Re: [MacRuby-devel] NSLocaliszed* functions missing

2010-05-20 Thread Dave Baldwin
> > You can call the localize method directly by using something like: > >NSBundle.mainBundle.localizedStringForKey('key', value:'value', > table:'table'). > > HTH, > Ed > > On May 19, 2010, at 9:25 AM, Dave Baldwin wrote: &

[MacRuby-devel] NSLocaliszed* functions missing

2010-05-19 Thread Dave Baldwin
With macruby 0.6 when I try and use NSLocalizedStringFromTable I get the following: ~> macirb irb(main):001:0> framework 'cocoa' => true irb(main):002:0> NSLocalizedStringFromTable('', '', '') NoMethodError: undefined method `NSLocalizedStringFromTable' for main:TopLevel from /Users/dave/

Re: [MacRuby-devel] Using a context with addObserver

2010-05-18 Thread Dave Baldwin
later. > > I'm not familiar with the API you are using but it seems very uncommon to > pass constants as context arguments to alter behaviors. Maybe there is > another way to do what you want? > > Laurent > > On May 17, 2010, at 2:25 AM, Dave Baldwin wrote: > >

Re: [MacRuby-devel] Using a context with addObserver

2010-05-17 Thread Dave Baldwin
Digging a bit more I think a solution to my own questions is: On 13 May 2010, at 14:33, Dave Baldwin wrote: > I am trying to translate code that looks like this: > > static NSString *SKTWindowControllerCanvasSizeObservationContext = > @"com.apple.SKTWindowController.canvasSize

[MacRuby-devel] Using a context with addObserver

2010-05-13 Thread Dave Baldwin
I am trying to translate code that looks like this: static NSString *SKTWindowControllerCanvasSizeObservationContext = @"com.apple.SKTWindowController.canvasSize"; and later [[self document] addObserver:self forKeyPath:SKTDocumentCanvasSizeKey options:NSKeyValueObservingOptionNew context:SKTW

[MacRuby-devel] Accessing objc methods aliased by ruby methods

2010-05-06 Thread Dave Baldwin
For example, the method 'class' is present in objective C as well as in Ruby but invoking obj.class will use the Ruby version How do I force the objc version to be used instead? Obviously if the two version do the same thing then this is a moot issue but if they do different things you may nee

Re: [MacRuby-devel] How to stop observing

2010-04-29 Thread Dave Baldwin
that. Make sure you do not insert > "self" anywhere it could be "referenced" by a write barrier. > > HTH, > Laurent > > On Apr 29, 2010, at 11:33 AM, Dave Baldwin wrote: > >> A common design pattern in cocoa seems to be to have a objc method

[MacRuby-devel] How to stop observing

2010-04-29 Thread Dave Baldwin
A common design pattern in cocoa seems to be to have a objc method along the lines: - (void)dealloc { // Stop observing the tool palette. [[NSNotificationCenter defaultCenter] removeObserver:self name:SKTSelectedToolDidChangeNotification object:[SKTToolPaletteController sharedToolP

Re: [MacRuby-devel] Size of the apps

2010-04-15 Thread Dave Baldwin
On 14 Apr 2010, at 19:47, Daniel Lopes wrote: > Ops, sorry... small typo == isn't a big issue. Nobody cares for 10mb or 30mb > today. I disagree strongly. I have not downloaded apps because their size seems way out of kilter with the functionality they offer. Who wants to support gratuitous

Re: [MacRuby-devel] HotCocoa, Snow Leopard and MacRuby trunk

2009-09-03 Thread Dave Baldwin
I'm currently working on IO stuff and sockets and I confirm that macrake is broken because of this (though all the specs pass). If you go back in time for a few revisions it should work. I committed that yesterday night, so be patient. Laurent On Sep 3, 2009, at 5:49 AM, Dave Baldwin

[MacRuby-devel] HotCocoa, Snow Leopard and MacRuby trunk

2009-09-03 Thread Dave Baldwin
I have just upgraded to Snow Leopard and found MacRuby 0.4 didn't work. Upgraded to the latest trunk using the instructions found here: http://redartisan.com/2009/9/1/macruby-intro Having done this I cannot run some of the HotCocoa examples. For calculato, layout_view and hotconsole doing

Re: [MacRuby-devel] That bus error: Reproducible and with all gl calls!

2009-05-05 Thread Dave Baldwin
On 5 May 2009, at 00:17, Vincent Isambart wrote: I also reproduce this on the experimental branch, and it's crashing inside OpenGL. Maybe something needs to be done first, before calling OpenGL? I know it's working nice inside a Cocoa application context. I reproduce the same crash wi

Re: [MacRuby-devel] HotCocoa table_view and the doubleAction

2009-04-01 Thread Dave Baldwin
Quoting John Shea : > Hi Dave, > > I am actually wrestling with a similar problem. > > I believe I have solved your problem, maybe you can solve mine ;-) ?? > > in the start method I placed: >@my_table_view.setTarget(self) >@my_table_view.setDoubleAction(:double) > > > and th

[MacRuby-devel] HotCocoa table_view and the doubleAction

2009-04-01 Thread Dave Baldwin
I am having some difficulty on getting the double click action to work with a table view. I have code along the lines of: @tableView = table_view( :columns => [column(:id => :item, :title => '')],

Re: [MacRuby-devel] Memory allocation problem

2009-02-14 Thread Dave Baldwin
On 14 Feb 2009, at 09:18, Dave Baldwin wrote: Hi Laurent, Tried registering a couple of times but no registration email has arrived and log in failed. I am just about to go on vacation for a week (to France!) so I'll have to look into it when I get back, unless you would be so ki

Re: [MacRuby-devel] Memory allocation problem

2009-02-14 Thread Dave Baldwin
4 Feb 2009, at 01:08, Laurent Sansonetti wrote: Hi Dave, Could you file a bug on the tracker regarding this problem? Thanks in advance, Laurent On Feb 13, 2009, at 5:51 AM, Dave Baldwin wrote: Here is a simple test case to show the problem. macirb >> str = [10].pack('N').unpack

[MacRuby-devel] Memory allocation problem

2009-02-13 Thread Dave Baldwin
Here is a simple test case to show the problem. macirb >> str = [10].pack('N').unpack('g')[0].to_s macruby(29176,0x7fff70513720) malloc: *** free() called with 0x8004a5c60 with refcount 0 macruby(29176,0x7fff70513720) malloc: reference count underflow for 0x8004a5c60, break on auto_refcount_u

[MacRuby-devel] Hot Cocoa disappearing window behaviour

2009-02-12 Thread Dave Baldwin
It seams like the default behaviour of windows generated in Hot Cocoa is to allow their content height to be shrunk to zero (by dragging the lower right corner). At which time you are left with just the title bar and no way to recover once you have released the mouse button (AFAIK). A min

Re: [MacRuby-devel] Framework callbacks in macirb

2009-02-09 Thread Dave Baldwin
On 9 Feb 2009, at 04:28, Robert Schaaf wrote: Tedd, To quote Ogden Nash, I'm a stranger here myself. I agree about objective-c; it's notationally unattractive. It seems to be an uncomfortable hybrid, despite the power of the object model. The only appreciable Ruby code I've written is a

Re: [MacRuby-devel] Problems compiling MacRuby

2009-01-30 Thread Dave Baldwin
. Thanks, Dave. # I am considering rewriting the extensions build system to avoid this kind of problems, but this won't be in 0.4. Laurent On Jan 19, 2009, at 2:42 PM, Dave Baldwin wrote: On 19 Jan 2009, at 21:34, Dave Baldwin wrote: I get the same error from trunk or testing version

Re: [MacRuby-devel] Problems compiling MacRuby

2009-01-19 Thread Dave Baldwin
On 19 Jan 2009, at 21:34, Dave Baldwin wrote: I get the same error from trunk or testing versions. I have in the past downloaded readline from macports, but the /opt directory isn't in my path. Any ideas what is wrong with my setup? PS. When will we see version 0.4? Thanks,

[MacRuby-devel] Problems compiling MacRuby

2009-01-19 Thread Dave Baldwin
I get the same error from trunk or testing versions. I have in the past downloaded readline from macports, but the /opt directory isn't in my path. Any ideas what is wrong with my setup? PS. When will we see version 0.4? Thanks, Dave. gcc -I. -I../../.ext/include/universal-darwin9.0 -I.