Is it possible to define constants in Servoy?

Questions, tips and tricks and techniques for scripting in Servoy

Is it possible to define constants in Servoy?

Postby swingman » Thu Jun 03, 2010 1:08 pm

Hi all,

Moving from 3.5.12 to 5.1.3 and have noticed all the constants that Servoy now use internally.
Is there a way of declare project specific constants in the servoy code?
If yes where? and how are these accessed from other files/modules?
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Is it possible to define constants in Servoy?

Postby ROCLASI » Thu Jun 03, 2010 1:24 pm

Hi Christian,

You can use global variables for this.
Code: Select all
var _k_MYCONSTANT = "your value";



Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 11 guests