Eric Bennett wrote:
> On Wed, 28 Feb 2001, Tom Allebrandi wrote:
>
> > As it turns out, and I don't know if Aldo intended for it to work this way,
> > if you have a handle to the control, you can also call the routine in the
> > "classless" way by doing
> >
> > GUI::ProgressBar::SetPos($progressControlHandle,$amount));
> >
> > The latter is the way I talk to the controls from the thread that is not
> > running Win32::GUI::Dialog.
>
> What advantage does this give you? The -> form searches the @ISA class
> hierarchy but once it finds the function the two forms are equivilent.
> Is there something about use of threads which forbids object syntax? The
> object form is safer and seems cleaner to me.
The object syntax requires an object handle. It isn't clear to me how to obtain
an object handle for a window created in one thread/process that can be used in
a
different thread/process. Perhaps, but I haven't experimented yet, if the two
processes are the result of a fork after the object handle is obtained, that it
would work to a certain degree, but perhaps not.
The non-object syntax can be used by any thread/process on any window to which
it
can obtain a Windows window handle. Including windows created by Win32::GUI.
Hnece the non-object syntax is more powerful.
--
Glenn
=====
Even if you're on the right track,
you'll get run over if you just sit there.
-- Will Rogers