Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

iphone - App works in Simulator but not on Device - NSMutableArray -


i have problem app, run on simulator when launch on idevice got error:

     terminating app due uncaught exception 'nsinvalidargumentexception',          reason: '*** -[nsmutablearray insertobject:atindex:]: attempt insert nil object @ 0'       0   corefoundation                      0x3513cfd3 __exceptionpreprocess + 114     1   libobjc.a.dylib                     0x303928a5 objc_exception_throw + 24     2   corefoundation                      0x350bff99 -[__nsarraym insertobject:atindex:] + 472     3   corefoundation                      0x350bfda7 -[__nsarraym addobject:] + 34     ....     program received signal:  “sigabrt”. 

in debugger can see problem. error comes there, @ addobject:

for (int = 0; < [arrayvalues count]; i++) {     f = [[nsnumberformatter alloc] init];     [f setnumberstyle:nsnumberformatterdecimalstyle];     mynumber =[f numberfromstring:[arrayvalues objectatindex:i]];      [arrayvalues2 addobject:mynumber];      [f release];    } 

here convert objects of arrayvalues (nsstring) in nsnumbers in arrayvalues2.

in simulator there no problem, arrays not empties. don't know for.

i checked other posts of stackoverflow, not error

well... i'm not sure problem is, there better way this...

for(nsstring *thestring in arrayvalues){     nsnumber *anumber = [nsnumber numberwithfloat:[thestring floatvalue]];     [arrayvalues2 addobject:anumber]; } 

which may because won't outstepping array boundaries, or inserting nil objects.

if want more you're going have nslog arrayvalues , give output can see you're dealing with. :)


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -