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

Improved interactive development #157

Open
Kevinpgalligan opened this issue Jan 28, 2024 · 3 comments
Open

Improved interactive development #157

Kevinpgalligan opened this issue Jan 28, 2024 · 3 comments

Comments

@Kevinpgalligan
Copy link
Contributor

Kevinpgalligan commented Jan 28, 2024

Things to add:

  • (Gleefre's suggestion) Have a slot/option like :restart-on-redefinition nil, so the window doesn't have to restart every time the defsketch is recompiled. If someone is just tweaking the drawing code, for example, or how the state gets updated (as opposed to adding new state), then they may not need to restart the window. Or even if they're adding new state, maybe they don't need to refresh (this might require ensuring that the new draw doesn't get called before any new slots are added).
  • May also want another config option to control whether the slots are reinitialised with prepare.
  • A hook or hotkey (like close-on) to manually trigger restarts.

Together, these features would enable something closer to "true" interactive development.

@aykaramba
Copy link

I would love to see this feature because Sketch is really annoying in my tiling window manager ... on every recompile the window is restarted and my window manager renders the window in a slightly different place (which is correct for my workflow).

Anyone know what it would take to implement this feature?

@Kevinpgalligan
Copy link
Contributor Author

I've never been sure exactly how the window gets reinitialized. I imagine it's something to do with update-instance-for-redefined-class - maybe sdl2kit provides an implementation of that method that recreates the window? I'll look into it when I get the chance.

@aykaramba
Copy link

I am learning Lisp and don't know enough to dig in to that level my self yet. I will try to help if I can.

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