I would think it makes sense to toggle the flag first--only because
the snippet I posted was a stripped-down test to see if I understood
it properly.  What I was hoping to do was maintain a list of currently
opened dialogs, relying on the close function to trigger a dialog
inventory of sorts. As the dialog is not flagged closed until after
the close function executes, it appears such a goal is out of reach.

As it is, I discovered the beforeclose function, which I am using to
manually remove the dialog from my list as it is closing instead of
triggering the catch-all function after the fact.  That's probably a
better way of doing things, anyway, so I shan't complain!

Thanks for taking time to respond, Scott.

-Paul

On Apr 2, 1:46 pm, Scott González <[email protected]> wrote:
> The close event does occur after the dialog has closed.  The flag for
> whether or not the dialog is open gets toggled just after the event.
> I suppose we could toggle the flag immediately before the event, but
> in terms of doing something after a dialog closes, you definitely
> don't need to check this flag inside of the close event.
>
> On Apr 1, 8:23 pm, Paul <[email protected]> wrote:
>
> > I would like to perform a function at the same time I close a UI
> > dialog. Accordingly as an experiment I am passing the following:
>
> > close: function (){console.log($(this).dialog('isOpen'))}
>
> > I had assumed that the passed function would happen after the dialog
> > closed, but alas I see that .dialog('isOpen') always returns true. If
> > the provided "close" function is not the means to perform a task after
> > a dialog closes, what is the best way to approach the task?
>
> > Thanks in advance for your time.
>
> > Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to