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

For instance

Expand Messages
  • Bruce
    Tried this, didn t work var init2 = function () { newFruit = TAFFY(fruits); fruit2 = gridPrinter2({ containerID: displayGridDiv2 }, newFruit.find(
    Message 1 of 6 , Jun 6, 2009
    • 0 Attachment
      Tried this, didn't work

      var init2 = function () {
      newFruit = TAFFY(fruits);
      fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
      newFruit.find( sugar:{greaterthan:12}); );
      fruit2.print();
      };
    • tacoman_cool
      Hey Bruce, So I think this is where you need to do. Mind you it has been a while since I wrote the grid example. The gridPrinter expected the element ID you
      Message 2 of 6 , Jun 9, 2009
      • 0 Attachment
        Hey Bruce,

        So I think this is where you need to do. Mind you it has been a while since I wrote the grid example.

        The gridPrinter expected the element ID you want to insert the grid into and the collection to build the grid from. It isn't built to expect a query, but that isn't a big deal.

        In theory you can do this (can't test at the moment):

        var init2 = function () {
        fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
        TAFFY(fruits.get({ sugar:{greaterthan:12})));
        fruit2.print();
        };

        Since .find() only returns an array of numbers you were passing in an array instead of a TAFFY object. By using .get() you can wrap up the collection as a new TAFFY object.

        You could also modify gridPrinter to accept a TAFFY lookup object as an argument and pass it on to the TAFFY collection. That would let you wrtie something like:

        fruit2.print({sugar:{greaterthan:12});

        Ian

        --- In taffydb@yahoogroups.com, "Bruce" <bfr@...> wrote:
        >
        > Tried this, didn't work
        >
        > var init2 = function () {
        > newFruit = TAFFY(fruits);
        > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
        > newFruit.find( sugar:{greaterthan:12}); );
        > fruit2.print();
        > };
        >
      • Bruce
        Tried this, including correcting unmatched brackets from your example; but it didn t work. I d really like to see a working example. var init2 = function () {
        Message 3 of 6 , Jun 10, 2009
        • 0 Attachment
          Tried this, including correcting unmatched brackets from your example; but it didn't work.
          I'd really like to see a working example.

          var init2 = function () {
          fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
          TAFFY( fruits.get({ sugar:{greaterthan:12}})) );
          fruit2.print();
          };

          --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@...> wrote:
          >
          > Hey Bruce,
          >
          > So I think this is where you need to do. Mind you it has been a while since I wrote the grid example.
          >
          > The gridPrinter expected the element ID you want to insert the grid into and the collection to build the grid from. It isn't built to expect a query, but that isn't a big deal.
          >
          > In theory you can do this (can't test at the moment):
          >
          > var init2 = function () {
          > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
          > TAFFY(fruits.get({ sugar:{greaterthan:12})));
          > fruit2.print();
          > };
          >
          > Since .find() only returns an array of numbers you were passing in an array instead of a TAFFY object. By using .get() you can wrap up the collection as a new TAFFY object.
          >
          > You could also modify gridPrinter to accept a TAFFY lookup object as an argument and pass it on to the TAFFY collection. That would let you wrtie something like:
          >
          > fruit2.print({sugar:{greaterthan:12});
          >
          > Ian
          >
          > --- In taffydb@yahoogroups.com, "Bruce" <bfr@> wrote:
          > >
          > > Tried this, didn't work
          > >
          > > var init2 = function () {
          > > newFruit = TAFFY(fruits);
          > > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
          > > newFruit.find( sugar:{greaterthan:12}); );
          > > fruit2.print();
          > > };
          > >
          >
        • Bruce
          Actually it was this that I tried. (Second set of {} ) But at any rate it illustrates why I m asking for real working examples. var init2 = function () {
          Message 4 of 6 , Jun 10, 2009
          • 0 Attachment
            Actually it was this that I tried. (Second set of {} )

            But at any rate it illustrates why I'm asking for real working examples.

            var init2 = function () {
            newFruit = TAFFY(fruits);
            fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
            newFruit.find( {sugar:{greaterthan:12}} ); );
            fruit2.print();
            };

            --- In taffydb@yahoogroups.com, "Bruce" <bfr@...> wrote:
            >
            > Tried this, didn't work
            >
            > var init2 = function () {
            > newFruit = TAFFY(fruits);
            > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
            > newFruit.find( sugar:{greaterthan:12}); );
            > fruit2.print();
            > };
            >
          • tacoman_cool
            Ahh, sorry. I forget that fruits isn t a TAFFY collection at this point. Try this: var init = function () { var fruits =
            Message 5 of 6 , Jun 11, 2009
            • 0 Attachment
              Ahh, sorry. I forget that fruits isn't a TAFFY collection at this point. Try this:

              var init = function () {
              var fruits = TAFFY(TAFFY(fruits).get({sugar:{greaterthan:12}}));
              fruit = gridPrinter2({ containerID: "displayGridDiv2" },
              fruits);
              fruit.print();
              };

              --- In taffydb@yahoogroups.com, "Bruce" <bfr@...> wrote:
              >
              > Tried this, including correcting unmatched brackets from your example; but it didn't work.
              > I'd really like to see a working example.
              >
              > var init2 = function () {
              > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
              > TAFFY( fruits.get({ sugar:{greaterthan:12}})) );
              > fruit2.print();
              > };
              >
              > --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@> wrote:
              > >
              > > Hey Bruce,
              > >
              > > So I think this is where you need to do. Mind you it has been a while since I wrote the grid example.
              > >
              > > The gridPrinter expected the element ID you want to insert the grid into and the collection to build the grid from. It isn't built to expect a query, but that isn't a big deal.
              > >
              > > In theory you can do this (can't test at the moment):
              > >
              > > var init2 = function () {
              > > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
              > > TAFFY(fruits.get({ sugar:{greaterthan:12})));
              > > fruit2.print();
              > > };
              > >
              > > Since .find() only returns an array of numbers you were passing in an array instead of a TAFFY object. By using .get() you can wrap up the collection as a new TAFFY object.
              > >
              > > You could also modify gridPrinter to accept a TAFFY lookup object as an argument and pass it on to the TAFFY collection. That would let you wrtie something like:
              > >
              > > fruit2.print({sugar:{greaterthan:12});
              > >
              > > Ian
              > >
              > > --- In taffydb@yahoogroups.com, "Bruce" <bfr@> wrote:
              > > >
              > > > Tried this, didn't work
              > > >
              > > > var init2 = function () {
              > > > newFruit = TAFFY(fruits);
              > > > fruit2 = gridPrinter2({ containerID: "displayGridDiv2" },
              > > > newFruit.find( sugar:{greaterthan:12}); );
              > > > fruit2.print();
              > > > };
              > > >
              > >
              >
            • Bruce
              OK, I was able to get that to work, thanks.
              Message 6 of 6 , Jun 11, 2009
              • 0 Attachment
                OK, I was able to get that to work, thanks.
              Your message has been successfully submitted and would be delivered to recipients shortly.