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
Thanks once again!
It sounds a little crazy, but try using a Dictionary for this.
myDict.Value("JobID") = myClassArray
Don’t write PHP (or java script) in Xojo - you’ll be disappointed
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 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. Those are a great bunch of clips Paul thanks
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”
Ah Ron Hextall & Billy Smith - those were the days
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 Thanks again!
The current AJHL web site has this file missing, but here is a link to my 1992-1993 stats
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?