Maybe I'm beeing completely daft, but I have a problem when I'm tying to create an nice way to express iherited classes. Look at this example. It is a type called Foo that contains a type called Bar that is accessable trough Foo.Bar
myFoo.Bar.SomeValue
Maybe it is my method of implementing this type of inheritance that is comletely wrong.
Ideas anyone?
Strict Type Foo Field Bar:Bar = New Bar End Type Type Bar Field SomeValue:Int = 1 End Type Global myFoo:Foo = New Foo DebugLog myFoo.Bar.SomeValueThis example does not work. The problem occurs when I try to assign the "Bar" Field in the "Foo" type. There is a name collision an with the field having the same name as the type that I'm trying to create. If we adjust the example like this...:
Strict Type Foo Field BarName:Bar = New Bar End Type Type Bar Field SomeValue:Int = 1 End Type Global myFoo:Foo = New Foo DebugLog myFoo.BarName.SomeValue...everything works fine. But the point is that I want the Field name to be same as the type name because it makes the syntax for retriving "SomeValue" more logical:
myFoo.Bar.SomeValue
Maybe it is my method of implementing this type of inheritance that is comletely wrong.
Ideas anyone?