Re: Object widget? [message #80694 is a reply to message #80588] |
Mon, 25 June 2012 17:29   |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
On Monday, June 25, 2012 2:42:55 PM UTC-4, Mike Galloy wrote:
> On 6/25/12 11:49 AM, rryan@stsci.edu wrote:
>> I am very familiar with the Fanning's library and website. But I was hoping someone could describe the virtues of the OOP for widgets/GUIs. I'm rewriting the code anyway, and so thought to do it in OOP --- provided the reasons are better than simple intellectual curiosity.
>
> Object-widgets have all the advantages of objects in general. In
> particular, encapsulation and a documented interface are important
> features. With a standard widget program, you basically have to give
> away your tlb widget identifier for another routine to interact with
> you. At which point, the interacting program can do anything they want
> to you. But an object-widget can publish an interface of actions it can
> take, properties that can be examined, etc. This makes working with
> object-widgets much easier and the code that interacts with them much
> easier to maintain.
>
> Mike
> --
> Michael Galloy
> www.michaelgalloy.com
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
> Research Mathematician
> Tech-X Corporation
Mike, David,
Thank you, that was what I was looking for. In fact, I think you two may have read my mind. The "main" GUI interacts with 4-6 "subGUIs" which do some other processing and manipulations. And, getting the data to pass back and forth between all the GUIs efficiently was a hassle. Finally, as the code progressed and new bits were added, tweaked, or removed, maintaining the connectivity was becoming a nightmare....
Sounds like the objects are the way to go, but I'm not too comfortable with developing my own. All the graphics handling is done with the object-graphics, so I'm familiar with the basics.
Thanks again fellas!
R
|
|
|