Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make wxGo follow wxPython API #77

Open
programmingkidx opened this issue May 17, 2022 · 2 comments
Open

Make wxGo follow wxPython API #77

programmingkidx opened this issue May 17, 2022 · 2 comments

Comments

@programmingkidx
Copy link

wxGo is a much easier to use language than C++. It has features that make it more similar to Python than C++. So I think it would be better if wxGo was made more like wxPython rather than the C++ based wxWidgets library. wxPython is way easier to use than wxWidgets and is officially supported by the maintainer of wxWidgets. An entire program in wxPython is this simple:

import wx
app = wx.App()
frame = wx.Frame(None, title="Main window")
frame.Show()
app.MainLoop()

My first suggestion is change the name of widget creating functions by removing "New" from the name. So instead of NewFrame() it would be Frame().

@emperor-limitless
Copy link

I'm not the maintainer nor a contributor, But it seems you didn't understand go properly yet. Go only has structs, Which has no constructor function to them. They're like C structs, So the way the go people make a constructor to a struct is making a function and calling it
For example.

type MyStruct struct {
    MyField string
}
func NewMyStruct(field string) *MyStruct {
    return &MyStruct { MyField: Field }
}

Also, This repo was last updated at 2018 and the readme clearly states it's sadly no longer maintained. Would be fun to use wx with go but it seems the interest for this library is dropping with everyone with each day.

@programmingkidx
Copy link
Author

Yeah I am new to Go. Thank you for the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants