Hello:
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
// "ID_CLIP_INFO_NAME4".
albumIndexTemp = [[playingItem allKeysForObject:@"Album"]
objectAtIndex: 0];
// This should return something like "ID_CLIP_INFO_VALUE4"
[albumIndexTemp replaceOccurrencesOfString:@"NAME"
withString:@"VALUE"];
[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
objectForKey:@"ID_CLIP_INFO_VALUE1"]];
[artistBoxMini setStringValue:[playingItem
objectForKey:@"ID_CLIP_INFO_VALUE1"
}
---------------------------------------------------
What am I doing wrong?
Thanks.
Charles
pgp21vao7G4r9.pgp
Description: PGP signature
_______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
