Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /XspfManager/XspfMRuleEditorDelegate.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 127 - (hide annotations) (download)
Sun Dec 6 07:55:22 2009 UTC (14 years, 4 months ago) by masaki
File size: 18761 byte(s)
[???] NSRuleEditorテスト中 :-)
1 masaki 120 //
2     // XspfMRuleEditorDelegate.m
3     // XspfManager
4     //
5     // Created by Hori,Masaki on 09/11/28.
6     // Copyright 2009 masakih. All rights reserved.
7     //
8    
9     #import "XspfMRuleEditorDelegate.h"
10    
11     #import "XspfMRuleEditorRow.h"
12    
13     @implementation XspfMRuleEditorDelegate
14 masaki 125
15     static NSString *XspfMREDRowsKey = @"rows";
16     static NSString *XspfMREDCriteriaKey = @"criteria";
17     static NSString *XspfMREDDisplayValuesKey = @"displayValues";
18     static NSString *XspfMREDRowTypeKey = @"rowType";
19     static NSString *XspfMREDSubrowsKey = @"subrows";
20     static NSString *XspfMREDValueKey = @"value";
21     static NSString *XspfMREDPredicateRowsKey = @"predicateRows";
22     static NSString *XspfMREDNameKey = @"name";
23    
24     static NSString *XspfMStringPredicateIsEqualOperator = @"is";
25     static NSString *XspfMStringPredicateIsNotEqualOperator = @"is not";
26     static NSString *XspfMStringPredicateContainsOperator = @"contains";
27     static NSString *XspfMStringPredicateBeginsWithOperator = @"begins with";
28     static NSString *XspfMStringPredicateEndsWithOperator = @"ends with";
29    
30     //static NSString *XspfMAbDatePredicatePicker01 = @"date";
31     //static NSString *XspfMAbDatePredicatePicker02 = @"beginDate";
32     //static NSString *XspfMAbDatePredicatePicker03 = @"endDate";
33     //static NSString *XspfMAbDatePredicateIsEqualOperator = @"is the date";
34     //static NSString *XspfMAbDatePredicateLessThanOperator = @"is after the date";
35     //static NSString *XspfMAbDatePredicateGreaterThanOperator = @"is before the date";
36     //static NSString *XspfMAbDatePredicateBetweenOperator = @"is in the range";
37     //static NSString *XspfMAbDatePredicateAndField = @"andField";
38    
39    
40    
41 masaki 124 - (NSExpression *)rangeDateFromDisplayValues:(NSArray *)displayValues
42     {
43     id field01 = nil;
44     id field02 = nil;
45    
46     Class datepickerclass = [NSDatePicker class];
47     for(id v in displayValues) {
48     if([v isKindOfClass:datepickerclass]) {
49     if([v tag] == 0) {
50     field01 = v;
51     } else {
52     field02 = v;
53     }
54     }
55     }
56    
57     if(!field01 || !field02) return nil;
58    
59     id value01, value02;
60     value01 = [field01 dateValue]; value02 = [field02 dateValue];
61     if([value01 compare:value02] == NSOrderedDescending) {
62     id t = value02;
63     value02 = value01;
64     value01 = t;
65     }
66    
67     id expression01, expression02;
68     expression01 = [NSExpression expressionForConstantValue:[field01 dateValue]];
69     expression02 = [NSExpression expressionForConstantValue:[field02 dateValue]];
70    
71     return [NSExpression expressionForAggregate:[NSArray arrayWithObjects:expression01, expression02, nil]];
72     }
73    
74     - (NSView *)textField
75     {
76     id text = [[[NSTextField alloc] initWithFrame:NSMakeRect(0,0,100,19)] autorelease];
77     [[text cell] setControlSize:NSSmallControlSize];
78     [text setFont:[NSFont controlContentFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]]];
79 masaki 126 [text setStringValue:@"1234567890"];
80 masaki 124 [text sizeToFit];
81     [text setStringValue:@""];
82     [text setDelegate:self];
83    
84     return text;
85     }
86     - (NSView *)datePicker
87     {
88     id date = [[[NSDatePicker alloc] initWithFrame:NSMakeRect(0,0,100,19)] autorelease];
89     [[date cell] setControlSize:NSSmallControlSize];
90     [date setFont:[NSFont controlContentFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]]];
91     [date setDatePickerElements:NSYearMonthDayDatePickerElementFlag];
92     [date setDrawsBackground:YES];
93     [date setDateValue:[NSDate dateWithTimeIntervalSinceNow:0.0]];
94     [date sizeToFit];
95     [date setDelegate:self];
96    
97     return date;
98     }
99     - (NSView *)ratingIndicator
100     {
101     id rate = [[[NSLevelIndicator alloc] initWithFrame:NSMakeRect(0,0,100,19)] autorelease];
102     id cell = [rate cell];
103     [cell setControlSize:NSSmallControlSize];
104     [rate setFont:[NSFont controlContentFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]]];
105     [rate setMinValue:0];
106     [rate setMaxValue:5];
107     [cell setLevelIndicatorStyle:NSRatingLevelIndicatorStyle];
108     [cell setEditable:YES];
109     [rate sizeToFit];
110    
111     return rate;
112     }
113     - (NSView *)numberField
114     {
115     [self doesNotRecognizeSelector:_cmd];
116     return nil;
117     }
118    
119     - (NSArray *)buildRowsFromTemplate:(NSArray *)template
120     {
121     NSMutableArray *result = [NSMutableArray array];
122     // for(id row in template) {
123     // NSMutableDictionary *dict = [NSMutableDictionary dictionary];
124     //
125     // id criteria = [row valueForKey:@"criteria"];
126     // if(criteria && ![criteria isEqual:[NSNull null]]) {
127     // criteria = [self buildRowsFromTemplate:criteria];
128     // }
129     // [dict setValue:criteria forKey:@"criteria"];
130     //
131 masaki 125 // id value = [row valueForKey:XspfMREDValueKey];
132 masaki 124 // if(value) {
133 masaki 125 // [dict setValue:value forKey:XspfMREDValueKey];
134 masaki 124 // }
135     //
136     // [result addObject:dict];
137     // }
138     return template;
139    
140     return result;
141     }
142     - (NSDictionary *)buildRows:(NSArray *)template
143     {
144     NSMutableDictionary *result = [NSMutableDictionary dictionary];
145     for(id row in template) {
146 masaki 125 id criteria = [row valueForKey:XspfMREDCriteriaKey];
147     id name = [row valueForKey:XspfMREDNameKey];
148 masaki 124 [result setObject:criteria forKey:name];
149     }
150    
151     return result;
152     }
153 masaki 126 - (id)criteriaWithKeyPath:(NSString *)keypath
154     {
155     NSString *key = nil;
156     if([keypath isEqualToString:@"title"]) {
157     key = @"String";
158     } else if([keypath isEqualToString:@"rating"]) {
159     key = @"Rate";
160     }
161     if(key) {
162     id row = [rowTemplate valueForKey:key];
163     id c = [[row objectAtIndex:0] mutableCopy];
164     [c setValue:keypath forKey:XspfMREDValueKey];
165     return [NSArray arrayWithObject:c];
166     }
167    
168     if([[NSArray arrayWithObjects:@"lastPlayDate", @"modificationDate", @"creationDate", nil] containsObject:keypath]) {
169     id keys = [NSArray arrayWithObjects:@"AbDate", nil];
170     id result = [NSMutableArray array];
171     for(key in keys) {
172     id row = [rowTemplate valueForKey:key];
173     id c = [[row objectAtIndex:0] mutableCopy];
174     [c setValue:keypath forKey:XspfMREDValueKey];
175     [result addObject:c];
176     }
177    
178     return result;
179     }
180    
181     return nil;
182     }
183 masaki 120 - (void)awakeFromNib
184     {
185     if(!compound) {
186     compound = [[XspfMCompound alloc] init];
187     }
188 masaki 124
189     rowIDs = [[NSMutableArray array] retain];
190     rowFields = [[NSMutableDictionary dictionary] retain];
191    
192     NSBundle *m = [NSBundle mainBundle];
193     NSString *path = [m pathForResource:@"LibraryRowTemplate" ofType:@"plist"];
194     NSArray *rowsTemplate = [NSArray arrayWithContentsOfFile:path];
195     if(!rowsTemplate) {
196     exit(12345);
197 masaki 120 }
198 masaki 124
199     rowTemplate = [[self buildRows:rowsTemplate] retain];
200    
201     // NSLog(@"rowTemplate =>\n%@", rowTemplate);
202    
203     NSMutableArray *newRows = [NSMutableArray array];
204    
205 masaki 126 id c = [self criteriaWithKeyPath:@"title"];
206     if(c) [newRows addObjectsFromArray:c];
207 masaki 124
208     for(id keyPath in [NSArray arrayWithObjects:@"lastPlayDate", @"modificationDate", @"creationDate", nil]) {
209 masaki 126 c = [self criteriaWithKeyPath:keyPath];
210     if(c) [newRows addObjectsFromArray:c];
211 masaki 124 }
212    
213 masaki 126 c = [self criteriaWithKeyPath:@"rating"];
214     if(c) [newRows addObjectsFromArray:c];
215 masaki 124
216     rows = [newRows retain];
217 masaki 125
218    
219    
220     ////
221     predicateRows = [[NSMutableArray alloc] init];
222     [ruleEditor bind:XspfMREDRowsKey toObject:self withKeyPath:XspfMREDPredicateRowsKey options:nil];
223 masaki 120 }
224    
225 masaki 123 - (void)showPredicate:(id)predicate
226     {
227     if([predicate isKindOfClass:[NSCompoundPredicate class]]) {
228     NSArray *sub = [predicate subpredicates];
229     NSLog(@"-> %d(%d)\n|\n-->",[predicate compoundPredicateType], [sub count]);
230     for(id p in sub) {
231 masaki 124 [self showPredicate:p];
232 masaki 123 }
233 masaki 124 } else if([predicate isKindOfClass:[NSComparisonPredicate class]]) {
234     NSLog(@"--> (Comparision) ope->%d, mod->%d, left->%@, right->%@, SEL->%s, opt->%u",
235     [predicate predicateOperatorType], [predicate comparisonPredicateModifier],
236     [predicate leftExpression], [predicate rightExpression],
237     [predicate customSelector], [predicate options]);
238 masaki 125
239 masaki 124 } else if([predicate isKindOfClass:[NSPredicate class]]) {
240     NSLog(@"--> %@", predicate);
241 masaki 123 } else {
242     NSLog(@"???predicate class is %@", NSStringFromClass([predicate class]));
243     }
244     }
245 masaki 127 - (NSArray *)displayValuesWithPredicate:(NSComparisonPredicate *)predicate
246     {
247     id value02 = nil; id value03 = nil;
248     id leftKeyPath = [[predicate leftExpression] keyPath];
249    
250     switch([predicate predicateOperatorType]) {
251     case NSEqualToPredicateOperatorType:
252     value02 = XspfMStringPredicateIsEqualOperator;
253     break;
254     case NSNotEqualToPredicateOperatorType:
255     value02 = XspfMStringPredicateIsNotEqualOperator;
256     break;
257     case NSContainsPredicateOperatorType:
258     value02 = XspfMStringPredicateContainsOperator;
259     break;
260     case NSBeginsWithPredicateOperatorType:
261     value02 = XspfMStringPredicateBeginsWithOperator;
262     break;
263     case NSEndsWithPredicateOperatorType:
264     value02 = XspfMStringPredicateEndsWithOperator;
265     break;
266     }
267     id rightConstant = [[predicate rightExpression] constantValue];
268     value03 = [self textField];
269     [value03 setObjectValue:rightConstant];
270    
271     id disp = [NSArray arrayWithObjects:leftKeyPath, value02, value03, nil];
272    
273     return disp;
274     }
275     - (NSArray *)ratingDisplayValuesWithPredicate:(NSComparisonPredicate *)predicate
276     {
277     id value02 = nil; id value03 = nil;
278     id leftKeyPath = [[predicate leftExpression] keyPath];
279    
280     switch([predicate predicateOperatorType]) {
281     case NSEqualToPredicateOperatorType:
282     value02 = XspfMStringPredicateIsEqualOperator;
283     break;
284     case NSGreaterThanPredicateOperatorType:
285     value02 = @"is greater than";
286     break;
287     case NSLessThanPredicateOperatorType:
288     value02 = @"is less than";
289     break;
290     }
291     id rightConstant = [[predicate rightExpression] constantValue];
292     value03 = [self ratingIndicator];
293     [value03 setObjectValue:rightConstant];
294    
295     id disp = [NSArray arrayWithObjects:leftKeyPath, value02, value03, nil];
296    
297     return disp;
298     }
299     - (NSArray *)dateDisplayValuesWithPredicate:(NSComparisonPredicate *)predicate
300     {
301     id value02 = nil; id value03 = nil;
302     id leftKeyPath = [[predicate leftExpression] keyPath];
303    
304     switch([predicate predicateOperatorType]) {
305     case NSEqualToPredicateOperatorType:
306     value02 = @"is the date";
307     break;
308     case NSGreaterThanPredicateOperatorType:
309     value02 = @"is after the date";
310     break;
311     case NSLessThanPredicateOperatorType:
312     value02 = @"is before the date";
313     break;
314     case NSBetweenPredicateOperatorType:
315     return [self dateRangeDisplayValuesWithPredicate:predicate];
316    
317     }
318     id rightConstant = [[predicate rightExpression] constantValue];
319     value03 = [self datePicker];
320     [value03 setObjectValue:rightConstant];
321    
322     id disp = [NSArray arrayWithObjects:leftKeyPath, value02, value03, nil];
323    
324     return disp;
325     }
326    
327 masaki 125 - (id)buildRowsFromPredicate:(id)predicate
328     {
329     if([predicate isKindOfClass:[NSCompoundPredicate class]]) {
330     id subrows = [NSMutableArray array];
331    
332     id value = nil;
333     switch([predicate compoundPredicateType]) {
334     case NSNotPredicateType:
335     // ?
336     break;
337     case NSAndPredicateType:
338     value = @"All";
339     break;
340     case NSOrPredicateType:
341     value = @"Any";
342     break;
343     }
344    
345     #warning MUST IMPLEMENT!!
346     NSArray *sub = [predicate subpredicates];
347     for(id p in sub) {
348     [subrows addObject:[self buildRowsFromPredicate:p]];
349     }
350    
351     id criteria = [NSArray arrayWithObjects:value, @"of the following are true", nil];
352 masaki 127 id type = [NSNumber numberWithInt:NSRuleEditorRowTypeCompound];
353 masaki 125
354     id result = [NSMutableDictionary dictionaryWithObjectsAndKeys:
355     criteria, XspfMREDCriteriaKey,
356     criteria, XspfMREDDisplayValuesKey,
357     type, XspfMREDRowTypeKey,
358     subrows, XspfMREDSubrowsKey,
359     nil];
360    
361     return result;
362     } else if([predicate isKindOfClass:[NSComparisonPredicate class]]) {
363     id leftKeyPath = [[predicate leftExpression] keyPath];
364     if(!leftKeyPath) return [NSArray array];
365 masaki 127 if([leftKeyPath isEqualToString:@"title"]) {
366     NSArray *disp = [self displayValuesWithPredicate:predicate];
367     NSArray *row = [self criteriaWithKeyPath:leftKeyPath];
368    
369     NSMutableDictionary *criterion = [NSMutableDictionary dictionaryWithObjectsAndKeys:
370     row, XspfMREDCriteriaKey,
371     disp, XspfMREDDisplayValuesKey,
372     [NSNumber numberWithInt:NSRuleEditorRowTypeSimple], XspfMREDRowTypeKey,
373     nil];
374    
375     return criterion;
376 masaki 125 }
377 masaki 127 if([leftKeyPath isEqualToString:@"rating"]) {
378     NSArray *disp = [self ratingDisplayValuesWithPredicate:predicate];
379     NSArray *row = [self criteriaWithKeyPath:leftKeyPath];
380    
381     NSMutableDictionary *criterion = [NSMutableDictionary dictionaryWithObjectsAndKeys:
382     row, XspfMREDCriteriaKey,
383     disp, XspfMREDDisplayValuesKey,
384     [NSNumber numberWithInt:NSRuleEditorRowTypeSimple], XspfMREDRowTypeKey,
385     nil];
386    
387     return criterion;
388     }
389     if([leftKeyPath isEqualToString:@"creationDate"]) {
390     NSArray *disp = [self dateDisplayValuesWithPredicate:predicate];
391     NSArray *row = [self criteriaWithKeyPath:leftKeyPath];
392    
393     NSMutableDictionary *criterion = [NSMutableDictionary dictionaryWithObjectsAndKeys:
394     row, XspfMREDCriteriaKey,
395     disp, XspfMREDDisplayValuesKey,
396     [NSNumber numberWithInt:NSRuleEditorRowTypeSimple], XspfMREDRowTypeKey,
397     nil];
398    
399     return criterion;
400     }
401 masaki 125
402    
403     } else if([predicate isKindOfClass:[NSPredicate class]]) {
404     NSLog(@"--> %@", predicate);
405     } else {
406     NSLog(@"???predicate class is %@", NSStringFromClass([predicate class]));
407     }
408    
409     return [NSArray array];
410     }
411 masaki 123 - (void)setPredicate:(id)predicate
412     {
413 masaki 126 NSLog(@"predicate -> (%@) %@", NSStringFromClass([predicate class]), predicate);
414 masaki 123 // NSLog(@"Predicate class is %@", [predicate class]);
415    
416 masaki 125 // NSLog(@"old rows -> %@", predicateRows);
417     id hoge = [self buildRowsFromPredicate:predicate];
418     id new = [NSArray arrayWithObject:hoge];
419     // NSLog(@"new rows -> %@", new);
420    
421     [self willChangeValueForKey:XspfMREDPredicateRowsKey];
422     [predicateRows release];
423     predicateRows = [new retain];
424     [self didChangeValueForKey:XspfMREDPredicateRowsKey];
425     [ruleEditor reloadCriteria];
426    
427     // [self showPredicate:predicate];
428 masaki 123 }
429 masaki 125 - (void)setPredicateRows:(id)p
430     {
431     NSLog(@"new -> %@", p);
432     [predicateRows release];
433     predicateRows = [p retain];
434     }
435    
436     #pragma mark#### NSRleEditor Delegate ####
437 masaki 124 - (NSInteger)ruleEditor:(NSRuleEditor *)editor
438     numberOfChildrenForCriterion:(id)criterion
439     withRowType:(NSRuleEditorRowType)rowType
440     {
441     NSInteger result = 0;
442    
443     if(rowType == NSRuleEditorRowTypeCompound) {
444     return [compound numberOfChildrenForChild:criterion];
445     }
446    
447     if(!criterion) {
448     result = [rows count];
449     } else {
450 masaki 125 result = [[criterion valueForKey:XspfMREDCriteriaKey] count];
451 masaki 124 }
452    
453     // NSLog(@"numner\tcriterion -> %@, type -> %d, result -> %d", criterion, rowType, result);
454    
455     return result;
456     }
457    
458     - (id)ruleEditor:(NSRuleEditor *)editor
459     child:(NSInteger)index
460     forCriterion:(id)criterion
461     withRowType:(NSRuleEditorRowType)rowType
462     {
463     id result = nil;
464    
465     if(rowType == NSRuleEditorRowTypeCompound) {
466     return [compound childForChild:criterion atIndex:index];
467     }
468    
469     if(!criterion) {
470     result = [rows objectAtIndex:index];
471     } else {
472 masaki 125 result = [[criterion valueForKey:XspfMREDCriteriaKey] objectAtIndex:index];
473 masaki 124 }
474    
475     // NSLog(@"child\tindex -> %d, criterion -> %@, type -> %d, result -> %@", index, criterion, rowType, result);
476    
477     return result;
478     }
479     - (id)ruleEditor:(NSRuleEditor *)editor
480     displayValueForCriterion:(id)criterion
481     inRow:(NSInteger)row
482     {
483     id result = nil;
484    
485     NSRuleEditorRowType rowType = [editor rowTypeForRow:row];
486     if(rowType == NSRuleEditorRowTypeCompound) {
487     return [compound displayValueForChild:criterion];
488     }
489    
490     if(!criterion) {
491     //
492     } else {
493 masaki 125 result = [criterion valueForKey:XspfMREDValueKey];
494 masaki 124 }
495    
496     // create or find field object.
497     do {
498     Class searchClass = Nil;
499     SEL defaultSEL = Nil;
500     NSInteger tag = 0;
501    
502 masaki 125 if([result hasPrefix:@"textField"]) {
503 masaki 124 searchClass = [NSTextField class];
504     defaultSEL = @selector(textField);
505     } else if([result hasPrefix:@"dateField"]) {
506     searchClass = [NSDatePicker class];
507     defaultSEL = @selector(datePicker);
508     if(![result isEqualToString:@"dateField"]) { // result == dateField02
509     tag = 1000;
510     }
511     } else if([result hasPrefix:@"rateField"]) {
512     searchClass = [NSLevelIndicator class];
513     defaultSEL = @selector(ratingIndicator);
514     }
515     if(!searchClass) break;
516    
517     id displayValues = [editor displayValuesForRow:row];
518     id field = nil;
519     for(id v in displayValues) {
520     if([v isKindOfClass:searchClass] && [v tag] == tag) {
521     field = v;
522     }
523     }
524     result = field ? field :[self performSelector:defaultSEL];
525     if(tag != 0) [result setTag:tag];
526     } while(NO);
527    
528     // NSLog(@"display\tcriterion -> %@, row -> %d, result -> %@", criterion, row, result);
529    
530     return result;
531     }
532     - (NSDictionary *)ruleEditor:(NSRuleEditor *)editor
533     predicatePartsForCriterion:(id)criterion
534     withDisplayValue:(id)displayValue
535     inRow:(NSInteger)row
536     {
537     id result = nil;
538    
539     NSRuleEditorRowType rowType = [editor rowTypeForRow:row];
540     if(rowType == NSRuleEditorRowTypeCompound) {
541     return [compound predicateForChild:criterion withDisplayValue:displayValue];
542     }
543    
544     result = [NSMutableDictionary dictionary];
545     if([criterion valueForKey:@"NSRuleEditorPredicateOperatorType"]) {
546     [result setValue:[criterion valueForKey:@"NSRuleEditorPredicateOperatorType"] forKey:@"NSRuleEditorPredicateOperatorType"];
547     }
548     if([criterion valueForKey:@"NSRuleEditorPredicateOptions"]) {
549     [result setValue:[criterion valueForKey:@"NSRuleEditorPredicateOptions"] forKey:@"NSRuleEditorPredicateOptions"];
550     }
551     if([criterion valueForKey:@"NSRuleEditorPredicateLeftExpression"]) {
552     id value = [criterion valueForKey:@"NSRuleEditorPredicateLeftExpression"];
553     id exp = nil;
554 masaki 125 if([value isEqual:XspfMREDValueKey]) {
555 masaki 124 exp = [NSExpression expressionForKeyPath:displayValue];
556     } else {
557     exp = [NSExpression expressionForKeyPath:[criterion valueForKey:@"NSRuleEditorPredicateLeft"]];
558     }
559     if(exp) {
560     [result setValue:exp forKey:@"NSRuleEditorPredicateLeftExpression"];
561     }
562     }
563     if([criterion valueForKey:@"NSRuleEditorPredicateRightExpression"]) {
564     id selector = [criterion valueForKey:@"NSRuleEditorPredicateRightExpression"];
565     id exp = nil;
566     if(NSSelectorFromString(selector)) {
567     exp = [NSExpression expressionForConstantValue:[displayValue performSelector:NSSelectorFromString(selector)]];
568     } else {
569     exp = [NSExpression expressionForConstantValue:[criterion valueForKey:@"NSRuleEditorPredicateRightExpression"]];
570     }
571     if(exp) {
572     [result setValue:exp forKey:@"NSRuleEditorPredicateRightExpression"];
573     }
574     }
575     if([criterion valueForKey:@"XspfMPredicateRightExpression"]) {
576     SEL selector = NSSelectorFromString([criterion valueForKey:@"XspfMPredicateRightExpression"]);
577     id arg01 = [criterion valueForKey:@"XspfMRightExpressionArg01"];
578     // id arg02 = [criterion valueForKey:@"XspfMRightExpressionArg02"];
579    
580     if(arg01) {
581 masaki 125 if([arg01 isEqualToString:XspfMREDDisplayValuesKey]) {
582 masaki 124 arg01 = [editor displayValuesForRow:row];
583     }
584     id r = [self performSelector:selector withObject:arg01];
585     [result setValue:r forKey:@"NSRuleEditorPredicateRightExpression"];
586     } else {
587     id r = [self performSelector:selector];
588     [result setValue:r forKey:@"NSRuleEditorPredicateRightExpression"];
589     }
590     }
591    
592 masaki 125 // NSLog(@"predicate\tcriterion -> %@, value -> %@, row -> %d, result -> %@", criterion, displayValue, row, result);
593 masaki 124
594     return result;
595     }
596     - (void)ruleEditorRowsDidChange:(NSNotification *)notification
597     {
598     //
599     }
600    
601 masaki 120 @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26