Projects

Ticket #760 (closed defect: fixed)

Opened 20 months ago

Last modified 17 months ago

C-level blocks are not supported

Reported by: ryand-ruby@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords: 0.7-blocker
Cc:

Description

% macirb
>> framework 'Foundation'
>> framework 'AppKit'
>> NSWorkspace.sharedWorkspace.recycleURLs [], completionHandler:nil

results in:

TypeError: unrecognized runtime type `?'
	from /Users/ryan/Work/p4/zss/src/Cocoa/Triage/(irb):1:in `<main>'

At the least, it should support a nil arg and just pass it through.

Change History

Changed 20 months ago by martinlagardette@…

This is unfortunately a limitation of the current bridge support, which doesn't support C blocks (making it impossible for now to handle C blocks within MacRuby). As for the nil arg, you're probably right, but I don't know how safe it would be to allow "nil" for every ? kind :-/

Changed 20 months ago by lsansonetti@…

It is possible to workaround the MacRuby runtime by using performSelector:.

NSWorkspace.sharedWorkspace.performSelector(:"recycleURLs:completionHandler:", withObject:[], withObject:nil)

Changed 17 months ago by lsansonetti@…

  • keywords 0.7-blocker added
  • summary changed from block arg in NSWorkspace#recycleURLs completionHandler: is not specified properly to C-level blocks are not supported

Renamed the title accordingly and added the 0.7-blocker keyword.

Changed 17 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Support for C-level blocks is implemented in r4495. However, it requires a not-yet-released BridgeSupport for special annotations, we will make sure to release it at the same time as 0.7.

Note: See TracTickets for help on using tickets.