Closing File in DW Catch Close Event

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  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. Similar Questions and Discussions

    1. item editor for catch event.
      I make the app, it used data grid editor item is combo box, if i want to catch event 'change' of ComboBox with id="inlineEditor" but i don't known...
    2. Catch 22 with file removal or mysql queries?
      I'm probably missing something here. I want to write some code to: Delete the contents of a folder if that happens successfully carry out a...
    3. Catching event before a window close
      Hi, The DocWatch SDK example shows how to catch the events when a document closes. However these events occur after the window is alreasy closed....
    4. Browser Close Event
      which event is fired when a browser is closed. i want to call asp page which deleet some files on the server. i tired using onunload event but it...
    5. how to detect Browser close event.
      Hi, I have a web Application that must be licensed. When Customer buys 2 licensees for my application they can only have 2 copies open at a time....
  3. #2

    Default Re: Closing File in DW Catch Close Event

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

    Chris
    Adobe Dreamweaver Engineering

    ChrisBank Guest

  4. #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 document. If
    you explain more of what you'd like to do when the document 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

  5. #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

  6. #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

  7. #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" <webforumsuser@macromedia.com> wrote in message
    news:f5bo8r$ff0$1@forums.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

  8. #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

  9. #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.getDocumentList() 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

Posting Permissions

  • You may not post new threads
  • You may 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