NetTalk Central

Author Topic: Global Variables  (Read 4568 times)

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Global Variables
« 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
Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Global Variables
« Reply #1 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

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: Global Variables
« Reply #2 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
Greetz,
Sjoerd

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Global Variables
« Reply #3 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
-----------
Regards
Alberto

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: Global Variables
« Reply #4 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
Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Global Variables
« Reply #5 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Global Variables
« Reply #6 on: June 07, 2010, 02:45:36 AM »
Dont forget you can use the Translate method to do it.
Alberto
-----------
Regards
Alberto