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

Re: do I really need to use loops on objects?



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?

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'm sure lots of people will disagree but I think on this occaison IDL
is correct.

Cheers,
Phil


Phil Aldis,
Gonville and Caius College,
Cambridge University,
CB2 1TA.
E-Mail : philaldis@yahoo.com



In article <38447341.28FBAACB@hotmail.com>,
  Brad Gom <b_gom@hotmail.com> wrote:
> It seems odd to me that I can't treat object arrays with the same
> elegance that is possible with all other array types. If I have a
large
> list of objects of the same type, and I want to call the same method
on
> each of them, do I really have to use a for loop? Wouldn't it be more
> consistent with the IDL philosophy to write: object_array->method()
> instead of: for i=0,10 do object_array[i]->method()
>
> I'm just getting back into IDL after a short hiatus, and back to
object
> programming in particular.. is there something I've missed?
>
> Brad
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.