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 14 made on Sunday July 19, 2020 at 18:47
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,778
Glad you got it sorted.

The key to libraries is defining them in such as way that they are nested objects and in what are called 'namespaces' using reverse domain naming.

com.lrmassoc.SqueezeLib

com.lrmassoc.YahooWeatherRss

at the top level, you declare a variable named 'com'.




var weather = new com.lrmassoc.YahoWeatherRSS.Weather();
var squeeze = new com.lrmassoc.SqueezeLib.SqueezeComet();


Now, you have 2 different instances of objects in a single activity named with 2 unique variable names. Reusing common variable names such as 'socket' outside of the library only asks for conflicts.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse