How to know how many Popover exist & when do they go out of scope?

Hello all,

With the code below, I create a popover.

Dim pop As New PopcntSiteInformationWide
pop.ShowPopover(grdSites, WebContainer.DisplaySides.Top, 200, 500)
pop.Initialize( True, SID )

When I close it, I use this code

Self.Visible = False
Call ClearFields
Me.Close

Is the above correct?
Tim

To be consistent with the rest of the language, they should go out of scope when the variable does, closing on its own. if you wanted it to hang around, you’d make a property to hold it open somewhere. Otherwise they’re going to leak.

@Ricardo_Cruz ?

Popovers are single use and are destroyed when they’re hidden. Trying to show a previously shown Popover results in the following in Web:

All this is to say that tracking them doesn’t really matter. You should discard the reference to a popover after it’s shown and use events on the WebContainer with AddHandler to perform functions.

2 Likes

I was hoping they would go out of scope and be destroyed when it is closed.
Tim