Triggering event from for-each

Hi,
I have a process that takes long to execute, I want to be
able to send a progress notification to the user with the hope of
not getting him bored or impatient, for some reason I can't achieve
it and I don't know where to go for help, if you know how to solve
this, any help will be greatly appreciated.
I have some code like this:
<code in mxml for my application>
- component declared .. onXEvent="showProgress()"
- script for showProgress calls refresh for ProgressBar
Component
</code in mxml for my application>
<code for my component>
for each (var myObject:xObject in MyCollectionOfMyObjects)
// do some complex logic and calls methods for this item
// creates and triggers event for progress notification
</code for my component>
I would expect to see my ProgressBar advancing as the process
is completed, but for some reason the process seems to take control
of the execution and no onProgressEvent is fired until the foreach
finishes execution. It will run perfectly in the debugger (step by
step) but it doesn't work at runtime.
Is there any way I can achieve this in Flex?? Is there any
event class I can use to solve this issue?
maybe anyone has done this before or knows a link to more
information on this subject?
Thanks in advance
William Vega
MCSD / Beginner Flex Developer

Flash functions execute within a frame. They finish before
any UI rendering is done. You will have to use callLater , somehow,
within your loop to give the UI a chance to draw.. There is a more
detailed answer to this thread somewhere else.
Tracy

