Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal Point Determination
Message
From
13/08/1998 16:02:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/08/1998 20:54:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00125594
Message ID:
00126694
Views:
24
>This works great!
>
>In the INIT.METHOD of the embossedfield class I've put the following code.
>Is there anything else that would streamline this?
>
>LOCAL lcArray, lcDotPosition
>lcDotPosition=AT(".",this.controlsource)
>lcField=UPPER(ALLTRIM(SUBSTR(this.controlsource,lcDotPosition+1,255)))
>SELE INVENTOR
>gnFieldcount = AFIELDS(gaMyArray) && Create array
>FOR nCount = 1 TO gnFieldcount
> IF gaMyArray(nCount,1)=lcField
> IF gaMyArray(nCount,4)=2
> this.inputmask="$$9,999.99"
> EXIT
> ENDIF
> ENDIF && Display field names
>ENDFOR

A quicker thing to do would be to write a DBC parser to set the default input mask for some of the fields (should also give you some interactive chance to change some - for one, not all decimal fields should be taken as amounts, some are quantities). Then when you build your forms, the default inputmask would already be there, without any need for runtime checking.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform