Changing data type and picture in GET

Changing data type and picture in GET

Postby DonDrew » Fri Jun 28, 2013 12:34 am

I have a GET define so:

REDEFINE GET oValue VAR mValue ID 2105 of oQry_Dlg ;
on change ( iif(! oSave:lactive, Set_Save() ) ) ;
update

Whenever the value of mValue becomes numeric the picture of oValue is changed as in the next line.
oValue := tGet():Redefine( , bSetGet := {||mValue }, oQry_Dlg, ,"@R ######.##" , , , , , , ,True, , ,False )


Whenever the value of mValue becomes a date the picture of oValue is changed as in the next line.
oValue := tGet():Redefine( , bSetGet := {||mValue }, oQry_Dlg, ,"@D" , , , , , , ,True, , ,False )


Whenever the value of mValue becomes a character string the picture of oValue is changed as in the next line.
oValue := tGet():Redefine( , bSetGet := {||mValue } , oQry_Dlg, , , , , , , , ,True, , ,False )

This works unfailingly for numbers and dates but does not work with strings. I've tried every character picture I can think of and nothing works.


The other problem I'm having is that oValue does not refresh until the cursor is place in the control. oValue:Refresh(), oValue:SetFocus() does not work.
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Changing data type and picture in GET

Postby DonDrew » Sat Jun 29, 2013 12:54 am

Trying new ideas to see if I can learn about what's creating my problem.


This line would not properly alter oValue from numeric or date formats to string.
oValue := tGet():Redefine( , bSetGet := {||mValue } , oQry_Dlg, ,"@S30" , , , , , , ,True, , ,False )
The line seems to execute properly because msginfo(oValue:cPicture) returns "@S30"

Next I tried removing the line redefining the and replaced it with the next 2 lines:

oValue:cPicture := "@S30"
oValue:bSetGet := {||mValue }

oValue:Refresh() causes an error --

Path and name: E:\ABA\ABA5\AbaWin32.exe (32 bits)
Size: 3,381,760 bytes
Time from start: 0 hours 0 mins 12 secs
Error occurred at: Friday 06/28/2013, 20:26:46
Error description: Error BASE/1073 Argument error: <
Args:
[ 1] = C Don
[ 2] = N 0

Stack Calls
===========
Called from: ../../../tget.prg => TCLIPGET:PUTMASK(0)
Called from: ../../../tget.prg => TCLIPGET:UPDATEBUFFER(0)
Called from: .\source\classes\TGET.PRG => (b)TGET(144)
Called from: .\source\classes\TGET.PRG => TGET:REFRESH(0)
Called from: e:\aba\aba5\Queries.prg => SETGET(367)
Called from: e:\aba\aba5\Queries.prg => LOADQUERY(227)
Called from: => (b)EVAL(150)
Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:LBUTTONDOWN(1201)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1711)
Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:HANDLEEVENT(1637)
Called from: .\source\classes\WINDOW.PRG => _FWH(3178)
Called from: => DIALOGBOX(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(270)
Called from: e:\aba\aba5\Queries.prg => QUERY(150)
Called from: e:\aba\aba5\Members.prg => (b)BLDBAR(1222)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK(465)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(656)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1714)

Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(1408)
Called from: .\source\classes\WINDOW.PRG => _FWH(3178) Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(991)
Called from: e:\aba\aba5\abawin.prg => MAIN(115)

What's going on?
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests