Hey,
I am still stacked with a simple objC code which retrieve some data from plist. After I used them I cannot release object because it fails...
- (void)retrieveFromPlist:(NSString*)Nazov
{
NSLog(@"Objekt: %@",Nazov);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"working.plist"];
////Zober vsetky ulozene
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
NSMutableDictionary *subDict = [[NSMutableDictionary alloc] init];
subDict = [dict objectForKey:Nazov];
NSString *hudbaR;
float hudbaL;
NSString *zvukR;
float zvukL;
hudbaL = [[subDict objectForKey:@"musicLevel"] floatValue];
hudbaR = [subDict objectForKey:@"musicRow"];
zvukL = [[subDict objectForKey:@"soundLevel"] floatValue];
zvukR = [subDict objectForKey:@"soundRow"];
NSLog(@"Musical level: %f, musical roww:%@ , zuk level: %f, zuk row: %@", hudbaL,hudbaR ,zvukL ,zvukR );
if (hudbaR) {
[musicController setBackgroundSoundVolume:zvukL];
[musicController setBackgroundMusicVolume:hudbaL];
MusicsliderCtl.value = hudbaL;
sliderCtl.value = zvukL;
[musicController playMusicWithKey:hudbaR timesToRepeat:0];
[musicController playSoundWithKey:zvukR timesToRepeat:0];
}
//[dict release];
//[subDict release];
}