Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Odd behavior with nested loops
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ussmoss  
View profile  
 More options Aug 15 2009, 9:03 pm
From: ussmoss <ussm...@gmail.com>
Date: Sat, 15 Aug 2009 18:03:58 -0700 (PDT)
Local: Sat, Aug 15 2009 9:03 pm
Subject: Odd behavior with nested loops
I am getting a weird issues with the args.item field not being set
correctly when using a function in the directive. I have narrowed down
the issue to what in the directive causes it though I am not sure why.

Please refer to the following link for the complete source code:
http://friendpaste.com/3tgqGZVg2DU9UN0vkqbcLI

It seems this part of the directive:
'div.header div.type' : { 'type <- team.types' : { '.'      : '#
{type.name}' } }

Breaks the item that is passed in this part:
'div.detailcontainer div.teamdetail img.image@src' : function(args) {
    if(args.item['default_image'] != '') {
        return args.item['id'] + '.png';
    }
    else {
        return 'blank.png';
    }

}

If that first part is commented out of the directive the image gets
the correct name otherwise undefined is returned. I used firebug to
dump the args variable in the function call. From what I saw it seems
it using the values from the first loop instead of resetting item.

Thank you in advance for you help and please let me know if I am
making a stupid mistake.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mic Cvilic  
View profile  
 More options Aug 17 2009, 6:13 am
From: Mic Cvilic <tch...@gmail.com>
Date: Mon, 17 Aug 2009 12:13:30 +0200
Local: Mon, Aug 17 2009 6:13 am
Subject: Re: [ PURE ] Odd behavior with nested loops

I tried some workarounds yesterday, but this needs some more investigations.
I've set an issue here: http://github.com/pure/pure/issues#issue/6 where
you can follow the progress.

Thanks for reporting.
Mic


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ussmoss  
View profile  
 More options Aug 19 2009, 11:13 pm
From: ussmoss <ussm...@gmail.com>
Date: Wed, 19 Aug 2009 20:13:55 -0700 (PDT)
Local: Wed, Aug 19 2009 11:13 pm
Subject: Re: Odd behavior with nested loops
I wanted to check in and see if you knew when a possible fix might be
put in for this bug? Are there any work arounds that I can do in the
mean time?

On Aug 17, 3:13 am, Mic Cvilic <tch...@gmail.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mic Cvilic  
View profile  
 More options Aug 20 2009, 2:11 am
From: Mic Cvilic <tch...@gmail.com>
Date: Thu, 20 Aug 2009 08:11:22 +0200
Local: Thurs, Aug 20 2009 2:11 am
Subject: Re: [ PURE ] Re: Odd behavior with nested loops

To get the reference of a running loop item, you need to name it.
In your example that should be "team.item" or "type.item"
This was the initial idea of using nested loops in pure2.

Now, I need to look at why "item" is not the innermost loop.
I'm quite busy these days, and won't have the time to look at it right now.

Cheers,
Mic


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ussmoss  
View profile  
 More options Aug 20 2009, 2:23 am
From: ussmoss <ussm...@gmail.com>
Date: Wed, 19 Aug 2009 23:23:41 -0700 (PDT)
Local: Thurs, Aug 20 2009 2:23 am
Subject: Re: Odd behavior with nested loops
Super thanks for the quick reply. That worked like a charm. Thanks
again for making such a great template library :-)

On Aug 19, 11:11 pm, Mic Cvilic <tch...@gmail.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google