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.

Powerbuilder refresh (VB.Net application.doevents)

6 posts in Powerscript Last posting was on 2010-07-30 12:23:45.0Z
O Steine Posted on 2010-07-30 09:19:17.0Z
From: "O Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Powerbuilder refresh (VB.Net application.doevents)
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c529915$1@forums-1-dub>
Date: 30 Jul 2010 02:19:17 -0700
X-Trace: forums-1-dub 1280481557 10.22.241.152 (30 Jul 2010 02:19:17 -0700)
X-Original-Trace: 30 Jul 2010 02:19:17 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27434
Article PK: 793750

Is there a powerbuilder way of performing application.doevents() ?

I'd like to show a progressbar to a user when performing database
maintenance (thousands of rows), where the progressbar is incremented one
for each row processed.

As the database maintenance job is rather big, what happens is that the
dialog window with the progressbar is not refreshed until the whole job is
complete (the response windows is also showing 'program is not responding').
Which then of course causes the user to miss the view of the progressbar
incrementing.

I've tried SetReDraw on/off before each progressbar increment, but it had no
effect.

Any tricks in how to avoid this ??


O Steine Posted on 2010-07-30 09:31:38.0Z
From: "O Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4c529915$1@forums-1-dub>
In-Reply-To: <4c529915$1@forums-1-dub>
Subject: Re: Powerbuilder refresh (VB.Net application.doevents)
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c529bfa@forums-1-dub>
Date: 30 Jul 2010 02:31:38 -0700
X-Trace: forums-1-dub 1280482298 10.22.241.152 (30 Jul 2010 02:31:38 -0700)
X-Original-Trace: 30 Jul 2010 02:31:38 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27435
Article PK: 761860

I've found the Yield() command, which I think will resolve my issue


"O Steine" <osteine@gmail.com> skrev i nyhetsmeldingen:
4c529915$1@forums-1-dub ...

