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

Home » Public Forums » archive » How to re-use object methods
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How to re-use object methods [message #85788] Sun, 08 September 2013 10:30 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
I learned object programming late in my career and have come to appreciate its many benefits. But one thing I have not figured out is how to make the code re-usable.

I have access to a very large object widget display program. Much of the widget is for a rather specific application, but some of the buttons, say, "Contrast" could be used in other widget display programs. So when writing my own widget program, I add a "inherit largeobject" to the object definition so that it can inherit the methods of the large object widget. But I immediately got conflicts between my object definition parameters and those in the large widget display. I have to admit I did not try very hard to debug this, in part because I was hesitant for my 500 line program to be inheriting the 50,000 line largewidge object. I ended up forgetting about inheritance and just cut and pasted the the portions of the largeobject methods I needed to create methods for my own object.

I wonder if the way to make the make the code more re-useable would have been for the author of the large widget program to have made each button in the large widget program into an object, rather than a method.

Thanks, --Wayne
[Message index]
 
Read Message
Read Message
Previous Topic: graphics window
Next Topic: How to increase the speed

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

Current Time: Wed Oct 08 18:32:17 PDT 2025

Total time taken to generate the page: 0.00221 seconds