Flex Complete Event

Hi guys,
Just trying to find answers regarding problems with Mac
players on the complete event in flex. Please help. I really need
an alternative to be used in my uploader project. My multiple file
uploader doesn't seem to work in Mac, only the first file was being
uploaded since the complete event is not working, it intends to be
that the other files in queue was not uploaded and has stopped
after the first file.
Any help would be very much appreciated. Thank you in
advance.

Ah I figured it out.  It seems that if I don't call addChild(img) (which I had been commenting out while trying to defer it for processing) then img.load(url) is never called so therefore the Event.COMPLETE won't run just on what I had.

Similar Messages

  • VideoPlayer complete event firing early

    I'm not sure why this is happening, but for some reason the complete event is firing about 5-10 seconds into my minutes long video.
    Here is the code for the VideoPage that loads the video and listens for the events. Does anything seem off to anyone?
    package com.applied.flex.pages
         import com.applied.flex.events.PageEvent;
         import flash.events.ProgressEvent;
         import spark.components.VideoPlayer;
         import spark.events.VideoEvent;
         public class VideoPage extends BasePage
              private var _video:VideoPlayer;
              private var _startTime:uint = 0;
              private var _endTime:uint;
              private var _cuePoints:Array;
              private var _displayedPoints:Array;
              private var resetting:Boolean = false;
              private var seekSafe:Boolean = true;
              public var readyToStart:Boolean = false;
              public function VideoPage(xml:XML,majorType:String,minorType:String,path:String)
                   super(xml,majorType,minorType,path);
                   _video = new VideoPlayer();
                   if(xml..Video[0].@StartTime != undefined)
                        _startTime = xml..Video[0].@StartTime;
                   if(xml..Video[0].@EndTime != undefined)
                        _endTime = xml..Video[0].@EndTime;
                   _cuePoints = new Array();
                   for each(var i:XML in _pageXML.Video.CuePoints.children())
                        _cuePoints.push(i.@OnTime);
                   _video.addEventListener(VideoEvent.READY,doVideoReady);
                   _video.source = path;
                   this.addChild(_video);
              private function doVideoReady(e:VideoEvent):void
                   _video.removeEventListener(VideoEvent.METADATA_RECEIVED,doVideoReady);
                   if(_pageXML..Video[0].@EndTime == undefined)
                        _endTime = _video.totalTime;
                   readyToStart = true;
                   this.dispatchEvent(new PageEvent(PageEvent.READY_TO_START,false,false,0,this));
              public override function startPage():void
                   addListeners();
                   _video.seek(_startTime);
              public override function resumePage():void
                   addListeners();
                   _video.play();
              public override function pausePage():void
                   removeListeners();
                   _video.pause();
              public override function stopPage():void
                   removeListeners();
                   var ar:Boolean = _video.autoRewind;
                   _video.autoRewind = true;
                   _video.stop();
                   _video.autoRewind = ar;
              public function seekPage(seekTo:Number):void
                   if(seekSafe)
                        removeListeners();
                        _video.pause();
                        _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                        _video.seek(seekTo);
                        seekSafe = false;
              private function doSeekSafe():void
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doSeekSafe);
                   addListeners();
                   _video.dispatchEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE));
                   seekSafe = true;
              private function addListeners():void
                   _video.addEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.addEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function removeListeners():void
                   _video.removeEventListener(VideoEvent.COMPLETE,dispatchPageComplete);
                   _video.removeEventListener(VideoEvent.PLAYHEAD_UPDATE,doVidProgress);
              private function doVidProgress(e:VideoEvent):void
                   var scrubObj:Object = new Object();
                   scrubObj.currentTime = (e.currentTarget as VideoPlayer).playheadTime;
                   scrubObj.totalTime = _endTime - _startTime;
                   trace("playheadTime | "+e.currentTarget.playheadTime);
                   trace("end time | "+_endTime);
                   dispatchUpdateScrubber(scrubObj);
                   checkForCuePoint(e);
                   if(_video.playheadTime >= _endTime)
                        dispatchPageComplete();
              private function checkForCuePoint(e:VideoEvent):void
                   if(_cuePoints.length > 0)
                        if( (e.currentTarget as VideoPlayer).playheadTime > _cuePoints[0].toString() && !resetting )
                             var item:Object = new Object();
                             item.point = _pageXML..CuePoints[_displayedPoints.length].toString()+"<br><br>";
                             dispatchUpdateScrubber(item);
                             _displayedPoints.push(_cuePoints.shift());                         

    Not sure if you found an answer to your problem, but I have come across this a few times, and I eventually found that is was a "corrupted" FLV.  It seems as though at a given point in the encoding process, there is a little "skip".  This skip causes the COMPLETE event to fire when there might be a good amount of video left in the file.  Try making the FLV in a different encoding program and see if you still have your problem.

  • [svn:fx-3.x] 9658: Handle complete events where event. target is not of type LoaderInfo.

    Revision: 9658
    Author:   [email protected]
    Date:     2009-08-26 12:53:16 -0700 (Wed, 26 Aug 2009)
    Log Message:
    Handle complete events where event.target is not of type LoaderInfo.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-22710
    Reviewer: Alex
    Tests run: checkintests
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22710
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/preloaders/Preloader.as

    Anyone able to help?

  • Where is the COMPLETE event of s:VideoPlayer ?

    I want to listen to the Event.COMPLETE of the s:VideoPlayer but cannot find the actual loaderInfo object.
    I tried the loaderInfo Object of VideoPlayer and its videoDisplay and videoObject children. They do not dispatch a COMPLETE event.
    Where is the event that dispatches when the video files has finished loading?
    Thanks,
    David

    I think the complete event is dispatched when the playhead reaches the duration for playable media.
    You can probably just use the bytesLoaded event and check if the bytesLoaded == bytesTotal, as seen in the following example:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import org.osmf.events.LoadEvent;
                protected function vidDsp_bytesLoadedChangeHandler(evt:LoadEvent):void {
                    var trgt:VideoPlayer = evt.currentTarget as VideoPlayer;
                    if (trgt.bytesLoaded == trgt.bytesTotal) {
                        Alert.show("Yeah, I'm loaded...");
            ]]>
        </fx:Script>
        <s:VideoPlayer id="vidDsp"
                source="http://helpexamples.com/flash/video/caption_video.flv"
                bytesLoadedChange="vidDsp_bytesLoadedChangeHandler(event);" />
    </s:Application>
    Peter 

  • Multiple loaders, one complete event

    Hi,
    What i have:
    I have a buch of data stored in a sqlite db.
    Getting that data is no problem.
    With that data i get 2 image paths to locally stored images.
    Now i want to send the data to a server using a remoteObject and amfphp.
    Getting to the server and sending plain text is no problem.
    Now my images.. what i need to do is get the url of my image, load the image and convert it to bitmapdata, so i can send it to the server.
    On the server I let php take care of the bitmapdata and save the image.
    This way i know when the total saving of one item is done, and i can send a message back to flex.
    You may ask.. why don't you let flex take care of the saving on the server. Well, if i do that, i have seperate saving of the text data and the image. If the image is saved, the text data needs to be saved, so the path to that image is correct.
    Anyways,
    Is it possible to load 2 images using loader, and have one complete event?
    Or is there a better solution to get 2 bitmapdata's of the images.. so i can send all data of one item at once.
    (item contains name, infotext, fullimgurl, thumbimgurl)
    Please some help.
    Greets, Jacob

    By that I meant that I'm using my cell phone to read post and publish 
    post to Adobe Forums so I could've probably misunderstood something.
    You could create a VO and wrap the two images inside the object and 
    then send the VO to your server, I dunno if this works but I'd give it 
    a shot.
    Sincerely,
    Michael
    El 11/05/2009, a las 8:41, Starlover_jacob <[email protected]> escribió:
    >
    hi,
    yess, I was thinking about something like a bytearray, but then I 
    would need a loader and on the load complete, I'll convert it to a 
    bytearray right?
    >
    The thing is I have 2 images. so I have some difficulty 
    understanding how I can load both images.. convert them to 2 
    bytearrays. and then send it along with all the textual data to the 
    server all at once.
    >
    Zipping it was more a way to hold all things together. (textual 
    data, and 2 images)
    >
    How to save the bytearray into files again on the server side is 
    another problem witch I'll research later.
    >
    and what did you mean by;
    Forgive me if I misunderstood something but Adobe Forums doesn't make
    your life easy when you use a cell phone.
    >
    I am building an air app just for on a windows or mac.
    I am not building something for a cell phone. If that's what you 
    meant by it
    >

  • SWFLoader/Image complete event problem (bug?)

    I have an SWFLoader in my application whose content is
    dynamically bound to a datagrid for loading different images.
    Depending on the new image size I want to make some adjustments,
    etc. to the SWFLoader itself... that's not important for now.
    The problem is that if I take the width of the SWFLoader
    instance on the "complete" event, it gives the value for the
    PREVIOUS image setting so my math function is useless.
    Try this to see what I mean:
    [Bindable]
    public var imageSource:String;
    private function temp():void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    <mx:Button click="imageSource='someImageURL'" />
    <mx:SWFLoader id="imgLoader" autoLoad="true"
    source="{imageSource}" complete="temp()" />
    if you implement the above code, and assuming that
    imageSource is a null string upon initialization, you will get a
    value of "0" for the imgLoader instance's width when you load a new
    image.
    To get around this in Flex 1.5 I could use doLater(this,
    "temp") but doLater appears to have been removed in Flex 2.0.
    My current work around is to modify the above code as
    follows:
    private function temp():void {
    this.addEventListener("enterFrame", blorch);
    private function blorch(b:Event):void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    this.removeEventListener("enterFrame", blorch);
    feels like a hack to me... is there no way to get this to
    work without using the above functions? Sort of seems pointless to
    have removed "doLater" just to make me write a function that
    essentially does the same thing in Flex 2.0. I tried using the
    "resize" event in place of "complete" and that works... if the
    image loaded is a different size than the previous one. If the
    image is the same size (as is often the case in my application)
    then it doesn't work.
    Any suggestions Adobe/Macromedia, fellow developers?

    Flex harUI -
    two solutions to this then are:
    1) use the callLater() function or
    2) extend the SWFLoader class...
    I don't want to increase my component files so I will stick
    with the callLater() setup.
    Haskasu -
    I tried init. It has the same result as complete. If I insert
    code like this: init="mx.controls.Alert.show(imgLoader.width)" I
    get the width for the *previous* setting (same as complete) and not
    the new setting.

  • LoaderInfo class doesn't dispatch Init and Complete events

    Hi,
    I use the traditional way to download jpeg images (size < 200K) dynamically:
        try {
         contentLoader = new Loader();
         contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
         contentLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
         contentLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
         contentLoader.loadBytes(loader.data as ByteArray);
        } catch (error:Error) {
           trace (error.toString());
    private function onInit(event:Event):void {
         trace ("onInit");
    private function onLoadComplete(evt:Event):void {
         token.result = (evt.target as LoaderInfo).content as Bitmap;
    I have noticed that sometimes class LoaderInfo doesn't dispatch neither INIT nor COMPLETE event working with the same images. There is no IO_ERROR dispatched as well. All images are small (< 200K).
    I suppose that this is a bug in the Flash Player.

    Okay, at this point I think I can chalk it up to a bad swf file (or a couple, anyway).
    One thing I noticed while stepping through fdb is that after invoking loader.loadBytes, even though the completion event is never triggered, it looks like a new swf is instantiated.  The instantiated movieClip is ~600k, though, which is over 200 times the actual source file size.  Using swfdump from the flex sdk on the swf it looks like the framerate and length parameters were bad.  Like 20k and 600k bad.  I'm guessing the file was incorrectly stored as text at a point.  After checking the source asset and reexporting, my application works as expected (the loaderInfo always triggers a completion event).
    I'm not sure why it works when in an isolated test case.  I end up loading the file the same number of times.  There's definitely a concatenation of circumstances at work.  I guess it's possible if I let it run for an indefinite amount of time the event would have eventually triggered.
    Thanks for the time though.  Hopefully someone else finds this thread helpful.

  • Why does URLStream complete event get dispatched when the file is not finished loading?

    I'm writing an AIR kiosk app that every night connects to a WordPress server, gets a JSON file with paths to all the content, and then downloads that content and saves it to the kiosk hard drive. 
    There's several hundred files (jpg, png, f4v, xml) and most of them download/save with no problems.  However, there are two f4v files that never get downloaded completely.  The complete event does get dispatched, but if I compare the bytesTotal (from the progress event) vs bytesAvailable (from the complete event) they don't match up; bytesTotal is larger.  The bytesTotal (from the progress event) matches the bytes on the server. 
    The bytesLoaded in the progress event never increases to the point that it matches the bytesTotal so I can't rely on the progress event either.  This seems to happen on the same two videos every time. The videos are not very large, one is 13MB and the other is 46MB.  I have larger videos that download without any problems.  
    [edit] After rebooting the compter, the two videos that were failing now download correctly, and now it's a 300kb png file that is not downloading completely.  I'm only getting 312889 of 314349 bytes.
    If I paste the url into Firefox it downloads correctly, so it appears to be a problem with Flash/AIR.
    [edit] I just wrote a quick C# app to download the file and it works as expected, so it's definitely a problem with Flash/AIR. 
    Here's the code I'm using:
    package  {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.net.URLRequest;
        import flash.net.URLStream;
        [SWF(backgroundColor="#000000", frameRate="24", width="640", height="480")]
        public class Test extends Sprite {
            private var fileSize:Number;
            private var stream : URLStream;
            private var url:String = "http://192.168.150.219/wordpress2/wp-content/uploads/2012/12/John-Butler-clip1.f4v";
            public function Test() {
                if (stage)
                    init();
                else
                    this.addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(e:Event=null):void {
                this.removeEventListener(Event.ADDED_TO_STAGE, init);
                stream = new URLStream();
                stream.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
                stream.addEventListener(Event.COMPLETE, onLoadComplete);
                stream.load(new URLRequest(url));
            private function onLoadProgress(event:ProgressEvent):void {
                fileSize = event.bytesTotal;
                var percent:Number = event.bytesLoaded / event.bytesTotal * 100;
                trace(percent + "%");
            private function onLoadComplete(event:Event):void {
                trace("loaded", stream.bytesAvailable, "of", fileSize);
                // outputs "loaded 13182905 of 13184365"
                // so why is it "complete" when it isn't finished downloading?

    Thanks for your quick reply !
    I am relatively new to programming so please bear with me on this as I still haven't managed to grasp some of those things that "make perfect sense". If I am setting mouseEnabled to false doesn't that mean that the object no longer gets MouseEvents ?
    If I have understood you correctly then once the mouseEnabled is set to false the btn object is removed from the objects recognizable by the mouse - hence dispatching a mouseout event (and I am guessing here) from the mouse?
    I still don't get it though, if the listeners are set to the object and the object is no longer accessible to the mouse why is the event still being dispatched ?
    I get it that the making of the object unavailable to the mouse causes the "removing" (deactivating) of the object from under the mouse,
      step 1. deactivate object, and  step 2. (as a result of step 1) register the removal of the object.
    but why is the mouse still listening after step 1?
    Even if the action is that of "out" (as in the object is no longer under the mouse) it still is an action isn't it ? so haven't we turned off the listening for actions ?
    I promise I am not trying to drive you crazy here, this is just one of those things that I really want to get to the root of !
    Thanks,

  • Not receiving COMPLETE event in URLLoader

    Hi:
    I'm querying a web application in a remote server through XML files and receiving answers in the same file format. Until now, sometimes I received a connection error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://server/Services/startSesion.com
        at reg_jugadores_fla::MainTimeline/queryGQ()
        at reg_jugadores_fla::MainTimeline/reg_jugadores_fla::frame1()
    When this occurs, trying to access the services through a web browser, there's a test page where you can try queries, returns a "500 Internal server error". I managed that problem adding a listener to catch the error:
    xmlSendLoad.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    But since yesterday I can't connect anymore using Flash while it's possible to access the test page. I'm not able to talk to any support guy as the company is closed for vacations! I added listeners to try to know what's happening and this is the result in the output window:
    openHandler: [Event type="open" bubbles=false cancelable=false eventPhase=2]
    progressHandler loaded:154 total: 154
    httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=200]
    AFAIK, status=200 means OK but why the COMPLETE event isn't dispatched?. So, is there anything I can do or just wait until the tech guys return from the beach?
    Thanks in advance
    queryGQ(sessionURL,sessionQS);  // Start session
    stop();
    function queryGQ(url:String,qs:String):void {
    var serviceURL:URLRequest = new URLRequest("http://server/Services/"+url);
    serviceURL.data = qs;
    serviceURL.contentType = "text/xml";
    serviceURL.method = URLRequestMethod.POST;
    var xmlSendLoad:URLLoader = new URLLoader();
    configureListeners(xmlSendLoad);
    xmlSendLoad.load(serviceURL);
    function configureListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, loadXML);
    dispatcher.addEventListener(Event.OPEN, openHandler);
    dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
    dispatcher.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    function openHandler(event:Event):void {
    trace("openHandler: " + event);
    function progressHandler(event:ProgressEvent):void {
    trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
    function securityErrorHandler(event:SecurityErrorEvent):void {
    trace("securityErrorHandler: " + event);
    function httpStatusHandler(event:HTTPStatusEvent):void {
    trace("httpStatusHandler: " + event);
    function ioErrorHandler(event:IOErrorEvent):void {
    trace("ioErrorHandler: " + event);

    Hugo,
    View may not fire events. View may call method on other controller (component / custom) and this controller fires event.
    You are absolutely right: in WD only instantiated controllers receives the event, event itself does not cause controller instantiation.
    The only controller that is always instantiated is component controller.
    Custom controllers instantiated on demand when their context is accessed or user-defined method called.
    As far as view may not have externally visible context nodes and methods (you may not add view controller as required to other one and use nodes/methods of view), the only time when view is instantiated is when it get visible for first time.
    To solve your problem, try the following:
    1. Save event parameters to component controller context node element before firing event.
    2. Create mapped node in target view and set node from controller as source.
    3. In wdDoInit of target view insert the following code:
    wdThis.<eventHandlerName>(
    null, //no wdEvent
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamA>(),
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamB>(),
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Capture the COBOL Batch Complete Event in CC&B

    Hi All,
    I have a specific requirement to capture the batch complete event for some custom implementation.
    I implemented the solution with change handler on the "Batch Run" entity.I got the completion event for the Java based batches but the problem comes with COBOL based batch.
    For COBOL based batches, the complete event is not getting in the change handler.I guess the batch completion status is getting updated thru a plain SQL in COBOL batches.
    Has anyone has a idea ,how to capture the Batch completion event for COBOL batches?
    Regards,
    -Jinesh J

    user816833 wrote:
    For the COBOL batches in CC&B, they all use a set of common routines for batch control - if you look at a COBOL batch, you will see "COPY CICZBTCR", and CICZBTCR contains the routines for getting batch parameters, starting, stopping, restarting batches etc.
    To end a batch run, it is actually CIPZFBRN that is called, and this does contain SQL to end the batch run and log the end of thread message to the Message Log. This is the information displayed on the Batch Run Tree screen, and it is available on the table CI_BATCH_RUN.I think what JJ999 need is to catch the event when any batch has changes its status or finishes its execution. The problem is that maybe the cobol routines you are referencing they are not following the regular SPL FW standars 100% accurately and this routines does not trigger the ChangeHandler extensions so the custome change handler is never called by cobol batch programs.

  • Creating thousands of jobs dependent on completion event of subsequent job

    Hello,
    I am using DBMS_SCHEDULER.CREATE_JOB.
    I am seeing a substantial degradation in the number of jobs I can create per second. I have a queue of jobs that run in sucession. Initially I can create around 5 per second and after 1000 jobs have been created, I am only creating 1 per 25 seconds.
    Is this expected behavior? If so, why?
    Thanks,
    Dianna

    Ravi,
    I have not used the ADDM to examine this.
    I did create a test case that isolates this simply down to calling CREATE_JOB. Here is the code. You can just replace my job_action with a job that you know will run for a long time or sleep for a few hours [my jobs run about 6-7 hours]. Only the first job runs while I am testing this. The other jobs are waiting on completion events of prior jobs.
    Because I am naming the jobs with the HH_MI_SS, you can quickly see that the time it takes to create jobs becomes longer and longer.
    Thanks,
    Dianna
    CREATE or replace PROCEDURE schedule_many_jobs (
    recent_tf IN NUMBER,--This is just a parameter to my job
    nbr_of_prior_months IN NUMBER, --This determines my number of jobs
    remove_old_jobs IN NUMBER DEFAULT 0 --If this is 1, it will remove old jobs with the same name, handy to clean out your Scheduler after you run this
    AS
    job_prefix VARCHAR2 (18);
    u_job_name VARCHAR2 (25);
    previous_job_name VARCHAR2 (25);
    this_month DATE;
    aa_subscriber_exists EXCEPTION;
    PRAGMA EXCEPTION_INIT (aa_subscriber_exists, -24034);
    BEGIN
    IF remove_old_jobs = 1
    THEN
    FOR c IN (SELECT job_name
    FROM user_scheduler_jobs
    WHERE job_name LIKE 'TEST_DGW%')
    LOOP
    DBMS_SCHEDULER.drop_job (c.job_name, TRUE);
    END LOOP;
    END IF;
    BEGIN
    DBMS_SCHEDULER.add_event_queue_subscriber ('AD');
    EXCEPTION
    WHEN aa_subscriber_exists
    THEN
    NULL;
    WHEN OTHERS
    THEN
    aaadmin.aa_common_pkg.aalogger ('AADMS', 'Historical DMS creating event queue subscriber: ', 'ERROR');
    END;
    job_prefix := 'TEST_DGW' || TO_CHAR (SYSDATE,'HH_MI_SS') || '_';
    u_job_name := DBMS_SCHEDULER.generate_job_name (job_prefix);
    previous_job_name := u_job_name;
    DBMS_SCHEDULER.create_job
    (job_name => u_job_name,
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN aa_dms.aa_dms_historical_update('
    || TO_CHAR (recent_tf)
    || '); END;',
    enabled => TRUE
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'raise_events',
    VALUE => DBMS_SCHEDULER.job_run_completed
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'restartable',
    VALUE => TRUE
    FOR i IN 1 .. nbr_of_prior_months
    LOOP
    previous_job_name := u_job_name;
    --this_month := recent_tf;
    job_prefix := 'TEST_DGW' ||TO_CHAR (SYSDATE,'HH_MI_SS') || '_';
    u_job_name := DBMS_SCHEDULER.generate_job_name (job_prefix);
    DBMS_SCHEDULER.create_job
    (job_name => u_job_name,
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN aa_dms.aa_dms_historical_update('
    || recent_tf
    || '); END;',
    event_condition => 'tab.user_data.object_name ='''
    || previous_job_name
    || '''',
    queue_spec => 'sys.scheduler$_event_queue,AD',
    auto_drop => TRUE,
    enabled => TRUE
    DBMS_SCHEDULER.set_attribute
    (NAME => u_job_name,
    ATTRIBUTE => 'raise_events',
    VALUE => DBMS_SCHEDULER.job_run_completed
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'restartable',
    VALUE => TRUE
    END LOOP;
    END schedule_many_jobs;

  • Waveform complete event?

    Is there any sort of Waveform Complete event for a continuous waveform generation? That is, an event that would fire at the beginning or end of every repeat of a waveform?
    NI-DAQmx 7.4, Win XP, M-series DAQ device, writing in C++.
    Thanks!
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

    Thank you, Serges, but I think you have misunderstood what I'm asking. There are no acquired samples involved- I'm talking about analog output.
    I'm generating a repeating waveform from the analog outputs. To start, I give it a buffer of data and specify that it be a continuous generation, but I don't write any further data to the task after the initial buffer. That way, I get a repeating waveform.
    What I want is an event or a function call that I can use to know when the waveform generation has recycled to the beginning of the buffer.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • Sound - 'complete' event vs. SoundChannel - 'soundComplete' event

    Hi,
    Can anybody here explain practical difference between:
    complete event of of Sound class and soundComplete event of SoundChannel class ?
    What are exact differences between the two? When precisely are both events dispatched? Are they dispatched always together or not - which one is first?
    Documentation is very laconic in this case (as usual mostly...).
    Thanks ahead !

    Sound class
    This doesn't actually have a complete event (in the way you might be thinking of). What you might be refering to (in the AS Docs) is usage of the flash.events.Event.COMPLETE event. This is only used for loading sound files, and tells you when the data has successfully loaded. So, typically, you'd just use the Sound class to manage the loading of things...
    SoundChannel class: flash.events.Event.SOUND_COMPLETE
    This is what should be used for detecting the completion of audio. The SoundChannel class is what you'd want to use to control the stopping/pausing/playing of things.
    private var _s:Sound;
    private var _sc:SoundChannel;
    When loading audio...
    _s = new Sound();
    _sc = new SoundChannel();
    _s.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
    _s.load(new URLRequest(url));
    When playing audio...
    _sc = _s.play();
    _sc.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);

  • [svn:osmf:] 15068: Fix bug FM-603: Need to signal complete event when live stream is unpublished.

    Revision: 15068
    Revision: 15068
    Author:   [email protected]
    Date:     2010-03-26 10:10:58 -0700 (Fri, 26 Mar 2010)
    Log Message:
    Fix bug FM-603: Need to signal complete event when live stream is unpublished.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-603
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamCodes.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamTimeTrait.as

    I have at least now managed to narrow down the problem.
    I took a guess at the packages that were causing problems, and seems I guessed right.
    By following this guide: http://wiki.archlinux.org/index.php/Downgrade_packages
    I downgraded both libgl to version 7.7-1 and ati-dri to 7.7-1, and now I can X starts correctly.
    I guess I'll need to figure out how to file a bug on those packages.

  • BackgroundWorker starting again in Completed event

    I want a background worker to continue running and occasionally update the user interface. My first idea was to use a BackgroundWorker and in its completed event just fire it up again.
    Is using a BackgroundWorker in this fashion acceptable? Or are there potential issues from using the completed event to trigger the worker?
    Below is some Pseudo code of what my intentions are
    class Program
    private static BackgroundWorker worker;
    private static Int32 runs = 0;
    static void Main(string[] args)
    worker = new BackgroundWorker();
    worker.DoWork += worker_DoWork;
    worker.RunWorkerCompleted += worker_RunWorkerCompleted;
    worker.RunWorkerAsync(runs);
    Console.ReadLine();
    static void worker_DoWork(object sender, DoWorkEventArgs e)
    //Do time consuming work
    Thread.Sleep(3000);
    static void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    //Update the UI and start time consuming work again
    runs++;
    Console.WriteLine("Completed run #" + runs);
    worker.RunWorkerAsync();

    Assuming you are doing something that must always be done in the background while your app is running, like monitoring a file location or pinging a host, what you suggest, as well as the other answers, is actually a really bad idea. Creating and destroying
    a thread is not a free operation... there are costs associated with that and repeatedly doing it will incur a performance penalty. Timers and Tasks are just fancy wrappers for threads so those suggestions are just putting a different colored lipstick on the
    same pig.
    You are doing the right thing by using a background worker... that is what they are designed for... but instead of killing the thread and restarting it, DoWork should remain in a loop checking to see if the thread has been cancelled while using the ReportProgress
    event whenever there is something to report to the UI. Whenever your thread raises that event, you can catch it in the ProgressChanged event handler and update the UI for your user. This way the thread never gets shut down and is always doing its job tossing
    up notices when there is something to note.
    When your app shuts down or you are done monitoring, just cancel the thread. Background workers support that if you set WorkerSupportsCancellation = true when you create the worker and then call CancelAsync to cancel the thread. Again, be sure to check within
    the loop to see if the thread has been cancelled to see if you need to break out and end the DoWork method. Make sure that the thread isn't too busy doing something long running that it becomes unresponsive to the cancellation call (i.e. some sort of really
    long blocking call).
    The MSDN docs have an example here: http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker%28v=vs.110%29.aspx

Maybe you are looking for

  • Not getting data in cube from lookup DSO

    Hi guys, I have a transformation with source DSO and the target Cube. In which I have a look-up from another DSO to the cube in this transformation, end routine. But I am not getting the records I needed in the cube, which are supposed to flow from a

  • Urgent Could someone help me

    Q: When we are moving from one OAF page to another OAF page how can we retain first page session or first page status. thnakx in adv

  • MSI R9 290 Gaming 4G

    Graphics Card, the 270X could be considered the budget option (for Gamers) from AMD's current lineup of GPUs based upon the Tahiti and Hawaii Cores. As some of you may be aware this card is effectively a AMD HD 7870 with a slighting higher Core Clock

  • Height in feet and inches

    I have a string value for height in the database that I would like split out into feet and inches. For example the value right now is 66, 65, etc...

  • Spring MVC & Struts 2 Pros/Cons

    What are the pros and cons, in your opinion, when choosing Spring over Struts 2 or Struts 2 over Spring? I am trying to determine which framework to select and the last time I used Spring was in the 1.x series and I loved it. So I am biased and I wan