Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Help about variables/objects

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2007, 02:08 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
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, 02:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,732
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 02:40 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
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
Reply With Quote
  #4 (permalink)  
Old 12-19-2007, 02:55 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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, 03:11 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
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, 03:23 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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, 03:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,732
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 06:14 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0