StanWarford / pep9suite

Pep9Suite is a suite of software for the Pep/9 virtual machine described in the text Computer Systems, J. Stanley Warford, fifth edition.
http://computersystemsbook.com
Other
16 stars 7 forks source link

Feature: prevent overwriting Object Code #117

Open fstonedahl opened 2 years ago

fstonedahl commented 2 years ago

When students first start using Pep/9 in Chapter 4, they often "accidentally" hit the "green run button" when they mean to choose "load object code". This then overwrites all of their painstakingly typed object code (and displays the red "ERROR: Missing .END sentinel").

It would be more user-friendly if, whenever the "source code tab" is blank/empty, clicking assemble would NOT overwrite the object code, and could instead pop up a friendly message like "You haven't entered any assembly language to assemble. If you writing object code directly, then you should use the 'load object code' option instead."

Matthew-McRaven commented 2 years ago

The code editing pane has two distinct modes, assembly code writing and object code writing. Some buttons only make sense in a particular mode, i.e. formatting assembly code is pointless when your working on object code, and there's little reason to load object code directly then you're writing an assembly code program.

I would propose that the editing pane would remember which mode you are in, and if you attempt to hit a button whose feature is not meaningful in your current mode, a popup box would appear, asking the user if they're sure they want to perform that action.

This should prevent users from accidentally deleting their object code.

StanWarford commented 1 year ago

Good idea. Let’s put it on our todo list. —Stan

On Apr 8, 2022, at 8:14 AM, Matthew McRaven @.***> wrote:

The code editing pane has two distinct modes, assembly code writing and object code writing. Some buttons only make sense in a particular mode, i.e. formatting assembly code is pointless when your working on object code, and there's little reason to load object code directly then you're writing an assembly code program.

I would propose that the editing pane would remember which mode you are in, and if you attempt to hit a button whose feature is not meaningful in your current mode, a popup box would appear, asking the user if they're sure they want to perform that action.

This should prevent users from accidentally deleting their object code.

— Reply to this email directly, view it on GitHub https://github.com/StanWarford/pep9suite/issues/117#issuecomment-1092982137, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU5TSB7KJ3JAYXIQYFLR33VEBEMPANCNFSM5Q2P2U5Q. You are receiving this because you are subscribed to this thread.