New topic: 

RealStudio2012 2.1 refresh not working

<http://forums.realsoftware.com/viewtopic.php?t=47308>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        bobjtls          Post subject: RealStudio2012 2.1 refresh not 
workingPosted: Sun Mar 17, 2013 12:12 am                         
Joined: Wed Nov 08, 2006 6:25 pm
Posts: 28
Location: Sydney, Australia                I have an app wherein I use a 
progress bar to show progress for certain long functions. There is a handler 
which caters for this. Code is as follows

Method: showProgressBar(showMsg as boolean,displayText as string, endValue as 
integer, currentValue as integer)

//shows or hides the progress bar depending on showMsg (true/false)

if showMsg then
  msgtext.visible = true
  msgtext.enabled = true
  msgProgressbar.visible =  true
  msgprogressbar.enabled = true
  currentstepLbl.visible = true
  currentstepLbl.enabled = true
  msgText.Text = displayText
  msgProgressbar.maximum = endValue
  msgProgressbar.value = currentValue
  if targetWin32 then
  currentstepLbl.Visible = false
  Self.Refresh
  else
  currentstepLbl.Visible = true
  currentstepLbl.Enabled = true
  currentstepLbl.text = Str(currentValue) + " of " + Str(endValue)
  Self.Refresh
  end if
else
  msgtext.visible = false
  msgProgressbar.visible =  false
  msgprogressbar.enabled = false
  currentstepLbl.visible = false
  Self.Refresh
end if


This code used to work but for some reason now has stopped working. All I see 
now is a static screen as the process goes along rather than a blue line 
snaking up the progress bar. Also, some TextArea refreshes are now not working 
whereas before they would show text becoming blue or red as it was processed 
and validated or invalidated.

I am flummoxed, as this code has not changed for many many versions. Is this a 
likely artefact of upgrading to 2012 release 2.1?

bobj      
_________________
bobj 
----------------------------------- 
Dr Bob Jansen 
Turtle Lane Studios Pty Ltd 
PO Box 26, Erskineville NSW 2043, Australia 
Ph: +61-414 297 448 
Skype: bobjtls 
http://www.turtlelane.com.au  
                             Top                bobjtls          Post subject: 
Re: RealStudio2012 2.1 refresh not workingPosted: Sun Mar 17, 2013 12:48 am     
                    
Joined: Wed Nov 08, 2006 6:25 pm
Posts: 28
Location: Sydney, Australia                Further to this, if I put a line of 
code as follows:
msgbox Str(msgProgressBar.Left) + " " + Str(msgProgressBar.Top)

after the Self.refresh then the progress bar and associated labels appear when 
the bar's left and top coords are displayed, remain visible throughout the 
process and update by subsequent calls to the method because of the redisplay 
of the coords.

weird isn't it!      
_________________
bobj 
----------------------------------- 
Dr Bob Jansen 
Turtle Lane Studios Pty Ltd 
PO Box 26, Erskineville NSW 2043, Australia 
Ph: +61-414 297 448 
Skype: bobjtls 
http://www.turtlelane.com.au  
                             Top                Markus Winter          Post 
subject: Re: RealStudio2012 2.1 refresh not workingPosted: Sun Mar 17, 2013 
1:31 am                         
Joined: Sun Feb 19, 2006 4:00 pm
Posts: 1255
Location: Heidelberg, Germany                Are you by any chance using a 
thread? If so have a look at

http://www.realsoftwareblog.com/2012/05/doing-progress-right.html   
                             Top                bobjtls          Post subject: 
Re: RealStudio2012 2.1 refresh not workingPosted: Sun Mar 17, 2013 3:20 am      
                   
Joined: Wed Nov 08, 2006 6:25 pm
Posts: 28
Location: Sydney, Australia                Markus,

Thanks formyour reply. no, I am not using threads and I have seen the post you 
refered to. i haven't gone to threads as the code was working and when working 
I don,t want the user to be ale to do anything. The code shows progress through 
a validation run and this can take some time.

What confuses me, is that if I interrupt the loop, by use of the msgbox 
statement, the progres bar and labels correctly show and the progress bar 
updates. So it would appear that the compiler is not allowing window updates to 
interrupt the process. I can't find anything in the release notes about this 
nor is there any other info on the web. 

Bobj      
_________________
bobj 
----------------------------------- 
Dr Bob Jansen 
Turtle Lane Studios Pty Ltd 
PO Box 26, Erskineville NSW 2043, Australia 
Ph: +61-414 297 448 
Skype: bobjtls 
http://www.turtlelane.com.au  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to