Rev equiv of VB Type data handler
Posted: Thu Oct 15, 2009 3:02 pm
I am really keen to jump in to Run Rev having been a hypercard nut back in the day.
But when Hypercard pulled up stumps I somewhat reluctantly went back to VB.
One thing I can't work out from the manuals is how to make your own custom data types
ie in VB I'd do something like this:
Private Type Node
Row As Integer 'row of the actual node
Col As Integer 'column of the actual node
ParId As Integer 'parent node
ScoreF As Integer 'Score F (total cost)
ScoreG As Integer 'Score G (Cost of the path done)
ScoreH As Integer 'Score H (Estimated cost of the path to do)
Closed As Boolean 'indicates if the node is in the close list
End Type
then I could make an array in which each address in the array was the above custom data type, therefore giving me a very efficient way of storing a lot of info for each data element of the array
eg
Dim OpenList() as Node
I could also have different variables that are defined by this custom data type
Dim CurrNode as Node
Dim TargetNode as Node
And then pass data to the individual elements of the datatype:
TargetNode.Row = 34
TargetNode.Col = 25
....
So my question is...... How do I do something like this in Run Rev... It's basically arrays isn't it with sub arrays??
But when Hypercard pulled up stumps I somewhat reluctantly went back to VB.
One thing I can't work out from the manuals is how to make your own custom data types
ie in VB I'd do something like this:
Private Type Node
Row As Integer 'row of the actual node
Col As Integer 'column of the actual node
ParId As Integer 'parent node
ScoreF As Integer 'Score F (total cost)
ScoreG As Integer 'Score G (Cost of the path done)
ScoreH As Integer 'Score H (Estimated cost of the path to do)
Closed As Boolean 'indicates if the node is in the close list
End Type
then I could make an array in which each address in the array was the above custom data type, therefore giving me a very efficient way of storing a lot of info for each data element of the array
eg
Dim OpenList() as Node
I could also have different variables that are defined by this custom data type
Dim CurrNode as Node
Dim TargetNode as Node
And then pass data to the individual elements of the datatype:
TargetNode.Row = 34
TargetNode.Col = 25
....
So my question is...... How do I do something like this in Run Rev... It's basically arrays isn't it with sub arrays??