- Timestamp:
- 01/08/09 10:26:41 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
apps/iphone/my.tel/trunk/Classes/KeywordEditController.m
r149 r156 167 167 - (IBAction)didClickSave:(id)sender { 168 168 // store all the keyword info 169 // TODO: grab the keyword info from the subview and store it 170 [theKeyword setObject:rValue.text forKey:@"value"]; 171 169 NSMutableDictionary *saveKeywordDict = [[NSMutableDictionary dictionaryWithCapacity:2] retain]; 170 [saveKeywordDict setObject:[VIPConnect sharedInstance].selectedDomain forKey:@"domain"]; 171 NSMutableArray *saveSecKeywordArray = [[NSMutableArray arrayWithCapacity:8] retain]; 172 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys: 173 [currentSecondaryView primaryType], @"key", 174 [currentSecondaryView primaryLabelString], @"value", 175 nil]]; 176 NSUInteger i, count = [[currentSecondaryView secondaryKeywordTypes] count]; 177 for (i = 0; i < count; i++) { 178 [saveSecKeywordArray addObject:[NSDictionary dictionaryWithObjectsAndKeys: 179 [[currentSecondaryView secondaryKeywordTypes] objectAtIndex:i], @"key", 180 [[[currentSecondaryView secondaryKeywordLabels] objectAtIndex:i] text], @"value", 181 nil]]; 182 } 183 [saveKeywordDict setObject:saveSecKeywordArray forKey:@"keywords"]; 184 NSLog([saveKeywordDict description]); 185 172 186 // Store the record 173 187 barButtonSave.enabled = NO; … … 176 190 [conn setTheDelegate:self]; 177 191 [conn setActionSel:@selector(afterSaveAction:)]; 178 [conn setConnectionUrl:[conn urlFromAction:@"addkeyword "]];179 [conn setPayload: theKeyword];192 [conn setConnectionUrl:[conn urlFromAction:@"addkeywordstructure"]]; 193 [conn setPayload:saveKeywordDict]; 180 194 [conn performLookup:TRUE]; 195 [saveSecKeywordArray release]; 196 [saveKeywordDict release]; 181 197 } 182 198








