global variables "on the fly"

Questions, tips and tricks and techniques for scripting in Servoy

global variables "on the fly"

Postby log-out » Tue Aug 09, 2011 11:28 am

Hi, sometimes I created global variables "on the fly", simply declaring them, but in Servoy 6 I receive this warning:

Code: Select all
The property globalVar is undefined for the type Globals<Solution>

So do I have to create that variable in solution explorer?

Thanks
Log-Out
Madrid - Spain

Servoy 5.2.9 - build 1020 - SQL Server 2005
Servoy 6.0.3 - build 1223
Java version 1.6.0_29-b11 (!!)
Windows XP Professional SP3
log-out
 
Posts: 180
Joined: Sat Feb 19, 2005 4:20 pm
Location: Spain

Re: global variables "on the fly"

Postby patrick » Tue Aug 09, 2011 12:10 pm

I'd say it is what it is: a warning. If you want to get rid of it, create a global.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: global variables "on the fly"

Postby log-out » Wed Aug 10, 2011 10:03 am

So creating global variables on the fly is (now) a bad practice, isn't it?
Log-Out
Madrid - Spain

Servoy 5.2.9 - build 1020 - SQL Server 2005
Servoy 6.0.3 - build 1223
Java version 1.6.0_29-b11 (!!)
Windows XP Professional SP3
log-out
 
Posts: 180
Joined: Sat Feb 19, 2005 4:20 pm
Location: Spain

Re: global variables "on the fly"

Postby Joas » Wed Aug 10, 2011 11:15 am

log-out wrote:So creating global variables on the fly is (now) a bad practice, isn't it?

It has always been a bad practice, but at least now you get a warning about it ;)
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to Methods

Who is online

Users browsing this forum: No registered users and 4 guests