You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "David Citron (JIRA)" <ji...@apache.org> on 2008/11/04 00:06:44 UTC

[jira] Created: (SHINDIG-671) setUserPref problems in gadgets.js

setUserPref problems in gadgets.js
----------------------------------

                 Key: SHINDIG-671
                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
             Project: Shindig
          Issue Type: Bug
          Components: Sample container & Examples
         Environment: FireFox
            Reporter: David Citron


gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:

1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)

I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment: shindig-671.patch

One last update to include fix to "requestNavigateTo" as well.

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment: shindig-671.patch

Patch attached. Note that "requestNavigateTo" may have similar issues...please take a look.

Thanks!

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment:     (was: shindig-671.patch)

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment:     (was: shindig-671.patch)

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666204#action_12666204 ] 

David Citron commented on SHINDIG-671:
--------------------------------------

Tom,

You are correct! I created an "off by one" error with my prior fix.

Please take a look at the newly attached patch. I have reworked the solution in a simpler fashion that does not mess with the argument order passed into setUserPref.

Thanks,
Dave


> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Lindner resolved SHINDIG-671.
----------------------------------

       Resolution: Later
    Fix Version/s: trunk

looks good, patch applied.

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>             Fix For: trunk
>
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment: shindig-671.patch

Slight improvement to patch

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment: shindig-671.patch

Updated patch which is simpler than the prior solution and fixes the reported issue with the first patch.

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "David Citron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Citron updated SHINDIG-671:
---------------------------------

    Attachment:     (was: shindig-671.patch)

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-671) setUserPref problems in gadgets.js

Posted by "Tom Deckers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652499#action_12652499 ] 

Tom Deckers commented on SHINDIG-671:
-------------------------------------

That patch file was helpful to me.  However, the following section didn't do the trick for me either:
   for (var i = 1, j = arguments.length; i < j; i += 2) {
     prefs[arguments[i]] = arguments[i + 1];
   }

When replaced by a simple:
  prefs[name] = value;

... things worked.

Any thoughts?

Regards,
Tom.

> setUserPref problems in gadgets.js
> ----------------------------------
>
>                 Key: SHINDIG-671
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-671
>             Project: Shindig
>          Issue Type: Bug
>          Components: Sample container & Examples
>         Environment: FireFox
>            Reporter: David Citron
>         Attachments: shindig-671.patch
>
>
> gadgets.IfrGadgetService.prototype.setUserPref appears to have multiple issues:
> 1) its callback registration looses the "this" pointer, causing JS errors (cannot find other methods in its object)
> 2) it does not handle the case where the gadget does not yet have prefs set (prefs undefined error)
> I will attach a patch that worked for me to resolve these issues. Please take a look and determine if the patch is correct or if perhaps some usage pattern of mine is causing the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.