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

Home » Public Forums » archive » widget_text
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: widget_text [message #12006 is a reply to message #2051] Thu, 18 June 1998 00:00 Go to previous messageGo to previous message
Phillip & Suzanne is currently offline  Phillip & Suzanne
Messages: 31
Registered: June 1998
Member
David Fanning wrote:
> Well, you're right. Putting this kind of functionality
> in a procedure in a good idea.

David, Lisa, and all;

I agree with the sentiment, but thought of another possibility, with IDL 5
having objects and all...

Make a message object, which contains a text widget. It could have an append
method that takes a text string, and performs all of the steps you mention.
In this fashion, you would not have to add all of this code everywhere.
Instead, you would just write something like:

(*state_ptr).message->append('my text')

where the append method would do all of the steps you were doing.

I realize that this is a similar solution to making a procedure for it, but it
allows the whole thing to be encapsulated (in good OO fashion), and would
allow the top line to be preserved as part of the object's data structure.
Without real effort, no one would be able to add DIRECTLY to the widget,
because it's encapsulated within a message object. Also, if you decided to
change the implementation of the message object some day (maybe when RSI
introduces another widget even better designed for this sort of purpose? :-),
changing the internals of your message object wouldn't affect the rest of your program.

A little food for thought...

Phillip David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: widget_text (correction)
Next Topic: resizing tlb with /align_right, /align_bottom

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

Current Time: Sat Oct 11 11:35:58 PDT 2025

Total time taken to generate the page: 0.63717 seconds