this will help I can't seem to find an answer to this, but what is the criteria for passing in a matching PendingIntent to be removed from an alarm? It it based on the just the name like com.blah.package.myclass or do the Extras matter? , Following is mentioned in AlarmManager documentation
fixed the issue. Will look into that further Obviously something is happening that is not clear. What I would suggest is adding some log messages to verify that in fact the timing is as you think:
// Add a simple log like (NSLog(@"%@", @"conn_del"); to all your delegate methods)
Then addend you cancelation code with this:
NSLog(@"Will cancel connection=%@", mgr.theConnection);
NSLog(@"Did cancel connection");
// [mgr.theConnection release]; assuming a retained property, this is not the way to do it
mgr.theConnection = nil; // this is the proper way - release and nil out the property
NSLog(@"Did release connection");
will be helpful for those in need Not really; you pretty much need to check the IsCancelled property of the BGW periodically to properly cancel. If it's important that a given operation explicitly not know about the BGW then there are a few options.
around this issue When the user clicks the Cancel button InputBox returns False, which is not a Range object and can't be assigned to ranC. One way to handle this is to wrap this part of the code in an error handler:
On Error Resume Next
Set ranC = Application.InputBox("Select the Cal B table.", Type:=8)
If Err.Number = 424 Then
' Handle cancel button
Debug.Print "User cancelled"
ElseIf Err.Number <> 0 Then
' Handle unexpected error
Debug.Print "Unexpected error"
' Your code here
On Error GoTo 0 ' This line could go in the else block