CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: Hayleia on November 14, 2015, 02:02:47 PM

Poll
Question: What interface do you like most ?
Option 1: type label name
Option 2: list all labels and navigate
Option 3: display nearest label, use up/down to change choice and confirm
Option 4: don't display anything, jump directly to nearest with up/down
Title: PHASM: label jumping feature, with poll
Post by: Hayleia on November 14, 2015, 02:02:47 PM
Hello there.

Epharius wants to implement a feature like zStart's label menu (if zStart is installed press ON+Vars while editing a program and you'll see a list of all your labels which allows you to select the one you want and jump to it). But he is hesitating on the interface of that feature.

You have the choice between these features: press/hold a key (or two or whatever, we'll see what triggers the hook later) while editing...

  • then type the name of the label you want to jump to and PHASM will jump to it
  • and you see a menu listing all labels, which allow you to navigate through labels and select the one you want to jump to (zStart's way)
  • and you see the name of the nearest label in the code relative to the current cursor position, use Up and Down to choose previous/next and validate somehow (release keys, timeout, press a key, whatever, we'll see)
  • then press up/down to jump directly to the previous/next label without displaying any menu
  • a combination of the aforementioned choices
Title: Re: PHASM: label jumping feature, with poll
Post by: Dream of Omnimaga on November 14, 2015, 02:35:45 PM
I voted the last option. While it's more simple, it's also the fastest, and since label names are only 2 characters long, we can't use meaningful names for them and I remember always forgetting them before. I would like such feature, though, because it takes several minutes to scroll through code on that calc. Typing the label name as a search feature would be nice as well, though.
Title: Re: PHASM: label jumping feature, with poll
Post by: novenary on November 14, 2015, 02:43:50 PM
Well, an easy way to have longer label names is to comment the label out (eg write "Lbl ASDF). I'm voting for the second option because that's how it is in zstart and it works well. Also make sure to keep the labels in the order they are in the code, don't sort them by alphabetical order.
Title: Re: PHASM: label jumping feature, with poll
Post by: Dream of Omnimaga on November 14, 2015, 02:45:03 PM
But then that slows down program execution and makes Ans unuseable. Storing a string into Ans takes like 0.1 seconds in TI-BASIC, which is a lot when you desperately try to keep your game above 3 FPS. This is why nobody comments their code in TI-BASIC.
Title: Re: PHASM: label jumping feature, with poll
Post by: novenary on November 14, 2015, 02:50:39 PM
Fair enough, I did it in Axe myself (commented out labels for easy navigation), but that doesn't work as well for basic. Maybe some custom label token could be added for basic ? Or a comment token I guess. Since PHASM already uses the parser hook I think it's a good idea.
Title: Re: PHASM: label jumping feature, with poll
Post by: Adriweb on November 14, 2015, 07:07:58 PM
What I proposed most was a catalog-like menu listing things (but also with the first menu item as a special case to let the user type stuff), I think it's the more convenient

(details of what I mean here (https://tiplanet.org/forum/viewtopic.php?p=192199#p192199))
Title: Re: PHASM: label jumping feature, with poll
Post by: Hayleia on November 14, 2015, 08:19:41 PM
(Also, as you may have noticed, there is the same poll on TI Planet (except for the third choice that Epharius decided to remove) but you obviously only vote on one so we know exactly what people want without having people who voted twice :P)
Title: Re: PHASM: label jumping feature, with poll
Post by: Dream of Omnimaga on November 19, 2015, 07:37:06 PM
Has he made his decision yet by the way? I know he doesn't post as much outside TI-Planet but he didn't post a lot there either so I wasn't sure if there were any updates.
Title: Re: PHASM: label jumping feature, with poll
Post by: Hayleia on November 19, 2015, 07:49:16 PM
He doesn't post a lot on TI Planet either :P
More than here, I agree, but he mostly tells about progress on the chat.

From what I recall, he plans on doing the menu listing all labels first, then he'll see about the other methods.
Title: Re: PHASM: label jumping feature, with poll
Post by: Dream of Omnimaga on November 19, 2015, 10:39:48 PM
I hope it helps speeding  up development nonetheless. Did he have any luck implementing routines to go to specific code instantly?
Title: Re: PHASM: label jumping feature, with poll
Post by: Hayleia on November 20, 2015, 09:44:24 AM
Seems like he has something working about this since you can press (alpha) (enter) to jump directly to the end of the code. At least according to the archive description because I did not remember reading this anywhere else -.-
Title: Re: PHASM: label jumping feature, with poll
Post by: Dream of Omnimaga on November 20, 2015, 05:18:40 PM
That would be another nice feature actually. Casio calcs have this feature.