Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Identifying if object exisits
Thread ID: 189053 Message ID: 189362 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Thursday, August 14, 2008 3:33:50 PM         
   


> > I am using the addobject command to add objects to a form.
> >
> > I sometimes get an error 1771 which states 'A member object with this name already exisits'
> >
> > I was wondering what command to use to check this immediately prior to the addobject command so that I can trap the error before it occurs and take the relevant action.
> >
>
> You can use PemStatus() (or Type()):
>
> ? PEMSTATUS(_screen,'Caption',5)
> 

>
> hth
> -Stefan

PEMstatus by definition is to find Properties, Events and Methods of an object. How can you use it to find out if an Object exists unless you assume that the object exists in the first place.

The correct function would be TYPE() or better still VARTYPE()

Bernard

** If you see someone without a smile, give em one of yours :) **
My Blog 8-)

ENTIRE THREAD

Identifying if object exisits Posted by Huw Jones @ 8/13/2008 8:25:29 AM
RE: Identifying if object exisits Posted by Stefan Wuebbe @ 8/13/2008 8:29:15 AM
RE: Identifying if object exisits Posted by Bernard Bout @ 8/14/2008 3:33:50 PM
RE: Identifying if object exisits Posted by Stefan Wuebbe @ 8/14/2008 3:49:48 PM
RE: Identifying if object exisits Posted by Vinay Pagaria @ 8/13/2008 8:29:34 AM
RE: Identifying if object exisits Posted by Yousfi Benameur @ 8/14/2008 4:30:27 PM