Author | Topic: tdradchk() | |
---|---|---|
Donald Keating | tdradchk() on Sat, 15 Mar 2014 17:53:53 -0400 Hi y'all, Someone please tell me why this code give me the error below. oSCALE:= tdradchk(1,nBGN,"rb","Change Screen Scale Level",oVIEWBAR ,,,tdsetfont("radchk"),.T.,,,{tdDBL,tdPGY}) -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ERROR LOG of "C:\Work\OptiDist\Version 5\OPTIDIST.exe" Date: 03/15/2014 17:28:15 5.05.04 District 22 Xbase++ version : Xbase++ (R) Version 1.90.355 Operating system : Windows 7 06.01 Build 07601 Service Pack 1 ------------------------------------------------------------------------------ oError:args : -> VALTYPE: O CLASS: tdcRadBtn -> VALTYPE: O CLASS: tdcStatic -> VALTYPE: U VALUE: NIL -> VALTYPE: A VALUE: {230.4, 0} -> VALTYPE: A VALUE: {189, 24} -> VALTYPE: A VALUE: {25165824, 29409472, {15, "10.MS Sans Serif"}} -> VALTYPE: L VALUE: .T. Thread Number : 1 oError:canDefault : N oError:canRetry : N oError:canSubstitute: Y oError:cargo : NIL oError:description : Parameter has a wrong data type oError:filename : oError:genCode : 2 oError:operation : :Init oError:osCode : 0 oError:severity : 2 oError:subCode : 3 oError:subSystem : BASE oError:thread : 1 oError:tries : 0 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Called from XBPRADIOBUTTON:INIT(411) Called from TDCRADBTN:INIT(258) Called from TDRADCHK(71) Called from SYSCFG(148) Called from (B)TDMENUCREATE(295) Called from MAIN(362) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Thanks, >don< | |
Andreas Gehrs-Pahl | Re: tdradchk() on Sat, 15 Mar 2014 20:35:12 -0400 Don, >oError:args : > -> VALTYPE: O CLASS: tdcRadBtn > -> VALTYPE: O CLASS: tdcStatic > -> VALTYPE: U VALUE: NIL > -> VALTYPE: A VALUE: {230.4, 0} > -> VALTYPE: A VALUE: {189, 24} > -> VALTYPE: A VALUE: {25165824, 29409472, {15, "10.MS Sans Serif"}} > -> VALTYPE: L VALUE: .T. >oError:description : Parameter has a wrong data type >oError:operation : :Init >Called from XBPRADIOBUTTON:INIT(411) The Init() method of the XbpRadioButton Class -- called with :New() -- has six (optional) parameters, like most XbaseParts. Your code (or the TopDown code) uses seven parameters. The third (the NIL) seems to be the additional parameter that needs to be removed. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net | |
Miran Zupan | Re: tdradchk() on Sun, 16 Mar 2014 10:14:23 +0100 This works for me .... PUBLIC nScale .... IF !tdOpenDbf("CONFIG.dbf","CONFIG","shared") RETURN nil ELSE nScale:=CONFIG->scale ENDIF .... line:=line+1.1 tdSay( line, 3,"Change Screen Scale Level (-1 - (3) - 5)",oDa,,'L',,cSayFont) line:=line+1.1 //*** RadioBtn_01 cRBfont := tdSetfont('scaleRB') oRb := tdRadChk(line, 15.50,"rb","1",oDa,tdBG,.T.,cRBfont) IF nScale == 1 oRb:selection := .T. oFocus := oRb ENDIF oRb:selected := {|lCheck,u,o| iif(lCheck,nScale := 1,nil)} oRb:create() //*** RadioBtn_02 oRb := tdRadChk( line,22.00,"rb","2",oDa,tdWG,,cRBfont) IF nScale == 2 oRb:selection := .T. oFocus := oRb ENDIF oRb:selected := {|lCheck,u,o| iif(lCheck,nScale := 2,nil)} oRb:create() //*** RadioBtn_03 oRb := tdRadChk( line,28.50,"rb","3",oDa,tdWG,,cRBfont) IF nScale == 3 oRb:selection := .T. oFocus := oRb ENDIF oRb:selected := {|lCheck,u,o| iif(lCheck,nScale := 3,nil)} oRb:create() //*** RadioBtn_04 oRb := tdRadChk( line,35.00,"rb","4",oDa,tdWG,,cRBfont) IF nScale == 4 oRb:selection := .T. oFocus := oRb ENDIF oRb:selected := {|lCheck,u,o| iif(lCheck,nScale := 4,nil)} oRb:create() //*** RadioBtn_05 oRb := tdRadChk( line,41.50,"rb","5",oDa,tdEG,,cRBfont) IF nScale == 5 oRb:selection := .T. oFocus := oRb ENDIF oRb:selected := {|lCheck,u,o| iif(lCheck,nScale := 5,nil)} oRb:create() ..... SELECT CONFIG RLOCK() REPLACE config->scale with nScale DBCOMMIT() DBUNLOCK() Best regards Miran Zupan | |
Donald Keating | Re: tdradchk() on Sun, 16 Mar 2014 17:45:21 -0400 Thanks Andreas and Miran, Problem was my last paramenter was wrong type. I mistook aPRES to be a two element color array. >don< On Sat, 15 Mar 2014 17:53:53 -0400, Donald Keating wrote: >Hi y'all, > >Someone please tell me why this code give me the error below. >oSCALE:= tdradchk(1,nBGN,"rb","Change Screen Scale Level",oVIEWBAR >,,,tdsetfont("radchk"),.T.,,,{tdDBL,tdPGY}) > > >-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >ERROR LOG of "C:\Work\OptiDist\Version 5\OPTIDIST.exe" > Date: 03/15/2014 17:28:15 5.05.04 > District 22 > >Xbase++ version : Xbase++ (R) Version 1.90.355 >Operating system : Windows 7 06.01 Build 07601 Service Pack 1 >------------------------------------------------------------------------------ >oError:args : > -> VALTYPE: O CLASS: tdcRadBtn > -> VALTYPE: O CLASS: tdcStatic > -> VALTYPE: U VALUE: NIL > -> VALTYPE: A VALUE: {230.4, 0} > -> VALTYPE: A VALUE: {189, 24} > -> VALTYPE: A VALUE: {25165824, 29409472, {15, "10.MS Sans >Serif"}} > -> VALTYPE: L VALUE: .T. >Thread Number : 1 >oError:canDefault : N >oError:canRetry : N >oError:canSubstitute: Y >oError:cargo : NIL >oError:description : Parameter has a wrong data type >oError:filename : >oError:genCode : 2 >oError:operation : :Init >oError:osCode : 0 >oError:severity : 2 >oError:subCode : 3 >oError:subSystem : BASE >oError:thread : 1 >oError:tries : 0 >------------------------------------------------------------------------------ >CALLSTACK: >------------------------------------------------------------------------------ >Called from XBPRADIOBUTTON:INIT(411) >Called from TDCRADBTN:INIT(258) >Called from TDRADCHK(71) >Called from SYSCFG(148) >Called from (B)TDMENUCREATE(295) >Called from MAIN(362) >+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- > >Thanks, > >>don< |