KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q130277: PRB: WPARENT() Gives Error in 3.0 Different from Error in 2.x

Article: Q130277
Product(s): Microsoft FoxPro
Version(s): WINDOWS:3.0
Operating System(s): 
Keyword(s): 
Last Modified: 27-JUL-2000

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual FoxPro for Windows, version 3.0 
-------------------------------------------------------------------------------

SYMPTOMS
========

Passing too many parameters to the function WPARENT() as in:

     ? WPARENT("<undefined window name>",<second parameter>)

results in different error messages in versions 2.x and 3.0. Error message # 1230
is returned in Visual FoxPro 3.0 as:

  Too many arguments.

whereas error message # 214 is returned in previous versions as:

  Window <undefined window name> has not been defined.

STATUS
======

This behavior is by design.

MORE INFORMATION
================

Visual FoxPro checks the number of arguments in the function before checking for
the existence of the window in question. FoxPro 2.x checked to see if the window
existed before it checked to see if the function had too many arguments. FoxPro
2.x ignored a second argument.

Steps to Reproduce Problem
--------------------------

Issue the command:

     ? WPARENT("no_window",10)

where the window "no_window" has not been defined.

Notice different error messages are returned in 2.x and 3.0.

Additional query words: VFoxWin

======================================================================
Keywords          :  
Technology        : kbVFPsearch kbAudDeveloper kbVFP300
Version           : WINDOWS:3.0

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.