Page 1 of 2

Problem Upgrading To FWH7.11

Posted: Tue Dec 11, 2007 2:30 am
by acwoo
Hi,

After upgrading from FWH2.4 to FWH7.11, I have this error message
(In FW2.4, when I press down arrow key, the listbox can accept both text and numeric field, but not in FWH 7.11):

Application
===========
Path and name: C:\test\test.exe (32 bits)
Size: 4,509,184 bytes
Time from start: 0 hours 0 mins 26 secs
Error occurred at: 11/12/2007, 10:15:12
Error description: Error BASE/1073 Argument error: <
Args:
[ 1] = C
[ 2] = N 0

Stack Calls
===========
Called from: => TCLIPGET:PUTMASK(1757)
Called from: => TCLIPGET:UPDATEBUFFER(236)
Called from: .\source\classes\TGET.PRG => (b)TGET(0)
Called from: => TGET:REFRESH(0)
Called from: .\c4.prg => (b)FORM6NEW(6229)
Called from: => TWBROWSE:GODOWN(910)
Called from: => TWBROWSE:KEYDOWN(1281)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TWBROWSE:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c4.prg => FORM6NEW(6254)
Called from: .\c4.prg => (b)FORM6X(5862)
Called from: => TBUTTON:CLICK(0)
Called from: => TBUTTON:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TDIALOG:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c4.prg => FORM6X(5877)
Called from: .\c4.prg => (b)FORM6(5674)
Called from: => TWINDOW:LBUTTONDOWN(0)
Called from: => TBITMAP:LBUTTONDOWN(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TCONTROL:HANDLEEVENT(0)
Called from: => TBITMAP:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c4.prg => FORM6(5694)
Called from: .\c4.prg => WORKINGSHEETC1(473)
Called from: .\c4.prg => (b)WORKINGSHEETC(440)
Called from: => TBUTTON:CLICK(0)
Called from: => TBUTTON:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TDIALOG:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c4.prg => WORKINGSHEETC(447)
Called from: .\c4.prg => (b)C04A(160)
Called from: => TBUTTON:CLICK(0)
Called from: => TBUTTON:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TDIALOG:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c4.prg => C04A(164)
Called from: .\ecs.prg => (b)BUILDMENU2(2208)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: .\test.prg => MAIN(78)

Please help

Posted: Tue Dec 11, 2007 12:43 pm
by Antonio Linares
Acwoo,

Could you please provide a small PRG sample to reproduce the error ? thanks

Problem Upgrade to FWH7.11

Posted: Tue Dec 11, 2007 3:07 pm
by acwoo
Thanks for your help.

@ 0.2, 0.4 LISTBOX oLbx FIELDS ;
tax3->desp;
HEADERS "Description";
FIELDSIZES 400 ;
SIZE 307, 160 OF oDlg;
FONT oFont

oLbx:cToolTip = "Press `Enter' To Select Item."
oLbx:bKeyDown := { | nKey, nFlags | If( nKey == VK_RETURN,;
saycusta(,lreturn := .f., oc1desp:SetFocus() ),) }
oLbx:bchange:={ || getform6c1desp(oc1desp), oc1desp:Refresh() }

@ 12.5, 0.4 Get oc1desp VAR cc1desp size 307, 11 OF oDlG COLOR;
CLR_GREEN
@ 9.95, 18.7 BUTTON "&Accept" OF oDlg SIZE 40, 12 ;
ACTION (getform6cxdesp(oLbx), ;
oDlg:SetFocus() ,SysREfresh(), oLbx:SetFocus())
@ 9.95, 25.7 BUTTON "&Exit" OF oDlg SIZE 40, 12 ;
ACTION ( lreturn := .t., oDlg:End())
ACTIVATE DIALOG oDlg CENTERED
..........................................................

function getform6c1desp(oc1desp)

select form6

crecnum = tax3->recnum

if crecnum = "Coynum"
c1desp = mCoynum
elseif crecnum = "Name1"
c1desp = mName1
elseif crecnum = "CoySec1"
c1desp = mCoySec1
elseif crecnum = "ICNum"
c1desp = mICNum
elseif crecnum = "SecAdd"
c1desp = mSecAdd
elseif crecnum = "RegSec"
c1desp = mRegSec
elseif crecnum = "RegState"
c1desp = mRegState
elseif crecnum = "RegPost"
c1desp = mRegPost
elseif crecnum = "PrinOB1"
c1desp = mPrinOB1
elseif crecnum = "PrinOB2"
c1desp = mPrinOB2
elseif crecnum = "PrinOB3"
c1desp = mPrinOB3
elseif crecnum = "AutCap"
c1desp = mAutCap
elseif crecnum = "NumShare"
c1desp = mNumShare
elseif crecnum = "ParValue"
c1desp = mParValue
elseif crecnum = "Declarea"
c1desp = mDeclarea
elseif crecnum = "Day1"
c1desp = mDay1
elseif crecnum = "MonthYr"
c1desp = mMonthYr
elseif crecnum = "CoySec2"
c1desp = mCoySec2
elseif crecnum = "LicenceN"
c1desp = mLicenceN
endif

cc1desp = c1desp
return oc1desp
********************************************
function getform6cxdesp(oLbx)

local nOldRec := RecNo()
c1desp = cc1desp
select form6

onerror("RLOCK")
if crecnum = "Coynum"
replace Coynum with c1desp
elseif crecnum = "Name1"
replace Name1 with c1desp
elseif crecnum = "CoySec1"
replace CoySec1 with c1desp
elseif crecnum = "ICNum"
replace ICNum with c1desp
elseif crecnum = "SecAdd"
replace SecAdd with c1desp
elseif crecnum = "RegSec"
replace RegSec with c1desp
elseif crecnum = "RegState"
replace RegState with c1desp
elseif crecnum = "RegPost"
replace RegPost with c1desp
elseif crecnum = "PrinOB1"
replace PrinOB1 with c1desp
elseif crecnum = "PrinOB2"
replace PrinOB2 with c1desp
elseif crecnum = "PrinOB3"
replace PrinOB3 with c1desp
elseif crecnum = "AutCap"
replace AutCap with c1desp
elseif crecnum = "NumShare"
replace NumShare with c1desp
elseif crecnum = "ParValue"
replace ParValue with c1desp
elseif crecnum = "Declarea"
replace Declarea with c1desp
elseif crecnum = "Day1"
replace Day1 with c1desp
elseif crecnum = "MonthYr"
replace MonthYr with c1desp
elseif crecnum = "CoySec2"
replace CoySec2 with c1desp
elseif crecnum = "LicenceN"
replace LicenceN with c1desp
endif

cc1desp = c1desp
oLbx:SetFocus()
oLbx:Refresh()

return nil
********************************************

Please help
Thanks

Posted: Tue Dec 11, 2007 8:54 pm
by Antonio Linares
Acwoo,

Whats the field type of tax3->desp ?

Problem Upgrade To FWH 7.11

Posted: Wed Dec 12, 2007 12:00 am
by acwoo
Thanks for yuor help

>Whats the field type of tax3->desp ?

Text field. It describe the items to be updated in form6.dbf

Thanks

Posted: Wed Dec 12, 2007 7:12 am
by Antonio Linares
Acwoo,

What source code do you have here ?

Called from: .\c4.prg => (b)FORM6NEW(6229)

Problem Upgrade To FWH7.11

Posted: Wed Dec 12, 2007 9:20 am
by acwoo
Thanks for your help

>Called from: .\c4.prg => (b)FORM6NEW(6229)

oLbx:bKeyDown := { | nKey, nFlags | If( nKey == VK_RETURN,;
saycusta(,lreturn := .f., oc1desp:SetFocus() ),) }


.................................
function saycusta()

return nil
***************************

Thanks

Posted: Wed Dec 12, 2007 9:22 am
by Antonio Linares
Acwoo,

The source code line number may not be 100% correct.

Somewhere you are refreshing (repainting) a GET and thats where the error comes from:

Called from: => TGET:REFRESH(0)
Called from: .\c4.prg => (b)FORM6NEW(6229)

Where and how is defined that GET ? Thanks,

Problem Upgrade To FWH 7.11

Posted: Wed Dec 12, 2007 1:16 pm
by acwoo
Thanks for yuor help

>Where and how is defined that GET ?

GET is not defined.

The first occurance of get is:

@ 12.5, 0.4 Get oc1desp VAR cc1desp size 307, 11 OF oDlG COLOR;
CLR_GREEN

The problem will not occur if all the variables are of the same type. If there are text and numeric field, the error will occur. And it only occur if the down-arrow key go immediately pass a nemeric field.

I tried to do something like GET oGet VAR ..., but it does not help.

Thanks

Posted: Wed Dec 12, 2007 2:10 pm
by Antonio Linares
Acwoo,

>
@ 12.5, 0.4 Get oc1desp VAR cc1desp size 307, 11 OF oDlG COLOR;
CLR_GREEN
>

What type cc1desp has ?

> The problem will not occur if all the variables are of the same type

What variables ? The ones used in the GETs ? Or the values shown in the browse ?

Problem Upgrade To FWH7.11

Posted: Wed Dec 12, 2007 4:18 pm
by acwoo
Thanks for your help

>What type cc1desp has ?
Text and numeric

>What variables ? The ones used in the GETs ? Or the values shown in the browse ?
The variables in GETs (form6.dbf). When the text in the browse changes (by pressing down-arrow key), the data (can be text and numeric) shown in GET will also change.

Thanks

Posted: Wed Dec 12, 2007 6:55 pm
by Antonio Linares
Acwoo,

> Text and numeric

Does the same GET use different values sometimes ?

Do you mean that sometimes is showing a text and sometimes a number ? If so, why don't you always use a text calling Str( number ) ?

Please notice that the error comes from Harbour itself. Its not a FWH error. Probably the Class TGet of Harbour does not accept the change of type of the GET value

Problem Upgrade To FWH7.11

Posted: Thu Dec 13, 2007 12:07 am
by acwoo
Thanks for your reply

>Please notice that the error comes from Harbour itself. Its not a FWH error. Probably the Class TGet of Harbour does not accept the change of type of the GET value

As a workaround, I am thinking of changing part of the Class TGet to accept the way it is as at FWH2.4. How do I do it.

Please help

Thanks

Posted: Thu Dec 13, 2007 8:17 am
by Antonio Linares
Acwoo,

How do you set the new value of the GET ?

Do you use oGet:Assign() ?

Do you change the variable related value and then call oGet:Refresh() ?

Problem Upgrade To FWH7.11

Posted: Thu Dec 13, 2007 3:35 pm
by acwoo
Thanks for your help

How do I find out more about this Class Tget which does not allow me now to have one get for both text and numeric variables. Now, if the down-arrow key just pass from text to numeric field in the listbox, the message "Arguement Error" wiil occur. Strange, why it allows me to do that in FWH2.4.

Thanks