Real Software Forums
http://forums.realsoftware.com/

Updating one web control messes with others...
http://forums.realsoftware.com/viewtopic.php?f=23&t=47991
Page 1 of 1

Author:  Zack.H [ Mon May 27, 2013 7:06 pm ]
Post subject:  Updating one web control messes with others...

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.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/