kpeters58 wrote: Thu Jun 09, 2022 12:23 am
Not sure I follow you...
Your sample works just fine in every incantation (initially in IDE, reloaded in IDE, standalone binary ...) just as I expected.
i wish but no , not as expected
initially in IDE .... about half the time it does not work correctly , the other half correctly
reloaded in IDE .... same thing : about half the time it does not work correctly , the other half correctly
as an .EXE .... 100% it works correctly, and it does not matter if i created the EXE when it worked incorrectly , or when it worked correctly
only the .EXE comes out perfect everytime OK
it does not matter if its working correctly or incorrectly in the IDE ,
my Program never hangs, its always responding to Inputs or Choices or Button or Menu choice clicks
the Debugger never finds an Error
does not matter if Debugger is On or Off
EnableExplicit is always in beginning of my Code
maybe clearer description :
i'm already in PureBasic IDE , i Open my .pb File ,
i run it , it does not calculate Data ,
because its not getting or seeing GetGadgetData's value correctly ,
and when its seeing not GetGadgetData's value correctly , the StringGadget values are not being updated,
the equation calculations in a Procedure are not correct or accessed,
so i end my program .
so i do absolutely nothing but immediately Run it again , this time everything works correctly or perfectly
and i've made no changes to Code , never Saved it , never quit the IDE ,
all i did was Run it again and it works .... so i end my Program again ,
i immediately Run it again , and sometimes it works correctly , sometimes it does not ... its like a random cycle
one important thing i forgot to mention is :
i can immediatetly tell when my Program is not going to work correctly
when all my User's StringGadget and ComboBoxGadgets values and choices are not selected/highlighted
each in turn as i Tab thru Gadgets
Half of the time this part of my Procedure Code does not work anymore , the other half it works ,
its random chance everytime i restart my .pb file in the IDE
Code: Select all
SendMessage_(GadgetID(EventGadget()),#EM_SETSEL,0,-1)
i've reduced my Code to one quarter of its size
i'm still not able to discover the random error or problem yet in using my Code in the IDE,
i thought i'd tryout redoing one of my small Programs to entirely using #PB_Any + SetGadgetData and GetGadgetData
hopefully someone here can solve it or give more insight ?,
in meantime i'll give it 2 more Days of trying .... if i can't solve it , i'll try again a few Months from now .
the reason i'm trying to make my entire Program's various Gadgets use #PB_Any + SetGadgetData and GetGadgetData
it would surely make a very much larger Commercial Program i'm trying to release in 2 weeks or surely before end of June ,
much easier version to Code with #PB_Any -vs- hard coding StringGadget and ComboBoxGadget numbers .
as of now , hard coding StringGadget and ComboBoxGadget numbers in my Commercial Program
works 100.0% correctly everytime in the IDE or as an EXE , even it latest PureBasic 6.0 Beta 32 and 64 bit versions .
i'd estimate 80+% of my large Commercial Program is using #PB_Any ( without any : SetGadgetData and GetGadgetData )
about 20% is hard coded numbered StringGadgets and ComboBoxGadgets
i'd like it instead to use 100% #PB_Any if possible
