Hi all,
I have been having fun today with NSPredicateEditor, but have run in to a couple of problems.
In Interface Builder I have an NSPredicateEditorRowTemplate setup to accept Number inputs. However, the default implementation creates the row template with the rightExpressionAttributeType set to NSInteger64AttributeType. I need to set it to NSDecimalAttributeType in order to evaluate the predicate with decimal values. The problem is I can not find out where to set or initialise this value. None of the listed init methods appear to be called in my row template subclass that I created to try and solve this problem.
I am also having an issue when an NSPredicateEditorRowTemplate is set to take date inputs. When a date is set, the array I am filtering using the created predicate is filtered with only objects that match the exact date including the time i.e if the date in the row template is set to today, only objects with a date that is today at midnight will be included after filtering. Does anyone know how to customise this behaviour so that it will include objects where the date is the same, but the time isn't?
As always, any help will be gratefully received
I have been having fun today with NSPredicateEditor, but have run in to a couple of problems.
In Interface Builder I have an NSPredicateEditorRowTemplate setup to accept Number inputs. However, the default implementation creates the row template with the rightExpressionAttributeType set to NSInteger64AttributeType. I need to set it to NSDecimalAttributeType in order to evaluate the predicate with decimal values. The problem is I can not find out where to set or initialise this value. None of the listed init methods appear to be called in my row template subclass that I created to try and solve this problem.
I am also having an issue when an NSPredicateEditorRowTemplate is set to take date inputs. When a date is set, the array I am filtering using the created predicate is filtered with only objects that match the exact date including the time i.e if the date in the row template is set to today, only objects with a date that is today at midnight will be included after filtering. Does anyone know how to customise this behaviour so that it will include objects where the date is the same, but the time isn't?
As always, any help will be gratefully received