> Is there a powerbuilder way of performing application.doevents() ?
>
> I'd like to show a progressbar to a user when performing database
> maintenance (thousands of rows), where the progressbar is incremented one
> for each row processed.
>
> As the database maintenance job is rather big, what happens is that the
> dialog window with the progressbar is not refreshed until the whole job is
> complete (the response windows is also showing 'program is not
> responding'). Which then of course causes the user to miss the view of the
> progressbar incrementing.
>
> I've tried SetReDraw on/off before each progressbar increment, but it had
> no effect.
>
> Any tricks in how to avoid this ??


Ivaylo Ivanov Posted on 2010-07-30 09:57:30.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4c529915$1@forums-1-dub> <4c529bfa@forums-1-dub>
Subject: Re: Powerbuilder refresh (VB.Net application.doevents)
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c52a20a$1@forums-1-dub>
Date: 30 Jul 2010 02:57:30 -0700
X-Trace: forums-1-dub 1280483850 10.22.241.152 (30 Jul 2010 02:57:30 -0700)
X-Original-Trace: 30 Jul 2010 02:57:30 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27436
Article PK: 761859

Just have in mind that by this command you give the end-user a chance to
work with your GUI interface and to close your window thus invalidating any
references to controls/variables in the range of your script being executed,
which finally would lead to a systemerror (null object reference). Take care
of this one, for example, by preventing the window closing (Return 1 in the
window's Closequery event if an operation is in progress).

Regards,
Ivaylo

"O Steine" <osteine@gmail.com> wrote in message
news:4c529bfa@forums-1-dub...
> I've found the Yield() command, which I think will resolve my issue
>
>
> "O Steine" <osteine@gmail.com> skrev i nyhetsmeldingen:
> 4c529915$1@forums-1-dub ...
>> Is there a powerbuilder way of performing application.doevents() ?
>>
>> I'd like to show a progressbar to a user when performing database
>> maintenance (thousands of rows), where the progressbar is incremented one
>> for each row processed.
>>
>> As the database maintenance job is rather big, what happens is that the
>> dialog window with the progressbar is not refreshed until the whole job
>> is complete (the response windows is also showing 'program is not
>> responding'). Which then of course causes the user to miss the view of
>> the progressbar incrementing.
>>
>> I've tried SetReDraw on/off before each progressbar increment, but it had
>> no effect.
>>
>> Any tricks in how to avoid this ??
>


O Steine Posted on 2010-07-30 11:40:39.0Z
From: "O Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4c529915$1@forums-1-dub> <4c529bfa@forums-1-dub> <4c52a20a$1@forums-1-dub>
In-Reply-To: <4c52a20a$1@forums-1-dub>
Subject: Re: Powerbuilder refresh (VB.Net application.doevents)
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c52ba37@forums-1-dub>
Date: 30 Jul 2010 04:40:39 -0700
X-Trace: forums-1-dub 1280490039 10.22.241.152 (30 Jul 2010 04:40:39 -0700)
X-Original-Trace: 30 Jul 2010 04:40:39 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27437
Article PK: 761862

Are there any better ways of approaching this problem (not using yeild)?


"Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> skrev i nyhetsmeldingen:
4c52a20a$1@forums-1-dub ...

> Just have in mind that by this command you give the end-user a chance to
> work with your GUI interface and to close your window thus invalidating
> any references to controls/variables in the range of your script being
> executed, which finally would lead to a systemerror (null object
> reference). Take care of this one, for example, by preventing the window
> closing (Return 1 in the window's Closequery event if an operation is in
> progress).
>
> Regards,
> Ivaylo
>
> "O Steine" <osteine@gmail.com> wrote in message
> news:4c529bfa@forums-1-dub...
>> I've found the Yield() command, which I think will resolve my issue
>>
>>
>> "O Steine" <osteine@gmail.com> skrev i nyhetsmeldingen:
>> 4c529915$1@forums-1-dub ...
>>> Is there a powerbuilder way of performing application.doevents() ?
>>>
>>> I'd like to show a progressbar to a user when performing database
>>> maintenance (thousands of rows), where the progressbar is incremented
>>> one for each row processed.
>>>
>>> As the database maintenance job is rather big, what happens is that the
>>> dialog window with the progressbar is not refreshed until the whole job
>>> is complete (the response windows is also showing 'program is not
>>> responding'). Which then of course causes the user to miss the view of
>>> the progressbar incrementing.
>>>
>>> I've tried SetReDraw on/off before each progressbar increment, but it
>>> had no effect.
>>>
>>> Any tricks in how to avoid this ??
>>
>
>


Ivaylo Ivanov Posted on 2010-07-30 12:02:10.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4c529915$1@forums-1-dub> <4c529bfa@forums-1-dub> <4c52a20a$1@forums-1-dub> <4c52ba37@forums-1-dub>
Subject: Re: Powerbuilder refresh (VB.Net application.doevents)
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c52bf42$1@forums-1-dub>
Date: 30 Jul 2010 05:02:10 -0700
X-Trace: forums-1-dub 1280491330 10.22.241.152 (30 Jul 2010 05:02:10 -0700)
X-Original-Trace: 30 Jul 2010 05:02:10 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27438
Article PK: 793748

I've made such dialogs (downloads, version updaters, for example) using
Yield + some boolean flags checked on CloseQuery and it's working fine.

I can think of another possible way - using some multithreading (PB shared
objects), but this can require a certain rewrite of your code.

Regards,
Ivaylo

"O Steine" <osteine@gmail.com> wrote in message
news:4c52ba37@forums-1-dub...
> Are there any better ways of approaching this problem (not using yeild)?
>
>
> "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> skrev i nyhetsmeldingen:
> 4c52a20a$1@forums-1-dub ...
>> Just have in mind that by this command you give the end-user a chance to
>> work with your GUI interface and to close your window thus invalidating
>> any references to controls/variables in the range of your script being
>> executed, which finally would lead to a systemerror (null object
>> reference). Take care of this one, for example, by preventing the window
>> closing (Return 1 in the window's Closequery event if an operation is in
>> progress).
>>
>> Regards,
>> Ivaylo
>>
>> "O Steine" <osteine@gmail.com> wrote in message
>> news:4c529bfa@forums-1-dub...
>>> I've found the Yield() command, which I think will resolve my issue
>>>
>>>
>>> "O Steine" <osteine@gmail.com> skrev i nyhetsmeldingen:
>>> 4c529915$1@forums-1-dub ...
>>>> Is there a powerbuilder way of performing application.doevents() ?
>>>>
>>>> I'd like to show a progressbar to a user when performing database
>>>> maintenance (thousands of rows), where the progressbar is incremented
>>>> one for each row processed.
>>>>
>>>> As the database maintenance job is rather big, what happens is that the
>>>> dialog window with the progressbar is not refreshed until the whole job
>>>> is complete (the response windows is also showing 'program is not
>>>> responding'). Which then of course causes the user to miss the view of
>>>> the progressbar incrementing.
>>>>
>>>> I've tried SetReDraw on/off before each progressbar increment, but it
>>>> had no effect.
>>>>
>>>> Any tricks in how to avoid this ??
>>>
>>
>>


O Steine Posted on 2010-07-30 12:23:45.0Z
From: "O Steine" <osteine@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4c529915$1@forums-1-dub> <4c529bfa@forums-1-dub> <4c52a20a$1@forums-1-dub> <4c52ba37@forums-1-dub> <4c52bf42$1@forums-1-dub>
In-Reply-To: <4c52bf42$1@forums-1-dub>
Subject: Re: Powerbuilder refresh (VB.Net application.doevents)
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c52c451$1@forums-1-dub>
Date: 30 Jul 2010 05:23:45 -0700
X-Trace: forums-1-dub 1280492625 10.22.241.152 (30 Jul 2010 05:23:45 -0700)
X-Original-Trace: 30 Jul 2010 05:23:45 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27439
Article PK: 793751

Thanks! :)

I'll think I'll stick with Yield(), but follow your advice and add some
additional handling like CloseQuery.

"Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> skrev i nyhetsmeldingen:
4c52bf42$1@forums-1-dub ...

> I've made such dialogs (downloads, version updaters, for example) using
> Yield + some boolean flags checked on CloseQuery and it's working fine.
>
> I can think of another possible way - using some multithreading (PB shared
> objects), but this can require a certain rewrite of your code.
>
> Regards,
> Ivaylo
>
> "O Steine" <osteine@gmail.com> wrote in message
> news:4c52ba37@forums-1-dub...
>> Are there any better ways of approaching this problem (not using yeild)?
>>
>>
>> "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> skrev i nyhetsmeldingen:
>> 4c52a20a$1@forums-1-dub ...
>>> Just have in mind that by this command you give the end-user a chance to
>>> work with your GUI interface and to close your window thus invalidating
>>> any references to controls/variables in the range of your script being
>>> executed, which finally would lead to a systemerror (null object
>>> reference). Take care of this one, for example, by preventing the window
>>> closing (Return 1 in the window's Closequery event if an operation is in
>>> progress).
>>>
>>> Regards,
>>> Ivaylo
>>>
>>> "O Steine" <osteine@gmail.com> wrote in message
>>> news:4c529bfa@forums-1-dub...
>>>> I've found the Yield() command, which I think will resolve my issue
>>>>
>>>>
>>>> "O Steine" <osteine@gmail.com> skrev i nyhetsmeldingen:
>>>> 4c529915$1@forums-1-dub ...
>>>>> Is there a powerbuilder way of performing application.doevents() ?
>>>>>
>>>>> I'd like to show a progressbar to a user when performing database
>>>>> maintenance (thousands of rows), where the progressbar is incremented
>>>>> one for each row processed.
>>>>>
>>>>> As the database maintenance job is rather big, what happens is that
>>>>> the dialog window with the progressbar is not refreshed until the
>>>>> whole job is complete (the response windows is also showing 'program
>>>>> is not responding'). Which then of course causes the user to miss the
>>>>> view of the progressbar incrementing.
>>>>>
>>>>> I've tried SetReDraw on/off before each progressbar increment, but it
>>>>> had no effect.
>>>>>
>>>>> Any tricks in how to avoid this ??
>>>>
>>>
>>>
>
>