Re: [MacRuby-devel] BridgeSupport question

2010-01-11 Thread Carlo Zottmann
2010/1/11 Matt Aimonetti :
> That seems to be a bridgesupport bug to me :( I also encountered some issues
> and I think someone is looking into it.

Ah, crud. Well, thanks for looking into it. At least I can be fairly
sure I didn't screw up somehow. ;)

C.


-- 
Carlo Zottmann
Munich, Germany.  --  http://carlo.zottmann.org

TwerpScan -- Anti-Fool Twitter Contact Management Tool. http://twerpscan.com/
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #548: The flip-flop operator

2010-01-11 Thread MacRuby
#548: The flip-flop operator
-+--
 Reporter:  eloy.de.en...@…  |   Owner:  martinlagarde...@…
 Type:  defect   |  Status:  new   
 Priority:  trivial  |   Milestone:
Component:  MacRuby  |Keywords:
-+--
 MRI supports the flip-flop operator, MacRuby doesn't yet compile it I've
 added a test_vm testcase here:
 http://github.com/masterkain/macruby/blob/master/test_vm/conditional.rb#L54

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #549: Class variables are not initialised properly.

2010-01-11 Thread MacRuby
#549: Class variables are not initialised properly.
-+--
 Reporter:  sorin.ione...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:  class, instance  
-+--
 The mime-types gem has a class and an instance interface. The class
 interface uses an instance of itself. However, it doesn’t work in MacRuby.
 It does not seem to be initialised properly. I have included in a sample
 code with the expected behaviour. Changing @__types__ to @@__types__ will
 not fix it.

 #!/usr/bin/env macruby

 class Test
   def initialize()
 @foo = true
   end

   def add(something)
 puts "Is foo nil: #[email protected]?}"
   end

   @__types__ = self.new()

   def self.add(something)
 @__types__.add(something)
   end
 end

 t = Test.new
 t.add(3)
 Test.add(4)

 Output (MacRuby 0.5)
 Is foo nil: false
 Is foo nil: true

 Expected (Ruby 1.9.1/1.8.7)
 Is foo nil: false
 Is foo nil: false

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #549: Class variables are not initialised properly.

2010-01-11 Thread MacRuby
#549: Class variables are not initialised properly.
-+--
 Reporter:  sorin.ione...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:  class, instance  
-+--

Comment(by sorin.ione...@…):

 Trac totally butchered the code sample.
 DISREGARD IT AND SEE ATTACHMENT INSTEAD.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[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 number 
(Fixnum, when examined) and a title (string). The title displays fine, but the 
number always displays as 1. Changing the number field to a string and removing 
the NSNumberFormatter produces the correct display, but of course, the sort 
order is string ordering rather than numeric.

Here is the code. Can anyone tell me what I'm missing here?

https://gist.github.com/5d490492a814eccd26b2

Thx,

Steve


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-11 Thread isaac kearse
Looks like you're bypassing the to_i conversion of @number by calling
instance_variable_set directly, but I'd guess that the problem is somewhere
else in the app.
Any chance you could put the whole thing up on github?

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 LightboxController.managedObjects:number. The managedObjects
> collection contains a collection of Lightbox objects, that have a number
> (Fixnum, when examined) and a title (string). The title displays fine, but
> the number always displays as 1. Changing the number field to a string and
> removing the NSNumberFormatter produces the correct display, but of course,
> the sort order is string ordering rather than numeric.
>
> Here is the code. Can anyone tell me what I'm missing here?
>
> https://gist.github.com/5d490492a814eccd26b2
>
> Thx,
>
> Steve
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #531: make #[] an alias for #objectForKey

2010-01-11 Thread MacRuby
#531: make #[] an alias for #objectForKey
-+--
 Reporter:  mattaimone...@…  |Owner:  martinlagarde...@…
 Type:  defect   |   Status:  closed
 Priority:  blocker  |Milestone:  MacRuby 0.5   
Component:  MacRuby  |   Resolution:  fixed 
 Keywords:   |  
-+--
Changes (by martinlagarde...@…):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 Implemented in r3244 :-)

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Cocoa Binding to NSArrayController

2010-01-11 Thread steve ross
On Jan 11, 2010, at 11:13 AM, isaac kearse wrote:
> Looks like you're bypassing the to_i conversion of @number by calling 
> instance_variable_set directly, but I'd guess that the problem is somewhere 
> else in the app.
> Any chance you could put the whole thing up on github?
> 
> 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 LightboxController.managedObjects:number. The managedObjects 
> collection contains a collection of Lightbox objects, that have a number 
> (Fixnum, when examined) and a title (string). The title displays fine, but 
> the number always displays as 1. Changing the number field to a string and 
> removing the NSNumberFormatter produces the correct display, but of course, 
> the sort order is string ordering rather than numeric.
> 
> Here is the code. Can anyone tell me what I'm missing here?
> 
> https://gist.github.com/5d490492a814eccd26b2
> 
> Thx,
> 
> Steve


Thanks for the reply and sorry for the delay. I created a simple Xcode project 
and it must be something I'm doing...

http://github.com/sxross/MacRuby-Array-Cocoa-Array-Binding/fast_forward___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #550: TypeError: unrecognized runtime type when using NSThread.alloc.initWithTarget

2010-01-11 Thread MacRuby
#550: TypeError: unrecognized runtime type when using
NSThread.alloc.initWithTarget
-+--
 Reporter:  mattaimone...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--
 {{{
 >> framework 'Foundation'
 => true
 >> thread = NSThread.alloc.initWithTarget(self, selector:'sleep:',
 object:'5')
 TypeError: unrecognized runtime type `'
 }}}

 Doing:

 {{{
 framework 'Foundation'

 class ExpensiveCalculation
   def start(to_process)
 puts "processing on a separate thread"
 exit
   end
 end

 calculation = ExpensiveCalculation.new
 thread = NSThread.alloc.initWithTarget(calculation, selector:'start:',
 object:'dummy_obj')
 thread.start
 }}}

 Works fine tho.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #551: NSThread.alloc.initWithTarget segfaulting

2010-01-11 Thread MacRuby
#551: NSThread.alloc.initWithTarget segfaulting
-+--
 Reporter:  mattaimone...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--
 I can't seem to get the same stack trace twice, here is the code:

 {{{
 framework 'Foundation'

 class ExpensiveCalculation
   def start(to_process)
 loop{ print '*' }
   end
 end

 calculation = ExpensiveCalculation.new
 thread = NSThread.alloc.initWithTarget(calculation, selector:'start:',
 object:'dummy_obj')
 thread.start

 1.upto(10_000) do
   print '.'
 end

 thread.dummy
 exit
 }}}

 Disabling the GC makes the crash even more obvious.

 example of a stack trace:

 {{{
 Stack dump:
 0.  Running pass 'Global Value Numbering' on function '@__ruby_scope3'

 objc[14056]: garbage collection is ON

 Thread 0:  Dispatch queue: com.apple.main-thread
 0   libmacruby.dylib0x000100506bc3
 llvm::RegsForValue::getCopyToRegs(llvm::SDValue, llvm::SelectionDAG&,
 llvm::DebugLoc, llvm::SDValue&, llvm::SDValue*) const + 355
 1   libmacruby.dylib0x00010050dda9
 llvm::SelectionDAGLowering::CopyValueToVirtualRegister(llvm::Value*,
 unsigned int) + 1001
 2   libmacruby.dylib0x0001005103d9
 llvm::SelectionDAGISel::LowerArguments(llvm::BasicBlock*) + 3625
 3   libmacruby.dylib0x000100548a53
 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
 llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*,
 llvm::TargetInstrInfo const&) + 3123
 4   libmacruby.dylib0x00010054943d
 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) +
 1581
 5   libmacruby.dylib0x00010062240b
 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 91
 6   libmacruby.dylib0x0001008d9c3a
 llvm::FPPassManager::runOnFunction(llvm::Function&) + 458
 7   libmacruby.dylib0x0001008da254
 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 164
 8   libmacruby.dylib0x0001008da592
 llvm::FunctionPassManager::run(llvm::Function&) + 82
 9   libmacruby.dylib0x0001005a774a
 llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard
 const&) + 42
 10  libmacruby.dylib0x0001005a8bef
 llvm::JIT::getPointerToFunction(llvm::Function*) + 943
 11  libmacruby.dylib0x000100179ac5
 RoxorCore::compile(llvm::Function*) + 149 (vm.cpp:486)
 12  libmacruby.dylib0x000100162d0e
 rb_vm_prepare_block + 1198 (dispatcher.cpp:1725)
 13  ??? 0x0001011102bf 0 + 4312859327
 14  libmacruby.dylib0x000100040f49 ruby_run_node +
 73 (eval.c:199)
 15  macruby 0x00010dd8 main + 152
 (main.cpp:42)
 16  macruby 0x00010d34 start + 52

 Thread 1:
 0   libSystem.B.dylib   0x7fff8650d9da
 __workq_kernreturn + 10
 1   libSystem.B.dylib   0x7fff8650ddec
 _pthread_wqthread + 917
 2   libSystem.B.dylib   0x7fff8650da55 start_wqthread
 + 13

 Thread 2:  Dispatch queue: com.apple.libdispatch-manager
 0   libSystem.B.dylib   0x7fff8650cbba kevent + 10
 1   libSystem.B.dylib   0x7fff8650ea85
 _dispatch_mgr_invoke + 154
 2   libSystem.B.dylib   0x7fff8650e75c
 _dispatch_queue_invoke + 185
 3   libSystem.B.dylib   0x7fff8650e286
 _dispatch_worker_thread2 + 244
 4   libSystem.B.dylib   0x7fff8650dbb8
 _pthread_wqthread + 353
 5   libSystem.B.dylib   0x7fff8650da55 start_wqthread
 + 13

 Thread 3:
 0   libSystem.B.dylib   0x7fff8650d9da
 __workq_kernreturn + 10
 1   libSystem.B.dylib   0x7fff8650ddec
 _pthread_wqthread + 917
 2   libSystem.B.dylib   0x7fff8650da55 start_wqthread
 + 13

 Thread 4 Crashed:
 0   libmacruby.dylib0x00010070147d (anonymous
 namespace)::GVN::iterateOnFunction(llvm::Function&) + 3261
 1   libmacruby.dylib0x000100701aac (anonymous
 namespace)::GVN::runOnFunction(llvm::Function&) + 300
 2   libmacruby.dylib0x0001008d9c3a
 llvm::FPPassManager::runOnFunction(llvm::Function&) + 458
 3   libmacruby.dylib0x0001008da254
 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 164
 4   libmacruby.dylib0x0001008da592
 llvm::FunctionPassManager::run(llv

[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
[email protected]




___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #552: NSOperationQueue segfaults when more than one operation is being added

2010-01-11 Thread MacRuby
#552: NSOperationQueue segfaults when more than one operation is being added
-+--
 Reporter:  mattaimone...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--

Comment(by mattaimone...@…):

 I was able to add two operations as long as they are from 2 different
 subclasses:

 {{{
 framework 'Foundation'

 class MyOperation < NSOperation
   attr_reader :name

   def initWithName(name)
 init
 @name = name
 self
   end

   def main
 puts "Hello #{name}"
   end

 end

 class OtherOperation < NSOperation
   attr_reader :name

   def initWithName(name)
 init
 @name = name
 self
   end

   def main
 puts "Hello #{name}"
   end

 end

 operation_heidi = MyOperation.alloc.initWithName('Heidi')
 operation_matt  = OtherOperation.alloc.initWithName('Matt')

 queue = NSOperationQueue.alloc.init
 queue.addOperation operation_heidi
 queue.addOperation operation_matt

 # run the main loop for 2 seconds
 NSRunLoop.currentRunLoop.runUntilDate(NSDate.dateWithTimeIntervalSinceNow(2.0))
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel