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

Interesting project. A Few problems #1

Open
1 of 3 tasks
Lewiscowles1986 opened this issue Jul 8, 2024 · 9 comments
Open
1 of 3 tasks

Interesting project. A Few problems #1

Lewiscowles1986 opened this issue Jul 8, 2024 · 9 comments

Comments

@Lewiscowles1986
Copy link
Contributor

Lewiscowles1986 commented Jul 8, 2024

Hey 👋 this is very cool

Intended platform

It looks like it is Windows platform specific for a python bundled with tkinter. Might be a good idea to share with folks how you set that up. Just-in-case.

In my case; I'm on a mac; which doesn't bundle tkinter by default.

Using TKinter (mac instructions)

Homebrew

If folks are using homebrew, they can brew install python-tk; but some of the options are OS specific... Kinda defeating the purpose of a cross-platform library for GUI; but that is TK, not your project specific.

pyenv

For folks using pyenv (I happen to use homebrew and pyenv); an additional step; as well as running or doing something to install libtk and libtcl; is to ensure your python build supports dynamic libraries. env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.11.8.

There are more comprehensive guides which also cover linux; but I've only so-far tested with OSX

Bug?

I noticed, sometimes the creature would go left, right, left, or right, left, right. I narrowed this down to being at, the window border. Rather than call self.change_direction(), which involves random; I use self.dir = -self.dir, which simply put, reverses the direction.

Thanks for sharing this code. Hope some of this helps.

Update: Todo

  • Contribute documentation on OSX setup
  • Contribute fix for screen edge changing direction
  • Contribute fix for OSX transparent display
@echtejosh
Copy link
Owner

Hi @Lewiscowles1986 , thank you for your contribution. I also agree that we can find better ways for the pet to move around the taskbar, there isn't a lot of sophisticated behaviorism implemented into this project. Maybe, just maybe, you could contribute to this project also?

@Lewiscowles1986
Copy link
Contributor Author

Happy to contribute the bug fix. The OSX fix isn't done, as the display is still not rendering when the label and window are transparent.

@echtejosh
Copy link
Owner

It's also possible for us to use another framework that's more compatible for both windows and macos?

@Lewiscowles1986
Copy link
Contributor Author

So I don't know that a framework is needed at all, or that it's not specific to the libraries built by homebrew, that cause this issue.

I have not seen a single tk pet that works with my OSX out of the box. I Own several macs. None of them work.

I Do have a Qt one that works, but it feels a bit heavyweight a lift.

do you have any other suggestions around tooling or tech?

@echtejosh
Copy link
Owner

I'll take a look today!

@echtejosh
Copy link
Owner

Hi @Lewiscowles1986 , want to take a look at tkmacosx?

@Lewiscowles1986
Copy link
Contributor Author

I Just did, but it doesn't seem to solve much. Why, and how did you think these would help?

@echtejosh
Copy link
Owner

I wasn't sure whether the issue was with running the application, or whether the issue lies in the way these frameworks display elements on the desktop screen. I was thinking this would help.

@Lewiscowles1986
Copy link
Contributor Author

Ah, it's a bug in Tk (which is not in QT). I Spent some time with pyobjc today, seeing if I can make a native example and define a thin API. Not much luck yet.

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