Flex 3 Passing Event Info via Metadata

As an opener, I am a complete new Flex user and a total novice.  This is my first crack at it and first post.  Now my problem, I am modifying and updating some existing Flex 3 code using the SDK.  I have completed all updates save one, The Alert messages HAVE NEVER WORKED, so I am trying to get those working.
The application uses a parent mxml file, FileUploadApp.mxml which sets the stage and a canvas.
That file uses a subordinate mxml file, FileUpload.mxml does all the work and places items on the canvas.
FileUpload.swf is created, then included in FileUploadApp.swf.  Everything works except the Alert messages.  Communication from FileUploadApp.swf is as two fold:
1) variables and constants are defined in FileUploadApp and used by FileUpload.
2) evemts are defined in FileUpload and passed back to FileUploadApp via metadata.  All events are being passed back except button/mouse events.
FileUploadApp code:
<mx:Canvas width="400" height="300" horizontalCenter="0" verticalCenter="0">
<com:FileUpload
  width="100%" height="100%"
  uploadUrl="{_strUploadScript}"
  uploadComplete="Alert.show('File(s) have been uploaded.', 'Upload successful')"
  uploadIOError="Alert.show('IO Error in uploading file.', 'Error')"
  uploadHTTPError="Alert.show('Upload Server Connection Lost.', 'Upload Failure')"
  uploadSecurityError="Alert.show('Security Error in uploading file.', 'Error')"
  btnCancel="Alert.show('You have canceled this upload.', 'Upload Cancled')"/>
</mx:Canvas>
FileUpload code:
<mx:Metadata>
[Event(name="uploadComplete", type="flash.events.Event")]
[Event(name="uploadProgress", type="flash.events.ProgressEvent")]
[Event(name="uploadCancel", type="flash.events.Event")]
[Event(name="uploadIOError", type="flash.events.IOErrorEvent")]
[Event(name="uploadHTTPError", type="flash.events.HTTPStatusEvent")]
[Event(name="uploadSecurityError", type="flash.events.SecurityErrorEvent")]
[Event(name="btnCancel", type="flash.events.MouseEvent")]
</mx:Metadata>
btnCancel.addEventListener(MouseEvent.CLICK, onbtnCancelClick);
var mevt:MouseEvent = new MouseEvent("btnCancel");
dispatchEvent(mevt);
<mx:Button id="btnCancel" toolTip="Cancel upload" icon="@Embed('assets/cancel2.png')" width="26" click="onbtnCancelClick()"/>
When the "btnCancel" button is clicked, the user should get the Alert message "Upload Cancled'.  All the other Alerts from events except the button events are being displayed.
Any help will be appreciated.

rtalton
There are two mxml files:
FileUploadApp.mxml => Sets the stage, some constants, some variables, all the Alerts from events and the canvas.
There is a subordinate file, FileUpload.mxml =>  does all the work, has the images that are placed on the canvas and processes all events, but passes the events back to FileUploadApp.mxml to process the Alerts.
FileUpload.mxml is compiled to FileUpload.swf and included into FileUploadApp.swf, all in the same compile.  Only FileUploadApp.swf is used in the Flash Player.
Do no know why this path was chosen, as in my original message, this is code I am modifying and updating.  I have everything else running correctly except the Alerts.  I tried moving all Alert processing to FileUpload.mxml to avoid passing the event through metadata, but no joy.  The Alerts have to be processed where the original blank canvas is defined, that is FileUploadApp.mxml.

