Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Dec 14, 2017 10:22 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Updating one web control messes with others...
PostPosted: Mon May 27, 2013 7:06 pm 
Offline

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
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group