comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Object Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Object Widgets [message #17769 is a reply to message #17721] Thu, 11 November 1999 00:00 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
J.D. Smith, jdsmith@astro.cornell.edu writes:

> I have a similar though less tightly coupled object
> widget superclass. One suggestion I had would be to
> register the widget under the name:
>
> obj_class(self)+self.title
>
> or some such, in order to allow different instances
> of the same class to run at once.

The xmanger allows duplicate names, so multiple instances of a
given sub-widget can exist in my version (eg, different widgets can
simultaneously have their own colour pickers on the screen).
Registering with the title as well would allow more sophisticated use
of the XREGISTERED function, but that returns so little information
that I found it only useful for singleton widgets (for setting global
preferences etc).

I'm sure J.D. spotted this, but it's worth pointing out to the
novice objecters that using the obj_class(self) in the call to
xmanager ensures that the subclass name is used, even if the call is
made in the super-class init method.

Incidentally, for a long time I thought the Xmanager actually
needed to know the actual name of the creation routine for the widget
so that it could call it at some point. It seems as if it will
actually accept any old name, although default names for the cleanup
and event handler are of course derived from that.


> Another suggestion involves blocking vs. non-blocking
> widgets. I find it convenient to make a separate "Start"
> method in addition to Init. Init is used to set up data,
> etc., and Start is used to actually run XManager, etc.


In a sense, that's what my XMANAGE method is. Other than starting
the Xmanager, is there anything else you do for all your widgets that
would be worth putting into a superclass defintion? Or is it just
that it is useful later on if all users know that object widgets have
to he invoked with:

objwidref = obj_new('object_widget') objwidref -> Start

instead of just the first line. I can see how this solves the
blocking widget/xmanager dilemma.


Thanks for the input. I begin to see why David loves having his
code rubbished in public :-)

Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Two widget questions
Next Topic: Re: Center of mass???

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:28:51 PDT 2025

Total time taken to generate the page: 0.79024 seconds