Post Reply 
Input works
12-06-2014, 08:21 PM (This post was last modified: 12-06-2014 08:22 PM by Giancarlo.)
Post: #1
Input works
Hello,
just testing the new input function and it seems to work pretty well so far. Inserted string, check boxes choose list, help strings, position and so on...

Here you are an example of code:

Code:
EXPORT Input_prova_6940()
BEGIN
 LOCAL A,B,C,D;
 INPUT({{A,[2],{15,35,1}},{B,2,{15,5,2}},{C,2,{55,15,2}},{D,{"uno","due","tre","12345678901234567801234567890123"},{20,70,3}}}, "Main title",{"Name", "Male","Female","children"},{"string A","flag B","flag C","How many children"},{"",0,0,0},{"",0,0,0});
 PRINT();
 PRINT(A + " " + B + " " + C + " " + D);
END;

here you are a screen shot:
[Image: 1c3d56d4-e7cf-4631-8593-4c5108a67441_zps26d3fbd7.png]

Thanks

Giancarlo
Find all posts by this user
Quote this message in a reply
12-06-2014, 08:25 PM
Post: #2
RE: Input works
Hello again,
the choose box is "1" based.

thanks

Giancarlo
Find all posts by this user
Quote this message in a reply
12-06-2014, 09:04 PM
Post: #3
RE: Input works
Does the check box behaves as a "radio button" in your example? (i.e. only one instance allowed to be checked)
Find all posts by this user
Quote this message in a reply
12-06-2014, 09:29 PM (This post was last modified: 12-06-2014 09:56 PM by Han.)
Post: #4
RE: Input works
(12-06-2014 09:04 PM)gabrieljcs Wrote:  Does the check box behaves as a "radio button" in your example? (i.e. only one instance allowed to be checked)

You can make the check box independent or have a number of them be interdependent (i.e. checking one will toggle of the other).

EDIT: If you look at the variable definition: {var_name, type, { position, width, row} }, the type value for a check box determines whether or not it is independent or dependent. For check boxes, the type is an integer n. If n>1, then that box and the next n-1 boxes are tied together (so that only 1 can be toggled). From what I can tell, the type value of the subsequent n-1 check box definitions doesn't seem to matter.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
12-06-2014, 09:33 PM
Post: #5
RE: Input works
(12-06-2014 09:04 PM)gabrieljcs Wrote:  Does the check box behaves as a "radio button" in your example? (i.e. only one instance allowed to be checked)

Yes, I tried it and if you check female, the check mark disappears from the male box and vice versa.

If you have more than three kids, you're in for a treat with this program, though.
Hope you can afford all those kids!

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
12-06-2014, 09:41 PM (This post was last modified: 12-06-2014 09:44 PM by gabrieljcs.)
Post: #6
RE: Input works
Nice! I couldn't test it, I'm on Linux and my VMs are not behaving well...

Also, Han, your Graph3D app is amazing!
Find all posts by this user
Quote this message in a reply
03-20-2015, 09:54 AM (This post was last modified: 03-20-2015 01:37 PM by Martin Hepperle.)
Post: #7
RE: Input works (but adds erroneous colon at the end of INPUT dialog labels)
Summary: One extra colon is appended to drop-down box labels. Width parameter is ignored.

The improved INPUT function (full description is only on the HP ftp site, not on the official HP Prime documentation pages) is a versatile command to create dialog screens.

However, when a drop-down box is specified, e.g. by

Code:
INPUT ( { {c,{"A","B","C"},{50,10,2}} }, "Title" );

an extra colon is appended to the label of the drop-down box.

The example leads to a label of the form "c::", i.e. with a duplicate colon at the end of the label.

If the additional list of labels for all INPUT dialog items is used,
e.g. by

Code:
INPUT ( { {c,{"A","B","C"},{50,10,2}} }, "Title", {"Select Character"} );

all labels are directly used without a trailing colon, except for the drop-down box control.

In case of the label "Select Character" for a drop-down box the resulting label will read "Select Character:"
The labels for text fields or check boxes do not exhibit this behavior, here the label would be presented without a trailing colon.

Finally: the drop-down box seems to extend always to or beyond the right edge of the screen, ignoring the width argument.


Maybe these two inconsistencies/bugs could be fixed in a future release.

Martin
Find all posts by this user
Quote this message in a reply
03-20-2015, 12:33 PM
Post: #8
RE: Input works
(03-20-2015 09:54 AM)Martin Hepperle Wrote:  The improved INPUT function (full description is only on the HP ftp site, not on the official HP Prime documentation pages) is a versatile command to create dialog screens.

Martin - Where is the full description on the ftp site, if not part of the official Prime documentation, which I understand to mean the docs that come with the virtual Prime?

The manuals in [ftp://ftp.hp.com/pub/calculators/Prime/Documentation/Calculator/EN/] are (should be) the same as those included when you install the virtual Prime.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-20-2015, 01:30 PM (This post was last modified: 03-20-2015 01:33 PM by Martin Hepperle.)
Post: #9
RE: Input works
(03-20-2015 12:33 PM)rprosperi Wrote:  ...
Martin - Where is the full description on the ftp site, if not part of the official Prime documentation, which I understand to mean the docs that come with the virtual Prime?

The manuals in [ftp://ftp.hp.com/pub/calculators/Prime/Documentation/Calculator/EN/] are (should be) the same as those included when you install the virtual Prime.

Yes, it is in the latest version of the manual - what I meant is that the innocent users goes first to HP's main and then their calculator web site and downloads the manual(s) from that site. He will find a "User's Manual" and a "User's Manual Phase 2" (whatever Phase 2 means stays obscure) and these are old manuals which do not describe the options of having lists as parameters to the INPUT function.

The virtual calculator seems to come with the manual as it is found on the ftp site (probabably the latest version) but I would not assume that everybody finds that manual. I think it should be made clear which manual goes with which firmware so that the average, non-engineer geek and kid can easily find out which manual fits his calculator.

Martin
Find all posts by this user
Quote this message in a reply
03-20-2015, 03:19 PM
Post: #10
RE: Input works
(03-20-2015 01:30 PM)Martin Hepperle Wrote:  
(03-20-2015 12:33 PM)rprosperi Wrote:  ...
Martin - Where is the full description on the ftp site, if not part of the official Prime documentation, which I understand to mean the docs that come with the virtual Prime?

The manuals in [ftp://ftp.hp.com/pub/calculators/Prime/Documentation/Calculator/EN/] are (should be) the same as those included when you install the virtual Prime.

Yes, it is in the latest version of the manual - what I meant is that the innocent users goes first to HP's main and then their calculator web site and downloads the manual(s) from that site. He will find a "User's Manual" and a "User's Manual Phase 2" (whatever Phase 2 means stays obscure) and these are old manuals which do not describe the options of having lists as parameters to the INPUT function.

The virtual calculator seems to come with the manual as it is found on the ftp site (probabably the latest version) but I would not assume that everybody finds that manual. I think it should be made clear which manual goes with which firmware so that the average, non-engineer geek and kid can easily find out which manual fits his calculator.

Martin

Thanks for clarifying Martin, I thought you were referring to additional docs.

Tim/Cyrille - I just checked and indeed the manuals online from the main Prime webpage "Learning Tools" tab has links to:

Prime User Guide - p/n NW280-2001, Edition 1, dated July 2013

Prime Quick Start Guide - p/n NW280-1001, Edition 1, dated May 2013

Suggest those responsible for keeping such things updated be sacked.

Since the "current" versions (released with f/w in Dec) are now several months old, maybe its best to replace the old ones when the next version is released, so that you don't have to ask them to do their job more than once within a few months.

Of course anyone getting the updated f/w gets the latest docs, but 1. many folks never even figure that out, and 2. many other folks seeking info will look first on the website and never think to dig further, since after all, this is where one should expect to find them. I go to HP's various websites daily for drivers and docs, and they generally are up to date.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-23-2015, 03:15 PM (This post was last modified: 03-23-2015 03:17 PM by Martin Hepperle.)
Post: #11
INPUT function adds erroneous double quotes to clear-string arguments
Summary: The optional clear-string argument to the INPUT function does not work properly for string variables.

While testing the various options of the INPUT function I found ... another bug.

This "feature" of the INPUT command is related to input fields declared to receive variables of type string.
The user can enter a string without double quotes into these fields, which makes sense and is expected.
On return from the INPUT function call the variable contains the desired string as entered (without any extra quotes).

However, if a clear-string is supplied (either directly as a string in the call to the INPUT function or via a string variable), the clear (back-arrow) action fills the edit field with the clear-string, but erroneously encloses it in double quotes.
When the INPUT dialog is then terminated with OK, the resulting string contains these quotes.

Fix: the clear action or INPUT function parameters of type string should insert the string _without_ quotes.

Martin
Find all posts by this user
Quote this message in a reply
03-24-2015, 06:37 PM
Post: #12
RE: Input works
Thanks for the 3 issues. I've filed them.

(for reference, this is what I parsed - if I've missed anything please point it out)
a) choose width
b) choose label extra ":"
c) reset with string on clear

Anyone aware of any further INPUT issues?

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
02-06-2018, 06:00 PM
Post: #13
RE: Input works (How about conditional drop down list?)
Hello, is it possible to create conditional drop down list on INPUT command as in Home Settings Page 3? (i.e. user choose second element from the list, then show B input box except for A)

Some pictures about this
[Image: Pic1.png]
[Image: Pic2.png]
Find all posts by this user
Quote this message in a reply
02-06-2018, 06:08 PM
Post: #14
RE: Input works
Not currently, no.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
02-06-2018, 10:20 PM
Post: #15
RE: Input works
Hello,
i was just thinking of an initial drop down box that when a user select an item that triggers another input screen (with a clone of the initial drop down box) and other different setting you may require.

in principle you could build an input screen for each choice of the initial drop down box.

Not a very efficient code but it could work

thanks

Giancarlo
Find all posts by this user
Quote this message in a reply
02-07-2018, 03:31 AM
Post: #16
RE: Input works
Thanks for the quick response, I'll try that after my exams and share the results.
Find all posts by this user
Quote this message in a reply
02-08-2018, 10:09 PM
Post: #17
RE: Input works
I also went to the hp website only to find the older manuals. Instead I had them the entire time in my virtual calculator folder.

Thanks for the tip.
Find all posts by this user
Quote this message in a reply
Post Reply 




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