The point is, I don't know what triggers detection of Parser1 or 2.
The script above (http://gist.github.com/151313) has the following
behaviour

1) Cannot be installed in 0.1
2) Can be installed in 0.5
2.1) Does not work correctly in 0.5 Parser1 because preview and
execute expect arguments in the Parser 2 format
2.2) Works correctly in 0.5 Parser 2

So there are a couple of things I don't understand:

If it installs in 0.5 Parser 1, why doesn't it in 0.1?
If parserVersion is set to 1 in 0.5, why do execute and preview expect
Parser 2-like arguments?

Maybe the approach suggested by Fernando does work.  I was attempting
to avoid duplicating the whole code and just making the critical parts
dependent on the parser version instead in order to easy maintenance.

Satyr: I'm not using any of the new features.  Still it might well be
that the parser recognition logic gets fooled by the hybrid approach,
I mean the presence of 'name' and 'names', 'takes' and 'arguments',
etc.

On Tue, Jul 21, 2009 at 8:18 PM, Fernando Takai<[email protected]> wrote:
>
> In the case the command author wants to use it, wouldn't be good to
> use something like:
>
> if(CmdUtils.parserVersion && CmdUtils.parserVersion == 2){
>  // Parser 2 version
> } else {
>  // Parser 1 version
> }
>
> ?
>
> On Jul 21, 2009, at 2:50 PM, satyr wrote:
>
>>
>> "Parser 1 API" itself remains same, so there's no difference wrt
>> Parser 1.
>>
>> The issue is that, if you're targetting 0.1, you can't use new
>> features (e.g. CmdUtils.previewList()) and/or updated APIs (e.g.
>> Utils.tabs).

--~--~---------~--~----~------------~-------~--~----~
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