New topic: 

Updating one web control messes with others...

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

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        Zack.H          Post subject: Updating one web control messes 
with others...Posted: Mon May 27, 2013 7:06 pm                         
Joined: Sun Jun 15, 2008 1:50 am
Posts: 122                So I guess this is sorta a bug unless I'm doing 
something wrong...

But I have a timer setup on my main window and I spawn other windows on top of 
that one, in one of the windows on top of that one I have a WebPopup Menu that 
gets reset every time the timer runs even though it's not messing with that 
specific control.

The timer runs a thread which contains the following code
Dim pDB as PostgreSQLDatabase
Dim Stats As RecordSet
Dim D As Date = New Date

print "Running Stats"
//Removed DB Connect information
if pDB.Connect() Then
  
  for i as integer = 0 to app.sessioncount - 1
  dim s as session = app.sessionAtIndex(i)
  if s.MainPanel.ListBox1 <> Nil Then
  s.MainPanel.ListBox1.DeleteAllRows()
  end
  next
  
  
  
  
  
  Stats = pDB.SQLSelect("SELECT status,date,server_id,camp_id FROM 
cmpsystem.mailing WHERE date='"+D.ShortDate+"';")
  if pDB.Error = false Then
  
  Do Until Stats.EOF
  
  Dim CampaignName As String
  Dim ServerName As String
  Dim Campaigns As RecordSet
  Dim Servers As RecordSet
  
  Servers = pDB.SQLSelect("SELECT name FROM cmpsystem.servers WHERE 
id='"+Stats.Field("server_id").StringValue+"';")
  ServerName = Servers.Field("name").StringValue
  
  Campaigns = pDB.SQLSelect("SELECT name FROM cmpsystem.campaigns WHERE 
id='"+Stats.Field("camp_id").StringValue+"';")
  CampaignName = Campaigns.Field("name").StringValue
  
  for i as integer = 0 to app.sessioncount - 1
    dim s as session = app.sessionAtIndex(i)
    if s.MainPanel.ListBox1 <> Nil Then
    
s.MainPanel.ListBox1.AddRow(CampaignName,ServerName,Stats.Field("date").StringValue,Stats.Field("status").StringValue)
    end
  next
  
  Stats.MoveNext
  loop
  
  else
  print pDB.ErrorMessage
  end
  
end


As you can see this is updating the ListBox1 control on "MainPanel" where as in 
other windows I have it appears as if it is resetting/refreshing the other 
controls which isn't what was expected.

The issue only seems to occur with the WebPopUp Menu control, if I select an 
item in another listbox it doesn't re-set my selection when the thread runs, 
but when I have something selected in the WebPopUp Menu Control (or If I've 
scrolled down even) it de-selects what I have selected and scrolls back up.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
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