How does one comply with MojoX View Class standards?
I understand I have to “Extends View.”
I’ve tried getting Mouse/Key Events from within a “View” but so I got nothing.
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
NamespaceAPPLICATION
ClassMyView ExtendsView
Method New()
Super.New()
'App.RequestRender()
End
Method OnRender(C:Canvas)Override
C.DrawRect(0,0,32,32)
End
Method OnMouseEvent(E:MouseEvent)Override
SelectE.Type
CaseEventType.MouseClick
Print"Clicked"
CaseEventType.MouseMove
Print"Moved"
CaseEventType.MouseUp
Print"Mouse Up"
EndSelect
End
'- Keyboard Event Handler
Method OnKeyEvent(E:KeyEvent)Override
SelectE.Key
CaseKey.B
Print"B Key Pressed"
EndSelect
End
End
Then I simply create a “View” Instance in the main window class and run the app.
I get no rendering of the DrawRect.
And no Keyboard/Mouse input seems to be getting through.