Jump to content

iPhone SDK: How would you reloadData?


1 post in this topic

Recommended Posts

Okay this is kinda messy but try and bear with me...

 

 

1 - In my main AppDelegate I open an async connection (via an included method) to a soap service that provides continuos status updates (in its own thread) and then lets the AppDelegate continue on 'doing its thing' in the main thread. (I'm pretty sure I got that working right).

 

2 - As messages come back from the soap server (in that other thread) I call back to a method in the AppDelegate that updates an NSArray with the new values. This too is working okay (amazing as it may seem) :P

 

That process looks something like:

 

ISY_26AppDelegate *appController = (ISY_26AppDelegate *)[[UIApplication sharedApplication] delegate];
[appController replaceObjectNode:[devStat objectAtIndex:4] withProp:[devStat objectAtIndex:1] withValue:[devStat objectAtIndex:2]];

 

That stuff works fine... or so it would seem...

 

3 - My main AppDelegate then calls up a 'root view controller' where you have one of several menu choices one of them being "show devices"

 

4 - When 'Show Devices' gets selected a menulist displays a list of 'items' as well as their current 'status' (represented by one of two icons) this information comes from that array I talked about.

 

That too works fine...

 

Here is the sticky part...

 

How would I go about doing a reloadData on that menu when the 'array' (from step #2) gets changed?

 

- I simply can't wrap my brain around how to even begin to go about doing it...

 

Yes if I change the status of a device -- the menulist doesn't change BUT if I then scroll the list 'all the way up' and 'all the way down' (basically forcing a reloadData) the new values get displayed correctly but that is clearly not the way things should work... If the soap service reports that 'XYZ is now OFF' I want the ability to manually do a reloadData on that device listing (menu).

 

Does this even make sense? If it doesn't I can try to expand on things.

 

Dave

Link to comment
Share on other sites

 Share

×
×
  • Create New...