The Token was lose the reference

55 views
Skip to first unread message

Alexander S Argollo

unread,
Jul 18, 2013, 6:26:08 AM7/18/13
to comman...@googlegroups.com
Hi Guys, as some of you have following my project, i was wrote my JS in a single project firstly, that have just a singe page and a few buttons. But in the last week i was transfer my JS to a big iviewer project that have a lot of subpages and buttons. Soon after i have gotten to running the script on a new project, i´ll call so for now, i saw that my tokens that i have wrote on single project is not running. i have left was to see again it on the single project, and i observed:

In a single project:
My Token Call: RecordID
I was set up it on this variable in a serial join S1. This serial join alredy existed on my projet.Its worink very well.
As you gas can see on CF.LOg output below:
> ZB.feedback: The Token value (u16DevAdd or RecordID1) is = 16543

Scritp part:
I using this variable on the body of the script, i didnt use on this part to imput the value on a button for ex.
CF.setToken("s1", "[RecordID]", value);CF.setToken("d3", "[RecordID]", value);
if(ZB.trace) CF.getJoin("s1", function(j,v,t) {CF.log("ZB.feedback: The Token value (u16DevAdd or RecordID1) is = " + t["[RecordID]"]);});


I was observed, that when i using a new serial join, for example S5, that i never would used or setup it, the variable (token defined on this project) was not defined as before. As you guys can see bellow:

> ZB.feedback: The Token value (u16DevAdd or RecordID1) is = undefined ( i just changed the S1 to S5).

A new Project 
As i described above, the new project have a lot of subpages and buttons. 
I saw other behaivor on this project. Even if i use S1 (seted up on project) my Token was not found as working very well in a single project. I just ported the same script that i using on a single project and is not runnig as the single project.

CF.LOG output in a new project.
> ZB.feedback: The Token value (u16DevAdd or RecordID1) is = undefined 

I have a few questions:
a) The token only works on the Join pre-defined on the project, for exemple d1, associated on a specific button or S10 asssociated a specific text box?

b) have a specific or a special definition when we use a project that have a lot of subpages. which may explain why the same script not have worked?







Florent Pillet

unread,
Jul 18, 2013, 8:32:42 AM7/18/13
to comman...@googlegroups.com

On Jul 18, 2013, at 12:26 PM, Alexander S Argollo <alexande...@gmail.com> wrote:

I have a few questions:
a) The token only works on the Join pre-defined on the project, for exemple d1, associated on a specific button or S10 asssociated a specific text box?

b) have a specific or a special definition when we use a project that have a lot of subpages. which may explain why the same script not have worked?


Tokens are associated with specific joins. If you need globally-accessible tokens, define a Global Token in guiDesigner (Project Properties > Global Token Manager)

When assigning tokens in Feedback expressions, you can select the target as being "Global" which references a global join (e0) which holds the global tokens.

Florent

--
Florent Pillet - Software Engineering Lead



alexande...@gmail.com

unread,
Jul 18, 2013, 9:59:58 PM7/18/13
to comman...@googlegroups.com
Hi Florent thanks a lot for your suggestions. I'll make a test tomorrow and I'll update this post.

BR
Alex

Enviado do meu smartphone BlackBerry 10.
De: Florent Pillet
Enviada: quinta-feira, 18 de julho de 2013 09h32
Assunto: Re: The Token was lose the reference

--
You received this message because you are subscribed to a topic in the Google Groups "CommandFusion Software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commandfusion/pP9vcv-bXw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alexander S Argollo

unread,
Jul 22, 2013, 7:09:47 AM7/22/13
to comman...@googlegroups.com
Hi Florent, thanks a lot for your assistance, after it i was defined the Globaltonken on my script and now it working very well. 
Here i am sharing the GlobalTonken soluction with our CF community:

to set on the GlobalTonken the variable VALUE:

CF.setToken(CF.GlobalTokensJoin, "[RecordID]", value);

To get variable VALUE:

    CF.getJoin(CF.GlobalTokensJoin, function(j,v,t) {ZB.sendToZBPServer_Node_ClusterCommand_PW_ON("18",t["[RecordID]"],"1");});

BR
Alex



--
atenciosamente,
Alexander S Argollo
11-99468494
mailto: alexande...@gmail.com
Reply all
Reply to author
Forward
0 new messages