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

Re: Shared Import

Expand Messages
  • iskitzdev
    Hi Levani, Thanks for sending the log, it was helpful. Can you download and try Ajile 0.7 and let me know if you still see the problem you reported? I just
    Message 1 of 9 , Sep 28, 2006
      Hi Levani,
      Thanks for sending the log, it was helpful.

      Can you download and try Ajile 0.7 and let me know if you still see the
      problem you reported? I just officially released 0.7 this morning today,
      so please redownload it to be sure you have the latest build.

      Download Ajile 0.7 here
      <http://prdownloads.sourceforge.net/ajile/Ajile.0.7.zip?download>


      Reviewing the log data you posted I saw the following entry that I
      didn't expect:

      > Wed Sep 13 2006 09:36:29 GMT-0400 (Eastern Standard Time) ::
      > completeImports
      > ImportAs ("function () {
      > return s.object(this);
      > }", "toJSONString")...CHECKING

      I'm very interested to see if/when this entry shows up in the new
      build's log output.

      Please let me know if the issue's been resolved and of course if you
      discover any others. If you decide to send the new log please save it as
      a file and upload it to this group's Files > Ajile Tests > Levani area.
      The link to that folder is:
      http://tech.groups.yahoo.com/group/ajile/files/Ajile%20Tests/Levani/


      Thanks,
      Michael


      --- In ajile@yahoogroups.com, "dlevancho" <dlevancho@...> wrote:
      >
      > Here is the Ajile Log :
      >
      > [Deleted]
      >
      > I have also identified the error , it seems that if I do
      > YAHOO.util.Event.addListener(window, "load",init); then
      there
      > will be Ajille error : dependencies.getAll is not a function
      > But If I do just plain old <body onLoad="init()"> then there is no
      > error in firebug. strange must be Yahoo Event not working as it
      should.
      > anyways here is complete list of imports :
      >
      > FIle inventory.js (autoloaded for inventory.html )
      >
      > content :
      >
      >
      >
      > Import ("com.scand.dhtmlxgrid.dhtmlXCommon", null, Ajile.USE_PATH);
      > Import ("com.scand.dhtmlxgrid.dhtmlXGrid", null, Ajile.USE_PATH);
      > Import ("com.scand.dhtmlxgrid.dhtmlXGrid_drag", null, Ajile.USE_PATH);
      > Import ("com.scand.dhtmlxgrid.dhtmlXGridCell", null, Ajile.USE_PATH);
      >
      > Import ("com.yahoo.yahoo.yahoo", null, Ajile.USE_PATH);
      > Import ("com.yahoo.event.event", null, Ajile.USE_PATH);
      > Import ("com.yahoo.dom.dom", null, Ajile.USE_PATH);
      > Import ("com.yahoo.dragdrop.dragdrop", null, Ajile.USE_PATH);
      > Import ("com.yahoo.animation.animation", null, Ajile.USE_PATH);
      > Import ("com.yahoo.connection.connection", null, Ajile.USE_PATH);
      > Import ("com.yahoo.container.container-min", null, Ajile.USE_PATH);
      > Import ("com.yahoo.logger.logger", null, Ajile.USE_PATH);
      >
      >
      > Import ("com.amostudio.utils.json", null, Ajile.USE_PATH);
      > Import ("com.amostudio.validation.verifiers", null, Ajile.USE_PATH);
      > Import ("com.amostudio.core.IObject", null, Ajile.USE_PATH);
      > Import ("com.amostudio.core.Extends", null, Ajile.USE_PATH);
      > Import ("com.amostudio.core.controllers.BaseController", null,
      > Ajile.USE_PATH);
      > Import ("com.amostudio.collections.Vector", null, Ajile.USE_PATH)
      > Import ("com.amostudio.core.portbox_Base", null, Ajile.USE_PATH);
      >
      >
      > Import ("com.amostudio.containers.PortGrid", null, Ajile.USE_PATH);
      > Import ("com.amostudio.geomobil.inventory.page-config", null,
      > Ajile.USE_PATH)// JavaScript Document
      > Import ("com.amostudio.utils.utils", null, Ajile.USE_PATH)
      >
      > File page-config.js (this file has init function)
      >
      > myConfigs = {
      > boundContainer_id :"portbox_test",
      > _grid:{
      > source:"../xml/grid/inventory.xml"},
      > inventorySchemma :{
      > title:"Inventory",
      > image:"../icons/small/object.png",
      > header_background:"#606ABF",
      > action_bar_backgroundColor:"#9197D2",
      > body_backgroundColor:"#9197D2",
      > footer_top_backgroundColor:"#9197D2",
      > footer_buttom_backgroundColor:"#606ABF"
      > },
      > FilterObj:{
      > title:" Specify the columns you would like to
      > display",
      >
      > modal:true,
      > visible:false,
      > width:"550px",
      > fixedcenter:true,
      > constraintoviewport:true,
      > draggable:true,
      > renderer: null
      > },
      > ConfigObj:{
      > title:" Specify the columns Configurations",
      > persistent :true,
      > modal:true,
      > visible:false,
      > width:"650px",
      > fixedcenter:true,
      > constraintoviewport:true,
      > draggable:true,
      >
      > renderer : null
      > }
      > };
      >
      > function init() {
      > Ajile.ShowLog();
      > //YAHOO.log(e.toString+" Init Started ");
      > gridtest = new amostudio.container.PortGrid();
      > gridtest.init(myConfigs);
      > //gridtest.initGrid();
      >
      > // gridtest2 = new amostudio.container.PortGrid();
      > // gridtest2.init(myConfigs);
      > //gridtest.initGrid();
      >
      >
      > }
      > YAHOO.util.Event.addListener(window, "load",init);
      >
      > -----
      > so as you se if I take out YAHOO.util.Event.addListener(window,
      > "load",init); and use onLoad attribute of body tag everything works
      > fine, everything still works fine using yahoo addListener but for some
      > reason that error showsup, I know yahoos even the way it works it
      checks
      > every 15 sec or so for some objects in case they have not been
      > initialized yet, maybe that is the case?
      >
      >
      > best Regards.
      >
      > --- In ajile@yahoogroups.com, "iskitzdev" iskitzdev@ wrote:
      > >
      > > Hi Levani,
      > > Can you provide a bit more information about the problem? Here are a
      > > few things you could do to get more information:
      > >
      > > 1. Please load Ajile using the debug load-time option for example:
      > >
      > > <script type="text/javascript"
      > > src="com.iskitz.ajile.0.6.5.js?default"><script>
      > >
      > > 2. Listen to the window.onload event and call Ajile.ShowLog(); when
      > > that occurs.
      > >
      > > 3. After the Ajile Debug Log window opens copy the output and post
      it.
      > >
      > > Also if you could, please send the list of imports in the order that
      > > they're currently written.
      > >
      > > Thanks,
      > > Michael
      > >
      > >
      > >
      > > --- In ajile@yahoogroups.com, "dlevancho" dlevancho@ wrote:
      > > >
      > > > --- In ajile@yahoogroups.com, "iskitzdev" iskitzdev@ wrote:
      > > > >
      > > > > Hi Levani,
      > > > > Glad you've been able to integrate Ajile with your project.
      Sounds
      > > > > like something interesting from the looks of your imports ;-)
      > > > >
      > > > > You're a lucky fellow. The feature you're asking about was
      > > introduced
      > > > > in Ajile 0.5.5, but I replaced it with an alternate solution in
      > the
      > > > > 0.6+ releases.
      > > > >
      > > > > I've just released Ajile 0.6.5 which reintroduces that feature,
      > > that's
      > > > > why you're lucky :-) I refer to it as a shared auto-loader, so
      if
      > > you
      > > > > see that term in discussions that's what's being talked about.
      > > > >
      > > > > So, here's how you to use the shared loader:
      > > > >
      > > > > 1. Put [script ... src="com.iskitz.ajile.0.6.5.js"][/script]
      > > > s> in your HTM files. (Replace [ and ] with < and >
      respectively)
      > > > >
      > > > > 2. Put all the imports you mentioned in an index.js file in
      > > > > the same directory where you store com.iskitz.ajile.0.6.5.js.
      > > > >
      > > > > 3. That's it! Ajile will automatically load that index.js
      > > > > everytime a page loads Ajile.
      > > > >
      > > > >
      > > > > An alternate solution if you're already using per-page loaders
      > (i.e.
      > > > > an auto-loaded script for each page):
      > > > >
      > > > > 1. Create a separate .js file (i.e. my.shared.importer.js).
      > > > >
      > > > > 2. Place all of the imports you mentioned within the file.
      > > > >
      > > > > 3. In every per-page .js you use, have a
      > > > >
      > > > > Load ("my.shared.importer.js"); or
      > > > >
      > > > > Import("my.shared.importer.*");
      > > > >
      > > > > if you want it's path to be automatically resolved.
      > > > >
      > > > >
      > > > > Some tips for using Ajile:
      > > > >
      > > > > 1. The Ajile.USE_PATH and Ajile.USE_NAME packaging style
      > indicators
      > > > > have been deprecated since version 0.6 you can use quoted
      > characters
      > > > > that match your prefered packaging style instead. So for
      instance
      > if
      > > > > you chose to store your files within subdirectories as follows:
      > > > >
      > > > > .../scripts/my/site/modules.js
      > > > >
      > > > > you would import then as:
      > > > >
      > > > > Import("my.site.modules.js, null, "/");
      > > > >
      > > > > Ajile 0.6+ allows you to use any valid file system character as
      > your
      > > > > packaging style. You can name your file: "my,site,modules.js" or
      > > > > "my-site-modules.js" or "my site modules.js" there are many
      > options.
      > > > >
      > > > >
      > > > > 2. The Ajile module's packaging style and location act as the
      > > > > automatic defaults for all imported scripts that don't
      explicitly
      > > > > specify their own packaging style or location. Basically Ajile
      > will
      > > > > default to loading imported scripts from the directory where
      Ajile
      > > > > exists and use the packaging style used by Ajile. This means you
      > can
      > > > > eliminate a lot of typing out the packaging style if it's all
      the
      > > same
      > > > > so for instance with:
      > > > >
      > > > > .../scripts/com/iskitz/ajile.0.6.5.js
      > > > > .../scripts/com/yahoo/...
      > > > > .../scripts/com/amostudio/...
      > > > >
      > > > > you should be able to do:
      > > > >
      > > > > Import ("com.yahoo.logger.logger");
      > > > > Import ("com.amostudio.utils.json");
      > > > >
      > > > >
      > > > > Good luck wth your project and let me know how it goes. I'm
      always
      > > > > interested to hear the creative/mundane ways ajile is being
      used.
      > > > >
      > > > >
      > > > > -Michael
      > > > >
      > > > >
      > > > > --- In ajile@yahoogroups.com, "dlevancho" <dlevancho@> wrote:
      > > > > >
      > > > > > Hi, after successfuly integrating Ajile in my project I have
      > small
      > > > > > problem that I try to find a best approach to, say I have 5
      > pages
      > > that
      > > > > > all use YAHOO UI library , now instead of duing duplicate
      > impots
      > > in
      > > > > > each page's .js file is there another sugegstive way to say
      > have
      > > one
      > > > > > shared import file that will import all libraries that are
      used
      > in
      > > > > > every page?
      > > > > > currenty I have something like that
      > > > > >
      > > > > > Import ("com.yahoo.yahoo.yahoo", null, Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.event.event", null, Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.dom.dom", null, Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.dragdrop.dragdrop", null, Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.animation.animation", null,
      Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.connection.connection", null,
      > Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.container.container-min", null,
      > > Ajile.USE_PATH);
      > > > > > Import ("com.yahoo.logger.logger", null, Ajile.USE_PATH);
      > > > > >
      > > > > >
      > > > > > Import ("com.amostudio.utils.json", null, Ajile.USE_PATH);
      > > > > > Import ("com.amostudio.validation.Verifiers", null,
      > > Ajile.USE_PATH);
      > > > > > Import ("com.amostudio.core.IObject", null, Ajile.USE_PATH);
      > > > > > Import ("com.amostudio.core.Extends", null, Ajile.USE_PATH);
      > > > > > Import ("com.amostudio.core.controllers.BaseController", null,
      > > > > > Ajile.USE_PATH);
      > > > > > Import ("com.amostudio.collections.Vector", null,
      > Ajile.USE_PATH)
      > > > > > Import ("com.amostudio.core.portbox_Base", null,
      > Ajile.USE_PATH);
      > > > > >
      > > > > >
      > > > > > I want to put 75% of those in one shared file,
      > > > > > thanks in advace for suggfestions
      > > > > > Best Regards,
      > > > > > Levani.
      > > > > >
      > > > >
      > > >
      > > >
      > > > Thanks for quick reply, I did download and updated but as soon as
      I
      > > > change from 6.2 to 6.5 not even moving the imports I see
      > > > "dependencies.getAll is not a function" error in firebug,
      everything
      > > > still works.
      > > >
      > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >



      [Non-text portions of this message have been removed]
    • dlevancho
      Unfortunately I still get the error, I made a sample app and I can send you if you would like, just let me know how and where. best Regards.
      Message 2 of 9 , Oct 23, 2006
        Unfortunately I still get the error, I made a sample app and I can
        send you if you would like, just let me know how and where.
        best Regards.
      • iskitzdev
        Hey Levani, If you can zip up and upload the sample app that d be great. To upload the zip use this link:
        Message 3 of 9 , Oct 23, 2006
          Hey Levani,
          If you can zip up and upload the sample app that'd be great.

          To upload the zip use this link:

          http://tech.groups.yahoo.com/group/ajile/sfupld?path=/Ajile%20Tests/Leva\
          ni/

          Alternatively you can browse through the support site links as follows
          to get to the upload area:

          Files >> Ajile Tests >> Levani >> Add File

          Thanks,
          Michael

          --- In ajile@yahoogroups.com, "dlevancho" <dlevancho@...> wrote:
          >
          > Unfortunately I still get the error, I made a sample app and I can
          > send you if you would like, just let me know how and where.
          > best Regards.
          >



          [Non-text portions of this message have been removed]
        • iskitzdev
          Hi Levani, Thanks for uploading the sample app, it made it much easier to find the problem and test the fix. I m scheduling the next Ajile release for either
          Message 4 of 9 , Oct 25, 2006
            Hi Levani,
            Thanks for uploading the sample app, it made it much easier to find the
            problem and test the fix.

            I'm scheduling the next Ajile release for either the end ofOctober or
            early November. That release will include this fix and any others
            completed by that date. I need to be sure that the fix doesn't cause
            regressions or new problems.

            I'm glad you stumbled across this problem, it's an important one and I'm
            happy to have been able to implement a solution.

            If you're curious, the following is a detailed explanation of the
            problem:

            The problem occurs because some of the scripts used by your sample
            modify JavaScript's core Object prototype. This is generally not a good
            idea as doing so at the very least will break the default behavior of
            JavaScript collections and in the worst case alter the behavior of any
            script that relies on the defined behavior of JavaScript's core Object.

            Modifying Object.prototype affects every JavaScript object, both
            built-in ones and custom ones developed by you or third-parties. Most
            importantl is that it affects objects that you may not mean or want to
            have to affected.

            My solution takes into account the possibility that Object.prototype may
            have been modified and works around it. When tested with your sample the
            fix alleviates the problem and no error is generated from the Ajile
            layer.

            Check the main site [ http://ajile.iskitz.com/ ] for news about the new
            release. When it's ready I'll post an announcement on the blog and
            possibly most-likely announce it in this group.

            -Michael

            --- In ajile@yahoogroups.com, "dlevancho" <dlevancho@...> wrote:
            >
            > --- In ajile@yahoogroups.com, "iskitzdev" iskitzdev@ wrote:
            > >
            > > Hi Levani,
            > > Glad you've been able to integrate Ajile with your project. Sounds
            > > like something interesting from the looks of your imports ;-)
            > >
            > > You're a lucky fellow. The feature you're asking about was
            introduced
            > > in Ajile 0.5.5, but I replaced it with an alternate solution in the
            > > 0.6+ releases.
            > >
            > > I've just released Ajile 0.6.5 which reintroduces that feature,
            that's
            > > why you're lucky :-) I refer to it as a shared auto-loader, so if
            you
            > > see that term in discussions that's what's being talked about.
            > >
            > > So, here's how you to use the shared loader:
            > >
            > > 1. Put [script ... src="com.iskitz.ajile.0.6.5.js"][/script]
            > s> in your HTM files. (Replace [ and ] with < and > respectively)
            > >
            > > 2. Put all the imports you mentioned in an index.js file in
            > > the same directory where you store com.iskitz.ajile.0.6.5.js.
            > >
            > > 3. That's it! Ajile will automatically load that index.js
            > > everytime a page loads Ajile.
            > >
            > >
            > > An alternate solution if you're already using per-page loaders (i.e.
            > > an auto-loaded script for each page):
            > >
            > > 1. Create a separate .js file (i.e. my.shared.importer.js).
            > >
            > > 2. Place all of the imports you mentioned within the file.
            > >
            > > 3. In every per-page .js you use, have a
            > >
            > > Load ("my.shared.importer.js"); or
            > >
            > > Import("my.shared.importer.*");
            > >
            > > if you want it's path to be automatically resolved.
            > >
            > >
            > > Some tips for using Ajile:
            > >
            > > 1. The Ajile.USE_PATH and Ajile.USE_NAME packaging style indicators
            > > have been deprecated since version 0.6 you can use quoted characters
            > > that match your prefered packaging style instead. So for instance if
            > > you chose to store your files within subdirectories as follows:
            > >
            > > .../scripts/my/site/modules.js
            > >
            > > you would import then as:
            > >
            > > Import("my.site.modules.js, null, "/");
            > >
            > > Ajile 0.6+ allows you to use any valid file system character as your
            > > packaging style. You can name your file: "my,site,modules.js" or
            > > "my-site-modules.js" or "my site modules.js" there are many options.
            > >
            > >
            > > 2. The Ajile module's packaging style and location act as the
            > > automatic defaults for all imported scripts that don't explicitly
            > > specify their own packaging style or location. Basically Ajile will
            > > default to loading imported scripts from the directory where Ajile
            > > exists and use the packaging style used by Ajile. This means you can
            > > eliminate a lot of typing out the packaging style if it's all the
            same
            > > so for instance with:
            > >
            > > .../scripts/com/iskitz/ajile.0.6.5.js
            > > .../scripts/com/yahoo/...
            > > .../scripts/com/amostudio/...
            > >
            > > you should be able to do:
            > >
            > > Import ("com.yahoo.logger.logger");
            > > Import ("com.amostudio.utils.json");
            > >
            > >
            > > Good luck wth your project and let me know how it goes. I'm always
            > > interested to hear the creative/mundane ways ajile is being used.
            > >
            > >
            > > -Michael
            > >
            > >
            > > --- In ajile@yahoogroups.com, "dlevancho" <dlevancho@> wrote:
            > > >
            > > > Hi, after successfuly integrating Ajile in my project I have small
            > > > problem that I try to find a best approach to, say I have 5 pages
            that
            > > > all use YAHOO UI library , now instead of duing duplicate impots
            in
            > > > each page's .js file is there another sugegstive way to say have
            one
            > > > shared import file that will import all libraries that are used in
            > > > every page?
            > > > currenty I have something like that
            > > >
            > > > Import ("com.yahoo.yahoo.yahoo", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.event.event", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.dom.dom", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.dragdrop.dragdrop", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.animation.animation", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.connection.connection", null, Ajile.USE_PATH);
            > > > Import ("com.yahoo.container.container-min", null,
            Ajile.USE_PATH);
            > > > Import ("com.yahoo.logger.logger", null, Ajile.USE_PATH);
            > > >
            > > >
            > > > Import ("com.amostudio.utils.json", null, Ajile.USE_PATH);
            > > > Import ("com.amostudio.validation.Verifiers", null,
            Ajile.USE_PATH);
            > > > Import ("com.amostudio.core.IObject", null, Ajile.USE_PATH);
            > > > Import ("com.amostudio.core.Extends", null, Ajile.USE_PATH);
            > > > Import ("com.amostudio.core.controllers.BaseController", null,
            > > > Ajile.USE_PATH);
            > > > Import ("com.amostudio.collections.Vector", null, Ajile.USE_PATH)
            > > > Import ("com.amostudio.core.portbox_Base", null, Ajile.USE_PATH);
            > > >
            > > >
            > > > I want to put 75% of those in one shared file,
            > > > thanks in advace for suggfestions
            > > > Best Regards,
            > > > Levani.
            > > >
            > >
            >
            >
            > Thanks for quick reply, I did download and updated but as soon as I
            > change from 6.2 to 6.5 not even moving the imports I see
            > "dependencies.getAll is not a function" error in firebug, everything
            > still works.
            >



            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.