Re: [MacRuby-devel] MacRuby promise delivered

2011-11-25 Thread Michael Johnston
ding source after modifications > if it spans a few lines. > > Hope this is of interest to some. Thanks Eloy and others. > > > On 25 Nov 2011, at 01:28, Michael Johnston wrote: > >> Thanks Eloy. I was playing with Interactive-MacRuby a bit last night. >> >>

Re: [MacRuby-devel] MacRuby promise delivered

2011-11-24 Thread Michael Johnston
level object. I was trying to figure out how to make it indent code as it is typed which irb does. Any thoughts on that? Cheerio, Michael Johnston lastobe...@mac.com On 2011-11-24, at 2:13 PM, Eloy Duran wrote: > Here’s a GUI approach to using macirb: > https://github.com/alloy/Inter

Re: [MacRuby-devel] MacRuby promise delivered

2011-11-23 Thread Michael Johnston
o any window with a running macirb in it whose top-level context is the window controller for that window. That might be actually fairly easy to do. Cheerio, Michael Johnston lastobe...@mac.com On 2011-11-15, at 10:01 AM, Jean-Denis MUYS wrote: > Following up on my Friday suggestion, I

Re: [MacRuby-devel] How to Configure Xcode to Run Test in MacRuby Project?

2011-11-04 Thread Michael Johnston
also just run xcodebuild every time from spechelper, but this slows things down a bit. The one thing that is annoying about this setup is that navigating to the run script build phase log when building the test framework is cumbersome. Cheerio, Michael Johnston lastobe...@mac.com On 2011-10-31,

Re: [MacRuby-devel] locals & dispatch: is using a pointer the best practice?

2011-10-22 Thread Michael Johnston
gt; nil check can I change a local scalar? nope => nil check_p can I assign to a pointer? yep => nil check_w can I assign to a wrapper attr? yep => nil Cheerio, Michael Johnston lastobe...@mac.com On 2011-10-22, at 12:32 AM, Joshua Ballanco wrote: > On Saturday, October 22

Re: [MacRuby-devel] thread-safety and collections in macruby

2011-10-21 Thread Michael Johnston
Thanks, I am using: results = NSArray.arrayWithArray(worker_results) which although it reports true for is_a?(NSMutableArray) is immutable. Cheerio, Michael Johnston lastobe...@mac.com On 2011-10-20, at 3:47 PM, terl wrote: > Just a note to the original question > >

[MacRuby-devel] locals & dispatch: is using a pointer the best practice?

2011-10-21 Thread Michael Johnston
ue.sync do result_p.assign(value_protected_by_queue) end result = result_p[0] it's not very ruby-ish... Cheerio, Michael Johnston lastobe...@mac.com On 2011-01-26, at 2:50 PM, Laurent Sansonetti wrote: > On Jan 26, 2011, at 12:49 AM, Charles Oliver Nutter wrote: >> On Mon, Jan 24,

Re: [MacRuby-devel] thread-safety and collections in macruby

2011-10-21 Thread Michael Johnston
each iteration takes, but results are random, I will test the idea of using a lazy lock, where the worker collects results in an array only the worker accesses and dumps them to the array the UI updater can access every X times through the loop (or by time, if that benchmarks better). Cheerio, M

Re: [MacRuby-devel] thread-safety and collections in macruby

2011-10-18 Thread Michael Johnston
Note, in my example I can also guarantee that none of the elements in b are going to be changed (for example, an array of strings) Cheerio, Michael Johnston lastobe...@mac.com On 2011-10-18, at 10:17 PM, Michael Johnston wrote: > In ObjC, the immutable collections are threadsafe. >

[MacRuby-devel] thread-safety and collections in macruby

2011-10-18 Thread Michael Johnston
threads (queued operations/blocks)? also, is there any difference between doing b = a.dup and b = NSArray.arrayWithArray(a) Both result in class Array, so I assume there is no difference. Cheerio, Michael Johnston lastobe...@mac.com

Re: [MacRuby-devel] Build problems

2010-03-01 Thread Michael Johnston
/usr/local/include/llvm/Instruction.h:51: note: candidates are: llvm::Instruction* llvm::Instruction::clone() const lipo: can't figure out the architecture type of: /var/folders/Qi/QiwLLAwKFdeRSa7pt-+7tk+++TI/-Tmp-//ccJVfimM.out rake aborted! Command failed with status (1): [/usr/bin/g++ -I/u

