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

Predicates not functional #997

Open
klattimer opened this issue Dec 24, 2017 · 3 comments
Open

Predicates not functional #997

klattimer opened this issue Dec 24, 2017 · 3 comments

Comments

@klattimer
Copy link

Sometimes I get a crash, sometimes it just doesn't do what it's meant to....

sample from my code.

NSString *const kXX = @"xx";

XLFormRowDescriptor *x = [XLFormRowDescriptor formRowDescriptorWithTag:kXX rowType:XLFormRowDescriptorTypeBooleanSwitch title:@"Test Predicate"];
x.value = @0;
[section addFormRow:x];

section = [XLFormSectionDescriptor formSection];
section.hidden = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"$%@ == 0", kXX]];
[form addFormSection:section];
@klattimer
Copy link
Author

#998

@klattimer
Copy link
Author

It seems that the dictionary supplied for hidden and disabled predicates isn't in the appropriate format, I've added an iteration to fix it (not ideal), a cache of the correct data would be a better option.

This fixes it, but not entirely, there also seems to be an issue with predicates not being evaluated in rows inside of sections which are governed by predicates. I'll fix that issue in a separate PR.

@klattimer
Copy link
Author

The rows in sections thing wasn't a real issue.

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

1 participant