more G-Labs products

Author Topic: Getting general parameter from widget.json Module  (Read 1334 times)

January 02, 2015, 07:51:43 PM
Read 1334 times

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
I need to get a general parameter of HG.
In C# from a scene modules of HG I call :
string tableTH = Settings.Parameter( "Table.Therm.0" ).Value ;
But from .JSON Widget of a module how to make that ?
For a module parameter I code :
var thermTH = HG.WebApp.Utility.GetModulePropertyByName(module, 'ConfigurationOptions.Table.W');
But for general parameter I need Help. In that case module is my local object. For general object what is the syntax ?

Thank's for Help.
Dani

January 02, 2015, 08:58:50 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
It is not possible to access system settings structure from javascript (client-side).
As a work-around you can store these settings into a Virtual Module so you can access it both from js and automation engine.
Is that ok for your purpose?

g.


January 02, 2015, 11:45:04 PM
Reply #2

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Thank's for your answer.
The data are already stored in one virtual module. It's the data from my hour table widget.
So what is the JSON syntax to access to another module from the current widget module ?

January 02, 2015, 11:49:08 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
var myModule = HG.WebApp.Utility.GetModuleByDomainAddress(domain, address);

g.

January 02, 2015, 11:57:00 PM
Reply #4

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Thank's GĂȘne.
Also I saw the R453.  I will update and make some tests.

Nice night
Dani