I am trying to use a constructor in an external class (#import file) and can’t seem to get it to work. So as I understand it this pseudo code should work but does not:
Monkey
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'Head source
Namespace"Head Source"
#Import"myexternal"
Using"myexternal"
ClassMyClass
Fieldmyextrn:MyExternalClass
Method Init()
myextern:=New("Test")
EndMethod
EndClass
'External Import Class
'"myexternal.monkey2"
Namespace"myexternal"
ClassMyExternalClass
Fieldtext:String
Method New()
EndMethod
Method New(txt:String)
Self.text=txt
EndMethod
EndClass
Am I implementing this correctly? When I try to use this method I get an “expecting end of line” error.