[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: object theoretical question

Brad Gom (b_gom@hotmail.com) writes:
> How computationally expensive is the 'GetByName' method function in the
> IDL object graphics objects?
> I am building a rather specific object, which contains plot views,
> models, plots, etc. among other things. In my object's methods, I will
> of course need to access the various members. Is it better to set up
> explicit object references in my object definition for the members I
> will need to access, or to use the 'GetByName' methods to search through
> the various heirarchies to find the object I want?  

I don't honestly know the answer to your question. I've used
the GetByName method several times and it seemed fast enough.
But as a general rule of thumb in my own programming, I don't
like to go "searching" for anything. If I need it, I like to 
know where is. A concept I can't seem to get across to either
my children or my lovely wife, which is why they are pretty
much banned from my office. :-)

I prefer the "add them to the definition" approach. It's just
a long integer, so it is not a big deal to carry a bunch of them


David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155