miketheprogrammer / go-thrust

Cross Platform UI Kit powered by Blink/V8/Chromium Content Lib
MIT License
445 stars 34 forks source link

Add checkUrl before NewWindow #47

Closed francisbouvier closed 9 years ago

francisbouvier commented 9 years ago

Signed-off-by: Francis Bouvier francis.bouvier@xerus-technologies.fr

francisbouvier commented 9 years ago

Hi @miketheprogrammer ,

A small PR in order to perform a quick check on the url parameter of the NewWindow function.

If the url scheme is empty this helper try to load the file from current directory. So you can do:

thrust.NewWindow("index.html", nil)

If there is an error nothing happens as I don't know how you want to handle errors: panic or return error to the developer and let him handle it.

francisbouvier commented 9 years ago

@cbandy

You're right, it makes more sense to return the argument of the failing call.

francisbouvier commented 9 years ago

@miketheprogrammer Thanks and congrats.

Unfortunately I have too few experience in C or C++ to help with Thrust core, but I will be happy to be part of the discussion regarding the direction of the project. I can help with the bindings in Python, Go and Javascript.