[ 
http://jira.amdatu.org/jira/browse/AMDATU-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10548#comment-10548
 ] 

Ivo Ladage - van Doorn commented on AMDATU-160:
-----------------------------------------------

In fact, I don't think this is a "problem". As far as I can see, it's conform 
spec. 
In this pubsub proposal; 
http://wiki.opensocial.org/index.php?title=PubSub.next_Proposals under 
"HubClient" step 3, it states;

When the gadget succeeds in connecting to the Hub (or when connect fails), the 
onConnected function is called and the gadget responds appropriately. 

The spec doesn't state anything about the fact that the Hub is already 
connected before gadgets.util.registerOnLoadHandler is invoked. It states that 
when the Hub is connected, onConnected is invoked and the " gadget responds 
appropriately.". So the gadget should subscribe itself in this onConnected 
method instead of gadgets.util.registerOnLoadHandler. I know that the 
registerOnLoadHandler approach is encouraged in the JS comment of the Shindig 
implementation of pubsub-2.js, but I believe this is incorrect. Attached is a 
working example which I believe uses the correct approach.


> While loading a gadget, the pubsub2router (Shindig 2.0) is not initialized
> --------------------------------------------------------------------------
>
>                 Key: AMDATU-160
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-160
>             Project: Amdatu
>          Issue Type: Bug
>          Components: Amdatu OpenSocial
>    Affects Versions: 0.0.6
>            Reporter: Naftali van der Loon
>            Assignee: Ivo Ladage - van Doorn
>            Priority: Critical
>             Fix For: 0.1.0
>
>         Attachments: AMDATU-160.patch, pubsub2gadgets.zip, 
> TestSubscribeGadget.xml
>
>
> While loading a gadget, the pubsub2router (Shindig 2.0) is not initialized, 
> therefore a gadget cannot subscribe to the pubsub2router.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to