Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial CPPredicateEditor support

  • Loading branch information...
commit 1d6fa6fb43afe6eb4fd6660fcd34bef8caa99fcc 1 parent d808a02
@daboe01 authored
View
BIN  Frameworks/.DS_Store
Binary file not shown
View
9 Frameworks/Renaissance/GSMarkupDecoder.j
@@ -319,7 +319,7 @@ var _arrayControllerToPKMapper;
}
}
if (peek=[[o attributes] objectForKey: "filterPredicate"])
- { if([oPO isKindOfClass: [CPArrayController class]])
+ { if( [oPO isKindOfClass: [CPArrayController class]])
{ [oPO setFilterPredicate: [self _getObjectForIdString: peek] ];
}
}
@@ -328,7 +328,7 @@ var _arrayControllerToPKMapper;
if (r.location == CPNotFound) // "unspecific" binding, such as in tableViews, where you do not want to connect the columns individually but through "identifier" property
{ var target=[[_nameTable objectForKey: peek] platformObject]; // <!> fixme: replace with [self _getObjectForIdString: peek];
if([oPO isKindOfClass: [CPTableView class] ])
- { [oPO bind:@"content" toObject: target withKeyPath: @"contentArray" options:nil];
+ { [oPO bind:@"content" toObject: target withKeyPath: @"arrangedObjects" options:nil];
var _content=[o content];
var j, l1 = _content.length;
for (j = 0; j < l1; j++)
@@ -341,7 +341,8 @@ var _arrayControllerToPKMapper;
}
}
} else if([oPO isKindOfClass: [CPPredicateEditor class] ])
- { //[[oPO rowTemplates] makeObjectsPerformSelector:@selector(setPredicate:) withObject: target];
+ {
+alert([[oPO rowTemplates] description]);
[oPO setObjectValue: target];
}
}
@@ -366,7 +367,7 @@ var _arrayControllerToPKMapper;
var oPO=[o platformObject];
if([oPO isKindOfClass: [CPArrayController class]]) // autofetching
{ var peek;
- if(peek=[[o attributes] objectForKey:"entity"])
+ if (peek=[[o attributes] objectForKey:"entity"])
{ var pk=[[[_nameTable objectForKey: peek] platformObject] pk];
[GSMarkupDecoder registerPk: pk forPlatformObject: oPO];
}
View
24 Frameworks/Renaissance/GSMarkupTagCappuccinoAdditions.j
@@ -149,28 +149,24 @@
var ops=[CPMutableArray new];
for(j=0;j<l1;j++)
{ var expr=expressions[j];
- if([expr isKindOfClass: [GSMarkupLexpression class] ]) [lexpressions addObject: [CPExpression expressionForKeyPath: [expr keyPath] ]];
- else if([expr isKindOfClass: [GSMarkupOperator class] ])
- if([expr operator]) [ops addObject: [expr operator]];
+ if([expr isKindOfClass: [GSMarkupLexpression class] ])
+ [lexpressions addObject: [CPExpression expressionForKeyPath: [expr keyPath] ]];
+ else if([expr isKindOfClass: [GSMarkupOperator class] ])
+ if([expr operator]) [ops addObject: [expr operator]];
}
var rowTemplate=[[CPPredicateEditorRowTemplate alloc]
initWithLeftExpressions: lexpressions
rightExpressionAttributeType: CPStringAttributeType //<!> fixme
- modifier: CPDirectPredicateModifier //<!> fixme
+ modifier: 0 //<!> fixme
operators: ops
- options: CPCaseInsensitivePredicateOption]; //<!> fixme
+ options: 0]; //<!> fixme
[rowTemplates addObject: rowTemplate];
}
}
-//alert(rowTemplates);
-/*
- var compoundTypesArr = [CPArray arrayWithObjects: [CPNumber numberWithInt:CPNotPredicateType],
- [CPNumber numberWithInt:CPAndPredicateType],
- [CPNumber numberWithInt:CPOrPredicateType]];
-
- var compound = [[CPPredicateEditorRowTemplate alloc] initWithCompoundTypes: compoundTypesArr];
- [rowTemplates addObject: compound];
-*/
+
+// [platformObject setNestingMode: CPRuleEditorNestingModeCompound];
+ [rowTemplates addObject: [ [CPPredicateEditorRowTemplate alloc] initWithCompoundTypes:
+ [CPArray arrayWithObjects: [CPNumber numberWithInt: CPAndPredicateType], [CPNumber numberWithInt: CPOrPredicateType] ] ] ];
[platformObject setRowTemplates: rowTemplates];
return platformObject;
}
Please sign in to comment.
Something went wrong with that request. Please try again.