home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8789 < prev    next >
Encoding:
Text File  |  1993-01-04  |  2.2 KB  |  65 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!almserv!mimas!g9utxu
  3. From: g9utxu@fnma.COM (Tanin Uthayanaka)
  4. Subject: Re: Help on CLIPPER DBEDIT()
  5. Message-ID: <1993Jan4.163531.6968@almserv.uucp>
  6. Sender: usenet@almserv.uucp
  7. Nntp-Posting-Host: mimas
  8. Reply-To: g9utxu@fnma.COM
  9. Organization: Fannie Mae
  10. References: <1993Jan2.073709.25824@cucs5.cs.cuhk.hk>
  11. Date: Mon, 4 Jan 1993 16:35:31 GMT
  12. Lines: 51
  13.  
  14. In article 25824@cucs5.cs.cuhk.hk, ynwang@cuse1.se.cuhk.hk (Wang Ying Ngai (GA)) writes:
  15. >Dear Clipper Programming experts,
  16. >
  17. >I am an new user to the CLIPPER 5.01 and recently I try to write my own
  18. >version of DBEDIT() with TBrowse. However, a stone stop my road for that
  19. >
  20. >-- How can I implement the PICTURE option into the TBrowse?
  21. >   (I try different ways with concept:
  22. >      field:="QUANTITY"
  23. >      column:=TBColumnNew(" ",{ || transform(fieldblock(field,"999,999")} )
  24. >    but this concept cannot work)
  25. >
  26. >I would appreciate a lot if you can give any advice on this.
  27. >
  28. >Also, do you know whether there is any ftp site that has CLIPPER sources in
  29. >internet?
  30. >
  31. >Regards
  32. >
  33. >Andrew Wang
  34. >
  35.  
  36. I will try to help you but I can't say it will work because I don't have the time to 
  37. write, compile and test the program.
  38.  
  39.    Lets evaluate your code block: { || transform(fieldblock(field,"999,999")}
  40.  
  41.  
  42. First, fieldblock syntax is fieldblock(<cExp>) where cExp is a field name; therefore, 
  43. your statement fieldblock(field,"999,999") would probably give you an error. 
  44. You need to say fieldblock(field) instead. Keep in mind that fieldblock returns a 
  45. block to be evaluated.
  46.  
  47. Second, transform(fieldblock(field),"999,999"), notice that I added ")" after 
  48. "field". The above statement looks correct, syntax wise, but will probably generate 
  49. an error because transform syntax is transform(<cExp1>,<cExp2>) where cExp2 is the 
  50. picture template expression and cExp1 is an expression NOT block. I could be wrong 
  51. but I believe an expression is not equivalent to a block. You would probably be 
  52. better off using transform(FIELD->quantity,"999,999).
  53.  
  54. Third, I don't know if this will work but you might try the following:
  55.  
  56. TBColumnNew(" ",{|| transform(FIELD->quantity,"999,999")})
  57.  
  58. I hope I've been of some help
  59.  
  60. Tanin U.
  61.  
  62.  
  63.  
  64.  
  65.