Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- App method, when in wireless mode ok, when in GSM Network freeze
- [NSTimer scheduledTimerWithTimeInterval:(25) target:self selector:@selector(getInitialData:) userInfo:nil repeats:YES];
- - (void) getInitialData:(id)obj{
- NSAutoreleasePool *initpool=[[NSAutoreleasePool alloc]init];
- //Check if the simulation mode is set
- if ([getSimulationMode getMode]) {
- //Load simulation-values into the plist´s
- [myStockView.loadindicator stopAnimating];
- [Koehl_WMSAppDelegate loadSimulationData];
- }else{
- [myStockView.loadindicator startAnimating];
- //Variables to check internet connection
- Reachability* reachability = [Reachability reachabilityWithHostName:@"www.google.de"];
- NetworkStatus remoteHostStatus = [reachability currentReachabilityStatus];
- if(remoteHostStatus == NotReachable) {
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"No internet connection available!"
- delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil ];
- [alert show];
- [alert release];
- }
- else {
- [loadStockData loadData];
- [loadArticleData loadData];
- [loadAlarmData loadData];
- [loadProductData loadData];
- }
- [myStockView.loadindicator stopAnimating];
- }
- //After all new Data got loaded, the views can be refreshed
- [myStockView loadStockData];
- [initpool release];
- }
- ...
- XMLRPCResponse *userInfoResponse=[XMLRPCConnection sendSynchronousXMLRPCRequest:request error:error2];
- ...
Advertisement
Add Comment
Please, Sign In to add comment