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

Re: Some bugs(?) and some requests

Expand Messages
  • tacoman_cool
    That for the help debugging. I think both the JSON and has issues are fixed in 2.2.2.
    Message 1 of 10 , Sep 19, 2011
    • 0 Attachment
      That for the help debugging. I think both the JSON and has issues are fixed in 2.2.2.

      --- In taffydb@yahoogroups.com, "wklau2046" <wklau2006@...> wrote:
      >
      > In 2.2.1, now we have:
      >
      > case "object":
      > if (T.isObject(var2)) {
      > eachin(var2, function (v, n) {
      > if (re === true && !T.isUndefined(var1[n]) && var1.hasOwnProperty(n)) {
      > re = T.has(var1[n], var2[n]);
      > } else {
      > re = false;
      > return TAFFY.EXIT;
      > }
      > })
      > } else if (T.isArray(var2)) {
      > each(var2, function (v, n) {
      > re = T.has(var1, var2[n]);
      > if (re) {
      > return TAFFY.EXIT;
      > }
      > });
      > } else if (T.isString(var2) && !TAFFY.isUndefined(var1[var2])) {
      > return true;
      > }
      > return re;
      > break;
      >
      > But in the 3rd case (T.isString(var2) && !TAFFY.isUndefined(var1[var2])), it will return re (=true) if the 3rd case is false.
      >
      >
      >
      >
      > --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@> wrote:
      > >
      > > Ahh, thanks. I believe it is fixed in just deployed 2.2.1.
      > >
      >
    • wklau2046
      Sorry for not pointing out also in previous message that there is similar problem in the 3rd case for array: } else if (T.isString(var2) || T.isNumber(var2)) {
      Message 2 of 10 , Sep 20, 2011
      • 0 Attachment
        Sorry for not pointing out also in previous message that there is similar problem in the 3rd case for array:

        } else if (T.isString(var2) || T.isNumber(var2)) {
        for (var n = 0; n < var1.length; n++) {
        re = T.has(var1[n], var2);
        if (re) {
        return true;
        }
        }
        }
        return re;


        --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@...> wrote:
        >
        > That for the help debugging. I think both the JSON and has issues are fixed in 2.2.2.
        >
        > --- In taffydb@yahoogroups.com, "wklau2046" <wklau2006@> wrote:
        > >
        > > In 2.2.1, now we have:
        > >
        > > case "object":
        > > if (T.isObject(var2)) {
        > > eachin(var2, function (v, n) {
        > > if (re === true && !T.isUndefined(var1[n]) && var1.hasOwnProperty(n)) {
        > > re = T.has(var1[n], var2[n]);
        > > } else {
        > > re = false;
        > > return TAFFY.EXIT;
        > > }
        > > })
        > > } else if (T.isArray(var2)) {
        > > each(var2, function (v, n) {
        > > re = T.has(var1, var2[n]);
        > > if (re) {
        > > return TAFFY.EXIT;
        > > }
        > > });
        > > } else if (T.isString(var2) && !TAFFY.isUndefined(var1[var2])) {
        > > return true;
        > > }
        > > return re;
        > > break;
        > >
        > > But in the 3rd case (T.isString(var2) && !TAFFY.isUndefined(var1[var2])), it will return re (=true) if the 3rd case is false.
        > >
        > >
        > >
        > >
        > > --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@> wrote:
        > > >
        > > > Ahh, thanks. I believe it is fixed in just deployed 2.2.1.
        > > >
        > >
        >
      • tacoman_cool
        I think that might be ok now that I return re at the bottom of the block. Not sure, my head kind of hurts from looking at it. Also, would you be willing to
        Message 3 of 10 , Sep 22, 2011
        • 0 Attachment
          I think that might be ok now that I return re at the bottom of the block. Not sure, my head kind of hurts from looking at it.

          Also, would you be willing to help work on a set of tests for has? I don't use it often and have only the basic checks going on before deployment.

          --- In taffydb@yahoogroups.com, "wklau2046" <wklau2006@...> wrote:
          >
          > Sorry for not pointing out also in previous message that there is similar problem in the 3rd case for array:
          >
          > } else if (T.isString(var2) || T.isNumber(var2)) {
          > for (var n = 0; n < var1.length; n++) {
          > re = T.has(var1[n], var2);
          > if (re) {
          > return true;
          > }
          > }
          > }
          > return re;
          >
          >
          > --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@> wrote:
          > >
          > > That for the help debugging. I think both the JSON and has issues are fixed in 2.2.2.
          > >
          > > --- In taffydb@yahoogroups.com, "wklau2046" <wklau2006@> wrote:
          > > >
          > > > In 2.2.1, now we have:
          > > >
          > > > case "object":
          > > > if (T.isObject(var2)) {
          > > > eachin(var2, function (v, n) {
          > > > if (re === true && !T.isUndefined(var1[n]) && var1.hasOwnProperty(n)) {
          > > > re = T.has(var1[n], var2[n]);
          > > > } else {
          > > > re = false;
          > > > return TAFFY.EXIT;
          > > > }
          > > > })
          > > > } else if (T.isArray(var2)) {
          > > > each(var2, function (v, n) {
          > > > re = T.has(var1, var2[n]);
          > > > if (re) {
          > > > return TAFFY.EXIT;
          > > > }
          > > > });
          > > > } else if (T.isString(var2) && !TAFFY.isUndefined(var1[var2])) {
          > > > return true;
          > > > }
          > > > return re;
          > > > break;
          > > >
          > > > But in the 3rd case (T.isString(var2) && !TAFFY.isUndefined(var1[var2])), it will return re (=true) if the 3rd case is false.
          > > >
          > > >
          > > >
          > > >
          > > > --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@> wrote:
          > > > >
          > > > > Ahh, thanks. I believe it is fixed in just deployed 2.2.1.
          > > > >
          > > >
          > >
          >
        • wklau2046
          Your code is correct, my fault.
          Message 4 of 10 , Sep 23, 2011
          • 0 Attachment
            Your code is correct, my fault.


            --- In taffydb@yahoogroups.com, "tacoman_cool" <ian@...> wrote:
            >
            > I think that might be ok now that I return re at the bottom of the block. Not sure, my head kind of hurts from looking at it.
            >
            > Also, would you be willing to help work on a set of tests for has? I don't use it often and have only the basic checks going on before deployment.
            >
            > --- In taffydb@yahoogroups.com, "wklau2046" <wklau2006@> wrote:
            > >
            > > Sorry for not pointing out also in previous message that there is similar problem in the 3rd case for array:
            > >
            > > } else if (T.isString(var2) || T.isNumber(var2)) {
            > > for (var n = 0; n < var1.length; n++) {
            > > re = T.has(var1[n], var2);
            > > if (re) {
            > > return true;
            > > }
            > > }
            > > }
            > > return re;
          Your message has been successfully submitted and would be delivered to recipients shortly.