How to package existing non-OO widget application into a catalyst based objects? [message #86220] |
Fri, 18 October 2013 10:39  |
Jie Zhou
Messages: 27 Registered: February 2014
|
Junior Member |
|
|
Now I have a widget application developed using the normal non-OO widget, i.e. the top level base is created using WIDGET_BASE. And I want to improve it using the objected widgets in catalyst library. But the time is limited. Now I just have time to change the image view part of the system. So How can I combine the WIDGET_BASE and BASEWIDGET object into the same application.
I have tried to set a widget_base as the parent to a BASEWIDGET objects. But I have no idea how to do it.
Please help...
Jie
|
|
|
|
Re: How to package existing non-OO widget application into a catalyst based objects? [message #86307 is a reply to message #86222] |
Thu, 24 October 2013 11:56   |
Jie Zhou
Messages: 27 Registered: February 2014
|
Junior Member |
|
|
On Saturday, October 19, 2013 12:13:50 AM UTC+2, David Fanning wrote:
> Jie Zhou writes:
>
>
>
>> Now I have a widget application developed using the normal non-OO widget, i.e. the top level base is created using WIDGET_BASE. And I want to improve it using the objected widgets in catalyst library. But the time is limited. Now I just have time to change the image view part of the system. So How can I combine the WIDGET_BASE and BASEWIDGET object into the same application.
>
>> I have tried to set a widget_base as the parent to a BASEWIDGET objects. But I have no idea how to do it.
>
>
>
> Yeah, I'm afraid it is all or nothing when you switch to the Catalyst
>
> Library. *Everything* has to be an object over there. It *can* drive you
>
> crazy until you build up enough objects in your own library. There are a
>
> number of advantages to doing so, however.
>
>
>
> The problem really has to do with how widget events get propagated in
>
> widget objects. The way this has to be done makes it impossible (I
>
> believe) to build a hybrid system.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
I use the toplevelbase at the top base, then use getID()method to get the id of embed base widget, and then create children widgets with the ID as parent. Also use the xmanager to dispatch the events of these child-widgets to a specific procedure. More or less, it worked. Absolutely, i well change all parts of my system into oo-based step by step.
|
|
|
Re: How to package existing non-OO widget application into a catalyst based objects? [message #86308 is a reply to message #86307] |
Thu, 24 October 2013 13:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jie Zhou writes:
> I use the toplevelbase at the top base, then use getID()method to get the id of embed base widget, and then create children widgets with the ID as parent. Also use the xmanager to dispatch the events of these child-widgets to a specific procedure. More or less, it worked. Absolutely, i well change all parts of my system into oo-based step by step.
Well, I would advise you to do it sooner rather than later. The problem
you are going to have very, very soon now is that information you need
to do something useful in your event handler procedure is going to be
stored in the program object and will be unavailable to you in your
event handler procedure. Then you are going to wish (desperately, I
should think!) that you had assigned your widget object an event handler
method, where information from the ENTIRE program is available to it.
:-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|