Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Wednesday May 5, 2010 at 07:34
Dominator
Long Time Member
Joined:
Posts:
August 2008
33
Hi Folks

I recently moved all my code including page scripts to a library

The Library is included with an include statement at the activity level

Variables defined at  the page level need to be qualified.

Note there are page functions func_b and func_c that need access to the page level variables as well.

Here is an example:

Page script: which has a tag of "FUNC_A"

var a,b,c,d;

func_a ();    // call to function func_a


Library Script:

CF.page("FUNC_A").func_a = function () {

CF.page().a = .......
CF.page().b = .......
CF.page().c = .......
CF.page().d = .......

}

You need to qualify the page variables a,b,c,d in the library defintion of the page function func_a .

Two questions:

1) Is there a way to avoid having to qualify the variables
2) Does this incur extra processing having to lookup the page in the config file with the CF.


Thanks in Advance

Dominic

Last edited by Dominator on May 5, 2010 08:06.
Dominic


Hosting Services by ipHouse