@Z not working

Post Reply
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

@Z not working

Post by hag »

Picture "@Z" seems not to be working. If I select enter on the get it should remove the existing value and let me enter a new value. Not working.

It leaves the last value of mprod_num and if I enter a new value it adds to the old value instead of removing it.
mprod_num is a character.

Code: Select all | Expand

REDEFINE GET oGet[1]  VAR mprod_num  ID 105 OF oDlg12 PICTURE "@K" UPDATE valid(lValue := fVal(mprod_num),if(lValue == .t.,(getprice(odlg12),getnumber(odlg12,oGet2),newData(oDlg12)),mprod_num := space(20)),.t.) 
Thank you
Harvey
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Hag,

Hmm, did you mean the "@K" picture is not working?

James
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

Sorry @K....
Thank you
Harvey
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Hag,

If you remove the VALID clause do you still have the same problem?

James
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Post by nageswaragunupudi »

I guess the effect of @K picture clause is that if we enter any text, it clears the buffer and takes our key strokes, but if we press Enter, the orginal text remains
Regards

G. N. Rao.
Hyderabad, India
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Hag,

>If I select enter on the get it should remove the existing value and let me enter a new value. Not working.

I assume that you are saying that if you arrive at the GET using the Enter key from a previous GET, then the existing value remains.

As NageswaraRao says, this is not the way it is supposed to work. From the Clipper manual:

"@K Deletes default text if the first key is not the cursor key."

James
User avatar
Antonio Linares
Site Admin
Posts: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Post by Antonio Linares »

This example is working fine here:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local oDlg, cText := "Hello world!"

   DEFINE DIALOG oDlg TITLE "@K test"

   @ 2, 2 GET cText PICTURE "@K"

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

All:
Regarding "@K"

I've done everything I can think of and it won't work. The get is a 20 character value.
And it seems the only way to do it is swipe the characters
to highlight them then they can be changed.

Is there a way when placing an ibeam or left clicking on the get it can automatically hilight all the characters like an internet address bar does.

Thanks all
Thank you
Harvey
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Harvey,

Did you try Antiono's example? I just tried it and it is working fine here. Run the program, type any character and all the text vanishes. If you use the right arrow key, instead, then you can move anywhere in the text. This is exactly how it is supposed to work.

Perhaps you were expecting it to work differently?

If yours is not working like the above description, then either you have an old version of FWH (the @K was broken some time back--a couple of years ago), or there is something else in your code causing the problem.

I am using FWH 8.05.

James
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

James
The only difference between Antonios code and mine is he doesn't use the picture command. I'll check to see if that may be my problem. My FWH was downloaded about a month ago. S/b new. Using 807.

Thanks again
Thank you
Harvey
User avatar
Antonio Linares
Site Admin
Posts: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Post by Antonio Linares »

Harvey,

My example is using the PICTURE command:

@ 2, 2 GET cText PICTURE "@K"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Harvey,

You must be referring to some other code. I was referring to this code where he is using the picture command.

James

Code: Select all | Expand

#include "FiveWin.ch" 

function Main()

   local oDlg, cText := "Hello world!"

   DEFINE DIALOG oDlg TITLE "@K test"

   @ 2, 2 GET cText PICTURE "@K"

   ACTIVATE DIALOG oDlg CENTERED

return nil
Last edited by James Bott on Thu Aug 21, 2008 7:06 pm, edited 1 time in total.
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

ooops
Thank you
Harvey
Post Reply