3:28pm, Bob Showalter wrote:

> Paul Archer wrote:
> > The answer to this is probably out there somewhere, but I haven't run
> > across it yet, so a pointer to a webpage/tutorial/FAQ/whatever would
> > be fine...
> >
> > I'm trying to put together an object class (my first OO attempt) for a
> > Curses-like interface to a serial LCD display.
> > I want to have multiple objects that different code can write to
> > (menus, status, etc), and a method to update the display (a la
> > 'refresh' in curses). The problem/question is: how do I have all the
> > different objects in this same class access the object that gets
> > updated?
>
> Store the display object as class data in the base class for the widgets.
>
> perldoc perltootc
> perldoc perltoot
>
I didn't know there was a 'perltootc' out there! That's just what I needed.

Thanks much,

Paul


> >
> > In other words, let's say $main_display is the object that represents
> > what is (or should be) currently on the display, and $menu_display is
> > an object that gets updated with new menu items. When I do
> > $menu_display->refresh, the
> > data in the $menu_display object needs to be transfered to the
> > $main_display object (and comparisons made, and data written to the
> > LCD). I suppose I could have a call like:
> > $main_display->refresh_from_other_object(\$menu_display)
> > (or something like that...I'm still getting used to the syntax), but
> > that seems a waste to have to pass data manually, when the
> > $menu_display object should be able to do it itself.
>

-----------------
      WWJD?
     JWRTFM
-----------------


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to