In testing a program I have a method where the use of Self.Close to
close the window after displaying an error dialog is not working. An
example of one of the places is shown below. I have purposely set the
forkLength value to 0 after getting a non-zero value just to force
the message dialog to appear. Following the call to showAlertDialog
is a "self.Close" statement that should close the window but doesn't.
Putting a breakpoint on the self.close line shows that self is in
fact pointing to the window. First time that I have ever run into a
situation like this. At the point in time when this occurs the
visible property of the window is set to false as the fields within
the window are in the process of being filled in. Doesn't seem like
that should matter.
forkLength = theFile.ResourceForkLength
forkLength = 0
if forkLength = 0 then // double check file has resource fork
s = "This file has no resource fork so there is nothing to
display. " _
+ "Consequently the viewing window will close."
showAlertDialog kPgmErr, s, "Okay", "", "", "a", "", 1
self.Close
end if
rf = theFile.OpenResourceFork
There are two other points where it is possible for a dialog to be
presented followed by self.close and forcing either of those to
appear also skips over the self.close as though it weren't there even
though the debugger stops on the self.close but then does not invoke
the closing of the window.
RB 2005 r4, Mac OS 10.4.5
=== A Mac addict in Tennessee ===
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|