XLForm
XLForm copied to clipboard
Multiple methods named 'count'
In XLFormInlineSelectorCell:(NSString *)valueDisplayText
{
...
if (!self.rowDescriptor.value || [self.rowDescriptor.value count] == 0){
...
NSMutableArray * descriptionArray = [NSMutableArray arrayWithCapacity:[self.rowDescriptor.value count]];
}
What should count
be cast as?
For rows of type XLFormRowDescriptorTypeMultipleSelector
or XLFormRowDescriptorTypeMultipleSelectorPopover
, the value of the rowDescriptor
is a NSArray so that count is a NSUInteger.
Source code like this
- (BOOL)valueIsEmpty
{
return self.value == nil || [self.value isKindOfClass:[NSNull class]] || ([self.value respondsToSelector:@selector(length)] && [self.value length]==0) ||
([self.value respondsToSelector:@selector(count)] && [self.value count]==0);
}
i'm changed like this
- (BOOL)valueIsEmpty
{
return self.value == nil || [self.value isKindOfClass:[NSNull class]] || ([self.value respondsToSelector:@selector(length)] && [self.value length]==0) ||
([self.value respondsToSelector:@selector(count)] && [(NSArray *)self.value count]==0);
}
but there is an error collide with Foundation NSDictionary NSArray NSSet NSIndex ....
how to fix this ...... ## help
What is the issue with the first code and what are you trying to achieve?