Behaviors without helper functions

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

  1. #1

    Default Behaviors without helper functions

    Hi all, I'm trying to create a behavior that doesn't require a behavior
    function, is this possible using the behaviors API?
    Dreamweaver requires a behaviorFunction() function in behaviors, and
    returnig an empty string results in a message "The Action will not be
    applied".

    Is it possible to insert behaviors without a behaviorfunction?
    Sure I can create proxy functions that in turn call the actual command (eg
    alert()) but this seems a lot of overhead to put into the document.

    Joris

    Joris van Lier Guest

  2. Similar Questions and Discussions

    1. Shockwave Helper
      I'm currently running Shockwave 10 and have noticed a "Shockwave Helper" icon in my system tray lately. Exactly what is the Shockwave Helper that...
    2. Acrobat IE Helper error
      About half the time I close Internet Explorer (v6), I get an "can't read" error identifying Acrobat IE Helper as the culprit. I'm looking for a way...
    3. Camino helper app
      >>After upgrading from Chimera 0.6 to Camino 0.7, my pdf downloads I've done that repeatedly but it doesn't help. I downloaded and installed...
    4. popup calendar helper
      Can anyone direct me to any resource or explain how to use the following calendar helper within Dreamweaver 4.0? This was written for MX, which I...
    5. Hardcode user for helper.exe
      I have an ASP.Net app call another program, "helper.exe", on its same server. I want the helper.exe to always have a user = Administrator (as...
  3. #2

    Default Re: Behaviors without helper functions


    If you read the Extension help you'll see that certain functions are
    indeed required by each type of Extension, whether Behavior, Command, or
    Object. And certain methods are disallowed by each type as well.

    --


    E. Michael Brandt

    [url]www.divaHTML.com[/url]
    divaPOP : standards-compliant popup windows
    divaGPS : you-are-here menu highlighting
    divaFAQ : FAQ pages with pizazz

    [url]www.valleywebdesigns.com[/url]
    JustSo PictureWindow
    JustSo PhotoAlbum

    --
    E Michael Brandt Guest

  4. #3

    Default Re: Behaviors without helper functions



    "E Michael Brandt" <michael@valleywebdesigns.com> wrote in message
    news:fb3rqv$qv3$1@forums.macromedia.com...
    >
    > If you read the Extension help you'll see that certain functions are
    > indeed required by each type of Extension, whether Behavior, Command, or
    > Object. And certain methods are disallowed by each type as well.
    >
    Yes i have the manual in front of me, i'm building a behavior to call
    commands in the AIR runtime, the air object is just available in the
    document when the AIRAliases.js is included, it doesn't need a "helper"
    function.
    So what i'm doing now is inserting a proxy function to call the original
    function, return the name of the proxy function from behaviorFunction and
    wrap the call, that just seems like a lot of overhead.

    Joris



    function AIR_exec(cmdName) { //v1.0
    if(typeof air != 'Object'){
    alert('ERROR: AIR object not loaded, please include AIRAliases.js');
    } else {
    var cmd = 'air.'+cmdName+'(';
    for(var i=1; i<arguments.length; i++){
    cmd += (i==1) ? arguments[i] : ','+arguments[i];
    }
    cmd += ')'
    eval(cmd);
    }
    }

    //Return the name of the function that we want to be inserted into the
    user's document.
    function behaviorFunction(){
    return "AIR_exec";
    }

    //Returns the actual function call string that will be inserted into the
    event handler
    function applyBehavior() {
    addAIRAliases();
    return "AIR_exec('trace',"+document.theForm.traceMessage. value+")";
    }

    Joris van Lier Guest

  5. #4

    Default Re: Behaviors without helper functions

    In exchange for this overhead, you have the DW API adding all the
    functionality of the Behaviors Window and its helper functions,
    including removal of all your code from the head of the page when you've
    deleted the last instance of yoru behavior from the body, allowing users
    to select events from a dropdown, etc.

    --


    E. Michael Brandt

    [url]www.divaHTML.com[/url]
    divaPOP : standards-compliant popup windows
    divaGPS : you-are-here menu highlighting
    divaFAQ : FAQ pages with pizazz

    [url]www.valleywebdesigns.com[/url]
    JustSo PictureWindow
    JustSo PhotoAlbum

    --
    E Michael Brandt 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