From: Eloy D. <elo...@gm...> - 2007-09-06 10:10:39
|
It might not be needed to subclass, but it would probably be the best way from a design point of view :) As in, the button subclass contains the code related to drawing itself... Cheers, Eloy On 9/6/07, Yvon Thoraval <yvo...@gm...> wrote: > > > 2007/9/5, Laurent Sansonetti <lsa...@ap...>: > > > > > > I would subclass NSButton, provide a custom drawing method that would > > draw the image, then trigger a timer (using either NSTimer or > > NSAnimation) that would increment an index and force the button to be > > redrawn. The image would be drawn in a rotated mode based on the timer > > index. > > NO, there is no need for a subclass, Luc Heinrich gave me yesterday a > working solution : > > to make the image of a button rotating, this has to be done in the > NSRunLoop. > > then, the action associated to this "rotating button" has to be done in > another thread, this works fine with ruby Tread ! > > Best, > > -- > yvon > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > |