Hi -

- I use the NSPredicateEditor with a custom NSPredicateEditorRowTemplate
- This custom component should implement something like this:
        [Filesize] - [is smaller/greater than] - [Textfield] - [KB/MB/GB]

By overriding templateViews I'm able to add an additional NSPopupButton to the existing ones:

- (NSArray *)templateViews
{
        NSArray* myviews = [super templateViews];
        NSPopUpButton* myButton = [[NSPopUpButton alloc] init];
[myButton addItemsWithTitles:[NSArray arrayWithObjects:@"KB", @"MB", @"GB", nil]]; return [NSArray arrayWithObjects: [myviews objectAtIndex:0],[myviews objectAtIndex:1],[myviews objectAtIndex:2], myButton, nil];
}

But in predicateWithSubpredicates I can't find out, which of the entries the user selected:

- (NSPredicate *)predicateWithSubpredicates:(NSArray *)subpredicates
{
        [[[self templateViews] objectAtIndex:1] titleOfSelectedItem]; // works
[[[self templateViews] objectAtIndex:3] titleOfSelectedItem]; // is always the first entry, regardless of the user selection..
        ...
}

What am I missing here / doing wrong?

Thanks in advance,
Mario


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to