Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait to iterate to finish #41

Open
pmilanez opened this issue May 8, 2013 · 1 comment
Open

Wait to iterate to finish #41

pmilanez opened this issue May 8, 2013 · 1 comment

Comments

@pmilanez
Copy link

pmilanez commented May 8, 2013

Is there any solutions to wait for the ITERATE methods to finish?

I have something like this:

[element iterate:@"*" usingBlock:^(RXMLElement * blk) {
    if ([blk.tag isEqualToString:STATUS_TAGNAME]) {
        [subelements addObject:blk];
    }
}];

if (subelements && ([subelements count] > 0)) {
    RXMLElement *subElement = (RXMLElement*)[subelements objectAtIndex:0];
    status = subElement.textAsInt;
}

And I need to the ARRAY subelements to be completed.

Any sugestions?

Many thanks!

@ZaBlanc
Copy link
Owner

ZaBlanc commented May 8, 2013

The iterate method is blocking. Are you suggesting the second code block is completed before the first is finished? I would be surprised to hear that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants