Skip navigation.
 
mlRe: How to create Custom Knobs with Sprite animation ?
FROM : Jens Alfke
DATE : Mon Jun 16 18:07:55 2008

>> My Question was : How to achieve that via Cocoa . Rather in Code i 
>> just need a Guidline or a Plan what i should look for , where to 
>> start , general things , what Concepts i should look for.


Read the conceptual documentation on event handling, specifically on 
how to handle mouse events in a view.

Then look for some AppKit sample code that demonstrates using a custom 
view that handles mouse events; I don't remember any offhand, but I 
know there are several examples like this. Read the code, run it, play 
with it and make it do some new things until you feel you understand 
what it's doing.

A tip: You can simplify your drawing code by making your view subclass 
NSImageView. Then the base class will take care of all the drawing; 
all you have to do is call [self setImage: [NSImage imageNamed: name]] 
where 'name' is the name of the image corresponding to the current 
state of the knob.

—Jens

Related mailsAuthorDate
mlHow to create Custom Knobs with Sprite animation ? David Paulicke Jun 14, 20:44
mlRe: How to create Custom Knobs with Sprite animation ? Graham Cox Jun 15, 02:00
mlRe: How to create Custom Knobs with Sprite animation ? Jens Alfke Jun 15, 05:59
mlRe: How to create Custom Knobs with Sprite animation ? Graham Cox Jun 16, 06:49
mlRe: How to create Custom Knobs with Sprite animation ? Jens Alfke Jun 16, 18:07