Skip to content

VBScript code cannot access nested types #23

@ghost

Description

Hello,

I have just discovered ClearScript, and think it's great. But I am having trouble exposing enums and consts to my scripts.

for example: I created a basic class with an enum defined.

Public Class test
    Public Enum Numbers
        one
        two
        three
    End Enum
End Class

I then add this to my engine

scriptEngine.AddHostType("test", GetType(test))

but I am unable to reference numbers in my scripts e.g.

test.Numbers.one

I would expect this to be an integer with a value of one? But instead get an error

Public member 'Numbers' on type 'HostType' not found.

Does ClearScript support enums? Any help appreciated.

Thanks

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions