Easier way to re-edit programs

General Discussions about ND1

Easier way to re-edit programs

Postby tcab » Wed Apr 25, 2012 1:13 am

Is there a simpler way of re-editing programs? I get that you can retrieve the program easily enough by pressing and holding the key to which its assigned. Exiting out of editing is done with enter (otherwise known as the up arrow symbol). But now the program object is on the stack and not assigned to the key - I have to manually type in the existing name e.g. 'doblah' enter STO (i.e. the weird -> * symbol) to update the program. Isn't there an easier way of editing?

Also, when I press and hold to edit a program the iphone keyboard pops up and I can't get access to the -> and << and other special keys on the ND0 calculator keyboard. The only way to get rid of the iphone keyboard is to exit editing mode by pressing enter. Then I have to laborious also close the iphone keyboard by pressing Done on the iphone keyboard. Now its too late and my half finished program is on the stack. There seems to be no proper way to edit and get access to the proper symbols - this seems to be a SHOW STOPPER for editing RPL style programs. Or am I missing something?

Also - why can't entering a program definition via the 'MyData' section of ND0 give me a full screen and proper keyboard for entering and editing and re-editing programs? And a copy operation. Such a change would solve a lot of the fiddly-ness of working with programs.

Oh there is still a bug where sometimes the bottom bar disappears completely (the one with definition/ND0/Help/My Data) and I can't get it back, and have to kill ND0 and restart it. Its rare but still happens.
tcab
 
Posts: 6
Joined: Sun Apr 15, 2012 9:28 pm

Re: Easier way to re-edit programs

Postby oliver » Wed Apr 25, 2012 9:32 am

Hi tcab,

Thank you for asking these questions. You're making some very good points.

I have to manually type in the existing name e.g. 'doblah' enter STO (i.e. the weird -> * symbol) to update the program. Isn't there an easier way of editing?


There's a somewhat easier way: tap ', your program's soft-key, →*. That's three keys.

Based on your feedback, I'll look into improving this. I considered making Enter save the edited program for zero keystrokes. But sometimes it's not desired to overwrite an existing program, but instead store the modified version under a different name. Or, when inserting a HALT, to not store it at all, but run it from the stack (via Eval). In my mind, the best solution would be to have two ways to enter: one "enter-to-stack", one "update contents". (Latter could be realized via a press-and-briefly-hold on Enter.)

There seems to be no proper way to edit and get access to the proper symbols - this seems to be a SHOW STOPPER for editing RPL style programs. Or am I missing something?


There IS the Program menu, which has soft-keys for ≪ ≫ and → ≪.
The (silent) assumption when writing multi-line RPL programs is to use these keys.

Or, to use RPL+, where you don't need these keys in the first place! (You use = for and you don't need to open a new context via ≪ ≫. If you need a fragment program for list processing functions and others, you use [ ] to enclose it, instead of ≪ ≫.)

I write a lot of RPL(+) on the device. I start by using ≪ from the keypad and then double-tap to get the multi-line editor. I mostly write RPL+ and subsequently don't need ≪ and ≫. If I write RPL and need them, I get them from the Program menu.

By the way, if you prefer STO and ENTER, switch to Classic mode (via Settings app). The classic keyboard actually gives you access to while the iOS keyboard is up. The assumption is that Classic guys will need it more often.

In both modes the challenge is how/where to fit keys on a screen that's a lot smaller than a 50g, while offering a larger editing area.

I give multi-line editing in the My Data section some thought, but I don't think it makes so much sense, as you really need/want access to soft menus when writing code. I hope zero-stroke content editing will address your need.

You do know that you can use standard iOS Copy/Paste (and Undo) for program text, right?

The bottom bar is known to disappear when you hold-tap a built-in function for Help, while using the keyboard in expanded mode. This is scheduled to be fixed with the next update.

Thanks for your feedback!
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Re: Easier way to re-edit programs

Postby tcab » Wed Apr 25, 2012 10:03 pm

There's a somewhat easier way: tap ', your program's soft-key, →*. That's three keys.

I don't understand this. Say I'm editing my program - what exactly do I do to save it back from whence it came?

Hitting the program's soft key merely inserts that text into my program text. Hitting →* also inserts that command into my program text. This cannot be what you mean.

If you mean hit enter first, to put the program on the stack, then hit the program's soft key - well all this does is execute the functionality that is inside the hot key.
If you mean hit enter and then hit ' to quote, and then hit the program's soft key - well yes that puts the name of the hot key on the stack but I have to backspace to get rid of the automatic ( that is on the end of it. Then hit →*

Did you notice that in the Hp48 and related simulators, to edit an existing program, you press ' softkey enter edit and when done, simply press enter.
tcab
 
Posts: 6
Joined: Sun Apr 15, 2012 9:28 pm

Re: Easier way to re-edit programs

Postby oliver » Wed Apr 25, 2012 11:26 pm

This sequence was meant to occur after Enter. There's no need to delete the "(" character. ND1 ignores it (even "()") when you store.

Yes, I understand that on HPs there's two ways to commence an edit; where one is doing an in-place edit.

What do you think about holding Enter briefly to store in-place, instead of pushing onto the stack? The key sequence to edit a program would then be: briefly hold soft-key, do your edit, briefly hold enter.

It seems to me advantageous to have the in-place store or stack push decision at the end of editing, as this permits one to change their mind. Also, the proposed key sequence seems minimal. I'll aim to have this with the next update.
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Re: Easier way to re-edit programs

Postby tcab » Thu Apr 26, 2012 4:00 am

What do you think about holding Enter briefly to store in-place, instead of pushing onto the stack? The key sequence to edit a program would then be: briefly hold soft-key, do your edit, briefly hold enter.

Sounds like a great solution!

Also please consider enhancing the 'My Data' section with filing and full screen editing facilities. Like the file manager on the HP48 etc calcs - except all done iPhone style. It would be great to paste in and edit JavaScript or maybe one day even coffeescript? code and run it, manage your buttons etc - very powerful and completely consistent with iPhone metaphors. Not sure if you could get sub folders in there too... And if you could get it all iPad sized and with a print roll too - that would be icing on the cake!
tcab
 
Posts: 6
Joined: Sun Apr 15, 2012 9:28 pm

Re: Easier way to re-edit programs

Postby tcab » Thu Apr 26, 2012 5:34 am

Actually...playing around a bit more with 'My Data' and 'Definition' sections I see they are both similar, offering ways to attach functionality to buttons and the menus/functionality within.

Unfortunately when I define a soft key or add a key in the 'Definition' section - the keyboard of the calculator gets too many keys and the layout of the keyboard gets pushed around and skews, and the display screen gets clipped - so I don't see the point. Add a few more keys and you won't be able to see the display screen!

And I don't see the point of being able to edit 'definitions' - since they almost all rely on special symbols which are not available on the iPhone keyboard. Same is true for 'my data' editing - no access to special key symbols, and very cramped to edit on a single line.

And on a conceptual level I think it's confusing to be able to define a key in both the definitions section and also the my data sections. What is the difference. Perhaps user definitions are for constants and my data entries are for both constants and programs. Still it's conceptually all a bit much.

I'm not a huge user of this app and haven't read all the documentation, so am putting forward this feedback based on limited learning of your app. It's frustrating to see so much potential in this app, held back by odd and perhaps incomplete GUI and design decisions. Another one that comes to mind is the use of strange symbols. It took me ages to figure out the EVAL key was the apple looking symbol. And another long while to remember the differences between all the variable storage symbols. Do we really need a *-> and also a *| as two subtly different ways of recalling a variable? I could go on - but perhaps have said enough for this post!
tcab
 
Posts: 6
Joined: Sun Apr 15, 2012 9:28 pm

Re: Easier way to re-edit programs

Postby oliver » Thu Apr 26, 2012 8:57 am

Thanks for your continued feedback.

There's a big difference between Definition and My Data: In Definition you can redefine the global keys and menus of the calculator, whereas in My Data you manage user data. Former globally affects keys and menus, latter only affects the row of soft-keys (and only when you stepped into the appropriate folder).

Yes, if you add a key to the global definition, the layout will break. Definition currently has the main purposes of editing keys or moving them around. Say you don't like a key-cap: change it. Say you need a certain a function on a key but can live without an existing one: swap the old one out. Say you want the enter key in a different place: move it.

In the near future, Definition will be tied to multiple calculators and you can build, save, and share your own specialized calculators. You'll be able to use more UI elements than just buttons. Sliders, etc. will work too.

The other thing is custom menu definitions. This is quite powerful and gives you a means to define a menu that's available through the menu key and can be used in addition to user data.

As far as ability to use special characters: you can copy/paste them. One of the specialized calculators in the update I just mentioned is a Unicode selector, where you can use a slider to access them all.

My Data is meant to be mainly used for deleting and re-arranging user data items. Not so much for creating them. Except, folders are created here and their contents are uploaded to/downloaded from the cloud.

Yes, the key caps are strange. But so are STO and RCL and other key caps on HP calculators to people who never used them. The advantage of symbols is that they consume less space. The * sign is used consistently to designate "user data".

If you don't like them, there's an easy fix: switch to the Classic keypad. Read the welcome page to see how to do that.

Hope this helps.
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron