Professional Web Applications Themes

Closing File in DW Catch Close Event - Macromedia Exchange Dreamweaver Extensions

I will post this in the extensions forum since i would think this has to exist somewhere.... I want to be able to run some code when a user closes a file in the DW IDE. Is there such a command/method/file that gets called when a file is closed? Such the same fashion as there are commands for _onOpen or _afterSave in the commands folder. thanks...

  1. #1

    Default Closing File in DW Catch Close Event

    I will post this in the extensions forum since i would think this has to exist
    somewhere.... I want to be able to run some code when a user closes a file in
    the DW IDE. Is there such a command/method/file that gets called when a file is
    closed? Such the same fashion as there are commands for _onOpen or _afterSave
    in the commands folder.

    thanks

    kscap Guest

  2. #2

    Default Re: Closing File in DW Catch Close Event

    I don't think there's a specific handler of onClose of a users doent. If you
    explain more of what you'd like to do when the doent closes there may be
    some workarounds you can use.

    Chris
    Adobe Dreamweaver Engineering

    ChrisBank Guest

  3. #3

    Default Re: Closing File in DW Catch Close Event

    [q]Originally posted by: ChrisBank
    I don't think there's a specific handler of onClose of a users doent. If
    you explain more of what you'd like to do when the doent closes there may be
    some workarounds you can use.

    Chris
    Adobe Dreamweaver Engineering[/q]

    basically when the user closes the file i wanted to write some information to
    an independent text file.



    kscap Guest

  4. #4

    Default Re: Closing File in DW Catch Close Event

    i was able to point the close menu to a file which included my script t write
    to a file.

    However, is there a way to get at the action or code behind when a user
    clicks the "x" to close the indivudal file tab? and also to grab a hold of the
    same thing when they click the "x" to close the application?

    kscap Guest

  5. #5

    Default Re: Closing File in DW Catch Close Event

    Maybe you gather all the information you need in an _onOpen command and write it all out at once in a Shutdown command when the application quits.

    Chris
    Adobe Dreamweaver Engineering
    ChrisBank Guest

  6. #6

    Default Re: Closing File in DW Catch Close Event

    I had a similar problem with my Extra File Functions toolbar. I ended up
    using the onSave command files instead, which basically gives you a similar
    thing.


    --
    --
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    [url]http://www.tom-muck.com/[/url]

    Cartweaver Development Team
    [url]http://www.cartweaver.com[/url]

    Extending Knowledge Daily
    [url]http://www.communitymx.com/[/url]

    "kscap" <webforumsusermacromedia.com> wrote in message
    news:f5bo8r$ff0$1forums.macromedia.com...
    >i was able to point the close menu to a file which included my script t
    >write
    > to a file.
    >
    > However, is there a way to get at the action or code behind when a user
    > clicks the "x" to close the indivudal file tab? and also to grab a hold of
    > the
    > same thing when they click the "x" to close the application?
    >

    Tom Muck Guest

  7. #7

    Default Re: Closing File in DW Catch Close Event

    The onSave command doesnt help me in this situation because i need to key off
    when the user closes the file(s) or application.

    i noticed that there is the Exit Ctrl+Q in the file menu but i cannot seem to
    locate this menu item in the menus.xml file. Is it labeled as something else?
    or is it included in a different file?

    Also, once again is there anyway to get at the code behind when the individual
    "x" is clicked on each file or the "x" on the application itself?

    thanks

    kscap Guest

  8. #8

    Default Re: Closing File in DW Catch Close Event

    I don't think there's a way to know exactly when a file is closed. You can keep
    a global list of opened files and periodically use dw.getDoentList() to see
    when a file is no longer open. Then you'll know it was closed sometime between
    your current check and your previous check.

    Chris
    Adobe Dreamweaver Engineering

    ChrisBank Guest

Similar Threads

  1. Replies: 0
    Last Post: March 19th, 07:39 AM
  2. item editor for catch event.
    By Linh ??p trai in forum Macromedia Flex General Discussion
    Replies: 5
    Last Post: May 8th, 04:59 AM
  3. Catching event before a window close
    By rene2233@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: June 10th, 12:50 PM
  4. Browser Close Event
    By Navin in forum ASP
    Replies: 1
    Last Post: September 4th, 09:14 AM
  5. how to detect Browser close event.
    By sm mehta in forum ASP.NET
    Replies: 4
    Last Post: July 29th, 07:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139