Complete implementation of delegates. Update app example with an

NSApplicationDelegate.
This commit is contained in:
gmp
2019-05-09 22:05:04 -04:00
parent 0d2321d516
commit 44b3b75e23
3 changed files with 321 additions and 80 deletions
+4 -6
View File
@@ -196,6 +196,7 @@ func Start() (err error) {
w.Import(Config.Imports)
w.SysImport(Config.Sysimports)
w.Pragma(Config.Pragma)
w.Delegate(Config.Delegates)
if Config.Vaargs == 0 {
Config.Vaargs = 16
}
@@ -215,13 +216,10 @@ func Start() (err error) {
w.AddFunction(x)
}
case *ast.ObjCProtocolDecl:
DELEGATES:
for _,ps := range Config.Delegates {
_ = ps
//if matches(x.Name,ps) {
// w.AddProtocol(x)
break DELEGATES
//}
if matches(x.Name,ps) {
w.AddProtocol(x)
}
}
case *ast.EnumDecl:
w.AddEnum(x,Config.Enums)