home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!almserv!mimas!g9utxu
- From: g9utxu@fnma.COM (Tanin Uthayanaka)
- Subject: Re: Help on CLIPPER DBEDIT()
- Message-ID: <1993Jan4.163531.6968@almserv.uucp>
- Sender: usenet@almserv.uucp
- Nntp-Posting-Host: mimas
- Reply-To: g9utxu@fnma.COM
- Organization: Fannie Mae
- References: <1993Jan2.073709.25824@cucs5.cs.cuhk.hk>
- Date: Mon, 4 Jan 1993 16:35:31 GMT
- Lines: 51
-
- In article 25824@cucs5.cs.cuhk.hk, ynwang@cuse1.se.cuhk.hk (Wang Ying Ngai (GA)) writes:
- >Dear Clipper Programming experts,
- >
- >I am an new user to the CLIPPER 5.01 and recently I try to write my own
- >version of DBEDIT() with TBrowse. However, a stone stop my road for that
- >
- >-- How can I implement the PICTURE option into the TBrowse?
- > (I try different ways with concept:
- > field:="QUANTITY"
- > column:=TBColumnNew(" ",{ || transform(fieldblock(field,"999,999")} )
- > but this concept cannot work)
- >
- >I would appreciate a lot if you can give any advice on this.
- >
- >Also, do you know whether there is any ftp site that has CLIPPER sources in
- >internet?
- >
- >Regards
- >
- >Andrew Wang
- >
-
- I will try to help you but I can't say it will work because I don't have the time to
- write, compile and test the program.
-
- Lets evaluate your code block: { || transform(fieldblock(field,"999,999")}
-
-
- First, fieldblock syntax is fieldblock(<cExp>) where cExp is a field name; therefore,
- your statement fieldblock(field,"999,999") would probably give you an error.
- You need to say fieldblock(field) instead. Keep in mind that fieldblock returns a
- block to be evaluated.
-
- Second, transform(fieldblock(field),"999,999"), notice that I added ")" after
- "field". The above statement looks correct, syntax wise, but will probably generate
- an error because transform syntax is transform(<cExp1>,<cExp2>) where cExp2 is the
- picture template expression and cExp1 is an expression NOT block. I could be wrong
- but I believe an expression is not equivalent to a block. You would probably be
- better off using transform(FIELD->quantity,"999,999).
-
- Third, I don't know if this will work but you might try the following:
-
- TBColumnNew(" ",{|| transform(FIELD->quantity,"999,999")})
-
- I hope I've been of some help
-
- Tanin U.
-
-
-
-
-