[MacRuby-devel] Xcode 4.2/IB and MacRuby: Works!

2011-10-19 Thread steve ross
In case nobody was watching… So, today I downloaded Xcode 4.2, hoping IB would recognize outlets and actions in MacRuby classes. I also downloaded the newest version of MacRuby (0.12) from the nightly builds. Now, my outlets and actions (as defined in my Ruby classes) are recognized in IB. Hur

[MacRuby-devel] XCode 4 -- I Must Be Missing Something

2011-04-04 Thread steve ross
I was using XCode 3 and everything was a breeze, but a new MacRuby project in XCode 4 seems like pulling teeth. I'm sure someone has run across this, so I'll ask. I read Matt's chapter on XCode 4, read the redwoodapp.posterous.com article on setting the targets, and can get the thing to run and

Re: [MacRuby-devel] testing?

2010-07-09 Thread steve ross
iCuke seems promising, but it is for iPhone dev [http://github.com/unboxed/icuke]. Probably could be repurposed for general Cocoa development. Bacon works, but I've found it more helpful for unit tests -- headless testing. In an automated sense, like 'rake test', there just isn't an analogous b

[MacRuby-devel] Mapping of Objective-C Blocks to MacRuby

2010-05-12 Thread steve ross
I was thinking syntax like: open_panel = NSOpenPanel.openPanel open_panel.beginSheetModalForWindow(@main_window, completionHandler:lambda{|arg| "Yo, open file and user arg is #{arg}") would be pretty sensible. But it seems not to be. Any hints? __

Re: [MacRuby-devel] political rumination

2010-04-10 Thread steve ross
get. Just my $.02 > On Apr 9, 2010, at 11:16 PM, steve ross wrote: > >> I don't know whether anyone will provide a rationale for the contract >> language, but here's an interesting analysis of it: >> >> http://daringfireball.net/2010/04/why_apple_cha

Re: [MacRuby-devel] political rumination

2010-04-09 Thread steve ross
itter have jumped on this contract language as a stupid and/or selfish call. I just don't know. Steve Ross On Apr 9, 2010, at 10:23 PM, Matthew Winter wrote: > > Hi, > > I asked the same question via Twitter, however I do not expect to get an > answer at this stage. >

[MacRuby-devel] EXC_BAD_ACCESS When Reopening NSDate

2010-02-06 Thread steve ross
This code creates an EXC_BAD_ACCESS error: class NSDate def to_s NSLog "#{__LINE__} NSDate#to_s %@", self 'hello' end end NSDate.date.to_s If I change the NSLog statement to: NSLog "#{__LINE__} NSDate#to_s hello" Then I get the log entry and no EXC_BAD_ACCESS. Any idea what's caus

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
unarchiving the file, which uses the NSCoder methods. Most of the time > if you need to do custom configuration on an object instantiated from > a nib file, you should probably do that in -awakeFromNib. However, if > for some reason you really need to do something during object > initializa

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
So that confirms my suspicion. It's not so much a MacRuby thing as a Cocoa thing. I just don't see how to set an initial state in a class that's instantiated when a nib is loaded. I don't do the alloc.initWithWhatever. On the previous subject though, adding super/self does not cause the initiali

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
extField.alloc.init > > - Matt > > > On Thu, Jan 21, 2010 at 3:20 PM, steve ross wrote: > I'm sure this is an elementary question, but I have the class below. In IB, I > set several NSTextField controls to this class. Everything works in the blah, > blah, blah p

[MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
I'm sure this is an elementary question, but I have the class below. In IB, I set several NSTextField controls to this class. Everything works in the blah, blah, blah part, but strangely enough the puts "initialize dctf" never seems to be called. Any thoughts as to why? require 'strings' cla

Re: [MacRuby-devel] GCD and NSURLConnection

2010-01-18 Thread steve ross
tweak some of the > parameters, depending on your machine) I think you'll find a fun error > message that indicates this is definitely a MacRuby bug. :-) > > Cheers, > > Josh > > > On Jan 17, 2010, at 10:25 PM, steve ross wrote: > >> But... both exam

Re: [MacRuby-devel] GCD and NSURLConnection

2010-01-17 Thread steve ross
But... both examples show multiple threads accessing a single instance variable without taking any precautions to make the access atomic. Could it be that kind of concurrency issue? Steve On Jan 17, 2010, at 6:01 PM, Joshua Ballanco wrote: > > Hey Darin, > > Looks like you're hitting https://

Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-12 Thread steve ross
def reverseTransformedValue(value) > new_val = value.to_f > end > end > > HTH, > John > > On Jan 12, 2010, at 7:33 PM, steve ross wrote: > >> On Jan 11, 2010, at 11:13 AM, isaac kearse wrote: >>> Looks like you're bypassing the to

Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-12 Thread steve ross
/MacRuby-Array-Cocoa-Array-Binding.git That's both MacRuby and Objective-C. Any pointers to my blind spot are appreciated :) Steve > On Tue, Jan 12, 2010 at 6:41 AM, steve ross wrote: > I wrote a simple controller that binds to an NSTableView. In the tableview, a > column has a

Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-12 Thread steve ross
/MacRuby-Array-Cocoa-Array-Binding.git That's both MacRuby and Objective-C. Any pointers to my blind spot are appreciated :) Steve > On Tue, Jan 12, 2010 at 6:41 AM, steve ross wrote: > I wrote a simple controller that binds to an NSTableView. In the tableview, a > column has a

Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-11 Thread steve ross
? > > Cheers, > Isaac > > On Tue, Jan 12, 2010 at 6:41 AM, steve ross wrote: > I wrote a simple controller that binds to an NSTableView. In the tableview, a > column has an NSNumberFormatter (in IB), but the column is what's bound. It's > bound to Ligh

[MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-11 Thread steve ross
I wrote a simple controller that binds to an NSTableView. In the tableview, a column has an NSNumberFormatter (in IB), but the column is what's bound. It's bound to LightboxController.managedObjects:number. The managedObjects collection contains a collection of Lightbox objects, that have a numb

Re: [MacRuby-devel] Would a macruby-newbie List Be Worthwhile?

2009-12-16 Thread steve ross
On Dec 16, 2009, at 1:07 AM, John Shea wrote: > > The second part, filling with data (presumably you will only need to do this > once, because then the data can be saved with the app). > There are many ways to add data. > > The easiest I reckon, is to add a method to the AppDelegate - called >

Re: [MacRuby-devel] Would a macruby-newbie List Be Worthwhile?

2009-12-15 Thread steve ross
Thanks for your feedback... On Dec 15, 2009, at 4:19 PM, Ernest N. Prabhakar, Ph.D. wrote: > > Hi "S", Point taken :) >> Would a newbie list be worth creating? > > I would encourage you to just go ahead and ask on this list, for several > reasons: > > a) The people who would answer are here,