ios


why my array is null in second time, when I assigned it's first object to dictionay in objective C, ios


Occured a crazy situation. I assinged values to a mutable array in my first method.it worked properly.this is the my code for it.
for (NSDictionary *final in SectorsArray)
{
MoreFligh *more = [MoreFligh new];
more.flightnumber = [final objectForKey:#"FLI_NUM"];
more.airlinecode = [final objectForKey:#"ARL_COD"];
more.departureairport = [final objectForKey:#"DepatureAirport"];
more.departureday = [final objectForKey:#"DepatureDay"];
more.departuredate = [final objectForKey:#"DepatureDate"];
more.departuredime = [final objectForKey:#"DepatureTime"];
more.arrivalairport = [final objectForKey:#"ArrivalAirport"];
more.arrivalday = [final objectForKey:#"ArrivalDay"];
more.arrivaldate = [final objectForKey:#"ArrivalDate"];
more.arrivaltime = [final objectForKey:#"ArrivalTime"];
[testingArray addObject:more];
}
this time testing array is not null and there are two objects with values.no problem.
then in my second method I chencked that array like this.
- (void)chk
{
id bbbbb = testingArray.firstObject;
NSLog(#"%#",bbbbb);
}
then it int the bbbbb (I used a breakpoint here) it had two objects with values.then I check with following code.
- (void)chk
{
NSDictionary *bbbbb = testingArray.firstObject;
NSLog(#"%#",bbbbb);
}
at this time it shows testing array has to objects but with no values.
then I have to create a new model class assign value.otherwise after this step it shows only like no value.I have attached some pictures.if anyone wants I can provide any other details.]2
[]3
when I create a new model, then it works properly until I checked like above.
- (void)chk
{
MoreFligh *bbbbb =(MoreFligh *) testingArray.firstObject;
NSLog(#"%#",bbbbb);
}
I do not understand what the testingArray is, instance variable or temporary variable?
If the instance variable that is, take a look at assignment, make sure no place makes testingArray nil or removeAllObjects.
Or show the .m file completely, let us check.

Related Links

How to hold queue execution until get response from web service API in Objective-C
How to set font sizes for different iPhone sizes? [closed]
Optimizing DrawRect: for a Snake sort of game
iOS 9 app lunch URL for 'Storage and iCloud Usage'
App Thinning Size Report reports totally different size then App Store size
Json Values Append Array but ViewDidLoad it seem Empty
Adding a Wizard style ViewController between two NavigationViewControllers in IOS
Run MQTT Broker in iOS
how to rotate image to a particular latitude and longitude in swift?
how to add json file in ActionRequestHandler safari extinction
How do I make a control on a reused custom UIView trigger actions only on the ViewController currently being viewed?
NSPredicate SUBQUERY with nested arrays iOS Objective C
What delegate method will be called on receiving a push notification if the app is in killed/Force closed (Not in background) state?
didReceiveMessage not called after unlocking the iPhone screen?
How to access source view that perform segue from within that segue or destination view controller?
I want to use same UserInterface with different Data in ios

Categories

HOME
odoo-10
sharepoint-2013
servlets
word-vba
image-segmentation
weblogic11g
freebsd
google-maps-sdk-ios
obiee
rebus
lazy-loading
zap
curve-fitting
appcelerator-alloy
microphone
hough-transform
burp
epicorerp
italic
confidence-interval
typemock-isolator
rrd
memorystream
ruamel.yaml
django-users
aem-6
roo
solid-principles
worldpay
automata-theory
uifont
html-form
ios-app-group
android-identifiers
jce
jvm-arguments
db2400
sizing
itamae
vispy
evaluate
xceed
olingo
submission
uploadify
groupbox
mongolab
php-opencloud
readline
actioncable
nominatim
kindlegen
user-registration
ehcache-bigmemory
smarty2
cordova-cli
information-schema
sbrk
xacml3
jquery-backstretch
delphi-2009
dfsort
datapump
mosek
slimbox
haar-wavelet
google-provisioning-api
xsocket
rc-shell
android-actionbar-compat
ariatemplates
harvest
nextpeer
oledbcommand
noindex
quilt
payment-services
jammit
demoscene
wiki-markup
android-searchmanager
large-teams
roguelike

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App