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

Update docs #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ricochet2200
Copy link

I noticed in wdetest.go it imports the init directory rather than importing the way the docs suggest. This seems to be a more convenient way to import in most cases and so I update the docs to reflect that.

As I didn't consult with anyone before making these changes, feel free to reject this pull request if there is a reason it is the way it is or if you just don't like my change.

wde.Run(), wde.Stop() and wde.NewWindow() without referring to the
backend explicitly.

If you would like to disable a backend, you must import all
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this part at all. You should only ever import one backend. It so happens that the init package uses build rules to import one based on the platform.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming your trouble is with the line: "If you would like to disable a backend, you must import all...".

When I said "import all", I meant create files with the appropriate names so that the build rules will import the correct one. It could maybe be changed to "create import files for all".

The idea was if you did not want your project to support say...OSX for some reason, you could manually import the other 2 backends by creating files with the appropriate filters rather than importing init. This would effectively "disable" being able to build for OSX. Perhaps this is not worth including, but I thought you did a good job explaining how to manually import so I didn't want to delete it.

All I really want with this PR is to update the documentation to say you can do:

import _ "github.com/skelterjohn/go.wde/init"

and it will register the right backend for you. I won't be offended if you reject this PR and add it to the documentation in a better way. sigh Writing is hard :( Sorry for the confusion.

@sqweek
Copy link
Collaborator

sqweek commented Aug 23, 2015

This section of the docs in particular should be in the README imo. Unless OSX is your primary development platform the portable program structure is easy to overlook as everything works fine in linux/windows without ever calling wde.Run/Stop.

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

Successfully merging this pull request may close these issues.

3 participants