Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Release Notes - <b>changed: tbrowse error handling</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHANGED:  TBrowse error handling
------------------------------------------------------------------------------

     Assigning invalid data to TBrowse and TBColumn instance variables would
     not generate an error in version 5.01. Type checking during instance
     variable assignment has been added in CA-Clipper 5.2 to trap invalid
     values and produce a recoverable runtime error.

     The problem commonly occurs when assigning a NIL value to an instance
     variable as a result of an optional parameter:

     FUNCTION MyBrowse( nTop, nLeft, nBottom, nRight, cHeadSep )

        oBrowse := TBrowseNew( nTop, nLeft, nBottom, nRight )
        // If only four arguments are passed to this function the following
        // line will assign a NIL to headSep, resulting in an error.
        oBrowse:headSep := cHeadSep

     The following example prevents accidentally assigning a NIL to a TBrowse
     instance variable when a function accepts optional parameters:

     FUNCTION MyBrowse( nTop, nLeft, nBottom, nRight, cHeadSep )

        oBrowse := TBrowseNew( nTop, nLeft, nBottom, nRight )
        // don't assign a NIL - headSep has a default value.
        IF cHeadSep != NIL
           oBrowse:headSep := cHeadSep
        ENDIF


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