Re: [MacRuby-devel] CATextLayer.font

2011-03-23 Thread Eloy DurĂ¡n
There is no Ruby workaround. What I currently do is I have a workaround subclass of CATextLayer that takes an explicit type instead of NSCFType and subclass/use that from MacRuby. % cat CALayerWorkarounds.h #import #import @interface WorkaroundTextLayer : CATextLayer - (void)setFontObject:(N

Re: [MacRuby-devel] CATextLayer.font

2011-03-22 Thread Matt Aimonetti
The work around would be to create a pointer: irb(main):005:0> font = NSFont.systemFontOfSize(NSFont.systemFontSize) => # irb(main):006:0> layer = CATextLayer.new => # irb(main):007:0> layer.font = font TypeError: expected instance of Pointer, got `#' (NSFont) Instead of setting the font directly

[MacRuby-devel] CATextLayer.font

2011-03-22 Thread Ben Koski
I'm having trouble trying to set the font property on a CATextLayer using the latest version of macruby. I've noticed that there is already a ticket for an issue when trying to set the font using a NSFont instance (http://www.macruby.org/trac/ticket/1114). I tried using CGFontCreateWithFontName('