Quellcode
- NSArray *objs = [NSArray arrayWithObjects:path,[NSNumber numberWithInt:ctxActionMode],args,[NSNumber numberWithBool:compatible],savePlace,nil];
- NSArray *keys = [NSArray arrayWithObjects:@"Path",@"Action",@"Args",@"Compatible",@"SavePlace",nil];
- NSDictionary *tcargs = [NSDictionary dictionaryWithObjects:objs forKeys:keys];
Fehlermeldung :
*** -[NSPlaceholderDictionary initWithObjects:forKeys:]: number of objects (4) not equal to number of keys (5)
*** Uncaught exception: <NSInvalidArgumentException> *** -[NSPlaceholderDictionary initWithObjects:forKeys:]: number of objects (4) not equal to number of keys (5)
Dabei ist path und savePlace ein NSString.
args ein Dictionary, Compatible ist BOOL und ctxActionMode typedef enum. Sollte aber doch als integer durch gehen oder?
Sven
:wq! /dev/null