CloudServices/Sync/FxSync/Developer/ClientAPI: Difference between revisions

Jump to navigation Jump to search
Line 262: Line 262:
== Installing your classes into Sync ==
== Installing your classes into Sync ==


You can register your engine in an ""weave:service:ready" observer using the Weave.Engines.register function. Note that the parameter you passed should be the name of your engine, such as Weave.Engines.register(FooEngine) and not new FooEngine().
You can register your engine in an "weave:service:ready" observer using the Weave.Engines.register() function. Note that the parameter you passed should be the name of your engine, such as Weave.Engines.register(FooEngine) and not new FooEngine().
 
Also note that "weave:service:ready" is issued after the "weave:engine:start-tracking" observer notification. If your tracker observes "weave:engine:start-tracking", it's best to have the Sync service register your engine. Stick your engine class on to the Weave object:
 
<pre>
Weave.FooEngine = FooEngine;
</pre>
 
and add "Foo" to the services.sync.registerEngines preference (it's a comma separated list of engine names).


== Updating the Weave preferences screen ==
== Updating the Weave preferences screen ==
canmove, Confirmed users
725

edits

Navigation menu