[MacRuby-devel] Unnamed Selectors

Larry Staton Jr. larry at sweetpeasoftware.com
Sat Aug 7 11:32:24 PDT 2010


All -

I'm freshening up on my Core Animation by translating the code from
Bill Dudney's "Core Animation" book:
<http://github.com/statonjr/macruby-coreanimation>

I've run across an interesting method signature that I can call, but
I'm wondering if my way is the best way to call it.

Here's the method signature from the CAMediaTimingFunction class:

- (id)initWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y

Yes, that's "initWithControlPoints::::"

Here's what I'm using:

    tf = CAMediaTimingFunction.alloc
    tf.send "initWithControlPoints::::".to_sym, c1x, c1y, c2x, c2y
    moveAnimation.timingFunction = tf

Is there a better way? I just feel like I'm missing something.

Warm regards,

Larry


More information about the MacRuby-devel mailing list