Loading ...
Sorry, an error occurred while loading the content.
 

Re: XUL and Ajile

Expand Messages
  • mikeizworkin
    Richard, No problem. Thanks for responding with details and posting the problematic code. I ve downloaded it and will try to take a look at this tonight.
    Message 1 of 10 , Nov 17, 2008
      Richard,
      No problem. Thanks for responding with details and posting the problematic code.

      I've downloaded it and will try to take a look at this tonight. Hopefully I'll find a solution
      that meets your needs. Not sure when I'll know for sure, but I'll keep you posted.

      Best,
      Michael


      --- In ajile@yahoogroups.com, "rme451" <rme451@...> wrote:
      >
      > --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@> wrote:
      > >
      > > Hi,
      > > Thanks for posting and providing error information.
      > >
      > > Is it possible for you to post a sample of XUL file using Ajile the
      > way you're trying to?
      > >
      >
      > Hi Michael,
      >
      > Thanks very much for the quick and encouraging response.
      >
      > With a dumb question like that I was expecting short shrift, so
      > thankyou!
      >
      > Your library is elegant & seems to offer exactly what we're looking
      > for, so I'm hopeful that we may be able to use it from firefox addon
      > land.
      >
      > I'm developing using Firefox 2.0.0.18.
      >
      > I tried the cloakoff setting without any luck.
      >
      > I tried your 'cloakoff,mvcoff,mvcshareoff' and established (with
      > alerts) the file was being included.
      >
      > I enabled the alert in the src (com.iskitz.ajile.1.2.1.src.js)
      > version, and (ominously) got a full house of falses:
      >
      > alert("LOADER: "+getMainLoader(document)
      > +"\n\nisSimple: "+isSimple+"\nisDOM: "+isDOM+"\nisDOM05: "+isDOM05+"\n
      > isDOM1: "+isDOM1+"\nisDOM2: "+isDOM2);
      >
      > This might be because the document is a XULElement according to
      > getMainLoader.
      >
      > I have bundled together an (experimental) version of what we intend
      > to offer our users:
      >
      > http://dl.getdropbox.com/u/197051/extdev.zip
      >
      > It might indicate where I've gone wrong.
      >
      > The readme will give you an idea about how to set-up.
      >
      > Let me know if it won't fire-up right, & apologies in advance for its
      > lack of sophistication.
      >
      > If you do a search-in-files (*.xul;*.js) for 'AJILE-TEST' it will
      > take you to my feeble attempts to get up to speed.
      >
      > Thanks once again for your help.
      >
      > Regards,
      >
      > Richard
      >
    • mikeizworkin
      Richard, I ve spent some time looking at Ajile working with your extension and am definitely hitting some challenges, the least of which is understanding XUL s
      Message 2 of 10 , Nov 20, 2008
        Richard,
        I've spent some time looking at Ajile working with your extension and am definitely hitting
        some challenges, the least of which is understanding XUL's structure: overlays, expected
        behavior of dynamic DOM updates, specifically dynamic scripts.

        I'm going to spend some more time looking into this, I'm curious why the XUL environment
        is behaving differently. I've modified Ajile such that the loaded scripts get written to the
        DOM, but those scripts don''t seem to be executing.

        Maybe you can help me better understand the XUL environment. I've been looking through
        Mozilla's Developer Center XUL Docs, but haven't found a clean simple explanation of
        DOM differences between client-side pages and extensions...

        I'm trying to understand whether XUL can handle dynamic scripts via DOM updates or if
        some other special loader is needed.

        Michael

        --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@...> wrote:
        >
        > Richard,
        > No problem. Thanks for responding with details and posting the problematic code.
        >
        > I've downloaded it and will try to take a look at this tonight. Hopefully I'll find a solution
        > that meets your needs. Not sure when I'll know for sure, but I'll keep you posted.
        >
        > Best,
        > Michael
        >
        >
        > --- In ajile@yahoogroups.com, "rme451" <rme451@> wrote:
        > >
        > > --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@> wrote:
        > > >
        > > > Hi,
        > > > Thanks for posting and providing error information.
        > > >
        > > > Is it possible for you to post a sample of XUL file using Ajile the
        > > way you're trying to?
        > > >
        > >
        > > Hi Michael,
        > >
        > > Thanks very much for the quick and encouraging response.
        > >
        > > With a dumb question like that I was expecting short shrift, so
        > > thankyou!
        > >
        > > Your library is elegant & seems to offer exactly what we're looking
        > > for, so I'm hopeful that we may be able to use it from firefox addon
        > > land.
        > >
        > > I'm developing using Firefox 2.0.0.18.
        > >
        > > I tried the cloakoff setting without any luck.
        > >
        > > I tried your 'cloakoff,mvcoff,mvcshareoff' and established (with
        > > alerts) the file was being included.
        > >
        > > I enabled the alert in the src (com.iskitz.ajile.1.2.1.src.js)
        > > version, and (ominously) got a full house of falses:
        > >
        > > alert("LOADER: "+getMainLoader(document)
        > > +"\n\nisSimple: "+isSimple+"\nisDOM: "+isDOM+"\nisDOM05: "+isDOM05+"\n
        > > isDOM1: "+isDOM1+"\nisDOM2: "+isDOM2);
        > >
        > > This might be because the document is a XULElement according to
        > > getMainLoader.
        > >
        > > I have bundled together an (experimental) version of what we intend
        > > to offer our users:
        > >
        > > http://dl.getdropbox.com/u/197051/extdev.zip
        > >
        > > It might indicate where I've gone wrong.
        > >
        > > The readme will give you an idea about how to set-up.
        > >
        > > Let me know if it won't fire-up right, & apologies in advance for its
        > > lack of sophistication.
        > >
        > > If you do a search-in-files (*.xul;*.js) for 'AJILE-TEST' it will
        > > take you to my feeble attempts to get up to speed.
        > >
        > > Thanks once again for your help.
        > >
        > > Regards,
        > >
        > > Richard
        > >
        >
      • rme451
        ... and am definitely hitting ... structure: overlays, expected ... the XUL environment ... scripts get written to the ... been looking through ... simple
        Message 3 of 10 , Nov 21, 2008
          --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@...> wrote:
          >
          > Richard,
          > I've spent some time looking at Ajile working with your extension
          and am definitely hitting
          > some challenges, the least of which is understanding XUL's
          structure: overlays, expected
          > behavior of dynamic DOM updates, specifically dynamic scripts.
          >
          > I'm going to spend some more time looking into this, I'm curious why
          the XUL environment
          > is behaving differently. I've modified Ajile such that the loaded
          scripts get written to the
          > DOM, but those scripts don''t seem to be executing.
          >
          > Maybe you can help me better understand the XUL environment. I've
          been looking through
          > Mozilla's Developer Center XUL Docs, but haven't found a clean
          simple explanation of
          > DOM differences between client-side pages and extensions...
          >
          > I'm trying to understand whether XUL can handle dynamic scripts via
          DOM updates or if
          > some other special loader is needed.
          >
          > Michael

          Hi Michael,

          Thanks very much for your reply.

          I think it's a lost cause!

          I'm sorry I can't be more help.

          I don't want to waste your time, but I wonder if some specific
          initialization at the start of every page load might be of use with
          AJILE in an extension?

          Please see http://dl.getdropbox.com/u/197051/overlay2.js for an
          example of what I've been trying.

          Really appreciate your time, and many thanks again for your help.

          Regards,

          Richard
        • iskitzdev
          Richard! Don t give up just yet! :-) It s funny, I thought about emailing you around 4 PM today to let you know I d found the solution, but decided to work out
          Message 4 of 10 , Nov 21, 2008
            Richard!

            Don't give up just yet! :-)

            It's funny, I thought about emailing you around 4 PM today to let you
            know I'd found the solution, but decided to work out all of the kinks
            first.

            Yes, it's true, Ajile can work the way you'd like *and* in the
            extensions environment. I'm cleaning up my test code and will post the
            working version of your extension as soon as I'm finished.

            Cheers!
            Michael

            --- In ajile@yahoogroups.com, "rme451" <rme451@...> wrote:
            >
            > Hi Michael,
            >
            > Thanks very much for your reply.
            >
            > I think it's a lost cause!
            >
            > I'm sorry I can't be more help.
            >
            > I don't want to waste your time, but I wonder if some specific
            > initialization at the start of every page load might be of use with
            > AJILE in an extension?
            >
            > Please see http://dl.getdropbox.com/u/197051/overlay2.js for an
            > example of what I've been trying.
            >
            > Really appreciate your time, and many thanks again for your help.
            >
            > Regards,
            >
            > Richard
            >
            >
            > --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@> wrote:
            > >
            > > Richard,
            > > I've spent some time looking at Ajile working with your extension
            > and am definitely hitting
            > > some challenges, the least of which is understanding XUL's
            > structure: overlays, expected
            > > behavior of dynamic DOM updates, specifically dynamic scripts.
            > >
            > > I'm going to spend some more time looking into this, I'm curious why
            > the XUL environment
            > > is behaving differently. I've modified Ajile such that the loaded
            > scripts get written to the
            > > DOM, but those scripts don''t seem to be executing.
            > >
            > > Maybe you can help me better understand the XUL environment. I've
            > been looking through
            > > Mozilla's Developer Center XUL Docs, but haven't found a clean
            > simple explanation of
            > > DOM differences between client-side pages and extensions...
            > >
            > > I'm trying to understand whether XUL can handle dynamic scripts via
            > DOM updates or if
            > > some other special loader is needed.
            > >
            > > Michael
          • iskitzdev
            Okay Richard. All set :-) I ve uploaded a functional version of your EBI Toolbar Firefox Extension here: http://drop.io/ebitoolbar/ The
            Message 5 of 10 , Nov 22, 2008
              Okay Richard.

              All set :-) I've uploaded a functional version of your EBI Toolbar
              Firefox Extension here:

              http://drop.io/ebitoolbar/

              The ebitoolbar.michael.4.zip file contains my changes, the
              ebitoolbar.richard.1.zip file contains what you originally sent me.

              I've left comments throughout the scripts I've created and modified so
              you should be able to find your way through without a problem.

              The key files to look at are:

              1. firefoxOverlay.xul
              2. com.iskitz.ajile.1.2.1-ebi.src.js
              3. browser.js

              Basically, your XUL overlay loads Ajile which then loads browser.js
              because the actual firefox XUL document is browser.xul.

              Thanks a lot for contacting me. It's given me the opportunity to
              update Ajile to support yet another environment Firefox Extensions
              (XUL), so thanks :-)

              I'll be doing further investigation to better understand the
              differences in the XUL environment so that the official Ajile library
              can be used "as is" there as well as in all of its currently supported
              environments (aka client-side pages in just about every browser).

              Let me know how it goes and if you have questions.


              Best,
              Michael


              --- In ajile@yahoogroups.com, "iskitzdev" <ajile@...> wrote:
              >
              > Richard!
              >
              > Don't give up just yet! :-)
              >
              > It's funny, I thought about emailing you around 4 PM today to let you
              > know I'd found the solution, but decided to work out all of the kinks
              > first.
              >
              > Yes, it's true, Ajile can work the way you'd like *and* in the
              > extensions environment. I'm cleaning up my test code and will post the
              > working version of your extension as soon as I'm finished.
              >
              > Cheers!
              > Michael
              >
              > --- In ajile@yahoogroups.com, "rme451" <rme451@> wrote:
              > >
              > > Hi Michael,
              > >
              > > Thanks very much for your reply.
              > >
              > > I think it's a lost cause!
              > >
              > > I'm sorry I can't be more help.
              > >
              > > I don't want to waste your time, but I wonder if some specific
              > > initialization at the start of every page load might be of use with
              > > AJILE in an extension?
              > >
              > > Please see http://dl.getdropbox.com/u/197051/overlay2.js for an
              > > example of what I've been trying.
              > >
              > > Really appreciate your time, and many thanks again for your help.
              > >
              > > Regards,
              > >
              > > Richard
              > >
              > >
              > > --- In ajile@yahoogroups.com, "mikeizworkin" <mikeizworkin@> wrote:
              > > >
              > > > Richard,
              > > > I've spent some time looking at Ajile working with your extension
              > > and am definitely hitting
              > > > some challenges, the least of which is understanding XUL's
              > > structure: overlays, expected
              > > > behavior of dynamic DOM updates, specifically dynamic scripts.
              > > >
              > > > I'm going to spend some more time looking into this, I'm curious why
              > > the XUL environment
              > > > is behaving differently. I've modified Ajile such that the loaded
              > > scripts get written to the
              > > > DOM, but those scripts don''t seem to be executing.
              > > >
              > > > Maybe you can help me better understand the XUL environment. I've
              > > been looking through
              > > > Mozilla's Developer Center XUL Docs, but haven't found a clean
              > > simple explanation of
              > > > DOM differences between client-side pages and extensions...
              > > >
              > > > I'm trying to understand whether XUL can handle dynamic scripts via
              > > DOM updates or if
              > > > some other special loader is needed.
              > > >
              > > > Michael
              >
            • Michael
              Hi Richard, Ajile works well for dynamically loading EBI Toolbar plugins. I ve extracted example 0 of your Google Scholar Examples into a separate JavaScript
              Message 6 of 10 , Nov 23, 2008
                Hi Richard,
                Ajile works well for dynamically loading EBI Toolbar plugins.

                I've extracted example 0 of your Google Scholar Examples into a
                separate JavaScript file and updated the EBI Toolbar extension to
                demonstrate how this and other plugins can easily be dynamically
                loaded using Ajile. The updated files are posted at:

                http://drop.io/ebitoolbar/

                Do the following to see a working example:

                1. Download the ebitoolbar.michael.5.zip file.

                2. Extract and use it's contents as your EBI Toolbar Extension
                within Firefox.

                3. Launch Firefox.

                4. Hit Enter through all alert boxes.

                5. Press F2, it should alert confirming F2 was pressed, then after
                you hit Enter, prompt you for input.

                6. Either hit Enter or change the prompt's default info. I recommend
                enter the first time around.

                7. Use the EBI Toolbar to load Google Scholar then perform a search
                and observe the listed results.

                Basically The example shows that the EBI Toolbar using Ajile can
                dynamically load internal or external script files on-demand. The
                external script file used by default in my example (Google Scholars
                Example 0) resides here: http://tinyurl.com/5sjdrv/

                You can try creating plugins elsewhere including on your local drive
                then access them via their absolute URLs, i.e. file:///local/path/to/
                a/Plugin.js

                I've used Ajile to successfully load the following:

                - plugins that exist within the extension.
                - plugins that exist outside of the extension, but on a local drive
                - plugins that exist outside of the extension, on the web (i.e.
                http://tinyurl.com/5sjdrv/ )

                The fwim.js file within ebitoolbar.michael.5.zip contains code at
                lines 108 through 129 that demonstrates how to load and execute plugins.

                Very little of Ajile's functionality has been used to show how what
                you've asked for is possible. If you wish or need, you can delve
                deeper and make use of it's Namespacing and Importing functionality
                to define dependencies between your scripts.

                I've enjoyed working with your EBI Toolbar extension and learned a
                good deal in the process.

                Best of luck and feel free to contact me with any questions.


                Cheers!
                Michael

                P.S. The tinyurl link might eventually lead you to a 500 resource
                timed out at drop.io, if that happens, just copy the file's Download
                link location and use that, but it's pretty long so you might want to
                use tinyurl.com to shorten it and try again.


                On Nov 22, 2008, at 9:19 PM, Richard Easty wrote:

                > Hi Michael,
                >
                > Thanks very much for your efforts.
                >
                > We really appreciate your help.
                >
                > Our plan is to try to support 'plugins' for our toolbar.
                >
                > Most of the code will be deployed as an extension and will be
                > loaded in
                > the 'normal' way.
                >
                > Users will develop their own functions which we'll host at ebi.
                >
                > We're thinking that these functions could be loaded if and when the
                > user
                > wants them via Ajile. Perhaps we'll offer a list of all available
                > functions and the user will select from it.
                >
                > So in other words, the js classes that live at ebi will be versions
                > of the
                > plugin examples I supplied.
                >
                > Do you think Ajile will support this?
                >
                > Thanks again,
                >
                > Richard
                >
              • Michael
                Richard! Sorry for the delay, just getting back from the long Thanksgiving holiday. Thanks for the kind words. I m very happy that Ajile is helping you and
                Message 7 of 10 , Dec 2 3:45 AM
                  Richard!
                  Sorry for the delay, just getting back from the long Thanksgiving
                  holiday.

                  Thanks for the kind words. I'm very happy that Ajile is helping you
                  and your team better achieve your goals :-)

                  I took a look at your sample and have created a working version
                  (ebitoolbar.michael.7.zip) at http://drop.io/ebitoolbar/


                  A few key points:

                  - Ajile's MVC setting has no effect on the issue shown in your sample.

                  - Ajile's Listeners are more reliable when used with Include, Import,
                  and ImportAs statements.


                  Take a look at the testPluginStatic() function within the scripts/
                  fwim.js file in the michael.7 sample. The updated sample builds on
                  the michael.5 sample. I've modified your alert statements to use the
                  EBILogger so that you can clearly see the loading and listener
                  handling sequences.

                  Let me know how things go and as always, feel free to ask any questions.


                  -Michael


                  On Nov 26, 2008, at 12:56 PM, Richard Easty wrote:

                  > Hi Michael!
                  >
                  > I can't thank you enough.
                  >
                  > That's such a lot of effort.
                  >
                  > What an amazingly quick & thorough explanation!
                  >
                  > We really appreciate it.
                  >
                  > We were thinking we'd be lost in XMLHttpRequest hell trying to get
                  > something with Ajile's capability up to speed.
                  >
                  > With Ajile's help, we're now tempted to put most of our scripts at
                  > ebi &
                  > distribute a fairly minimal extension.
                  >
                  > Thanks to Ajile, the possibilities are really opening out for us.
                  >
                  > We're some distance from re-framing our toolbar so it can take
                  > advantage
                  > of Ajile, but we're very grateful.
                  >
                  > I'm probably missing some obvious point, but in trying to do some
                  > simple
                  > tests without the MVC functions, I'm having some problems. I've
                  > changed my
                  > original zipped example so it features the problem I've encountered.
                  >
                  > http://dl.getdropbox.com/u/197051/ebitoolbar.richard.2.zip
                  >
                  > To summarise, I switched off MVC in the Ajile file and changed the
                  > function attached to F2, so that it is a simple version of the last
                  > example you supplied. The new F2 function attempts to do a load of
                  > a file,
                  > and sets up a listener. Seems the listener does not get fired on
                  > the first
                  > run through. Subsequent attempts do seem to fire though. I dare say
                  > it's
                  > something to do with the MVC switch being turned off & some
                  > initialisation
                  > not running before the first call.
                  >
                  > Cheers! & many thanks once again,
                  >
                  > Richard
                  >
                  >> Hi Richard,
                  >> Ajile works well for dynamically loading EBI Toolbar plugins.
                  >>
                  >> I've extracted example 0 of your Google Scholar Examples into a
                  >> separate JavaScript file and updated the EBI Toolbar extension to
                  >> demonstrate how this and other plugins can easily be dynamically
                  >> loaded using Ajile. The updated files are posted at:
                  >>
                  >> http://drop.io/ebitoolbar/
                  >>
                  >> Do the following to see a working example:
                  >>
                  >> 1. Download the ebitoolbar.michael.5.zip file.
                  >>
                  >> 2. Extract and use it's contents as your EBI Toolbar Extension
                  >> within Firefox.
                  >>
                  >> 3. Launch Firefox.
                  >>
                  >> 4. Hit Enter through all alert boxes.
                  >>
                  >> 5. Press F2, it should alert confirming F2 was pressed, then after
                  >> you hit Enter, prompt you for input.
                  >>
                  >> 6. Either hit Enter or change the prompt's default info. I recommend
                  >> enter the first time around.
                  >>
                  >> 7. Use the EBI Toolbar to load Google Scholar then perform a search
                  >> and observe the listed results.
                  >>
                  >> Basically The example shows that the EBI Toolbar using Ajile can
                  >> dynamically load internal or external script files on-demand. The
                  >> external script file used by default in my example (Google Scholars
                  >> Example 0) resides here: http://tinyurl.com/5sjdrv/
                  >>
                  >> You can try creating plugins elsewhere including on your local drive
                  >> then access them via their absolute URLs, i.e. file:///local/path/to/
                  >> a/Plugin.js
                  >>
                  >> I've used Ajile to successfully load the following:
                  >>
                  >> - plugins that exist within the extension.
                  >> - plugins that exist outside of the extension, but on a local drive
                  >> - plugins that exist outside of the extension, on the web (i.e.
                  >> http://tinyurl.com/5sjdrv/ )
                  >>
                  >> The fwim.js file within ebitoolbar.michael.5.zip contains code at
                  >> lines 108 through 129 that demonstrates how to load and execute
                  >> plugins.
                  >>
                  >> Very little of Ajile's functionality has been used to show how what
                  >> you've asked for is possible. If you wish or need, you can delve
                  >> deeper and make use of it's Namespacing and Importing functionality
                  >> to define dependencies between your scripts.
                  >>
                  >> I've enjoyed working with your EBI Toolbar extension and learned a
                  >> good deal in the process.
                  >>
                  >> Best of luck and feel free to contact me with any questions.
                  >>
                  >>
                  >> Cheers!
                  >> Michael
                  >>
                  >> P.S. The tinyurl link might eventually lead you to a 500 resource
                  >> timed out at drop.io, if that happens, just copy the file's Download
                  >> link location and use that, but it's pretty long so you might want to
                  >> use tinyurl.com to shorten it and try again.
                  >>
                  >>
                  >> On Nov 22, 2008, at 9:19 PM, Richard Easty wrote:
                  >>
                  >>> Hi Michael,
                  >>>
                  >>> Thanks very much for your efforts.
                  >>>
                  >>> We really appreciate your help.
                  >>>
                  >>> Our plan is to try to support 'plugins' for our toolbar.
                  >>>
                  >>> Most of the code will be deployed as an extension and will be
                  >>> loaded in
                  >>> the 'normal' way.
                  >>>
                  >>> Users will develop their own functions which we'll host at ebi.
                  >>>
                  >>> We're thinking that these functions could be loaded if and when the
                  >>> user
                  >>> wants them via Ajile. Perhaps we'll offer a list of all available
                  >>> functions and the user will select from it.
                  >>>
                  >>> So in other words, the js classes that live at ebi will be versions
                  >>> of the
                  >>> plugin examples I supplied.
                  >>>
                  >>> Do you think Ajile will support this?
                  >>>
                  >>> Thanks again,
                  >>>
                  >>> Richard
                  >>>
                  >>
                  >
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.