I have a simple code that fails. I'm not sure if it's my oversight, or a problem in the compiler.
I'm using an enum as a generic variable, and when using it, the compiler can't find its fields.
Does this work for you? :
# I get ...[the filename]... (0,0): Error: Cannot find a definition for "Information" in "Parts" whose type is "Parts". (Controller)
def doInfo
data = SimpleData<of Parts>(Parts.Information, .infoMsg)
.updateViewsPart(data)
enum Parts
Information
Configure
Processing
About
struct SimpleData<of TEnumParts>
is public
get part from var as TEnumParts
get data from var as Object
cue init(part as TEnumParts, data as Object)
_part, _data = part, data
Thanks alot!