FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour @Z not working
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
@Z not working
Posted: Wed Aug 20, 2008 01: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.

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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
@Z not working
Posted: Wed Aug 20, 2008 05:24 AM

Hag,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
@Z not working
Posted: Wed Aug 20, 2008 06:09 AM

Sorry @K....

Thank you

Harvey
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
@Z not working
Posted: Wed Aug 20, 2008 06:29 AM

Hag,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
@Z not working
Posted: Wed Aug 20, 2008 07: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
@Z not working
Posted: Wed Aug 20, 2008 07: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
@Z not working
Posted: Wed Aug 20, 2008 07:56 AM
This example is working fine here:
#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
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
@Z not working
Posted: Thu Aug 21, 2008 04: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
@Z not working
Posted: Thu Aug 21, 2008 06: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
@Z not working
Posted: Thu Aug 21, 2008 07: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
@Z not working
Posted: Thu Aug 21, 2008 07:05 PM
Harvey,

My example is using the PICTURE command:

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

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
@Z not working
Posted: Thu Aug 21, 2008 07: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

#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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
@Z not working
Posted: Thu Aug 21, 2008 07:06 PM

ooops

Thank you

Harvey

Continue the discussion