私はNSMutableArray
、purDesc
、これはNSMutableDictionary
,purDetails
を保持しています。 辞書の配列
singleton purDesc Dump:(
{
},
{
},
{
},
{
},
{
}
)
今すぐサイズ/外観/ダンプは、私は辞書を追加/削除される回数を反映するために辞書を追加するたびに変更します。私は
NSLog(@"%@", purDesc);
を使用する場合には、次のようにdictionarysがあるはず空のスペースを返します。ここでは、コードスニペットは、私のXMLパーサから取られています。
...私が間違っているのと、なぜログが半空をアップ来ている何
else if ([elementName isEqualToString:@"purDesc"])
{
//close purDisc
// dumps dictionary into log
NSLog(@"End of purDesc");
NSLog(@"Dump:%@", [purDesc description]);
[singleton setPurDesc:purDesc];//sets this response to the response in the singleton
NSLog(@"singleton purDesc Dump:%@", [[singleton purDesc] description]);
return;//we're done here
}
else if ([elementName isEqualToString:@"PurDetails"])
{
//close purDetails
// dumps dictionary into log
NSLog(@"End of PurDetails");
[purDetails addEntriesFromDictionary:description];//sets current purDetails to current description
NSLog(@"Dump:%@", [purDetails description]);
[purDesc addObject:purDetails];//adds purDetails dictionary to purDesc
[purDetails removeAllObjects];
NSLog(@"Current purDesc:%@", [purDesc description]);
}
?
実際に配列と辞書をどのように満たしていますか?私は辞書が*空であると思います。シングルトンとは何ですか?[singleton purDesc]とは何ですか? purDescとはどのような関係がありますか?実際に何が起こっているのか、何が間違っているのかは実際には分かりません。 –
ログに記録すると値が表示されます。たとえば、NSLog(@ "Dump:%@"、[purDetails description]);ダンプを返します。{ amt = "1.29"; desc = test; } – Baub
はい、それはpurDetailsです。私は、何が何で、何が間違っているかを見るために、より多くのコードを見る必要があります。 –