Please show your most complex PICTURE

Moderator: Rathinagiri

User avatar
mol
Posts: 3220
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 224 times
Been thanked: 125 times
Contact:

Re: Please show your most complex PICTURE

Post by mol » Fri Dec 16, 2011 10:39 am

l3whmg wrote:Hi guys.
@Mol: about BACKSPACE or DEL with masquered field you can only "overwrite" the position with a valid character.
If I have a TEXTBOX with this picture "AAA", IMHO, you must enter a valid char in every position (eg. you must enter "FrE").
In this condition, DEL or BACKSPACE are unuseful because you must not remove the character (or the position). On the other hand, if I use DEL or BACKSPACE, what is the right character? NULL it's wrong, SPACE can be considered wrong, etc. because the picture in that position say "A". The string of codes (the mask) give us these informations: 1) what is a valid character (simple coding "A", "X", "N", "9") and the length (f.e. 3 characters must be entered and they must be in the range A-Z and a-z). If you have time, take a look to the codes related with QT inputmask. F.e. they have these codes:
"A" (like Clipper) and it means "required" and "a" (like clipper) but it means "not required". On the other hand, there is another parameter at the end of the QT inputmask and its significate is: instead space what is the "null" character to fill out the string? For example, you can create this Qt inputmask: "NnN;*" and enter "A2b" or enter "A b" but you will see "A*b". Output text must be 3 length.
I understand your philosophy, but it's really irritating when you enter wrong letter and must press arrow to return to right position and type right character...
It could be realised in this way, that only characters matching to PICTURES are deleted and spaces are insterted, other characters remain immobile on original position.
Final verification should be realised by programmer after leaving the field.
PICTURE class should be helpful in data entry, but can not be validation of entered data..

Uff, sorry for my bad English :)

Best regards, Marek

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Post by l3whmg » Fri Dec 16, 2011 10:57 am

Hi Mol
Me too I'm sorry for my English ;)
mol wrote:but it's really irritating when you enter wrong letter and must press arrow to return to right position and type right character...
I do a test with my example (I don't change anything about lib, only a little demo restyle) but when there is a mask and you enter a wrong character cursor it's not moved :!: :?:
mol wrote:only characters matching to PICTURES are deleted and spaces are insterted
Can be a problem about SPACE: if the picture is "999" do you think must be inserted "0" (zero) or SPACE? IMHO, must be inserted "0". Can be an evolution, I know, but at this moment I want to give us "a good" way to enter data; then, we can do any update. But remember my example.

IMO, I believe that the clause "PICTURE" can be understood in many different ways for each of us.
Luigi from Italy
www.L3W.it

User avatar
mol
Posts: 3220
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 224 times
Been thanked: 125 times
Contact:

Post by mol » Fri Dec 16, 2011 12:01 pm

l3whmg wrote: I do a test with my example (I don't change anything about lib, only a little demo restyle) but when there is a mask and you enter a wrong character cursor it's not moved :!: :?:
Writing "wrong" a had a mistake like "Q" not "W" or "9" not "8" :)
Can be a problem about SPACE: if the picture is "999" do you think must be inserted "0" (zero) or SPACE? IMHO, must be inserted "0". Can be an evolution, I know, but at this moment I want to give us "a good" way to enter data; then, we can do any update. But remember my example.

IMO, I believe that the clause "PICTURE" can be understood in many different ways for each of us.
SPACE is better than 0, Ithink.
Because:
" 99" has still 99 value
"99 " too

but:
"099" OK
"990" not OK

It's hard to describe everything I'm thinking about.

Marek

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Post by l3whmg » Fri Dec 16, 2011 12:35 pm

Hi Mol
Ok I understand your POW about wrong.... the solution is to highlight (SHIFT+LEFTRow) the character and retype. I know it's different, but.... we will have time to improve.

About other problem: with current demo you are managing strings not numbers (there will be another demo). Can be this the problem ?
Anyway, a string can be formatted with a picture clause and this demo manages this data type. I don't want to be tedious.... but with:
  • A) picture "AAA-AAA" you must have a valid starting value (f.e. "abc-def) and you must enter valid chars in according with "A". So, you can enter "HgF-OyT" but you can't enter "H F-OyT"
  • B) picture "XXX-XXX" you must have a valid starting value (f.e. "abc-def") and you must enter valid chars in according with "X". So, you can enter "HgF-OyT" AND you can enter "H F- T"
What I means is: when there is a mask, starting value and entered characters must be in according with picture clause or, in other words, with every single character codes in related position else is a wrong data. You must think about a secure code: you can enter only digit and length is 5. Your personal code is "09763". Do you enter "09763" or "9763" ?

About numbers it's different.

I hope my little brief (or POW) is clear.
Luigi from Italy
www.L3W.it

User avatar
mol
Posts: 3220
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 224 times
Been thanked: 125 times
Contact:

Post by mol » Fri Dec 16, 2011 4:46 pm

I agree that's clear.
Besides, mask is useful, but, onerous for inaccurate users :D

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Post by l3whmg » Fri Dec 16, 2011 5:02 pm

Hi Mol.
I'm in agreement with you. As many other, I don't use complex PICTURE (f.e. I split the field in sub-field, etc. and the field is like a freeware text; then I do check of the value.), but this was to keep compatibility (or my better POW about compatibility) with HMG3.

Cheers.
Luigi from Italy
www.L3W.it

Post Reply