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 42 made on Wednesday April 28, 2010 at 08:25
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
On April 28, 2010 at 05:25, sWORDs said...
self = this;
this.rs232port.OnData=Function(){
    self.test = Function(a){System.print(a);}
    self.test("blaat1");
    self.test("blaat2");
    [...]
};

vs

self = this;
this.test = Function(a){System.print(a);}
this.rs232port.OnData=Function(){
    self.test("blaat1");
    self.test("blaat2");
    [...]
};

I immediately see the problem with first approach. You are creating a function each time OnData is called. The second approach only calls the function that already exists.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse