You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Bruno Bowden (JIRA)" <ji...@apache.org> on 2008/03/07 12:41:46 UTC

[jira] Created: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

_IG_Callback is not defined, need for legacy support
----------------------------------------------------

                 Key: SHINDIG-114
                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
             Project: Shindig
          Issue Type: Bug
          Components: Features
            Reporter: Bruno Bowden
            Assignee: Kevin Brown




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


Re: [jira] Commented: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

Posted by Bruno Bowden <br...@google.com>.
The _IG_Callback function is publicly documented. So we have to support it:

    http://code.google.com/apis/gadgets/docs/remote-content.html#Callbacks


On Fri, Mar 7, 2008 at 9:27 AM, Bruno Bowden (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/SHINDIG-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576282#action_12576282]
>
> Bruno Bowden commented on SHINDIG-114:
> --------------------------------------
>
> The behaviour is a little strange, that's why you can't do a simple
> wrapper
> for makeClosure as you'd expect. The code is documented in an igoogle
> source
> file. I'll send you directly the internal link.
>
>
> > _IG_Callback is not defined, need for legacy support
> > ----------------------------------------------------
> >
> >                 Key: SHINDIG-114
> >                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
> >             Project: Shindig
> >          Issue Type: Bug
> >          Components: Features
> >            Reporter: Bruno Bowden
> >            Assignee: Kevin Brown
> >         Attachments: _IG_Callback-legacy.patch
> >
> >
>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576159#action_12576159 ] 

Kevin Brown commented on SHINDIG-114:
-------------------------------------

I can't find actual documentation for this function on igoogle. It seems like broken behavior to me:

Consider this:

function func(arg0, arg1) {
  alert(arg0 + arg1);
}

_IG_Callback(func, "world")("hello", "haha i broke your API");

vs

gadgets.util.makeClosure(null, func, "hello")("world", "haha i broke your API")

The second outputs 'world haha i broke your API' I can't reference my original data by name. This makes it impossible for callers to add new arguments in the future. 

The first outputs 'hello haha i broke your API world'

Is this true on igoogle today, or does it ensure a predictable signature by keeping the arguments in place?

> _IG_Callback is not defined, need for legacy support
> ----------------------------------------------------
>
>                 Key: SHINDIG-114
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features
>            Reporter: Bruno Bowden
>            Assignee: Kevin Brown
>         Attachments: _IG_Callback-legacy.patch
>
>


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


[jira] Closed: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

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

Zhen Wang closed SHINDIG-114.
-----------------------------

    Resolution: Fixed
      Assignee: Zhen Wang  (was: Kevin Brown)

Optimized the patch and fixed in revision 634813.

> _IG_Callback is not defined, need for legacy support
> ----------------------------------------------------
>
>                 Key: SHINDIG-114
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features
>            Reporter: Bruno Bowden
>            Assignee: Zhen Wang
>         Attachments: _IG_Callback-legacy.patch
>
>


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


[jira] Commented: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

Posted by "Bruno Bowden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576282#action_12576282 ] 

Bruno Bowden commented on SHINDIG-114:
--------------------------------------

The behaviour is a little strange, that's why you can't do a simple wrapper
for makeClosure as you'd expect. The code is documented in an igoogle source
file. I'll send you directly the internal link.


> _IG_Callback is not defined, need for legacy support
> ----------------------------------------------------
>
>                 Key: SHINDIG-114
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features
>            Reporter: Bruno Bowden
>            Assignee: Kevin Brown
>         Attachments: _IG_Callback-legacy.patch
>
>


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


[jira] Updated: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

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

Bruno Bowden updated SHINDIG-114:
---------------------------------

    Attachment: _IG_Callback-legacy.patch

Can't just make _IG_Callback a wrapper for makeClosure as it reverses the argument ordering.

_IG_Callback takes the arguments in the scope the callback is executed and
places them first in the argument array. MakeClosure takse the arguments
from the scope at callback construction and pushes them first in the array

> _IG_Callback is not defined, need for legacy support
> ----------------------------------------------------
>
>                 Key: SHINDIG-114
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features
>            Reporter: Bruno Bowden
>            Assignee: Kevin Brown
>         Attachments: _IG_Callback-legacy.patch
>
>


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


[jira] Issue Comment Edited: (SHINDIG-114) _IG_Callback is not defined, need for legacy support

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576159#action_12576159 ] 

etnu edited comment on SHINDIG-114 at 3/7/08 4:12 AM:
-------------------------------------------------------------

I can't find actual documentation for this function on igoogle. It seems like broken behavior to me:

Consider this:

function func(arg0, arg1) {
  alert(arg0 + arg1);
}

_IG_Callback(func, "world")("hello", "haha i broke your API");

vs

gadgets.util.makeClosure(null, func, "hello")("world", "haha i broke your API")

The first outputs 'hello haha i broke your API world' can't reference my original data by name. This makes it impossible for callers to add new arguments in the future. 

The second outputs 'hello world', what I would have expected.



Is this true on igoogle today, or does it ensure a predictable signature by keeping the arguments in place?

      was (Author: etnu):
    I can't find actual documentation for this function on igoogle. It seems like broken behavior to me:

Consider this:

function func(arg0, arg1) {
  alert(arg0 + arg1);
}

_IG_Callback(func, "world")("hello", "haha i broke your API");

vs

gadgets.util.makeClosure(null, func, "hello")("world", "haha i broke your API")

The second outputs 'world haha i broke your API' I can't reference my original data by name. This makes it impossible for callers to add new arguments in the future. 

The first outputs 'hello haha i broke your API world'

Is this true on igoogle today, or does it ensure a predictable signature by keeping the arguments in place?
  
> _IG_Callback is not defined, need for legacy support
> ----------------------------------------------------
>
>                 Key: SHINDIG-114
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-114
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features
>            Reporter: Bruno Bowden
>            Assignee: Kevin Brown
>         Attachments: _IG_Callback-legacy.patch
>
>


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