This commit is contained in:
Araq
2013-01-08 08:11:21 +01:00
parent 3c73654aca
commit 1bc5ff6dc9
2 changed files with 23 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
type
PMenu = ref object
PMenuItem = ref object
proc createMenuItem*(menu: PMenu, label: string,
action: proc (i: PMenuItem, p: pointer) {.cdecl.}) = nil
var s: PMenu
createMenuItem(s, "Go to definition...",
proc (i: PMenuItem, p: pointer) {.cdecl.} =
try:
echo(i.repr)
except EInvalidValue:
echo("blah")
)