[Pythonmac-SIG] simple pyobjc question
Ronald Oussoren
ronaldoussoren at mac.com
Wed Nov 16 07:48:02 CET 2005
On 15-nov-2005, at 19:06, Tom Elliott wrote:
> I have 2 classes, one which responds to user input, calculates stuff
> and displays the result in a series of NSTextFields, and a second
> class that is a subclass of NSView called MyView, which can display
> the same type of information graphically.
>
> What I'd like is for the first class to be able to use MyView to
> display its results, but I don't know how to get them to talk to each
> other. If I had an instance of MyView I could pass in data and call
> setNeedsDisplay(True) via a button in the interface. How should I do
> this?
One way to do this is giving the first class a number of outlets that
can
be connected to NSTextFields or MyViews. If you then implement
'setFloatValue_'
in MyView you can connect your outlets to MyView to show the results.
BTW. This is a very basic Cocoa question. May I suggest looking for a
Cocoa
tutorial?
Ronald
>
> Tom Elliott
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
More information about the Pythonmac-SIG
mailing list