Bin ich blind oder kann ich nicht zählen

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Bin ich blind oder kann ich nicht zählen

    Quellcode

    1. NSArray *objs = [NSArray arrayWithObjects:path,[NSNumber numberWithInt:ctxActionMode],args,[NSNumber numberWithBool:compatible],savePlace,nil];
    2. NSArray *keys = [NSArray arrayWithObjects:@"Path",@"Action",@"Args",@"Compatible",@"SavePlace",nil];
    3. 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