Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Help about variables/objects


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2007, 03:08 PM
Junior Member
 
Join Date: Dec 2007
Posts: 40
Default Help about variables/objects

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
Reply With Quote
  #2 (permalink)  
Old 12-19-2007, 03:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

There is no limit to the number of variables or objects.
Can you post some of your code?
Reply With Quote
  #3 (permalink)  
Old 12-19-2007, 03:40 PM
Junior Member
 
Join Date: Dec 2007
Posts: 40
Default

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
Attached Files
File Type: zip Test.zip (21.5 KB, 6 views)
Reply With Quote
  #4 (permalink)  
Old 12-19-2007, 03:55 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,770
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

I don't mean to butt in but Erel is probably very busy at the moment. The problem is here but the compiler isn't erroring it!

xColor=230,230,255

try

xColor=Rgb(230,230,255)
Reply With Quote
  #5 (permalink)  
Old 12-19-2007, 04:11 PM
Junior Member
 
Join Date: Dec 2007
Posts: 40
Default

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
Reply With Quote
  #6 (permalink)  
Old 12-19-2007, 04:23 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,770
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by skipper View Post
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.
Reply With Quote
  #7 (permalink)  
Old 12-19-2007, 04:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

Quote:
Maybe it's a hangover from earlier versions of B4PPC.
That is correct.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
program variables tremara1 Questions & Help Needed 2 10-16-2008 08:52 AM
Environment Variables Zenerdiode Questions & Help Needed 1 05-22-2008 04:36 PM
automatic typecasting of variables? Stellaferox Questions & Help Needed 4 02-04-2008 01:17 PM
Dim-ing variables colin9876 Questions & Help Needed 8 11-17-2007 06:47 PM
Structure variables Erel Code Samples & Tips 0 05-19-2007 11:36 AM


All times are GMT. The time now is 05:19 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0