It is currently Sat Sep 22, 2018 1:21 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [PB5.50] #PB_Any generated ID conflict
PostPosted: Wed Sep 28, 2016 7:31 pm 
Offline
User
User

Joined: Wed Apr 13, 2016 7:39 am
Posts: 64
Hi!

Just met with this unpleasant thing...
I'm using #PB_Any for gadgets enumeration in all modal form .pbf files and these files are Xincluded in the main form file.
During execution, if I open and close several forms, some buttons of the last opened form stop working.
I checked the Variable Viewer and found that gadget ID variables of the different forms (active and previously closed) contain same values....

Is it a bug of #PB_Any or in my head?)

BRG
Yury


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.50] #PB_Any generated ID conflict
PostPosted: Wed Sep 28, 2016 11:04 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 1332
no bug. take a look at my responses here: http://purebasic.fr/english/viewtopic.php?f=13&t=66299

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB5.50] #PB_Any generated ID conflict
PostPosted: Thu Sep 29, 2016 7:43 am 
Offline
User
User

Joined: Wed Apr 13, 2016 7:39 am
Posts: 64
2 nco2k:

OK, thanks! I see that not only me suffering from this issue)
Problem is: I'm using files created by PB Form Designer and for simplicity/universality I want to keep them in .pbf format - IMHO PBFD shall create a cleaning code automatically if a parent window is defined and for this it shall create not a global variable for each gadget/window but a list or a map (user selectable). Currently I can't do this cleaning in cycle and I need to zero these variables one by one ... looks ugly:

Code:
Procedure CloseModal( _iFormID.i)
   CloseWindow( _iFormID)
   Window_Connect = 0
   Button_CmConnect = 0
   Button_CmCancel = 0
   ipConnectTo = 0
   strUserName = 0
   strPassword = 0
   lstConnections = 0
   strConnectionName = 0
   lblConnectionName = 0
   lblConnect2IP = 0
   lblLogin = 0
   lblPassword = 0
   Button_CmAdd = 0
   Button_CmDelete = 0
   
   Window_AlarmEdit = 0
   Button_AseApply = 0
   Button_AseCancel = 0
   ; TODO: Finish
   
   Window_About = 0
   Button_AboutClose = 0
   imgDevice = 0
   txtAboutName = 0
   txtAboutVer = 0
   txtAboutCopyright = 0
   txtAboutCopyrightName = 0
   txtAboutEmail = 0
   DisableWindow( Window_Main, #False)
EndProcedure


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


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 © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye