Post Reply 
HP48G soft menu toggle: How?
10-02-2023, 11:09 PM
Post: #24
RE: HP48G soft menu toggle: How?
(10-02-2023 10:23 PM)DM48 Wrote:  When my program starts up, it checks to see if the FLAG has been set or not. It then gives the soft menu item the correct flag status on item. I am not understanding how to refresh the menu without writing another sub-routine to do exactly that and no more. Is this correct?

1. Program Starts
2. Menu created [ed. by a single subroutine]
3. Key pressed that changes the flag
4. Program calls upon sub-routine [ed. from step 2] to create the menu

With my editorials above, that's pretty much how I'd do it.

Quote:It seems from the above I have to code this up twice. Is this about the go of it? I was hoping I was not looking at this correctly.

No, no need to code anything twice. I'm a software engineer and my dictum is "coding anything twice is bad." Any given functionality should have its home in only one place: then if you change it later, it changes everywhere. Strive to make each separate routine or function general purpose -- this helps. The "code only once" precept is also good for figuring out what code should be split out into a subroutine.

Does that make sense?

Daily drivers: 15c, 32sII, 35s, 41cx, 48g, WP 34s/31s. Favorite: 16c.
Latest: 15ce, 48s, 50g. Gateway drug: 28s found in yard sale ~2009.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP48G soft menu toggle: How? - DM48 - 07-23-2023, 02:11 AM
RE: HP48G soft menu toggle: How? - DM48 - 07-23-2023, 12:13 PM
RE: HP48G soft menu toggle: How? - DM48 - 07-23-2023, 05:56 PM
RE: HP48G soft menu toggle: How? - BruceH - 07-23-2023, 08:42 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-01-2023, 05:55 PM
RE: HP48G soft menu toggle: How? - johnb - 07-23-2023, 10:09 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-01-2023, 06:24 PM
RE: HP48G soft menu toggle: How? - DM48 - 07-24-2023, 02:11 AM
RE: HP48G soft menu toggle: How? - DM48 - 07-25-2023, 01:31 AM
RE: HP48G soft menu toggle: How? - DM48 - 07-25-2023, 04:57 PM
RE: HP48G soft menu toggle: How? - DavidM - 07-27-2023, 03:41 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-01-2023, 09:39 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-02-2023, 09:00 PM
RE: HP48G soft menu toggle: How? - johnb - 10-02-2023, 09:55 PM
RE: HP48G soft menu toggle: How? - johnb - 10-02-2023, 10:02 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-02-2023, 10:23 PM
RE: HP48G soft menu toggle: How? - johnb - 10-02-2023 11:09 PM
RE: HP48G soft menu toggle: How? - DM48 - 10-03-2023, 12:42 AM



User(s) browsing this thread: 4 Guest(s)