Similar Messages

  • File info or metadata

    I cannot seem to find a way to enter the job name into the "file info" or metadata in Photoshop CS. If the job name was entered in a previous version of photoshop such as PS7 it will appear in the file info under the advanced tab underthe XMP Basic job ticket properties but cannot be edited. As a work around I am using PS 7 to enter my job name and then using CS for everything else. There must be a better way. Am I missing something?

    Ahem, well this is interesting.  I haven't found a way to write a custom panel to display the JobName in CS and make it editable - perhaps a limitation to the panel language.<br /><br />One option is to create a template to apply to multiple files - either through the flyout menu in File Info, Replace in the Advanced panel or via the File Browser > Edit > Replace Metadata.<br /><br />Below is a template that I created.  Best way to create your own is to save a template with the JobName property present, then go in an edit the file to remove the other template data and retain the jobName section as I did below.<br /><br />Edit the jobName value between the tags and rename the template - then use the Replace command to apply it to files in CS.<br /><br />Not a pretty work around.  Otherwise I would suggest using another field going forward.<br /><br />Gunar<br /><br /><?xpacket begin='Ôªø' id='W5M0MpCehiHzreSzNTczkc9d'?><x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 3.0-29, framework 1.6'><br /><rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'><br /><br /> <rdf:Description rdf:about=''<br />  xmlns:stJob='http://ns.adobe.com/xap/1.0/sType/Job#'<br />  xmlns:xapBJ='http://ns.adobe.com/xap/1.0/bj/'><br />  <xapBJ:JobRef><br />   <rdf:Bag><br />    <rdf:li rdf:parseType='Resource'><br />     <stJob:name>new info goes into here</stJob:name><br />    </rdf:li><br />   </rdf:Bag><br />  </xapBJ:JobRef><br /> </rdf:Description><br /><br /></rdf:RDF><br /></x:xmpmeta><br /><?xpacket end='r'?>

  • Passing user info into precompiled flex2 .swf

    Hello all,
    Using flex builder to precompile my .swf how do I then pass
    client info to the SWF when a user accesses it? I have information
    like profile_id and user_id that need to accompany all of my remote
    calls, so how do I get them loaded into the swf if it is
    precompiled? We are running CF 7.02. I thought maybe URLLoader to
    hit a .cfm page, but I am wondering if the request would carry any
    header info...no header means I could not identify who made the
    request and then I am back where I started.
    Thanks for any Help.
    -Mark

    Thanks inlineblue. that is exactly what i was looking for.
    Although now am curious if there is any way to pass an object into
    the swf. My guess is no...not on the init, but if anyone knows how
    to, that would be great.
    I know how to pass objects through remoting, just not on the
    init. I could loop over the struct (it is really a named array) and
    create name value pairs, but I was hoping to avoid that.

  • Ical delegate with private appointment blocks delegate event info showingup

    Hi forum folks.
    Thought I'd pass this info on... I've discovered that under certain circumstances, someone sharing out (delegating) their calendar to someone else, may be able to have that 2nd person "subscribed" to their iCal calendar, but no appointments show up in the actual calendar view (despite a tick showing). It will happen "all of a sudden" one day, without explanation.
    I heard it might be related to an iCal event without a subject line, but there were no such events.
    Instead, I tracked the problem to a "private" To Do. I made the to-do "not private" and then made it private again (in the original iCal calendar), and as soon as I did that, and refreshed the calendar on the delegated machine, the whole list of appointments re-appeared.
    So, if one of your delegated staff are successfully "subscribed" to someone's calendar, but can't see any actual appointments, try checking through their To Do's for any private appointments.
    The OS was 10.5.7, so I will aim to try installing 10.5.8, in case that prevents it (just a long shot though) for the future.
    Cheers,
    D.

    Joey,
    Try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. To find that Library folder, use Finder>Go Menu>Depress the "Option" key>Library. Drag the .plist file to your desktop.
    Next, go to your Macintosh HD/Users/yourusername/Library/Calendars Folder and remove any files with "Cache" as a part of the file name. Use the same method as described above to get to the correct Library Folder.
    Restart using a Safe Boot, and after the Safe Boot is complete startup normally and test Calendar for functionality.

  • Passing event parameters to copy of DECISION task TS20000118

    Hi.
    I have made a copy of the decision task TS20000118 which is the standard approve/reject user decision step.
    In the decision step, i have a link to ME13 transaction which is done by passing object_id and giving the "display" method as default method for the ZBUS3003 object which takes Info record number as key.
    My problem is users are restrcited by PORG auth object in ME13 also and along with Info record number, i have to pass porg, plant, vendor , material to ME13 link.
    I have defined event parameters to capture this 4 fields but i dont know where to pass this parameters as TS20000118  where the link appears in using the DECISION object and not the DISPLAY method,.
    I dont want to make this 4 fields as object key because it will mean altering many other things. Also, int he DISPLAY method based on info record number i cannot retrieve 4 fields bcos there mioght be multiple records for same info record number.
    Appreciate if you can let me know how i can pass event parameters to ME12 link in DECISION step of Task TS20000118 .
    Regards
    PN.

    Hello user12628! I have the same problem. Did you solve it? I have dynamically generated size of my Event Parameter String[] mass. And some times I have Error that URL string very long :). That is why I want to use POST method instead GET. if you has found solution,please let me know.
    Message was edited by:
    kostik

  • Passing session info

    hi all,
    i have lots of jsp pages and these pages use a lot of class files created by me.
    i want to pass session info to class files without having to pass the info through each object that is created in the jsp pages--
    what i want to know is that is there any way through which a class file a mine could fetch the session value.(i dont mind passing session info to one class-- but passing to too many classes would be a headache !!)
    thanks,
    gaurav

    Not sure if this will work but worth a try.
    Create a class called SessionHolder that looks something like:
    public class SessionHolder {
    private static HashMap sessionMap;
    public synchronized static void putSession(Thread thread, HttpSession session) {
         if (sessionMap == null) { sessionMap = new HashMap(); }
         sessionMap.put(thread, session); }
    public synchronized static HttpSession getSession(Thread thread) {
         return (HttpSesion)sessionMap.get(thread); }
    public synchronized static void removeSession(Thread thread) {
          sessionMap.remove(thread); }
    }<P>
    In the servlet you store the session in the SessionHolder via:
    SessionHolder.putSession(Thread.currentThread, request.getSession(true));
    Always remember to remove the session from the SessionHolder when exiting the servlet or the sessions will linger and take up memory:
    SessionHolder.removeSession(Thread.currentThread);
    In your classes you can retrieve the session using:
    HttpSession session = SessionHolder.getSession(Thread.currentThread);
    This should work on the basis that the servlet container will create a new thread for each request to the servlet. As long as your classes do not create new threads they should be able to access the static hashmap to retrieve the session stored by the thread key.
    Of course this is just a theory and I have not tested it out to verify if it actually works.

  • Passing events - whats wrong with this code?

    hi,
    I'm trying to get components to behave in a frame like they would as though I had written
    frame.getContentPane().add(thecomponent);
    by processing events explicitly. I've written the code below as a test, and it does work, but the events do not seem to be passed to the component at the right level.
    For example, when the JTree is the component tried it does not expand nodes when you click on them.
    Or if you tree a JButton then it doesn't actually visibly "click"
    I'm still quite new with Swing so any help would be really appreciated - is this kind of thing even possible?
    thanks,
    asjf
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class EventTest extends Component
         Component notAttached;
         class SimpleMouseListener implements MouseListener
              String owner;
              Component passOnTo;
              SimpleMouseListener(String owner, Component passOnTo)
                   this.owner = owner;
                   this.passOnTo = passOnTo;
              public void mouseClicked(MouseEvent e){passOn(e);}
              public void mousePressed(MouseEvent e){passOn(e);}
              public void mouseReleased(MouseEvent e){passOn(e);}
              public void mouseEntered(MouseEvent e){passOn(e);}
              public void mouseExited(MouseEvent e){passOn(e);}
              public void passOn(MouseEvent e)
                   System.out.println(owner+" "+e);
                   if(passOnTo!=null)
                        passOnTo.dispatchEvent(
                             new MouseEvent(passOnTo,
                                                      e.getID(),
                                                      System.currentTimeMillis(),
                                                      e.getModifiers(),
                                                      e.getX(), // needs offsetting relative to parent
                                                      e.getY(), // needs offsetting relative to parent
                                                      e.getClickCount(),
                                                      e.isPopupTrigger()
         EventTest()
              super();
              notAttached = new JTree(); //JButton("Hello");
                   notAttached.setSize(100,100);
                   notAttached.setVisible(true);
                   notAttached.addMouseListener(new SimpleMouseListener("unattached component",null));
         public void paint(Graphics g){notAttached.paint(g);}
         static void main(String [] arg) throws Exception
              JFrame frame = new JFrame("Passing events test");
                   frame.setSize(640,480);
                   frame.setVisible(true);
                   EventTest et = new EventTest();
                   frame.getContentPane().add(et);
                   frame.addMouseListener(et.new SimpleMouseListener("Frame listener",et.notAttached));
    }

    Sorry
    It doesn't compile.
    I'm not sure how to create the 6 processes to each add part of sum and then update the total for the next processor to sum the next part up, and i don't know where it goes either.
    I think it would be something like:
    public void run()
    try
    //this add it up
    total= array + total;
    System.out.println("PROCESSOR"+thisnumber+" Your total is " + total);
    sleep();
    update(total)
    and then do the same code for another processor.
    I'm confused do I have to name each processor and put the name in :
    public void Processor1 ()
    please help I'm very confused
    }

  • No longer able to tab to all items in event Info dialog

    When creating a new event, I used to hit Command-I to bring up the event info dialog. Then I would tab to each item to change it. This would include the "all-day" checkbox and the "calendar" popup. I would then use the space bar to check/uncheck the all-day checkbox and to pop open the calendar popup and use the arrow keys to scroll up/down the list of calendars. I can no longer do this in the Leopard version of iCal (3.0)! Tabbing skips the above-mentioned items. Please bring this functionality back!

    Not sure what to say...i just did it again on machines with Tiger and another one with Leopard. Both work quite similarly with one small exception- the drawer is replaced by the popup.
    This is what I did on Tiger
    -double clicked an open time slot to create a new event
    -In Tiger if the drawer was closed, then I had to open it so that I could tab
    -If the drawer was open when creating the event, then I could just start tabbing
    -Space bar toggles values of each check box or opens up the list box at which point I can use arrows
    and Leopard:
    -Double click an open time slot and an event appears
    -Double click it again and the pop-up window appears
    -then started tabbing through each item in the drawer(including the All-day and calendar items)
    -Space bar toggles values of each check box or opens up the list box at which point I can use arrows
    How did you install Leopard? Upgrade? Archive and Install? or Erase and Install?

  • ICal Alarm - Pass Event data to AppleScript?

    Is there a way that a script called by an iCal alarm can be passed event data as parameters?

    This is a quick one I knocked up a while back to see if it was possible. The problem is that iCal doesn't tell the script what event triggered it, so you have to go looking ...
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">(*
    called from iCal as on alarm, will speak the title of the alarm event
    won't work for repeating events
    AK ITCarlow Nov 2004
    set Now to current date
    -- Adjust FuzzSeconds to suit; if too big, close events will speak several times
    set FuzzSeconds to 15
    tell application "iCal"
    set MyEvents to every event of every calendar where ((start date of it) ≥ (current date))
    repeat with ThisEvent in MyEvents --scan the list looking for events that have triggered us
    try
    set MinutesBefore to (trigger interval of open file alarm of ThisEvent) as number
    set TriggerInt to (Now - ((start date of ThisEvent) + 60 * MinutesBefore)) --notionally 0 for firing event
    if (TriggerInt < FuzzSeconds) and (TriggerInt > (-FuzzSeconds)) then
    say (summary of ThisEvent as text) & " at " & (start date of ThisEvent as text)
    --could say other fields too eg location, description ...
    end if
    end try
    end repeat
    end tell
    </pre>
    AK

  • How to see the wait events info. after excute a select query

    Hi
    How to see the wait events info. after execute a select query. Are there any parameter to set for this option?
    And also wanna see the follwing info. in trace file. For this what are the parameters I have to set right?
    SELECT * FROM emp, dept
    WHERE emp.deptno = dept.deptno;
    call   count      cpu    elapsed     disk    query current    rows
    Parse      1     0.16      0.29         3       13       0       0
    Execute    1     0.00      0.00         0        0       0       0
    Fetch      1     0.03      0.26         2        2       4      14
    Misses in library cache during parse: 1
    Parsing user id: (8) SCOTT Regards
    Arpitha

    $ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Apr 20 15:29:33 2011
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> SHOW PARAMETER dump
    NAME                                 TYPE        VALUE
    background_core_dump                 string      partial
    background_dump_dest                 string      /user/oracle/app/oracle/admin/
                                                     orclsb/bdump
    core_dump_dest                       string      /user/oracle/app/oracle/admin/
                                                     orclsb/cdump
    max_dump_file_size                   string      UNLIMITED
    shadow_core_dump                     string      partial
    user_dump_dest                       string      /user/oracle/app/oracle/admin/
                                                     orclsb/udump
    SQL> ALTER SESSION SET EVENTS='10046 trace name context forever, level 12';
    Session altered.
    SQL> SELECT * FROM emp WHERE deptno=20;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800
            20
          7566 JONES      MANAGER         7839 02-APR-81       2975
            20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000
            20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7876 ADAMS      CLERK           7788 23-MAY-87       1100
            20
          7902 FORD       ANALYST         7566 03-DEC-81       3000
            20Now
    $ pwd
    /user/oracle/app/oracle/admin/orclsb/udump
    $ ls -ltr|tail -5
    -rw-r-----   1 oracle   oinstall     622 Apr 20 11:35 orclsb_ora_949.trc
    -rw-r-----   1 oracle   oinstall     651 Apr 20 11:35 orclsb_ora_976.trc
    -rw-r-----   1 oracle   oinstall    1982 Apr 20 11:35 orclsb_ora_977.trc
    -rw-r-----   1 oracle   oinstall    1443 Apr 20 15:29 orclsb_ora_1251.trc
    -rw-r-----   1 oracle   oinstall  279719 Apr 20 15:30 orclsb_ora_1255.trc
    $ tkprof  orclsb_ora_1255.trc  orclsb_ora_1255.txt
    TKPROF: Release 10.2.0.2.0 - Production on Wed Apr 20 15:32:17 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    $ ls -ltr|tail -5
    -rw-r-----   1 oracle   oinstall     651 Apr 20 11:35 orclsb_ora_976.trc
    -rw-r-----   1 oracle   oinstall    1982 Apr 20 11:35 orclsb_ora_977.trc
    -rw-r-----   1 oracle   oinstall    1443 Apr 20 15:29 orclsb_ora_1251.trc
    -rw-r-----   1 oracle   oinstall  279719 Apr 20 15:30 orclsb_ora_1255.trc
    -rw-r--r--   1 oracle   oinstall   26872 Apr 20 15:32 orclsb_ora_1255.txtThis orclsb_ora_1255.txt contains the required information.

  • Where is "Reminder" feature in Quantum event info screen

    Just upgraded to FIOS Quantum. My previous Fios STB had a feature in the Event Info screen that allowed for setting "Reminders" for upcoming shows. The reminders would pop-up on screen to remind you of a show about to start, and eventually switch you over to it. Quantum does not show this feature. The Event Info screen is the feature where Recording shows and series, is supported.

    Eigentor wrote:
    Just upgraded to FIOS Quantum. My previous Fios STB had a feature in the Event Info screen that allowed for setting "Reminders" for upcoming shows. The reminders would pop-up on screen to remind you of a show about to start, and eventually switch you over to it. Quantum does not show this feature. The Event Info screen is the feature where Recording shows and series, is supported.
    Reminders are not available at this time on Quantum TV. Verizon is well aware of this issue, it is my understanding that Verizon does plan to add the reminder function in, but there is no public committed date. I hope we will see it fairly soon, within the next 2-4 months, maybe even less, but Verizon generally does not announce availability of updates in advance. So all we can do is wait.....
    Justin
    FiOS TV: Extreme HD, Internet: 50/50, Digital Voice
    VMS Enhanced Service: 1 server, 2 clients
    Keller, TX 76248 (VHO 1)

  • The calendar shows different time then in event info

    Hi guys,
    after the last upgrade to the Mountain Lion, my Calendar shows in the event info differnet time than on the visual .. (differecne one hour)
    Any help on this please?
    Thanks
    Stan

    If you're referring to setting the time zone, after following the steps in the article Linc posted, look in the top right hand corner of the Calendar window, by the search box.

  • No wait events info in trace file?

    A very good day to all experts,
    I am tracing a session using the below procedure.
    dbms_system.set_ev(12,13,EV=>10046,LE=>12,NM=>'');
    I am just displaying the following information in trace file.Trace file is not displaying any wait events even when i am doing level 12 tracing.How i can see the wait event information in trace files?
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.01 0.01 0 0 0 0
    Fetch 2 0.00 0.05 2 2 0 1
    total 4 0.01 0.07 2 2 0 1
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 55
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID aaa_USERS (cr=2 pr=2 pw=0 time=58806 us)
    1 INDEX UNIQUE SCAN SYS_C004271 (cr=1 pr=1 pw=0 time=42773 us)(object id 47506)
    Thank you....

    Your post is without version information up to 4 digits.
    You post tkprof output.
    Not all version of Oracle have tkprof post wait event info.
    IIRC. this started in Oracle 9iR2.
    You would need to look in the raw trace file to find out whether this information is actually available. You will find it is.
    This could likely being caused by using 8i, which doesn't have this facility.
    But as you don't post a version, your question can not be answered.
    Sybrand Bakker
    Senior Oracle DBA

  • Passing events down components in different layers

    Hi,
    Summary: How to pass events to lower level containers
    in a multi layered container system.
    This is the scenario which I have
    2 Small panels (non overlapping)are added to the content pane using
    getContentPane.add(component). Both of them have tool tips associated with them.
    Now I am adding semi transparent pane partially overlapping the above two panes and on the top of it. I achieve it by doing
    getContentPane.add(component, 0 )
    There is no tooltip associated with it.
    When I move the mouse over the non-overlapping areas, i get the tool tip associated with the panel. When I move the mouse over the overlapping area. No tool tip comes. Now I would like to display the tool tip based on the component based below the semi transparent , ofcourse depending on whether the mouse is over the overlapping area.
    Regards,
    Revon

    Here's an idea:transparentPane.addMouseListener(new MouseAdapter(){
       public void mouseEntered(MouseEvent e)
          // depending the components 1 and 2's positioning,
          // in relation to where mouse is over transparentPane,
          // you can determine who to fowaredEvent to
          if(mouseOnTopOfComponent1)
             fowardEvent(component1, e);
          else if(mouseOnTopOfComponent2)
             fowardEvent(component2, e);
    private void forwardEvent(Component c, MouseEvent e)
       c.dispatchEvent(new MouseEvent(c, e.getID(),
                                      e.getWhen(),
                                      e.getModifiers(),
                                      e.getX(), e.getY(),
                                      e.getClickCount(),
                                      e.isPopupTrigger()));
    }

  • Category and Supplemental Category are missing from Photoshop CC 2014 File Info IPTC metadata

    Photoshop CC 2014.0.0 is missing the File Info IPTC metadata fields Category and Supplemental Category. Is there a way to restore them? The new interface to all the IPTC fields is much less flexible—they cannot be rearranged or hidden as in Photoshop CC 14.x

    Removed from XMP

Maybe you are looking for