Sorry, you're right, we really need to explain "context" somewhere in 
our documentation!

The basic idea is that it's literally the "context" surrounding the 
execution of a command.  It's not enough for a command to simply know 
that it needs to execute; what physical browser window was the user in, 
and what widget did they have in focus?  Some of this stuff gets 
captured by CmdUtils, and some of it is included in the direct object 
provided to the command, which makes the exact question of where to look 
for a piece of information a bit confusing, but that's the general idea 
of what "context" is supposed to provide.

Hope that helps.

- Atul

On 2/10/09 12:41 PM, lrbabe wrote:
> Hello everybody,
>
> I'm spending some time today to try to understand what actually is
> this "context" that is supposed to be defined when triggering a
> command.
> I would like to execute arbitrary code each time Ubiquity is opened
> that execute an existing command.
>
> I'm trying to use the following piece of code right in the Ubiquity
> Command Editor:
>
> context.chromeWindow.gUbiquity.__cmdManager.__cmdSource.getCommand
> ( "existing-command" ).execute(
>    context, {text:"any text"}, {} );
> );
>
> Of course it doesn't work because there is no context defined when the
> code is executed. The problem is that I don't know exactly what a
> context is (there is no documentation about it AFAIK) and how to
> "build" one...
>
> Thanks in advance for your clarifications : )
> Louis-rémi Babé
> >
>    

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to