How to fire TreeEvent from within Automation Framework(ActionScript)?

Hi,
I am using the Adobe Automation Framework to write a testing environment.
Here, I am getting the automation object (IAutomationObject) and want to dispatch a TreeEvent using it (possibly with IAutomationObject.replayAutomatableEvent(). I am not getting the correct way to accomplish this.
Can anybody help me?

I'm not very familiar with the Automation framework, but I think you're getting your path's crossed.  You're TreeEvent should really only be tied to the tree you're working with and should be the handler for all items in the Tree.
If you're simply trying to automate the tree opening for you...I would think that the Automation framework had some funtions to take an object and an event that should it do probably based on a timer value, but I'm not too familiar with Automation in Flex.  From here I can't really help you as I have never messed with the Automation Framework...
I came across this in a quick google, so hopefully this helps:
http://livedocs.adobe.com/flex/3/html/help.html?content=functest_components2_10.html

Similar Messages

  • How to fire TreeEvent from ActionScript?

    Hi,
    I want tp fire a TreeEvent (TreeEvent.ITEM_OPEN,TreeEvent.ITEM_CLOSE,etc.) from ActionScript.
    I want to be able to open branches, double-click node(leaf),etc from ActionScript.
    Can anybody provide an example or suggest  a way to accomplish this.
    Thanks,
    Pradeep.

    I'm not very familiar with the Automation framework, but I think you're getting your path's crossed.  You're TreeEvent should really only be tied to the tree you're working with and should be the handler for all items in the Tree.
    If you're simply trying to automate the tree opening for you...I would think that the Automation framework had some funtions to take an object and an event that should it do probably based on a timer value, but I'm not too familiar with Automation in Flex.  From here I can't really help you as I have never messed with the Automation Framework...
    I came across this in a quick google, so hopefully this helps:
    http://livedocs.adobe.com/flex/3/html/help.html?content=functest_components2_10.html

  • How do I shutdown from within Genome??

    How do I shutdown from within Genome??
    There is only a logout option - and that do not work.
    If I open a terminal and enter init 5 nothing happens.
    Or so it seems some services maybe stop.
    BUT there is no logoff and shutdown of Genome. So I swicth
    off my pc and next time I boot up my file system was corrupted.
    FSCK did not work I end up install everything this time use bypass
    option and install the patches for PC-Solaris 8.
    How do I go to a command line environment within Genome
    a .dtconfig stop ?? Will this let Genome come down without
    booting up and loosing my system again??

    ok... i figured it out... a 'Sprite' is really also a DisplayObjectContainer... so if i make my class an extension of Sprite i can 'addChild' to the Sprite and then add them all to the stage at once by adding Sprite to the stage...

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • OWSM Policy - how to access subject from within protected service

    I am setting up a new instance of SOA Suite 11g for integration purposes at my organization. I am planning to use predefined WSM policies to protect the services (see http://download.oracle.com/docs/cd/E12839_01/web.1111/b32511/policies.htm).
    Most communication is server-to-server (e.g. HR sending data to CRM), so it would make sense to use something like X.509 (i.e. oracle/wss11_x509_token_with_message_protection_service_policy). However, I have a requirement that the underlying services (BPEL processes, for example), must know the subject (i.e. the server) that sent the message. For example, did this incoming message come from the HR system or the CRM system. This is used internally by the BPEL process for audit logs and other things.
    We also use OAM, so I will likely eventually use the oracle/wss_oam_token_service_policy to verify ObssoCookie values. In those cases, the underlying Java service or BPEL process will need to have access to the username of the authenticated user.
    I've searched and searched the documentation, and I cannot find any instructions about how to access details about the authenticated subject (such as username, roles, or X.509 properties) from within the protected service, whether it be a Java-based service, a BPEL process, or anything else.
    I did find some information about how to read SOAP header values from within Oracle BPEL processes (see http://chintanblog.blogspot.com/2007/12/insertextract-soap-headers-in-bpel-it.html). However, this looks like it will only work if I use the WSS UsernameToken policy (e.g. oracle/wss_username_token_service_policy), since that is the only policy where the actual subject identifier (username) is specified in a SOAP header.
    Do the other policies (X.509, SAML, and OAM) provide a mechanism to convey properties of the authenticated subject to the underlying service? If so, where is this documented? Thanks much!
    Sincerely,
    Nathan Kopp

    Is it wrong question or wrong thing to do?
    Let's make it a little bit easier/better/worse:
    How can I change policy permissions at runtime?

  • How to run mxmlc from within an Adobe AIR application

    Hi. I'm at the planning stages of writing an Adobe AIR application that needs to be able to run the mxmlc Flex compiler from within. I don't know if this is possible, but if it is, then there are 2 things I don't know how to do:
    1) I don't know what classes to use to execute mxmlc from within my AIR application;
    2) I don't know how to register a listener to such so that the application will know when mxmlc has finished its execution.
    Any help on this would be immensely appreciated. Thanks in advance.

    There is a detailed article on Runtime
    [url http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html]here

  • How to access script from within Bridge

    I have considerable experience scripting InDesign, but this is my first
    Bridge script...
    The following script does what I want from within the ESTK, but I have
    no idea what to do to make it runnable from within Bridge... :(
    Any pointers?
    var brSel = app.document.selections[0].spec.toString();
    var bt = new BridgeTalk();
    //brSel = brSel.toSource();
    bt.target = "indesign";
    theScript = "var IDsel = app.selection[0]; \n";
    theScript += "if (IDsel instanceof Graphic){ \n";
    theScript += "var theGraphic = IDsel;\n";
    theScript += "}else{\n";
    theScript += "var theGraphic = IDsel.graphics[0];\n";
    theScript += "}\n";
    theScript += "var theFile = File(\""+brSel+"\");\n";
    theScript += "theGraphic.itemLink.relink(theFile);\n";
    theScript += "theGraphic.itemLink.update();\n";
    bt.body=theScript;
    bt.send()
    Thanks,
    Harbs

    Harbs,
    There isn't anything like a scripts palette in Bridge.
    Because your working on a selection, you'll need to add a menu item to bridge.
    You can also navigate to the folder containing the scripts and double click it. But then the script is the selection...
    Bob

  • Fire event from within another event ?

    It seems that an event fired from within another event does not
    actually execute its code until the firing event completes. The fired
    event's Time value in its Event Data Node indicates the time that it
    was told to execute, but using GetTickCount calls shows that its code
    does not execute until the firing event is finished. This happens
    whether Value Signaling is used to generate a Value Change event or if
    CreateUserEvent and GenerateUserEvent is used. Is this because events
    are placed in a queue ? This behavior is different from Delphi for
    example where the fired event executes right away when called from the
    firing event (before the firing event completes).
    I have an event that executes upon a button value change. I would
    like that same event's code to execute when another button is pressed,
    but also have other code in the second button's event execute after
    that first button's event's code completes. Is there another way to
    accomplish this ?
    Steve

    > It seems that an event fired from within another event does not
    > actually execute its code until the firing event completes. The fired
    > event's Time value in its Event Data Node indicates the time that it
    > was told to execute, but using GetTickCount calls shows that its code
    > does not execute until the firing event is finished. This happens
    > whether Value Signaling is used to generate a Value Change event or if
    > CreateUserEvent and GenerateUserEvent is used. Is this because events
    > are placed in a queue ? This behavior is different from Delphi for
    > example where the fired event executes right away when called from the
    > firing event (before the firing event completes).
    I'm not that familiar with Delphi, but LV events are asynchronous.
    Window
    s OS has two ways of firing events, Send and Post. The LV events
    are always posted. The primary reason is that the LV events are handled
    by a node, not by a callback. The node you are calling is in the middle
    of a diagram, and reentering it not valid.
    > I have an event that executes upon a button value change. I would
    > like that same event's code to execute when another button is pressed,
    > but also have other code in the second button's event execute after
    > that first button's event's code completes. Is there another way to
    > accomplish this ?
    The best way to reuse code is to use subVIs. Firing events, or rather
    sending events is pretty close in other events to making a function call
    dispatched to anyone interested in the event. The event just hides who
    you are calling and makes you put your parameters in a funny format
    stuffed inside the event. IMO it also makes the code very hard to read
    since you don't know what calls what.
    Instead, just put the code into a sub
    VI and call it whenever you need
    to, from the event structure in one or more locations, and from other
    loops and diagrams.
    Greg McKaskle

  • How to show image from within a symbol

    Howdy,
    EA, Win7
    I've imported an img on to my stage, converted it to a symbol (and unchecked autoplay).
    Then I deleted the img from the stage, the symbol w/img still remains in the Assets > Symbols section.
    What I want to do now is simply have the img (that's inside the symbol) appear when I click on a button/text.
    Is this possible? I've tried...
    sym.getSymbol("image").show();       where "image" is the name of the symbol
    but this doesn't work. What am I missing?
    Thanks for any help,
    R

    Thanks resdesign,
    Looked over the Edge API and it's kinda vague on how to interact with symbols. There's nothing that specifically says 'A symbol must have an instance on the main timelline in order to interact with it'. The API seems to make the assumption that that people automatically know that. Yet when I see something like the following from the Edge JSAPI...
    Access a symbol timeline from the main stage
    To access the timeline of a symbol from the main stage, use the following in your event:
    // Play the symbol timeline sym.getSymbol("symbolName").play();
    ...it makes me think that I can just call up the symbol on to the the main stage without having an instance of the symbol already on the stage/timeline.
    Would be curious to know where in the API it mentions that in order to interact with symbols they must have an instance on the main timeline/stage.
    Cheers,
    R

  • How do you launch from within "Finder" a file to open in nano?

    So i want to be able to click on a file found in Finder and have it open in /user/bin/nano

    I tried creating an Automator Service to open it using applescript, but it won't run from the contextual menu. It works if I run it in the automator window, but doesn't seem to run at all from the Services menu.
    Create an Automator Service that receives files and folders in Finder.
    Add an Applescript Action. Put this in for the code:
    on run {input, parameters}
              repeat with anItem in input
                        tell application "Terminal"
      activate
                                  do script with command "nano " & quoted form of POSIX path of anItem
                        end tell
              end repeat
    end run
    Save it and it should appear in the contextual menu in the Finder.  If it doesn't, select it from the Services menu. For some reason, it sometimes doesn't appear until you run it once.
    The next thing I tried was just creating an Applescript Droplet. Essentially the same code, but you create it in Applescript Editor and save it as an application (also save a script copy, first).
    You can then drag the file onto the Droplet and it will open the file in nano.  If you put it in the Dock, you can drop the file there.
    on open somefiles
              repeat with anItem in somefiles
                        tell application "Terminal"
      activate
                                  do script with command "nano " & quoted form of POSIX path of anItem
                        end tell
              end repeat
    end open

  • How to fire canon from turret

    Dear experts,
    I am making an animated game in which there is a turret that can move either to left or to
    right based on left/right key press.
    Till this part i achieved.
    Now i want that moment i press upper key a cannon ahould fire and must follow the same direction
    of turret till it reaches the first row of screen.
    I am not enough good in trignometry ,however i know it will be used here.I am providing w/e
    info i have.
    Origin of rotation of turret = (468,300) [This is the fixed point of turret and
                                                           turret rotaes with this point]
    cos theta where theta is angle which get + or - as per key action.
    For Rotaion i used Affinetransform t and rotate ().
    Can some one help me ,how to start with this ?

    These methods may be of use to you
        static public double pointDirection(double x1, double y1, double x2, double y2) {
            double direction = radToDeg((double) Math.atan2(y2 - y1, x2 - x1));
            if (direction > 360) {
                direction -= 360;
            if (direction < 0) {
                direction += 360;
            return direction;
        static public double pointDistance(double x1, double y1, double x2, double y2) {
            return (double) Math.sqrt((double) Math.pow(x2 - x1, 2) + (double) Math.pow(y2 - y1, 2));
        static public double lengthDirX(double length, double direction) {
            return ((double) Math.cos(direction * (double) Math.PI / 180) * length);
        static public double lengthDirY(double length, double direction) {
            return ((double) Math.sin(direction * (double) Math.PI / 180) * length);
        }

  • How to delete masters from within Aperture

    Hi all,
    I have searched the discussion forums for this one, with no luck. 
    What I want to do is import say 500 images from a shoot, and review them in Aperture.   I will delete 200-300 of them.  I'd like to look at them in Aperture, and if I don't like the image, delete it.  But I want to delete the underlying image file in the filesystem as well.
    I have tried File | Delete Original Image and All Versions followed by emptying the Aperture trash and then emptying the system trash.  Does not work.
    I am on Aperture 3.5.1 and OSX 10.9.2.
    Any suggestions would be much appreciated.
    Thanks,
    Brian

    It's a common mistake If you set the import pane to copy the originals into the library (which is the Aperture default)  then you wind up with two copies of the original and deleting it from Aperture doesn't delete the original original 
    As a suggestion start off with managed originals, there is less to deal with while you get use to the rest of Aperture. You can always turn the managed originals into referenced originals down the road by using the Aperture command File->Relocate Originals.
    regards

  • How to detect OS from within java?

    hi,
    i have a method that reads all the classes in a directory. to do this i use the code
    File dir = new File(DIRECTORY_PATH);
    the variable DIRECTORY_PATH is a windows based directory path and so if i port my app to a mac it will not work 'cos of the different directory structure.
    is there any way i could detect the OS before this method is called so i can change the directory path structure?
    many thanks in advance
    benny

    im reading all the classes available in a dir.
    i then populate a list box with the classes available
    the user can then select the classes he wants created from this list.the code goes something like this:
    File dir = new File(DIRECTORY_PATH);
    String [] classes = dir.list( new FilenameFilter()); //filter gets files ending with .class
    then i populate the list with these, user selects wanted classes and presses create.
    then i use Class.forName() to create the specified classes.
    will this work on both OS? is there a better way to do this if not?

  • Eye Candy: How to remove it from within Lion?

    hey guys, i'm starting to get the hang of the Terminal and in the future i'd prefer to use that over the GUI. it seems like the GUI uses up a lot of RAM and CPU cycles so i was wondering if there was a way i could 'reduce' it to something like how Windows7 allows the user to go back to 'classic' mode to increase performance. is there any way to do this in Lion? i just want to use my apps: Word, firefox, VLC without the fancy GUI.    
    thanks

    You can use the Terminal for any file based operation (copy, move, delete, create or remove folders, etc.). It also has all of the powerful UNIX apps for IP tracing and pinging and various other functions, but has little practical use for applications meant for a GUI desktop.

  • How to print item from within app?

    How can I create a discrete text element inside an ipad app that can be printed? Something like shopping list etc
    Would also like to be able to email to self and/or share. Using dps cc, app for ipad only.
    thx for any tips!

    We do not support printing in DPS. Single Edition applications do not support sharing.
    Neil

Maybe you are looking for

  • GL account in Invoice Verification

    Dear Experts, Usually, IR doc is Dr: GR/IR Cr: AP-vendor But, My document is Dr: GR/IR Cr: GL account I don't know where is this GL account from, Is it configurable? otherwise, how does SAP find and post this GL account instead of AP-vendor? Before t

  • Why can't I open files with double click, etc?

    Hello, all, I have been having problems with my MacBook (Aluminum late 2008, I think, OS 10.5). It runs slowly; files on the desktop and in my "Macintosh HD" often won't open with double-click but have to be opened with File-->Open; there are Word Wo

  • Lightroom doent see the .icc profile - color profiles

    Lightroom 5 doent see the .icc profile -they are in the correct folder  C:\Windows\System32\spool\drivers\color - it sees some but not all - I have tried everything - even installing Lightroom again. Nothing seems to work I am running windows 7 profe

  • SQL join with Nested tables

    Please look at this tables and help me how i do get result in "Result tbl" tables ..

  • COPY FGroup M61N in ECC 5

    Hi Folks, There is a strange issue. We are able to copy standard function group in ECC6 and 4.7 but we are unable to do the same in ECC 5. When we tried to copy it is giving error saying TOP include is inactive though it is active. Can any one provid