@Z not working

@Z not working

Postby hag » Wed Aug 20, 2008 1:50 am

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 view  RUN
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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 5:24 am

Hag,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Wed Aug 20, 2008 6:09 am

Sorry @K....
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 6:29 am

Hag,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Wed Aug 20, 2008 7:04 am

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
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Wed Aug 20, 2008 7:14 am

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Wed Aug 20, 2008 7:56 am

This example is working fine here:
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hag » Thu Aug 21, 2008 4:30 pm

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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Thu Aug 21, 2008 6:40 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Thu Aug 21, 2008 7:00 pm

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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby Antonio Linares » Thu Aug 21, 2008 7:05 pm

Harvey,

My example is using the PICTURE command:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Thu Aug 21, 2008 7:06 pm

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 view  RUN
#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.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Thu Aug 21, 2008 7:06 pm

ooops
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests