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

Home » Public Forums » archive » Re: do I really need to use loops on objects?
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: do I really need to use loops on objects? [message #18078] Wed, 01 December 1999 00:00 Go to previous message
Brad Gom is currently offline  Brad Gom
Messages: 49
Registered: August 1997
Member
philaldis@yahoo.com wrote:

> I don't think that this isn't particularly consistent with the IDL
> philsophy. I can see what you're saying but how would go about
> implementing your suggestion being as in your case the objects may be
> all of the same type, but in other cases the objects may all be
> different. What would IDL do then when some of the objects do have the
> method called and others don't?
>

In the case where an object in an array didn't have the required method,
IDL could spit out an error to the effect of:
%Attempt to call undefined method: 'OBJECT::METHOD' when a method was
called on a whole array. It would be up to the programmer to make sure the
array was filled with the appropriate class of objects.
At any rate, I still have to make sure all the objects in my array have the
required method when I use a for loop on an object array!


> What is more consistent with IDL philosophy is the fact that a
> procedure like Obj_Destroy() can work on an entire array of object
> references so you can destroy a whole bunch of them in one go. However
> IDL does not continue with this fully. What's always riled me is the
> fact that Obj_Class() does not work on a objArr and you can't get it to
> return a string array with the object's classes.

I'll agree with that.


> I'm sure lots of people will disagree but I think on this occaison IDL
> is correct.

Well, I guess I am a disagree-er. The fact that after learning the basics
of IDL I would intuitively try to use object arrays in the same style that
I use all the other array types, suggests to me that there is an
inconsistency. Of course I have the same gripe about pointer arrays, but
then I'm used to programming in C, where I am allowed to crash the computer
in all sorts of creative ways by mis-casting variables.

Thanks for the opinion,

Brad Gom
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How does REFORM work in PV-Wave
Next Topic: Re: Copying objects

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

Current Time: Sat Oct 11 01:37:25 PDT 2025

Total time taken to generate the page: 2.31955 seconds