Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipX.Lib v1.2 - cautions http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Cautions

o Always call CipXOpen() first. Pass a logical true ( ClipXOpen( .t. ) ) to
  test from the DOS prompt.

o Always call header() as your second X-Hacker.orgfunction. Some web servers will
  let you get away with not passing a content type header, but why take the
  chance.

o Always call ClipXClose() to end your program.

o Do not use any commands, procedures, or functions which write to the screen.
  For example, don't use ?, qOut(), qqOut(), @say.

o Checkbox Input Types require special handling.  The web server does not
  pass ANY information about a checkbox which is not checked. For this
  reason test the existence of a checkbox with the Type() function.

  Example:   if Type( "ChekcBos1" ) == "U"
                .. does not exist logic ...
             else
                ... ok to use it logic ...
             endif

o Generating TextArea form objects.

  Special attention should be given to large text strings or memo fields which
  may contain hard-carriage-returns Chr(13) and/or soft-carriage-returns
  Chr(141). Soft-carriage-returns can cause data to look jagged if display
  in a textarea which is not the same width as the original textarea or
  memoedit width. The CA-Clipper MemoTran() can be used to make the textarea
  display more presentable. See the Example below.

  Example 1: Textarea with a default string.
    ....
    FormBeg( "MyForm", "abc.exe", "POST" )
      TextArea( "taField",3,20,"Enter your message here." )
    FormEnd()
    ...

  Example 2. Displaying a dbf memo filed in a textarea

    function Main()

      if !ClipXOpen()
        Quit
      endif
      header()
      htmlBodyBeg()

      use myDbf

      FormBeg( "myForm", "abc.exe", "POST" )

        // Use MemoTran() to preserve hard CR and replace soft CR with space
        TextArea( "MyName", 10, 80, MemoTran( myDbf->notes, Chr(13), Space(1) ) )

      FormEnd()

      htmlBodyEnd()

      ClipXClose()

    return nil

o A web server must use standard-in and standard-out to communicate with a
  CGI program written in ClipX.

o Always use xErrSys.obj in your compile. Place it prior to Clipper lib
  in your link file so it will override the errorysys in the Clipper lib.
  The errorsys in the Clipper lib writes to the screen and will thus cause
  your programs to hang the web server if an error occurs.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson