NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: bergsj on June 02, 2010, 02:12:26 AM

Title: Global Variables
Post by: bergsj on June 02, 2010, 02:12:26 AM
Hi,

I have a feature request. Saw the feature request section, but that has not been very active for quite a while.
Request is this; I would like to have the MeesageIfEmpty / DeleteConfirmation and HeaderTooltip (Sort message) be defined globally. For instance in the Webserver Extension.
This would deal with a lot of work I have to do every time I create a browse of browse field.
I did some changes myself in the template but that will be gone whenever I would update to the latest version.
Will this be possible?

Regards,
Sjoerd
Title: Re: Global Variables
Post by: Bruce on June 02, 2010, 07:44:49 AM
You could use global variables, or better yet, session variables in these places.
Then by setting the global variable, or session variable once, it would apply to all these settings.

This is true for almost any setting where "quotes" are used. Any of these fields can hold an expression.

Of course using this approach you still have to set the actual template field, but if you wanted to change the contents of the field, that would be very quick to do.

cheers
Bruce
Title: Re: Global Variables
Post by: bergsj on June 03, 2010, 10:59:44 PM
That's true, but I would like to have it work the same way as the General and Local PageHeaders. You define a General MessageIfEmpty,the local MessageIfEmpty contains nothing by default. Then you do not have to do anything at the template unless you would like to override the variable.

Is that an option for future release?

Greets,
Sjoerd
Title: Re: Global Variables
Post by: Alberto on June 05, 2010, 07:13:28 AM
Why dont you use an ini file?
The values will be allways the same for all threads and you can change them when you want even without stopping the server.
Regards
Alberto
Title: Re: Global Variables
Post by: bergsj on June 06, 2010, 12:08:00 AM
Alberto,

Your absolutely right, I even use that now. But nevertheless you still have to change the defaults (eg. 'No records available') to a global variable (or SV).
Sometimes you forget setting this field on a new browse/form/field and then your app isn't so consequent in it's messages.

Greets
Sjoerd
Title: Re: Global Variables
Post by: Bruce on June 06, 2010, 10:00:39 PM
I understand what you mean Sjoerd - I'll see if I can create a global default in an upcoming build.

Cheers
Bruce
Title: Re: Global Variables
Post by: Alberto on June 07, 2010, 02:45:36 AM
Dont forget you can use the Translate method to do it.
Alberto