A Question of scope

I'm trying to download report the progress of a download of the FileReference class. Anyone know how to get the onProgress event, with the file reference and loads/bytes bytes total return parameters to a function whose range is the class rather than the listener object or the FileReference object?

I know brought is a common problem, but the solutions I've seen involve addEventListener, that AFAIK only applies to components, and I don't see a way to get back via the delegate class settings.

Any help would be much appreciated.

Thank you guys.

Both answers made me think a lot harder about listeners (I use delegates to avoid this) and I finally decided to do this - should help someone else with the same brain block as me--it sticks with the basic documented examples of the listener, but also gives the scope I was looking for.

Tags: Adobe Animate

Similar Questions

  • Questions of scope ADF mobile

    Do the separate thread for the second question in this thread. https://forums.Oracle.com/message/11097822#.

    The question is:

    How to ensure that an instance of the bean is not created when I go to a new page of the AMX. I tried to use all scopes (PageFlow and Application) of the bean, but each of them create a new instance of the bean when the command is in the next page. Then the variables no matter what I put in the first page is not taken to the next page. Here's how I wrote my app.

    Click on a button on FirstPage to call the method of a bean using actionListener-> function call DB SampleBean method and set of values to the variables in this bean members-> go to the second Page based on the action of the taskflow.

    I added the code here as TestNestedIterator2.zip,

    Add the code below in build report.java. Because the variable is declared in pageFlowScope, its value is cached by default so you need firePropertyChange UI to update the value one. You have added the call to propertyChangeSupport.firePropertyChange, but you missed the party sub. If you automatically generate code to inform listeners jdev should do it for you.

    {} public void addPropertyChangeListener (PropertyChangeListener l)

    propertyChangeSupport.addPropertyChangeListener (l);

    }

    {} public void removePropertyChangeListener (PropertyChangeListener l)

    propertyChangeSupport.removePropertyChangeListener (l);

    }

    As Frank, said using the same java class bean as well as DC may not be a good design practice, but it should work without any problems. Please separate your code from generateReport in a bean and dc as you see fit.

    Thank you

    Arun

  • Question of scope of Flash 8

    In the following class can someone tell me how I would call the function doSomething() since myObject.onMouseDown = function ()?



    convenient class extends MovieClip {}
    var myObject:Object;
    //
    public void Practice() {}
    MyObject = new Object();
    myObject.onMouseDown = function() {}
    call doSomething here
    doSomething();
    };
    Mouse.addListener (myObject);
    }
    //
    public void doSomething() {}
    trace ("done something");
    }
    }

    Figured it out.

    convenient class extends MovieClip {}
    var myObject:Object;
    //
    public void Practice() {}
    MyObject = new Object();
    //
    var I: practice = this;
    //
    myObject.onMouseDown = function() {}
    call doSomething here
    me.doSomething ();
    };
    Mouse.addListener (myObject);
    }
    //
    public void doSomething() {}
    trace ("done something");
    }
    }

  • question of scope for html text

    I am creating a page of details about a given object. I want to display the date of creation (one of the db columns) as a static text field. If I put the source of the text field to be the result of a sql query, I get the correct result by using a hidden object on the page that holds the primary key of the object. In any case, I would use the date format, but it says formatting works only on sources that are of type db column. So, how can I write the source so that it fits into this mold?

    Ok... I did the following:

    -- Created a table for test porpuses:
    create table dummy (dat date);
    insert into dummy values (to_date('080412 10:11','yymmdd hh24:mi'));
    insert into dummy values (to_date('080816 11:34','yymmdd hh24:mi'));
    insert into dummy values (to_date('080723 14:56','yymmdd hh24:mi'));
    commit;
    
    -- A functionn:
    create or replace
    FUNCTION since_func(p_date DATE) RETURN VARCHAR2 IS
      v_months    NUMBER;
      v_days      NUMBER;
      v_hours     NUMBER;
      v_minutes   NUMBER;
      v_Seconds   NUMBER;
      v_diff      NUMBER;
      v_diff0     NUMBER;
      v_diff1     NUMBER;
      v_diff2     NUMBER;
    BEGIN
      v_diff := sysdate - p_date;
    
      v_days := FLOOR(v_diff);
    
      v_diff0 := MOD(v_diff,1);
    
      v_hours := FLOOR(v_diff0*24);
    
      v_diff1 := Mod(v_diff0*24,1);
    
      v_minutes := FLOOR(v_diff1*60);
    
      v_diff2 := MOD(v_diff1*60,1);
    
      v_seconds := FLOOR(v_diff2*60);
    
      RETURN (v_days||' days '||v_hours||' hours '||v_minutes||'  minutes '||v_seconds||' seconds');
    END since_func;
    
    -- Try it:
    select since_func(dat), dat from dummy;
    

    I can't take full credit for this, I found this on http://www.oracle.com/technology/oramag/code/tips2004/tip6.html. On the page you can find other solutions as well, for example, you can also do this by using SQL.
    I think that you will find something that goes on your needs on the page.

    / Daniel

  • A mounted drive is suddenly nonexistent after Get-ChildItem is used with a wildcard

    I use this function to mount the drive

    Function MountDrive() {}

    $name = "Functional_Storage".

    $datastore = get-Datastore $name

    New-PSDrive-location $datastore - name VimDatastore - PSProvider fs-root "\".

    CD FS:

    }

    I now try to do a directory listing using a wildcard

    PS fs:------> Get-ChildItem "something."

    Get-ChildItem: cannot find drive. There is no such thing as a disk with the name "fs".

    Online: 1 character: 14

    + Get-ChildItem < < < < "something."

    + CategoryInfo: ObjectNotFound: (fs:String) [Get-ChildItem], DriveNotFoundException

    + FullyQualifiedErrorId: DriveNotFound, Microsoft.PowerShell.Commands.GetChildItemCommand

    However, if I had just issued a Get-Childitem, no error does occur... How is it that fs becomes non-existent that if I use a joker?

    I suspect this might be a question of scope.

    You have configured the psdrive inside a function, but you seem to perform the Get-ChildItem outside the function.

    I think that the psdrive is available inside the function.

  • Dynamic region: task flow interfering with eachother

    JDeveloper 11.1.1.6

    I followed the tutorial of Shay on dynamic regions: https://blogs.oracle.com/shay/entry/adf_dynamic_regions_switching_just

    I then added create/edit buttons at the bottom of the departments and the pages of the employee.

    I added the control flow in the workflow to create and edit actions, they must go to another page containing an ADF form to create or edit a Department or employee.

    It works fine for departments, if you click on create in the departments table, and then you get to create a new Department.

    The problem is for employees, when you click on create, updates of the region and the departments table shows yet once, instead of display the employee update page.

    I think it's a question of scope, but I don't know what I should check or how to debug this.

    Any tips? Thank you.

    What effect have you bean where the taskflowIs is stored in?

    It should be at least within sight. If you have created is as in the tutorial, it is created in the scope of the request.

    Open the adfc-config. XML in preview mode, and then select the managed bean section. Select the bean, then change the scope to display. Then try again.

    Timo

  • Problem with multidimensional table

    Hey guys,.

    I had some difficulty trying to understand what im doing wrong with my multidimensional table, Im trying to access all the information in the tables looks like I do well, the only problem is when I add the info for the text fields its only adding the last element of each array in the fields even though the functions of trace said its getting all the information! My Code:

    import flash.text.TextField;
    var textArray:Array = new Array();
    var wordSearch:Array = new Array)
    ["%", "%", "%", "%", "%"],
    ["s", "%", "s", "%", "%"],
    ["h", "%", "h", "o", "t"],
    ["o", "%", "e", "a", "r"],
    ["p", "%", "e", "i", "g"]
    );
    for (var n: int = 0; n < 25; n ++)
    {
    var theText:TextField = new TextField();
    theText.width = 50;
    theText.x = theText.width * n;
    textArray.push (theText);
    releases with only the last elements in tables 25 textfields are generated as expected.

    addChild (textArray [n]);
    }


    for (var l:String in Word search)
    {
    for (var m:String in [l] wordSearch)
    {
    textArray [l] .text = wordSearch [l] [m];
    outputs with all the letters

    trace ("Hello" + textArray [l] .text);

    }
    }

    at first I thought it was a question whose scope which is why I put the textFields in a table, but it's not. Any help would be appreciated, thanks for your time.

    It is is not clear to me that textfield you speak, but that that you assign things is attributed (=) where perhaps mean you to add it instead.  Perhaps mean you to use...

    textArray [l] .appendTtext (wordSearch [l] [m]);

  • Range variable problem

    Here is the snippet of my function.

    He reads the values of the XML file and get the URL of an Image file for example Abc.jpg.

    To read the URL, I create an empty movieclip to create animations. But now my problem is that I can't read one of the variables to store the XML values because it is not in the scope. I have tried to look for a workaround solution and failed again. Little help?

    private function init (): Void {}

    var polaroid_image:String;

    var myXML:XML = new XML();

    myXML.ignoreWhite = true;

    myXML.load ("content.xml");

    var myImage = myXML.firstChild.childNodes;

    myXML.onLoad = {function (success)}

    If (success) {}

    myImage = myXML.firstChild.childNodes;

    polaroid_image = myImage [1].firstChild.childNodes;

    trace (polaroid_image);

    }

    }

    trace (polaroid_image);  / / PROBLEM HERE: output 'undefined'

    This ._border = 10;

    this.initSize ();

    this.setPosition (48.35).

    this.createBackground ();

    var _mcPolaroid:MovieClip = this._mcBg.createEmptyMovieClip ("polaroid_mc", this._mcBg.getNextHighestDepth ());

    _mcPolaroid.loadMovie (polaroid_image, "polaroid_mc"); / / PROBLEM HERE: as the value is 'undefined', it cannot be used.

    _mcPolaroid._x = _border;

    _mcPolaroid._y = _border;

    var _rmcPolaroid:MovieClip = this._rmcBg.createEmptyMovieClip ("rpolaroid_mc", this._rmcBg.getNextHighestDepth ());

    _rmcPolaroid._yscale * =-1;

    _rmcPolaroid._y = _rmcPolaroid._y + _it _border;

    _rmcPolaroid._x = _border;

    }

    It is not a question of importance.  You try to deal with a value that is not yet defined.  Just because you place this code after the onload function does not mean it runs after the onload function.  The onload function sits and expected that the loading completes, but the rest of the code after it is running before loading is performed.

    You must have all the treatments that are supposed to happen once the loading is completed within the onload function.

    You can confirm that this is not a question of scope by assigning a value to polaroid_image when it is declared... you should see this value when you run...

    var polaroid_image:String = 'value before loading file ';

  • Component of the tree open to extended status

    I built a small "framework" to view the demos-, a component of the tree XML-driven to provide access to the published files and demo segments.

    I would like the table of contents in the tree component to open to extended status, but I'm having no luck with myTree.setIsOpen.

    The shaft connects to the XML OK - I can expand/collapse, etc... and it looks great. But I cannlt get the tree to open wider.

    The code I try to open the table of contents expanded:

    this.demoTOC.setIsOpen (this.demoTOC.getTreeNodeAt (0), true);

    OR

    this.demoTOC.setIsOpen (this.demoTOC.getTreeNodeAt (0) .getTreeNodeAt (0), true);

    The XML code that is connected to the tree:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < table of contents >
    < demosection label = "MY TITLE" >
    < ID = "demo 00demo.flv" label = "title01" isBranch = "true" / > "
    < ID = "demo 01demo.flv" label = "title02" isBranch = "true" / > "
    < ID = "demo 02demo.flv" label = "title03" isBranch = "true" / > "
    < ID = "demo 03demo.flv" label = "title04" isBranch = "true" / > "
    < / demosection >
    < / table of contents >

    If anyone can tell what I'm doing wrong, I am willing to learn.

    THX.

    Never mind - figured it out.

    It was a question of scope - the call of the form setIsOpen within the XML loader function.

  • Flex Builder 3

    Hi, I'm new to flex (basically a Java programmer). I have a few questions. I'm using Flex Builder 3.

    (1) what is the difference between the class Action Script and the file Script of action?
    (2) when a class Action Script generated, I think flex builder puts in cache even after that I have to delete the file. So how to remove the cache too.

    Please give me the answer, if this isn't the right forum, guide me on where I can get information.


    Thank you


    They may have the same name, but it is not advisable, because you tend to run into this kind of problem. The question is scope. Your error takes place on this line:

    loginMaster = new LoginMaster;

    It is really important to remember here that every MXML file is pre-compiled in a class ActionScript and MXML components are referenced by the rest of the system in exactly in the same way that classes ActionScript - because they are, in fact, the ActionScript classes.

    So when you say "new LoginMaster", the compiler must find a class named LoginMaster. At this point, the compiler is not aware of what classes began its life as a component MXML; they are now all classes. If the compiler will pick up the LoginMaster definition that has a scope - the closest at hand - which, because you actually write this line within the MXML LoginMaster component class, solves the component class itself, not your other class in a different package, which also happens to share the same name.

    There are ways around this, but I have to recommend not to have classes AND MXML components with the same name, or you find yourself continually encountering difficult to diagnose such problems. If you have just renamed your class AS something like LoginMasterModel, or LoginMasterView MXML component, these problems could disappear. Your code will be also much easier for others to understand in the future.

    Hope that helps and sorry for the delay in responding - I just found a bunch of Adobe Forum notifications in my Yahoo spam folder, so I'm catching up on several threads that I think are dormant.

    -Chris

  • Question &amp; VI credentials of the scope again

    Just trying to keep quickly my powershell...

    So I created a .ps1 include file that I load in my PS profile by making a point scoring. .\VIinclude.ps1 ... Some of the functions I want to put here are common things as VC connect and disconnect-VC, also define some global variables. For example, these functions to connect to VC using a file of credentials of cookie in read-only format for the statement of the functions of type. The issue I noticed is, when I call these functions of PS by simply entering the function, authentication works and holds for this session. But when I run other scripts in the session that call these functions in the include file, the credential is not retained.  (for example a script dump-vms-in - cluster.ps1 calling definied connect-VC in the include file, does not work, but if I run VC plug then dump-vms... all works)

    What are the rules for the determination of the scope for this kind of thing?

    Question - is there a way to prevent the automatic connection using the currently logged-on user is connect-viserver ?  IN many cases, I want to force PS scripts to always ask authentication, because my rule of thumb is to run scripts with as little as possible privilege on VC/Resource Pools etc to do the job.

    Happy to be told if go and RTps.1FM but I am a prime, second VCP PS guru-wannabe.

    Thanks Peeps, happy vSphereing

    /Kimono/

    I suspect that the Connect-ViServer is called from a function in the include file?

    Then the framing rules begin to play, see also to connect-viserver to remain persistent through different functions..

    This thread also contains a pointer to course of PowerShell of Tobias (strongly advised to have a look).

    You can force a prompt for a username/password by practice

    Connect-ViServer -Server  -Credential (Get-Credential)
    
  • Question on the scope, theoretical

    Hello

    I have a question on the scope. It's something that I'm probably not on Java and OBJECT oriented programming.

    I am writing a program, that can handle several documents (images) of simple image processing. Now I have a DialogNewGUI with an actionPerformed method. In this method, I test for the appropriate action command and if NEW is the action command that I should create a new document (for example, a Document class). What worries me is that if I create an instance of a Document class in the scope of the actionPerformed method, we only see in this method, right? So, how do I access these Document instances newly created throughout the entire application? I think, I need a kind of global variable holding a reference to the Document instance, so I can work on it from anywhere in the code, but I don't think that there is such a thing in Java as global variables. I thought that, maybe, I need to create a class, called Basic, to contain the references in the world, but I don't know if I'm not running in the same issue there either.

    Someone has an idea? Thank you

    PR

    It is not clear what exactly you're trying to do. If you want to keep track of documents (images) which currently manages your image processing system, you will need to add in some kind of a collection - Let's say a card openDocuments, which in turn is handled by another class - let's call it imageProcessingSystem. You should then be able to add and to remove documents from the collection and to keep track of documents course of treatment.

  • Question about SET log_buffer and SCOPE = SPFILE

    Good evening

    I am teacher Oracle. In the book I use it says that I have to specify the SCOPE = SPFILE in order (because it is a static parameter):
    alter system set log_buffer = 6m scope=SPFILE;
    It is said that if I specify the scope as indicated, the command will succeed, but I still get the error:
    SQL> alter system set log_buffer = 6M scope=SPFILE;
    
    alter system set log_buffer = 6M scope=SPFILE
                     *
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    
    
    SQL> show user
    USER is "SYS"
    SQL>
    I am logged in as "SYS as SYSDBA.

    My question is: why it is not working? (the book says it should).

    Thank you for your help,

    John.
    SQL> alter system set log_buffer=7249920 scope=spfile;
    
    System altered.
    

    It works for me.

  • question on the scope of the stage object

    Hello, all.  I am currently working with containers and I have a question about the stage object.

    I have 2 files in my program

    (1) app.as

    (2) stuff.as

    Stuff.As is a library of common user interface that I build.  I'm trying, in this document, follow these steps:

    stuff(){
    
    makeUI();
    
    }
    
    makeUI(){
    
    myContainer.setSize(stage.Stagewidth , stage.Stagehight);
    
    }
    

    Flash crash when running, saying that there is a reference not valid for a null object.

    If main.as is the file of the application, how can I get the stage object to be valid / available inside my stuff.as file?

    -Thanks for your time!

    Hey dtater,

    I met the same problem too in the past. the only way to have access to the stage is to have the class that never work added to the stage by a parent object that is already on scene. If an object has not yet been added to the stage, his stage value will be null.

    the best way to work with this set of return must have an event listener defined in your file stuff.as to listen for Event.ADDED event in your stuff() constructor like this:

    this.addEventListener(Event.ADDED, onAdded);
    

    and then in your event handler function onAdded:

    private function onAdded(e:Event):void{     // this event gets triggered by other objects, so we check to make sure it the right object     if (e.target == e.currentTarget)      {          makeUI();
    
         }
    
    }
    

    in this way the makeUI funciton only will be called when it has access to the scene.

    Here are more details on the event Event.ADDED:

    http://www.Adobe.com/LiveDocs/Flash/9.0/ActionScriptLangRefV3/Flash/events/event.HTML#added

    hope that helps. Good luck!

    Edit: I also forgot to add that the Event.ADDED event will be called when you addChild (stuff); in your main application.

  • Question of Lumetri Scopes

    What is the difference between 8-bit and float?

    Thank you

    Bryce

    Hi Bryce,.

    What is the difference between 8-bit and float?

    Regarding the Lumetri Scopes, it refers to how a file can be accessed: Re: Color correction in first with Lumetri on the Raw DNG sequence does not... any suggestions?

    Thank you

    Kevin

Maybe you are looking for