Hi,
When developing in javascript and adding global objects it is good practice to place all the global objects in a separate namespace object. Earlier the recommendatation was to only use the module's prefix as the global object, for example (with the Application Example module's prefix OBEXAPP):

OBEXAPP  ={};
OBEXAPP.OnChangeFunctions  ={};

The recommendation has changed to add the module's global object to the global 
OB object which already exists:

OB.OBEXAPP  ={};
OB.OBEXAPP.OnChangeFunctions  ={};

This means that only the OB object itself will be directly globally visible which is nicer/better from a namespace/namecollision point of view.

The changes have been reflected in the documentation:
http://wiki.openbravo.com/wiki/How_to_create_client_side_callout_onchange_function
http://wiki.openbravo.com/wiki/How_to_create_a_Pick_and_Execute_Process
http://wiki.openbravo.com/wiki/Client_Side_Development_and_API#Implementing_global-singleton_javascript_objects

--

With Regards, Martin Taal

Openbravo
M: +31 6 288 48 943
@: martin.t...@openbravo.com
Skype: martintaal

Openbravo Headquarters:
P: +34 93 27 25 947
F: +34 93 27 25 905
Address: Edificio Slan, Planta 2a, Landaben, Calle J, 31012 Pamplona, Navarra, 
Spain
Mailing address: PO Box 5117, 31010 Pamplona, Navarra, Spain

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Openbravo-development mailing list
Openbravo-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-development

Reply via email to