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-shape throws a Lisp exception when run on a sprite box that has been changed into a doit box #94

Open
rigdern opened this issue Jul 2, 2024 · 0 comments

Comments

@rigdern
Copy link

rigdern commented Jul 2, 2024

This issue raises the question: should the "Flip to Doit" command be allowed on sprite & graphics boxes?

Repro steps

I reproed this on Boxer 3.4.19 2024-06-24

  1. Make a new graphics box (Make > Graphics menu item)
  2. Name the sprite sprite
  3. Change sprite to a doit box (Box > Flip to Doit)
  4. Change the code in sprite.SHAPE to stamp-circle 20
  5. Outside of the graphics box, run the line tell sprite update-shape

Unexpected result: A Common Lisp exception is thrown:

Lisp Error:#(BOXER::INVALID-VALUE-BOX-INTERFACE (0.0 0.0) #<DATA-BOX 0.00 0... > #<DOIT-BOX Show-S... > BOXER::HOME-POSITION) fell through ETYPECASE expression inside BOXER:VIRTUAL-COPY.
Wanted one of (BOXER:VIRTUAL-COPY BOXER::VIRTUAL-PORT BOXER::BOX NUMBER SYMBOL BOXER::FOREIGN-DATA). 

The issue can also be reproed with update-shape repro.box.zip.

Potential fixes

I see two options for fixing the issue:

  1. Prevent sprite boxes from being flipped into doit boxes
  2. Or ensure an exception isn't thrown in running update-shape on a sprite box that is a doit box

# Should the "Flip to Doit" command be allowed on sprite & graphics boxes?

Sometimes when trying to click into a sprite or graphics box, I accidentally turn it into a doit box. This also happens sometimes when I hit the wrong keyboard shortcut. When this happens, the change is subtle: the corners of the box change from round to square. The box's label remains unchanged as "Graphics" or "Sprite". I often don't notice until later that the sprite/graphics box has become a doit box.

So I think (1) could improve the user experience.

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

1 participant