Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to determine if a Class exists?

5 posts in Objects Last posting was on 2002-11-04 04:26:55.0Z
Jeff Gibson Posted on 2002-11-01 19:04:22.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Subject: How to determine if a Class exists?
Date: Fri, 1 Nov 2002 13:04:22 -0600
Lines: 24
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 66.0.110.241
Message-ID: <364_bpOqXvdgCHA.196@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:814
Article PK: 713378

Here is what were doing.

We are opening our windows using a centralized method. The windows class
name is pulled from our database and placed in the opensheetwithparm method.

Everything works great until the database tries to open a window where the
class does not exist in the library list. Then you just get the big null
reference crash.

Does anybody have a way to do this to check to see if the class (window)
exists prior to trying to opening it? I need to be able to do this in a
deployed application with would be built with pbd's or dll's.

I am running PowerBuilder 7.0.3 Build 10213.

Any info would be greatly appreciated.

TIA

Jeff Gibson
Intercept Solutions
Nashville, TN


Bug Posted on 2002-11-01 20:30:19.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Bug" <fenterbug@hotmail.com>
Subject: Re: How to determine if a Class exists?
Date: Fri, 1 Nov 2002 14:30:19 -0600
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: iaccess100.greyhound.com 206.66.2.100
Message-ID: <364_dyCEreegCHA.296@forums.sybase.com>
References: <364_bpOqXvdgCHA.196@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:812
Article PK: 713377

You can try the FindClassDefinition() function, but I'm not sure if it works
against .PBDs. Once you move to PB8, you can use exception handling to catch
your errors... but I realize that doesn't help you now.

You can try LibraryDirectory() and parse the results, but again, I don't
know if it works against .PBDs.

--
(`'·.¸_/^\_¸.·'´)
f e n t e r b u g
(¸.·'´¯)^(¯`'·.¸)
/ \
´´´^```

"Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
news:bpOqXvdgCHA.196@forums.sybase.com...
> Here is what were doing.
>
> We are opening our windows using a centralized method. The windows class
> name is pulled from our database and placed in the opensheetwithparm
method.
>
> Everything works great until the database tries to open a window where the
> class does not exist in the library list. Then you just get the big null
> reference crash.
>
> Does anybody have a way to do this to check to see if the class (window)
> exists prior to trying to opening it? I need to be able to do this in a
> deployed application with would be built with pbd's or dll's.
>
> I am running PowerBuilder 7.0.3 Build 10213.
>
> Any info would be greatly appreciated.
>
> TIA
>
> Jeff Gibson
> Intercept Solutions
> Nashville, TN
>
>


Jeff Gibson Posted on 2002-11-01 22:57:02.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Subject: Re: How to determine if a Class exists?
Date: Fri, 1 Nov 2002 16:57:02 -0600
Lines: 57
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 66.0.110.241
Message-ID: <364_f8kWZxfgCHA.196@forums.sybase.com>
References: <364_bpOqXvdgCHA.196@forums.sybase.com> <364_dyCEreegCHA.296@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:810
Article PK: 713381


"Bug" <fenterbug@hotmail.com> wrote in message
news:dyCEreegCHA.296@forums.sybase.com...
> You can try the FindClassDefinition() function, but I'm not sure if it
works
> against .PBDs. Once you move to PB8, you can use exception handling to
catch
> your errors... but I realize that doesn't help you now.

Bug,

Thanks for the tip. Works great in my source code, and I just generated a
dll based application, and it works great there too. I'm sure it would work
against pbd's as well since it works against dll's.

Jeff Gibson
Intercept Solutions
Nashville, TN

> You can try LibraryDirectory() and parse the results, but again, I don't
> know if it works against .PBDs.
>
> --
> (`'·.¸_/^\_¸.·'´)
> f e n t e r b u g
> (¸.·'´¯)^(¯`'·.¸)
> / \
> ´´´^```
> "Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
> news:bpOqXvdgCHA.196@forums.sybase.com...
> > Here is what were doing.
> >
> > We are opening our windows using a centralized method. The windows
class
> > name is pulled from our database and placed in the opensheetwithparm
> method.
> >
> > Everything works great until the database tries to open a window where
the
> > class does not exist in the library list. Then you just get the big
null
> > reference crash.
> >
> > Does anybody have a way to do this to check to see if the class (window)
> > exists prior to trying to opening it? I need to be able to do this in a
> > deployed application with would be built with pbd's or dll's.
> >
> > I am running PowerBuilder 7.0.3 Build 10213.
> >
> > Any info would be greatly appreciated.
> >
> > TIA
> >
> > Jeff Gibson
> > Intercept Solutions
> > Nashville, TN


Philip Salgannik Posted on 2002-11-02 03:38:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Philip Salgannik" <philemax@attbi.com>
Subject: Re: How to determine if a Class exists?
Date: Fri, 1 Nov 2002 22:38:55 -0500
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: h0020af718683.ne.client2.attbi.com 24.91.16.178
Message-ID: <364_xwpXKOigCHA.196@forums.sybase.com>
References: <364_bpOqXvdgCHA.196@forums.sybase.com> <364_dyCEreegCHA.296@forums.sybase.com> <364_f8kWZxfgCHA.196@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:809
Article PK: 713367

Yes it definitely works against PBDs. Bug is confusing it with
LibraryDirectory, which does not.


pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
news:f8kWZxfgCHA.196@forums.sybase.com...
> "Bug" <fenterbug@hotmail.com> wrote in message
> news:dyCEreegCHA.296@forums.sybase.com...
> > You can try the FindClassDefinition() function, but I'm not sure if it
> works
> > against .PBDs. Once you move to PB8, you can use exception handling to
> catch
> > your errors... but I realize that doesn't help you now.
>
> Bug,
>
> Thanks for the tip. Works great in my source code, and I just generated a
> dll based application, and it works great there too. I'm sure it would
work
> against pbd's as well since it works against dll's.
>
> Jeff Gibson
> Intercept Solutions
> Nashville, TN
>
> > You can try LibraryDirectory() and parse the results, but again, I don't
> > know if it works against .PBDs.
> >
> > --
> > (`'·.¸_/^\_¸.·'´)
> > f e n t e r b u g
> > (¸.·'´¯)^(¯`'·.¸)
> > / \
> > ´´´^```
> > "Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
> > news:bpOqXvdgCHA.196@forums.sybase.com...
> > > Here is what were doing.
> > >
> > > We are opening our windows using a centralized method. The windows
> class
> > > name is pulled from our database and placed in the opensheetwithparm
> > method.
> > >
> > > Everything works great until the database tries to open a window where
> the
> > > class does not exist in the library list. Then you just get the big
> null
> > > reference crash.
> > >
> > > Does anybody have a way to do this to check to see if the class
(window)
> > > exists prior to trying to opening it? I need to be able to do this in
a
> > > deployed application with would be built with pbd's or dll's.
> > >
> > > I am running PowerBuilder 7.0.3 Build 10213.
> > >
> > > Any info would be greatly appreciated.
> > >
> > > TIA
> > >
> > > Jeff Gibson
> > > Intercept Solutions
> > > Nashville, TN
>
>


Jeff Gibson Posted on 2002-11-04 04:26:55.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Jeff Gibson" <jgibson@interceptsolutions.com>
Subject: Re: How to determine if a Class exists?
Date: Sun, 3 Nov 2002 22:26:55 -0600
Lines: 85
Organization: Intercept Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: pcp01727704pcs.nash01.tn.comcast.net 68.52.234.181
Message-ID: <364_FDmPoz7gCHA.249@forums.sybase.com>
References: <364_bpOqXvdgCHA.196@forums.sybase.com> <364_dyCEreegCHA.296@forums.sybase.com> <364_f8kWZxfgCHA.196@forums.sybase.com> <364_xwpXKOigCHA.196@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:805
Article PK: 713372


"Philip Salgannik" <philemax@attbi.com> wrote in message
news:xwpXKOigCHA.196@forums.sybase.com...
> Yes it definitely works against PBDs. Bug is confusing it with
> LibraryDirectory, which does not.

Yeah.

I did some google searches and found the info on LibraryDirectory not
working with a deployed app.

FindClassDefinition() is working great though.

Jeff Gibson
Intercept Solutions
Nashville, TN

> pbm_thisusuallydoesnothelp:-))
> Philip Salgannik
>
> "Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
> news:f8kWZxfgCHA.196@forums.sybase.com...
> > "Bug" <fenterbug@hotmail.com> wrote in message
> > news:dyCEreegCHA.296@forums.sybase.com...
> > > You can try the FindClassDefinition() function, but I'm not sure if it
> > works
> > > against .PBDs. Once you move to PB8, you can use exception handling to
> > catch
> > > your errors... but I realize that doesn't help you now.
> >
> > Bug,
> >
> > Thanks for the tip. Works great in my source code, and I just generated
a
> > dll based application, and it works great there too. I'm sure it would
> work
> > against pbd's as well since it works against dll's.
> >
> > Jeff Gibson
> > Intercept Solutions
> > Nashville, TN
> >
> > > You can try LibraryDirectory() and parse the results, but again, I
don't
> > > know if it works against .PBDs.
> > >
> > > --
> > > (`'·.¸_/^\_¸.·'´)
> > > f e n t e r b u g
> > > (¸.·'´¯)^(¯`'·.¸)
> > > / \
> > > ´´´^```
> > > "Jeff Gibson" <jgibson@interceptsolutions.com> wrote in message
> > > news:bpOqXvdgCHA.196@forums.sybase.com...
> > > > Here is what were doing.
> > > >
> > > > We are opening our windows using a centralized method. The windows
> > class
> > > > name is pulled from our database and placed in the opensheetwithparm
> > > method.
> > > >
> > > > Everything works great until the database tries to open a window
where
> > the
> > > > class does not exist in the library list. Then you just get the big
> > null
> > > > reference crash.
> > > >
> > > > Does anybody have a way to do this to check to see if the class
> (window)
> > > > exists prior to trying to opening it? I need to be able to do this
in
> a
> > > > deployed application with would be built with pbd's or dll's.
> > > >
> > > > I am running PowerBuilder 7.0.3 Build 10213.
> > > >
> > > > Any info would be greatly appreciated.
> > > >
> > > > TIA
> > > >
> > > > Jeff Gibson
> > > > Intercept Solutions
> > > > Nashville, TN