I have this.

Enter code here...
package main

import (
    "fmt"
    "log"

    "github.com/sciter-sdk/go-sciter"
    "github.com/sciter-sdk/go-sciter/window"
)

var w *window.Window

func init() {
    var err error
    w, err = window.New(sciter.DefaultWindowCreateFlag, sciter.DefaultRect)

    if err != nil {
        log.Fatal(err)
    }
}

func main() {
    w.SetResourceArchive(resources)
    w.LoadFile("this://app/conect.html")

    w.DefineFunction("goConect", goConect)

    w.Show()
    w.Run()
}

func goConect(vals ...*sciter.Value) *sciter.Value {
    fmt.Print(vals)
    w.LoadFile("this://app/cauta.html")
    return nil
}

Can var w *window.Window be avoided?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to