Greetings !
Bug?
If the input mask option is a TextBox t2, when compiled program then this error message:
t3 of Form_Main not defined.
Without inputmask is ok.
#include <hmg.ch>
FUNCTION Main()
DEFINE Window Form_Main at 0,0 width getdesktopwidth() height Getdesktopheight() title 'Error' main on init BizFrissit()
@ 335,20 texTbox t1 height 22 width 100 value '' maxlength 5 on change BizFrissit()
@ 335,130 texTbox t2 height 22 width 100 value '' on change BizFrissit()
//@ 335,130 texTbox t2 height 22 width 100 value '' inputmask '9999-99-99' on change BizFrissit()
@ 335,240 texTbox t3 height 22 width 100 value '' maxlength 40 on change BizFrissit()
END WINDOW
Form_Main.s3.Setfocus; Form_Main.activate
RETURN(NIL)
*--------------------------------------------------------*
FUNCTION BizFrissit()
*--------------------------------------------------------*
IF !Empty (Form_Main.t1.Value)
MsgInfo( Form_Main.t1.Value )
ENDIF
IF !Empty (Form_Main.t2.Value)
MsgInfo( Form_Main.t2.Value )
ENDIF
IF !Empty (Form_Main.t3.Value)
MsgInfo( Form_Main.t3.Value )
ENDIF
RETURN(NIL)
Problem with on change
Moderator: Rathinagiri
- miszler.zoltan
- Posts: 22
- Joined: Sun May 26, 2013 12:37 pm
- Location: Hungary
- Contact:
- dragancesu
- Posts: 926
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: Problem with on change
Try
...numeric inputmask...
...numeric inputmask...
Re: Problem with on change
Hi Zoltan,miszler.zoltan wrote:Greetings !
Bug?
If the input mask option is a TextBox t2, when compiled program then this error message:
t3 of Form_Main not defined.
Without inputmask is ok.
Please be so kind to update your 'On Change' function with the following code:
Code: Select all
*--------------------------------------------------------*
FUNCTION BizFrissit()
*--------------------------------------------------------*
IF !Empty (Form_Main.t1.Value)
MsgInfo( Form_Main.t1.Value )
ENDIF
IF !Empty (Form_Main.t2.Value) .and. !(Form_Main.t2.Value == " - - ")
MsgInfo( Form_Main.t2.Value )
ENDIF
IF !Empty (Form_Main.t3.Value)
MsgInfo( Form_Main.t3.Value )
ENDIF
RETURN(NIL)
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- miszler.zoltan
- Posts: 22
- Joined: Sun May 26, 2013 12:37 pm
- Location: Hungary
- Contact:
Re: Problem with on change
Dear Grigory and Dragancesu!
The problem, when in textbox is inputmask (numeric or text), the compiler not compiling the program!
Version: HMG 3.4.2 Stable Patch 3 (32bits)
Called from getproperty(8449)
Called from Bizfrissit(23)...
This line has error:
@ 335,130 texTbox t2 height 22 width 100 value '' inputmask '9999-99-99' on change BizFrissit()
According to the manual does not contain only numeric input textbox mask!
TEXTBOX ( Character InputMask ):
@ <nRow>,<nCol> TEXTBOX <ControlName>
[ OF | PARENT <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <cValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <ToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ DISABLEDBACKCOLOR <aDisabledBackColor> ]
[ DISABLEDFONTCOLOR <aDisabledFontColor> ]
INPUTMASK <cMask>
[ ON CHANGE <OnChangeProcedure> ]
Best regards, Zoltan
The problem, when in textbox is inputmask (numeric or text), the compiler not compiling the program!
Version: HMG 3.4.2 Stable Patch 3 (32bits)
Called from getproperty(8449)
Called from Bizfrissit(23)...
This line has error:
@ 335,130 texTbox t2 height 22 width 100 value '' inputmask '9999-99-99' on change BizFrissit()
According to the manual does not contain only numeric input textbox mask!
TEXTBOX ( Character InputMask ):
@ <nRow>,<nCol> TEXTBOX <ControlName>
[ OF | PARENT <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <cValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <ToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ DISABLEDBACKCOLOR <aDisabledBackColor> ]
[ DISABLEDFONTCOLOR <aDisabledFontColor> ]
INPUTMASK <cMask>
[ ON CHANGE <OnChangeProcedure> ]
Best regards, Zoltan
Re: Problem with on change
Szia Zoli,
A probléma nem az inputmask-nak köszönhető, hanem az on change függyvény miatt.
Kipróbáltam és nálam is előjött a hiba, de a Grigory amit tanácsolt, avval tökéletesen működik.
Hi Zoltan,
I'm tried and i have the same issue, but what Grigory advised, program is works perfectly.
A probléma nem az inputmask-nak köszönhető, hanem az on change függyvény miatt.
Kipróbáltam és nálam is előjött a hiba, de a Grigory amit tanácsolt, avval tökéletesen működik.
Hi Zoltan,
I'm tried and i have the same issue, but what Grigory advised, program is works perfectly.
Best regards,
Gabor
Gabor
Re: Problem with on change
Sorry, what i wrote is wrong.
try this
hmmm interesting
try this
Code: Select all
@ 335,20 texTbox t1 height 22 width 100 value '' maxlength 5 on change BizFrissit()
@ 335,240 texTbox t3 height 22 width 100 value '' maxlength 40 on change BizFrissit()
@ 335,130 texTbox t2 height 22 width 100 value '' inputmask '9999-99-99' on change BizFrissit()
Best regards,
Gabor
Gabor
Re: Problem with on change
It Works
Code: Select all
#include <hmg.ch>
FUNCTION Main()
DEFINE Window Form_Main at 0,0 width getdesktopwidth() height Getdesktopheight() title 'Error' main on init BizFrissit()
@ 335,20 texTbox t1 height 22 width 100 value '' maxlength 5 on change BizFrissit()
@ 335,130 texTbox t2 height 22 width 100 value '' inputmask '9999-99-99' on change BizFrissit()
@ 335,240 texTbox t3 height 22 width 100 value '' maxlength 40 on change BizFrissit()
END WINDOW
Form_Main.t1.Setfocus; Form_Main.activate
RETURN(NIL)
*--------------------------------------------------------*
FUNCTION BizFrissit()
*--------------------------------------------------------*
IF !Empty (Form_Main.t1.Value)
MsgInfo( Form_Main.t1.Value )
ENDIF
IF !Empty (Form_Main.t2.Value)
MsgInfo( Form_Main.t2.Value )
ENDIF
If IsControlDefined("t3","Form_Main") .and. !Empty (Form_Main.t3.Value)
MsgInfo( Form_Main.t3.Value )
Endif
RETURN(NIL)
Best regards,
Gabor
Gabor