BeforeModifyConnection

ContainerReleaseType, ContainerRelease

This property and event let you indicate what to do when the user of an ActiveDoc application navigates away from it.

Usage

acdActiveDoc.ContainerReleaseType = nLiveOrDie nLiveOrDie = acdActiveDoc.ContainerReleaseType PROCEDURE acdActiveDoc.ContainerRelease

Parameter

Value

Meaning

nLiveOrDie

0

When the host releases the application, open an instance of the VFP runtime and continue running there.

1

When the host releases the application, shut it down.


When you run an application in a browser, you face a unique problem. The user can abandon your application and move on to something else without explicitly quitting. This pair of members helps you solve that problem.

ContainerReleaseType lets you decide whether the application should be shut down or should keep running in the VFP runtime when the user navigates away from it. (Actually, if your browser has a cache like IE 3, this stuff doesn't happen until the application falls out of the cache.) When the user does leave, ContainerRelease fires so you can take appropriate action.

Example

PROCEDURE ContainerRelease   * Clean up if the app is shutting down IF This.ContainerReleaseType = 1    This.CleanUp()  && a custom method ENDIF   RETURN

See Also

ActiveDoc, HideDoc


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net