Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat May 30, 2020 12:55 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: strange bugs
PostPosted: Thu Dec 29, 2005 9:38 am 
Offline

Joined: Wed Dec 21, 2005 12:04 pm
Posts: 110
I found 2 strange bugs on rb linux.

1. calling the windows name it self will create another threads copy.

ex: I have windows1 , inside I have timer set to run once . on timer action event.
code:
'this code will create another copy of windows1
windows1.left = 0
windows1.top = 0

'this will solve the weird problem
self.top = 0
self.left = 0

2. on message dialog
if u try to use result of message dialog without storing to a variable , the program will stop in there (not hang)
ex.
on windows1 , I have timer (set run once) on the timer action event.
code:
dim cnt as integer = 1
while cnt =1
call_Login ' a method to open a window (winLogin) to accept login or quit
call_entry ' a method to open a window (winEntry) for data entry
wend

' the idea is every time finish one entry it back to call login

on winEntry windows there's a exit button
(on action event) code:
Dim d as New MessageDialog
Dim b as MessageDialogButton
d.icon=MessageDialog.GraphicCaution
d.ActionButton.Caption="Save"
d.CancelButton.Visible= True
d.AlternateActionButton.Visible= True
d.AlternateActionButton.Caption="Don't Save"
d.Message="Do you want to save changes to this document" _
+" before closing?"
d.Explanation="If you don't save, your changes will be lost. "

///// A-WAY doing this NOT OK
if d.ShowModal = d.ActionButton then
close
End

/////// B-WAY doing this is OK ////
b=d.ShowModal //display the dialog
if b = d.ActionButton then
close
End

/// the problem show after closing. A-WAY , after close winEntry it won't execute login while B-WAY run execute login


I wonder others having same problem (test under suse10 and fedora 4)


Top
 Profile  
Reply with quote  
 Post subject: Re: strange bugs
PostPosted: Thu Dec 29, 2005 2:39 pm 
Offline
User avatar

Joined: Wed Sep 28, 2005 8:39 am
Posts: 9341
Location: St Augusta, MN
kobolds wrote:
I found 2 strange bugs on rb linux.

1. calling the windows name it self will create another threads copy.

ex: I have windows1 , inside I have timer set to run once . on timer action event.
code:
'this code will create another copy of windows1
windows1.left = 0
windows1.top = 0

'this will solve the weird problem
self.top = 0
self.left = 0



This is not a bug -- it's called implicit instansiation and it's a feature of RB. However, it's one I always tell people to avoid since it invariably causes seemingly strange happenings (like you're describing) if you're not careful.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group