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.

Multiple instances of window open in memory

2 posts in Objects Last posting was on 2003-06-04 15:21:35.0Z
Richard O. Posted on 2003-06-04 12:52:42.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Richard O." <rolatilu@med-sys.com>
Subject: Multiple instances of window open in memory
Date: Wed, 4 Jun 2003 08:52:42 -0400
Lines: 18
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: 12.151.152.4
Message-ID: <364_eqeboipKDHA.345@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7449
Article PK: 734735

When I open up a window it appears multiple times in memory and other times
it does not. I think this is causing my application to crash when I try to
close the window. The code looks something like this.

for i= 0 to n

open(w_1) //Some times opens two instances or more in
memory.

w_1.openuserobjectwithParm(iu,.....)

if isvalid(w_1) then close(w_1) //Closes all instances
but eventually the application crashes at this
point

next


Steve_Katz_[TeamSybase] Posted on 2003-06-04 15:21:35.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Steve_Katz_[TeamSybase]
Date: Wed, 4 Jun 2003 11:21:35 -0400
Subject: Re: Multiple instances of window open in memory
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_05EF63A78215FC7100545FB285256D3B.004BD96C85256D3B@webforums>
References: <364_eqeboipKDHA.345@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7450
Article PK: 734738

>>When I open up a window it appears multiple times in memory and other
times it does not. I think this is causing my application to crash when I
try to close the window. The code looks something like this.

for i= 0 to n
open(w_1) //Some times opens two instances more in
memory.
w_1.openuserobjectwithParm(iu,.....)

if isvalid(w_1) then close(w_1) //Closes all instances
but eventually the application crashes at this
point
next
<<

Take a look at Syntax 1 AND Syntax 2 of the Open() function and see which
one you actually want to use.

Syntax 1 will only EVER open one instance of the windowtype. Subsequent
calls will only activate the window.

Syntax 2 will allow mulitple instances to open and subsequent calls will
open additional instances.

steve
[TeamSybase]