[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with Replacing a String is a NSMutableString

From: Charles philip Chan
Subject: Problems with Replacing a String is a NSMutableString
Date: Wed, 23 Jul 2008 19:53:36 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)


I am currently having a problem with replacing a string in an
NSMutableString and I am not too sure whether it is a bug in the current
SVN tree or I am doing something stupid. Here are the code snippets:
NSMutableString *albumIndexTemp;
// PlayItem is just a dictionary of strings. Since there is
// only 1 key with the value of "Album". The first index of
// the array should return something like 
albumIndexTemp = [[playingItem allKeysForObject:@"Album"] 
               objectAtIndex: 0]; 

// This should return something like "ID_CLIP_INFO_VALUE4"
[albumIndexTemp replaceOccurrencesOfString:@"NAME" 

[albumBox setStringValue:[playingItem objectForKey:albumIndexTemp]];
[albumBoxMini setStringValue:[playingItem objectForKey:albumIndexTemp]];


However, this doesn't seem to work. I have a similiar stanza above
(without the string replacement) and it worked:

if ([[playingItem objectForKey:@"ID_CLIP_INFO_NAME1"]
                               isEqual:@"Artist"]) {
   [artistBox setStringValue:[playingItem 
   [artistBoxMini setStringValue:[playingItem 


What am I doing wrong?



Attachment: pgpzg7sfEyTsb.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]