Bug fix and start improvements to subclassing.
This commit is contained in:
@@ -6,6 +6,11 @@ import (
|
||||
ns "gitlab.wow.st/gmp/nswrap/examples/simple/ClassOne"
|
||||
)
|
||||
|
||||
func cb(super ns.ClassThreeSupermethods) ns.Int {
|
||||
fmt.Printf("In Go callback\n")
|
||||
return 0
|
||||
}
|
||||
|
||||
func main() {
|
||||
o := ns.ClassOneAlloc().Init()
|
||||
fmt.Println("i1 = ",o.Geti1())
|
||||
@@ -20,7 +25,10 @@ func main() {
|
||||
fmt.Println(o.Hi2(np))
|
||||
o2 := ns.ClassTwoAlloc().Init()
|
||||
fmt.Println(o2.Hi1(ns1))
|
||||
o3 := ns.ClassThreeAlloc().Init()
|
||||
o3 := ns.ClassThreeAlloc()
|
||||
o3.Init()
|
||||
o3.Geti1Callback(cb)
|
||||
fmt.Println(o3.Hi2(np))
|
||||
fmt.Println(o3.Geti1())
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ classes:
|
||||
subclasses:
|
||||
ClassThree:
|
||||
ClassTwo:
|
||||
- .*
|
||||
- geti1
|
||||
- (void)myMethod:int
|
||||
|
||||
imports: [ simple.h ]
|
||||
frameworks: [ Foundation ]
|
||||
|
||||
Reference in New Issue
Block a user