Make Dynamic Array Names?

I have a need for dynamically creating array names based on trying to sort data from an input.

For example I may receive a bunch of data that I assign to a “storage” Class (multiple properties within this class). I then create an array of these classes. I would like to use one of the Class properties (ie. Job ID) as the Array of classes name. This sounds crazy, but is this possible to set an array name dynamically via code? or for sure call me crazy anyhow :slight_smile: :slight_smile:

Thanks once again!

It sounds a little crazy, but try using a Dictionary for this.

myDict.Value("JobID") = myClassArray

Yer crazy
Don’t write PHP (or java script) in Xojo - you’ll be disappointed :slight_smile:

Sounds like what you need is a “StoreClassList” or something that can hold a bunch of these items and has a “name” property

haha:) I thought I would have had to convert a dictionary to an array anyhow eventually to access by data properly, but I may not be recalling this properly by the sounds of it… Thank you guys as I will try the dictionary. The only issue is that I could have literally 1000’s of different job ID name combinations so a pre-list wouldn’t help me here.

Norman I was a goalie so I guess I have been crazy for a while :slight_smile: Thanks again guys!

You have to watch this goalie video, then!

HAHAHAH!! I had an episode of that when we lost to the Calgary Canucks back in 1994 when I played in the AJHL. :slight_smile: Those are a great bunch of clips Paul thanks :slight_smile:

Same here. Probably requires similar levels of crazy to want to be a goalie or a programmer.

I played defence and yeah goalies are “special” :stuck_out_tongue:

Ah Ron Hextall & Billy Smith - those were the days :stuck_out_tongue:

Sounds like we have enough ex-hockey players to have a “Xojo Classic” game at XDC…

Mike, you can store a dictionary inside another dictionary to achieve an “named array of named arrays” function. And if you are using a value (like JobID) to name the “array”, you can use a variable to access the data.

myDict.Value(myJobID) = myClassArray

Cant play anymore
Got slew footed a few year back & tore the meniscus & wrecked my knee - to the point if I take a hit I’m likely crippled

While you an put dictionaries in dictionaries etc I would write a class that, even if all it does is wraps a dictionary, provides a clearer means to follow whats going on
Esp IF sometime down the road you have to change the implementation details - you can change your wrapper class & not touch other code

Guys a sincere thank you! Your experience is helping out this network engineer convert to coder :slight_smile: Thanks again!

The current AJHL web site has this file missing, but here is a link to my 1992-1993 stats :slight_smile:
Alberta Junior Hockey League Top Goaltenders

Is it normal to see weird ascii as the Value in a dictionary of arrays (of classes)?.

I am used to putting classes into dictionaries directly so I have always seen the actual value of the classes.

Is this normal?


Thanks Kem