[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: object wizards
- Subject: Re: object wizards
- From: davidf(at)dfanning.com (David Fanning)
- Date: Fri, 13 Oct 2000 11:41:37 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <39E746B8.CDD607F2@va.aetc.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:21702
Bernard Puc (bpuc@va.aetc.com) writes:
> Apparently, an array created with objarr() can only store one type of
> object. And thats consistent with arrays of structures. But, I want to
> store several different objects together somehow in a single variable.
> A structure doesn't work since I have a variable number of objects to
> store. Therefore, is the only way to do this with an array of pointers,
> where each pointer references an object reference?
Why would you think this!? This simple test works well:
IDL> a=objarr(2)
IDL> a[0] = Obj_New('idlgrSurface')
IDL> a[1] = Obj_New('idlgrPlot')
An object reference is an object reference. I can't see
how ObjArr or anyone else can object. :-)
Cheers,
David
--
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