Help about variables/objects

skipper

Member
Licensed User
Hello all,
is there any limitation on the number of variables, objects used in an application?

I'm having some troubles with global variables. The app I'm writing is a kind of wizard that uses 8 panels and quite a lot of label, textbox and combobox objects. Now, in addition to the few global variables used to manage the page transition (next, prev), I added some global variables to store few stuff like the db_path, db_name and so on. The new global variables are not assigned and a msgbox in the AppStart shows an empty string. If I move the declaration of the new variables at the beginning of the Sub Globals, I gain access to the above variable but the contents of some of previoulsy defined variables get lost.

Any idea? Too many variables? Too many objects?

Thanks a lot for your help
Mimmo
 

skipper

Member
Licensed User
Thanks Erel!

Sure! I'm attaching the entire folder. The Wizard starts from File|Certificato
There is no db engine at the moment...only interface. Please check the global variable xdbPath in the Global Section (used with msgBox in AppStart)

thanks again
Mimmo
 

skipper

Member
Licensed User
Many thanks Agraham! I did a quick try and it seems to work. Now I'll add all the other stuff and I'll let you know.

May be I misundestood the Color syntax. The help reports

Example: Button1.Color = 255,0,0 'Red color

and I used the same syntax to assign a default color to a variable.

What a great forum!

:)

Mimmo
 

agraham

Expert
Licensed User
Example: Button1.Color = 255,0,0 'Red color
Hmm - I tried that. It actually works in code, to my surprise, but obviously not in Globals where it messes up other initialisations. Maybe it's a hangover from earlier versions of B4PPC.

Using RGB() and its converse GetRGB() is the "correct" way to handle colour conversions and will be compatible with the forthcoming version 6.0 compiler which will be much more rigorous in its' checking than the current v5.80.
 
Top