所以这是我的代码。
NSMutableArray *arrProductSet = [NSMutableArray array];
int countProducts = (int)dicTemp.count;
int countStart = 0;
while(countStart < countProducts) {
NSMutableArray *arrProductInfo = [NSMutableArray array];
NSArray *arrProductSpecs = [NSArray array];
NSString *strObjectKey = [NSString stringWithFormat:@"%i",countStart];
arrProductInfo = [dicTemp objectForKey:strObjectKey];
arrProductSpecs = [self getProductSpecs:[arrProductInfo objectAtIndex:0]];
NSLog(@"Specs %@",arrProductSpecs); //<= arrProductSpecs has value
[arrProductInfo addObject:arrProductSpecs];
NSLog(@"Product %@",arrProductInfo); //<= arrProductSpecs becomes empty
[arrProductSet addObject:arrProductInfo];
countStart++;
}
我无法在将arrProductSpecs
添加到产品信息数组(arrProductInfo
)时找出原因arrProductSet
为空。
此外,如果我记录arrProductInfo
,则最后arrProductSpecs
数组的(
(
168,
ACR33U,
"ACR33U-A1 SmartDuo Smart Card Reader",
0,
(
/* empty, but this have value, if logged */
)
),
(
155,
ACR3801,
"ACR3801 Smart Card Reader",
(
(
"Host Interface",
"USB Full Speed"
),
(
"Contact Smart Card Interface",
"1 Full-sized smart card<br> ISO 7816 T=0 and T=1<br> Memory Cards"
),
(
"Built-in Peripherals",
"1 LED"
),
(
"OS Supported",
"Windows <br>Mac<br>Linux<br>Android"
),
(
"Compliance / Certifications",
"PC/SC, CCID, Microsoft ® WHQL, USB Full Speed<br>FIPS 201, TAA<br>CE, FCC, IEC/EN 60950, VCCI, RoHS 2, REACH"
),
(
Applications,
"e-Government<br>Banking & Payment<br>Access Control<br>Network Security<br>Public Key Infrastructure<br>e-Purse & Loyalty<br>"
)
)
)
)
不为空,令人惊讶的是内容
这是我的结果:
function call(){
$("#para").html( 'oops css gone');
}