Re: [MacRuby-devel] problems implementing a NSEntityMigrationPolicy? (fixed)

2010-01-28 Thread Michael Johnston
same. Cheerio, Michael Johnston lastobe...@mac.com On 27-Jan-10, at 10:35 PM, Michael Johnston wrote: Hi, I'm having trouble implementing a NSEntityMigrationPolicy. Has anyone used subclasses of NSEntityMigrationPolicy in macruby successfully? I've narrowed it down to th

[MacRuby-devel] problems implementing a NSEntityMigrationPolicy?

2010-01-27 Thread Michael Johnston
manager: (NSMigrationManager*)manager error:(NSError**)error { return YES; } }}} Is there any way to get more detail on how/why it is failing? Cheerio, Michael Johnston lastobe...@mac.com _

[MacRuby-devel] is there a way to use ruby namespaces in IB?

2010-01-27 Thread Michael Johnston
f the two (doesn't seem to depend on require order) Is there any way to use ruby namespacing with classes that are to be referred to in IB or passed to Objective C methods? Cheerio, Michael Johnston lastobe...@mac.com ___ MacRuby-devel mai

[MacRuby-devel] NSAssert equivalent in MacRuby?

2010-01-11 Thread Michael Johnston
Hi, Is there an equivalent of the NSAssert macro in MacRuby? Thanks, Michael Johnston lastobe...@mac.com ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

[MacRuby-devel] handling void pointers in callbacks

2010-01-09 Thread Michael Johnston
1-08 23:44:49.580 GrokkingRecipesRuby[34059:10b] expected instance of Pointer of type `v', got `@' }}} I tried assigning my object to a Pointer.new('^v') and Pointer.new(:uchar) but this also caused type errors. is there any workaround for this? Cheerio, Micha

Re: [MacRuby-devel] Behaviour when local variables pointing to non-auto-retained objects go out of scope?

2010-01-06 Thread Michael Johnston
status_item as a local, which should go out of scope when applicationDidFinishLaunching finishes, if I put a "sleep 1" at the end of applicationDidFinishLaunching, the status item never disappears (or at least it hasn't after much more than 1 second) Cheerio, Michael Johnst

Re: [MacRuby-devel] Behaviour when local variables pointing to non-auto-retained objects go out of scope?

2010-01-05 Thread Michael Johnston
le though. Cheerio, Michael Johnston lastobe...@mac.com On 5-Jan-10, at 1:30 AM, Michael Johnston wrote: I just purchased the book Programming Cocoa with Ruby, and am working through the examples using Macruby. This tiny app works fine in rubycocoa, but in macruby the created statusb

[MacRuby-devel] Behaviour when local variables pointing to non-auto-retained objects go out of scope?

2010-01-05 Thread Michael Johnston
not sure whether there is a bug or not. In general, what is the intended behaviour of Macruby with local variables referring to objects that would have to be retained in obj C when said variables go out of scope? Cheerio, Michael Johnston lastobe...@mac.com __

Re: [MacRuby-devel] Some OpenGL sample code

2009-12-19 Thread Michael Johnston
has more code than the tutorial does). Feel free to put this on the samples page as well. Cheerio, Michael Johnston lastobe...@mac.com On 18-Dec-09, at 2:41 PM, Laurent Sansonetti wrote: Bonjour Julien, On Dec 18, 2009, at 4:54 AM, Julien Jassaud wrote: Hello to everyone, I tried to

Re: [MacRuby-devel] mangled range param in NSString#getLineStart:end:contentsEnd:forRange:

2009-12-11 Thread Michael Johnston
e param in NSString#getLineStart:end:contentsEnd:forRange: Message-ID: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Hi Michael, This could be another ABI calling problem. What architecture are you running? Laurent On Dec 9, 2009, at 2:25 PM, Michael John

[MacRuby-devel] mangled range param in NSString#getLineStart:end:contentsEnd:forRange:

2009-12-09 Thread Michael Johnston
x: 6 range: {0, 4294995796} 2009-12-09 14:22:11.490 seeqr[11372:10b] *** -[NSBigMutableString _getBlockStart:end:contentsEnd:forRange:stopAtLineSeparators:]: Range or index out of bounds Am I missing something obvious? Thanks, Michael Johnston lastobe...@mac.com ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel