Book a Demo

Author Topic: Attribute array  (Read 2248 times)

Ronaldo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Attribute array
« on: June 25, 2008, 06:26:48 am »
EA is generating a wrong VBNET code for my class array attribute...

In the class diagram I wrote:
- sCurve : Single ((31))
and at tab detail I checked the "Attribute is a Collection" checkbox and "Container Type" field is filled with  (31).

The code generated was (VBNET):
Private sCurve As Single(31)

when it should be:
Private sCurve(31) as Single

What I'm doing wrong?

thank's

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Attribute array
« Reply #1 on: June 25, 2008, 07:25:03 am »
Try giving your attribute a multiplicity instead of making it a collection.

When you designate an attribute as a collection, that (the collection) becomes the data type, not the array bound. AFAIK such a designation is for something like (for example): Private sCurves As Collection. In your case that does not appear to be what you are seeking.

HTH, David
No, you can't have it!