Similar Messages

  • Generate every hour event 2331 for each DP after Software update Deployment Package deletion

    We have an organization build on SCCM 2012 R2 with 270 DPs configured with DP Pulls function. The centralized point contains DP sources available for all DP Pull.
    We have some problems with Windows Update deployment package, and we decide to delete them. We first remove them from all DPs. After more than a month we delete the deployment package. From this day, we see that the SMS_Distribution_Manager service generate
    every hour logs for contacting each of the 270 DPs to ask them for deleting the package.
    Remark: At the time we run the delete, some of the DPs were not connected. After 3 weeks all of them were connected. A month later, the SMS_Distribution_Manager
    generate always these events every hour.
    Each DP responds with a 2331 event that seems OK. Every hour the system begin with two events (2301 and then 2300 for this package, after a 2331 for each
    DP). All these events are also present in the application log of the Event Viewer. After the last DP connection that respond with 2331 event, there are no event that generalize a task for the package to definitively remove it from the database.
    Could anyone help me to correct the system?

    There are no error messages. There are only messages generated in Distribution_manager logs and Event Viewer, showing us server processing and network activity on package that was deleted over 40 days, and that happened every hours. The Microsoft support
    give us directives to delete orphan records in 4 tables
    pkgServers_L,pkgServers_G,PkgStatus_L,PkgStatus_G)
    At this time the correction has positive effect.
    A sample of event generated
    Log Name:      Application
    Source:        SMS Server
    Date:          26.02.2014 09:56:19
    Event ID:      2331
    Task Category: SMS_DISTRIBUTION_MANAGER
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Computer:      wwww.xxxx.yyyy.zzz
    Description:
    On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  Distribution Manager successfully removed package "PS100066" from distribution point "["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=xxx"]\\aaa.bbb.ccc.dddd\".
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="SMS Server" />
        <EventID Qualifiers="16384">2331</EventID>
        <Level>4</Level>
        <Task>12</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-02-26T08:56:19.000000000Z" />
        <EventRecordID>825362</EventRecordID>
        <Channel>Application</Channel>
        <Computer>wwww.xxxx.yyyy.zzz</Computer>
        <Security />
      </System>
      <EventData>
        <Data>PS100066</Data>
        <Data>["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=PS1"]\\aaa.bbb.ccc.dddd\</Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  </Data>
        <Data>
        </Data>
      </EventData>
    </Event>
    Regards

  • Duplicated workflows  for fast triggering event from CRM

    Hello,
    I'm facing an issue when a credit limit sales order is created in CRM.
    They are creating the order and manking a change to it 5 seconds later. Those created and changed events are triggered with a difference of 5 seconds and in background, the first WF is triggered (with the created event) and 5 seconds later other instance of that WF is triggered (with the changed event).
    The problem is that the first WF is not being logically deleted when the seconds one is created (it has a wait step at the beggining of the WF to end in case another instancer of the WF is triggered).
    This is caused by a perfoirmance issue that when the seconds WF is triggered, the first one is still not listening to the changed event.
    Do you know if there's any way to solve this?
    Thanks!

    Hi MatiasAZ,
    In the first workflow(created) check the event. It should be the 'changed' event and proper binding should be there.
    If everything is fine, after the wait for event create a process control with the option as 'Complete workflow'.
    Initially your workflow should have the fork step type with two branches. Maintain the changed event wait step in one branch and created events step in other branch. So that the workflow will wait for 'Changed' event and workflow will be completed if the 'Changed' event occurs in the system.
    Thanks,
    Viji.

  • Triggering events from event queue

    Can anyone tell me if events triggered FROM the event queue execute immediatly before returning to the place where the trigger occured (as it seems to when I follow the code in the debugger).
    for example in my code I am:
    1) capturing a tab change event so I'm on the AWT event queue.
    2) calling stopcellediting() on a table which eventually triggers a losefocus event on a control within the table.
    3) the program flow seems to go straight to the focuslost event before returning to process the rest of tab change event.
    is this behaviour reliable? or is it just a timing coincidence?
    thanks in advance.

    This behaviour is reliable.
    All the code that executes these events is performed in the same thread, so it has no means to do something in parallel.
    SwingUtilities.invokeLater method does provide an ability to postpone execution of some code but inside Swing package it is used mainly for paint related tasks (for example the painting of the focus change will most likely occur only after the rest of tab change event processing will be executed).

  • How can I create events dynamic for a Group/List?

    Hey,
    atm I'm programming a little application where i want to add elements to my center-pane.
    Simpyfied I got:
    - Center Pane : here shall the elements appear on right click in bottom-pane. This pane shall be used as anything like a playground where you can drag/drop and connect items from the bottom-pane
    - Bottom Pane: here I got about 180 elements which are quite equal. This is sth like a menu of items which you can use. I realised them in java classes extended from a parent class with differend calulations.
    What I want:
    I want to create an event handler for EACH of the "menu" elements dynamically. Just sth like:
        for (int i = 0; i < basic_menu_list.size(); i++)
          final Element el = hbox_bottom.getChildren().get(i);
          hbox_bottom.getChildren().get(i).setOnMouseClicked(new EventHandler<MouseEvent>()
            public void handle(MouseEvent event)
              if (event.isSecondaryButtonDown())
                playground.add(el);
                redrawPlayground();
        }But as i expected this doesnt work...
    Now my question:
    How can I solve this problem? Is there any option to listen to all elements of a group without hard-coding every single listener?
    Thanks for your help,
    Martin

    Hello User,
    Why did you expect that it wouldn't work?
    You have an example with "transition" apply on a bunch of circles in the Getting Started with JavaFx (http://download.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm)
    Here a basic example class...
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.TextBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class HelloWorld extends Application {
        //~ ----------------------------------------------------------------------------------------------------------------
        //~ Methods
        //~ ----------------------------------------------------------------------------------------------------------------
        public static void main(String[] args) {
            // Entry point
            Application.launch(args);
        @Override
        public void start(Stage mainStage) throws Exception {
            Pane pane = new Pane();
            Scene scene = new Scene(pane, 200, 200);
            VBox vBox = new VBox();
            TextBox input1 = new TextBox();
            TextBox input2 = new TextBox();
            vBox.getChildren().addAll(input1, input2);
            for (Node input : vBox.getChildren()) {
                input.setOnMouseClicked(new EventHandler<MouseEvent>() {
                        public void handle(MouseEvent event) {
                            System.out.println("test click");
            pane.getChildren().add(vBox);
            mainStage.setScene(scene);
            mainStage.setVisible(true);
    }Niculaiu

  • How to use common event handler for selected movie clips?

    I have a 50-state map in a flash movie. Each state is a movie
    clip.
    Goal: when mouse moves over a state or is clicked in a state,
    the state will be highlighted in a bright color and a small box
    will pop up near the state and display some information about the
    state.
    Question: I know I can add mouse event handler for each state
    movie clip. But this is simply not good since this has to be done
    50 times and codes thus scattered different places. Ideally, I only
    want to have one script that determines where the mouse position is
    when events trigged and then do right things (highlight the state
    and display info. in a pop-up). How can this be implemented?
    Thanks!

    There are a number of ways. Which way is best depends on how
    you have things set up so far.
    E.g. If they have an enumerable naming convention:
    e.g. each clip is like state_0 , state_1 etc.
    Then you can loop through them and assign them all to the
    same mouse event handler via the loop. You would need properties
    other than the name of the clip to identify the state. E.g. each
    clip could contain its own data or the index could be a pointer to
    the state data (objects with state name and info properties) in a
    separate array.
    //state clips named
    for (var i=0;i<50;i++) {
    this["state_"+i].stateindex=i;
    this["state_"+i].onPress= statePressHandler;
    var stateData:Array = [{name:"StateName,info:"this state
    Info"}, name:"StateName,info:"this state Info"}, etc...]
    function statePressHandler() {
    trace(this);
    trace(stateData[this.stateindex].name+"="+stateData[this.stateindex].info);
    Other ways are possible too but the best approach depends on
    how you have named the clips and whether you're creating them with
    code or whether they're already on stage from authoring (my guess).
    If they're already on stage and they're called "Alaska" etc, then I
    would be inclined to put them all inside a container clip that
    contains nothing else other than states. It would avoid the need
    for an array of clip names or for checking some other specific
    property of each clip to determine if its a 'state' clip and not
    something else in a for..in loop.

  • Package Help needed For each Loop container

    Hello all,
    I need a bit of advice, I`m a newbee to SSIS so I`m learning. Here`s what I need. I have a EDI 837 file which needs to be converted and inserted into a sql table. These are multiple files and I need to maintain them with a monthly load. So I have a source
    folder where these files will be dumped. I created a Package which will grab the files process the EDI aspect inserts into the data into table. This is the story on a high level.
    Here`s what I did.
    Created a For each loop container.
    I have a stored proc which takes in a 837 files and gets the fields what I want and it inserts it into a staging table from there I have a data flow task which pipes it into my production table.
    Inside the loop first task is to exec the Stored Proc but my question is once a file is picked up from for each loop I need the file to be inserted into a table which I am referencing in my store proc. All the EDI conversion takes place in my SP and it references
    the table..
    My question is the For each loop container picks up the files but where does the data goes?? Can someone help me out
    FM

    The foreach loop container (file enumerator) only returns the filename or filepath which you can use as a parameter in an Execute SQL Task or within an expression on a connection manager (which can be used in a Data Flow). So it doesn't do anything with
    the file. You have to add a task within the loop to do something with the file (Execute SQL Task/Data Flow Task/File System Task/etc.).
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • When I transferred my iPhoto from macbook to iMac it created double events for each, how do I correct this?

    When I transferred my iPhoto from macbook to iMac it created double events for each, how do I correct this?

    How did you do it?
    Here's what should work:
    To move an iPhoto Library to a new machine:
    Link the two Macs together: there are several ways to do this: Wireless Network,Firewire Target Disk Mode, Ethernet, or even just copy the Library to an external HD and then on to the new machine...
    But however you do choose to link the two machines...
    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then launch iPhoto. That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.

  • I imported events from iphoto into aperture and aperture is showing 2 photos for each picture, one original and one edited although none of the photos from iphoto had been edited. Any idea why this has happened and what I need to do to prevent this.

    I imported several events for iPhoto into Aperture3 and in Aperture it shows two photos for each photo imported, one original and one edited although none of the photos imported were edited. Why has this happened and what do I need to do to prevent this in future. I have only recently got Aperture and am trying to learn as I go along using the Focal Press guide. Thanks for any help.

    Ir. Bob wrote:
    A photo that was rotated in iPhoto will also show up as iPhoto edited.
    This is not what I found to be the case in a recent experiment using iPhoto11- I did repeat it to be sure.
    https://discussions.apple.com/message/15586837#15586837
    Quickly, what I found is that only the ones I did actual adjustments on brought over two images.  Images that were simply rotated, had "quick fixes" or "Effects" did not bring in two images.  More importantly, among the ones with adjustments that did bring in two images, the ones with the keyword  "iPhoto Edited" appear to be nothing more than iPhoto's 6MB JPEG Previews.  The master was a 25MB RAW image.
    I don't know why some users are experiencing doubles on everything, but I recommend caution in deciding which ones to remove or you may find yourself deleting masters and keeping previews. 
    DLS

  • HT201386 Since the 8.02 update I now have every photo separated into an event for each pic. how do i get it back to the way it was before the update?

    I backed up my phone and then updated to the new update 8.02. I now have my pics in a separate album for each pic with an event attached to each one. how do i set it back up to the couple albums i had previously without adding all my pics from my computer which i dont want?

    You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
    Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
    http://roaringapps.com/apps:table
    Far as your Safari problem do these things until it's resolved:
    1: Software Update fully under the Apple menu.
    2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
    https://www.mozilla.org/en-US/plugincheck/
    Flash install instructions/problem resolution here if you need it.
    How to install Flash, fix problems
    3: Install Safari again from Apple's web site
    https://www.apple.com/safari/
    4: Run through this list of fixes, stopping with #16 and report back before doing #17
    Step by Step to fix your Mac

  • How do I print a list of my events from one of my calendars for tax purposes?

    How do I print a list of my events from one of my calendars for tax purposes?

    I actually began this process by creating a new calendar called "Medical" and then each event was assogned to this calendar but the program still wants to print out every day of the month for even those days that have no events.  The list view gives me the look I want and I have even tried deselecting all of the options and then reselecting them one at a time to no avail.

  • Can I set individual alerts (tones) for each calendar events/ reminders

    Can I set individual alerts (tones) for each calendar events/ reminders

    Thanks On my phone, these are the options under Menu>Settings & Tools>Sound Settings>Alert Sounds: 1. TXT Message 2. Multimedia Message 3. Voicemail 4. Emergency Tone  5. Missed Call . And under Service Alerts: 1. ERI 2. Minute Beep 3. Call Connect 4. Charge Complete 5. Software Update. So nothing there for the calendar. And options from the calendar that I can see are Add (here you can change the tone for one event or recurring event, but not set a default tone for the event alarm), View (gives you the options of viewing an existing event in more detail, adding a new one, and the same choices from the Options list on the first screen where you are viewing the entire month), and Options (1. lets you view weekly/monthly,  2. Go To Today  3. Go To Date   4. Search   5. Erase All   6. Erase All Old   7. Send.  So as far as I can see, there's no way to do it. I have been through all the Settings and Tools menus... and the Events menu. But...I have just discovered that if I delete ALL my alarms and change the Ringtone for the first alarm I set, that ringtone becomes the default ringtone. I will try deleting ALL my events and starting fresh with a new tone and see if that works!

  • Triggering background job event from Unix script

    Hi all,
      I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
      Appreciate for your help in advance.
    Thanks,
    Adithya K

    Hi,
    Check if this can help you
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
    Regards,
    Atish

  • VC: Strategies for Triggering Events

    Hello All,
    Other than buttons, how can events be triggered in VC?
    I am trying to dynamically load a layer once a user clicks on a chart / table without using a button.
    Is this possible? What is the official answer from SAP? are there any work arounds for this?
    Thanks in advance

    Hi,
    My model:
    BI Query -> Input for Pie Chart
    Pie Chart  -> iput for Table (table is hidden) -> Table  is used as Input for popup iview, the logic here is that when the user clicks on the pie chart, the table selection is changed and that is passed to the popup iView. I use a datastore to store value "dummy" with default value zero, this value I pass to popup iview
    Popup iview has visibility condition:STORE@dummy==1. Inside the popup iview there is a chart and a query with a signal in.The signal in is passed the dummy value and a variable value for the query from the table. The chart has visibility condition set to STORE@dummy==1
    When I set the default value of the datastore to 1 (in the main iView), when I execute the model, my pop up is visible. However if I set the default value to 0, and change it with a *select event (from table out to pop up iView in) with formual STORE@dummy+1, the popup does not show.
    This is my problem, I trying to trigger an event that changes my datastore value so that when its passed to the popup iview, the visibility condition will hold true.
    Many Thanks,
    Sbuda

  • Brwoser does not refresh for each server event if delta handling is on

    I wrote a simple stateful BSP page. When I turn on delta handling(to remove flickering) on the page, page is refreshed only for every other server event. This page contains two table views and I use table view iterator for one of them. How can I force browser refresh for each server event? Browser is IE and version is 5.5.
    This problem doesn't exist if turn off delta handling. But I want to stop flickering any how, since users are complaining.

    Learning BSP is similar like driving a car. You first need to get a driver's license. So you study a bit, take a test and are ready to drive. Thereafter, flipping that deltaHandling checkbox is like getting into a big plane and trying to fly. It is unfortunately a quantum jump from using BSP to activating the DH system. Which also has a lot of very special constraints, etc.
    This was a very special development we did for a big application group inhouse. The first version was good, but did not exactly meet all our expectations. So we redid a lot of the work/concepts. All of this is highly specialized and not documented.
    What I could recommend is that you look at BSP application IT05. It should help a little. Otherwise, I am going to ask that you please open an OSS message (please reference this thread!). Then we can look at your application and show you what is to be done. But it is definitely not all moonshine and roses. Our standard answer is "do not use it" when people can not ride this bull. I will add it onto my weblog schedule for some future date.

Maybe you are looking for