Flex/AS3: textArea - Paste-Event

Hi everyone,
is there a way to capture the paste in the mx:TextArea?
KEY_DOWN captuing for V with event.command == true (I'm on a Mac)
does not work.
Stephan

To answer my own question, I finally found a solution ...
While there isn't any paste event you can catch a menu
command invokation for paste of a native menu. You need to add an
event listener for the SELECT event to the native menu.
Then you can either handle the paste yourself or call
standard functionality by invoking nativeApplication.paste()
You need a native edit (normally with at least cut, copy,
paste, select all) menu for that, preferrably with the common key
short cuts. It is automatically created on the Mac but you have to
create it yourself for Windows (haven't tried Linux yet, but I'm
sure you'll need to create it there as well).
By creating your own menu, especially on windows (where you
have to), you cut off all standard behaviour for cut, copy, paste
and select all, so you have to call the according methods of
nativeApplication yourself. If you reuse the standard edit menu
that's created automatically on OS X you do not need to do that.
Hope this helps anyboy with the same problem

Similar Messages

  • Flex/AS3 Best way to construct a derived class instance from an existing base class instance?

    What is the best way to handle the instantiation of a derived class from an existing base class.
    I have a base class which is being created via remote_object [RemoteClass alias] from the server.   I have other specialized classes that are derived from this baseclass, but serialization with the server always happens with the base class.     The base class has meta data that defines what the derived class is, for example
    [RemoteClass (alias="com.myco...')]
    public Class Base
         public var derivedType:String;
         public function Base()
    public Class Derived extends Base
         public "some other data"
         public function Derived()
    In my Cairgorm command which retrieves this object from ther server I want to do this:
    public function result (event: Object):void
        var baseInstance:Base = event.result;
         if (baseInstance.derivedType = "derived")
              var derivedInstance:Derived = new Derived( baseInstance );
    What is the most efficient way of doing this?   It appears to me that doing a deep-copy/clone and instantiation of the derived class is pretty inefficient as far as memory allocation and data movement via the copy.

    Thanks for the assistance.  Let me try to clarify.
    MY UI requires a number of composite classes.    The individual components of the composite classes are being transfered to/from the server at different times depending upone which component has changed state.    The construction of the composite classes from the base class happens in my clients business logic.
    Composition happens in a derived class; but server syncronization happens using the base class.    When I recieve the object from Blazeds through the remote object event, it is in the form of the base class.  I then need to instantiate the derived class and copy the elements of the base class into it (for later composite construction).   And likewise when sending the base class back to the server, I need to upcast the derived class to its base class.   But in this case just a mere upcast does not work.  I actually need to create a new base class and copy the attrbutes into it.  I believe this is limitation of how remoting works on Flex/AS3.
    My question is, what is the best way to turn my base class into it's derived class so further composite construction can take place.   The way I am currently doing it is to create a  load method on the base class, that takes the base class as on argument.  The load function, copies all of the instance attribute references from the base class to the target class.
    public Class Base
         public function Base()
         public function load(fromClass:Base)
        {  //  copy the references for all of the instance attributes from the fromClass to this class }
    Then,  after I recieve the base class from the server.   I create a new derived class and pass the base class into the load function like this:
                for (var i:int=0; i < event.result.length; i++) {
                    var derived:Derived = new Derived();
                    derived.load(event.result[i]);
    The drawbacks of this approach is that it now requires 2 extra instance creations per object serialization.   One on recieving the object from the server and one sending it to the server.    I assume copying references are pretty efficient.  But, there is probably some GC issues.     The worst of it is in code maintenance.   The load function now has to be manually maintained and kept in sync with the server class.
    It would be interesting to hear how others have solved this problem.      The server side is an existing application with around 2M LOC, so changing the code on the server is a non-starter.
    Thanks for your help.

  • How to add the Event.PASTE event on RIA Application container.

    Hi,
    I am creating the Web appliccation. but i need add the paste functionality over the application.
    Once paste some content over the application caontainer. I want to check the Clipboard data and react based the content. If it should be text content i want to add the text object inside the work area and put the related content inside text object.
    I tried Event.PASTE event in TextArea component, its working fine. but i need for main application.
    It will very use for me.
    Thanks
    - Rajan

    Hi Madhu,
    Can you provide me more details on what to do with my situation?
    I already have the program which is SAPMV56A but I don't know what to do after. Also can you tell me where I can find (table) the items on the Trans. Type list?
    Thanks,
    Eric

  • Delete a calendar without deleting past events? (iCal 5.0.3)

    Hi,
    Is there a way I can delete one of my calendars on iCal without losing all the past events? Right now, if I just delte it I get a warning that all event in that sequence will be gone.
    Thank you

    Actually, I've figured it out. In order not to lose the past events in a calendar I can export the whole calendar. Delete it, then Import it into a calendar that I don't want to delete. This way all the past events will remain.

  • Ios 7 calendar list view only go back 12 months, how can I sync all my past events

    My iphone 5  ios 7 calendar only shows events for past 12 months (ios 6 could show events from the beginning, about 6 years).  I uninstalled and reinstalled itune and related Apple program, also disable add ons in outlook 2007, where calendar and contacts stored.  Now the calendar shows all my past events after I reset sync history in itune but calendar list still only shows past 12 months.  Even the search won't bring any thing that is older than 12 months.
    I really really miss my old calendar, so frustrated with ios7, can anyone help me? Did I do anything wrong or missed anything?

    In my calendar viewing in a list, I can see days back and forth.
    View a list of events.  In month view, tap to see a day’s events. In day view, tap .
    Sorry, the icons are missing above, see this help link:
    http://help.apple.com/iphone/8/#/iph3d110f84

  • Ical deleted all my past events

    I am using iMac, iPhone4s, iPad, iPod - yesterday, all of my past events on iCal, across all devices, were deleted. I am not currently using Time Machine on my iMac, and I need to get these events back - I use them at the end of each month for billing purposes. I did not alter my syncing options on any device or on iCloud -- the events have been there since I started using iCloud, now suddenly, they are all gone (everything prior to yesterday's date). Any help in recovering these items would be greatly appreciated. Thanks in advance for your time!

    About your only option would be to try to recover it from your iCloud backup.  There's a user tip here on how to recover contacts from an iCloud backup: https://discussions.apple.com/docs/DOC-4841.  Just substitute calendar for contacts and the process would be the same.  The key for this being successful is to disconnect your router from the internet (step 4), allowing you to turn off calendar syncing with iCloud and keep the calendar on your iPhone before it is overwritten by the iCloud calendar. 
    If you have any other calendars on your Mac be sure to back them up before trying this using File>Export>Export.

  • How do I get my past events back on my calendar ?

    I have 'lost' my past events on my iPad 2 and my iPad Mini so how can I retrieve them,please

    Settings>Mail, contacts, calendars>Calendars>Sync>All Events.

  • How to disable registration for a past event

    Hello community,
    Please help.
    I know I've seen something written or a tutorial on how to make past events disabled for registration in the events module, but now I can't find them to save my life. It seems obvious that this should be the default situation (what business in the world wants to allow users to register for a past event?), but I'm willing to make mods until Adobe figures this out.
    Please tell me this is possible. And PLEASE let it not be a massive hassle! My client has daily events (basically daily admission) and creating each day separately is already a hassle after I sold them on BC functionality. For them to have to delete each event daily so that (their often elderly) personage won't get the day wrong and purchase for a past date is something I don't want to tell them they have to do.
    I'm using a modified web form with payment to allow multiple registrations.
    Thank you in advance!

    Your sister needs to disable iMessage on her iPhone if the iPhone is still available if she hasn't already done so.
    If she has, does she have iMessage enabled with the same Apple ID on another iOS device or on a Mac as was used to activate iMessage on her iPhone?

  • How can I copy and paste events in the calendar?

    Does anyone know how to cut and paste or copy and past events in the calendar?  The events happen at different times and on different days so I can't just "repeat".  Thanks in advance!

    Ignore MJG196 post.
    In Calendar, tap the event, tap Edit, then change the Starts date you want the event to move to.

  • Past events are being altered automatically

    For some reason my calendar has started to delete the contents of some past events.  All events are in one iCloud calendar.  I can't work out whether they were created on the iPad, iPhone or iMac in terms of synching. I need these to research comments made at the time in the notes fields and it's deleting the entire contents other than times and dates and comes up as "new event".  Does anyone know why this is happening or how I can find out which device has the problem?

    You have this - go to settings > mail, contacts, and calendars > scroll down to 'calendars' section > where it says 'sync' it probably says 'events 1 month back'
    select that bar, then change how far back you sync calendar data. It's not deleting your info, it's just not syncing it to your phone

  • Why does my calander lose past events

    My calendar loses past events. Everything from 30 days ago back is gone. Do i have something set wrong?

    If you are syncing with a calendar on another computer, you may have the iPad settings set to a limited number of events.  To check, go into Settings, Mai/Contacts/Calendars, and scroll down to the Calendars section.  Tap Sync and select the number of months back you wish to sync.  You may want to consider choosing All Events to have your calendar completely up to date.

  • Can't edit past events

    i have a client who showed me this strange problem today.
    she can view or delete past events for which she's listed as the organizer but can't edit them. i don't see any clear errors or notifications on the server to point me in any particular direction.
    for individual events added to her calendar with no attendees, she can edit the past events, just not if attendees are listed.
    any ideas? server's a g5 xserve running 10.5.5 for now. clients are 10.5.4-10.5.6. the client in question is on 10.5.6.
    i also still have an issue at the same client, outlined here: http://discussions.apple.com/thread.jspa?threadID=1964543

    Perhaps you've just updated your OS and now have the newer version of iCal which is ***** compared to the faster, more elegant older version. The older iCal presented every event's details in a ready to edit format just by clicking on the item in the calendar.
    Now you have to double click that item you're interested in (one two) to get a window that shows you the item's details. Then, to edit, you must click the 'edit' button (three) upon which another editable window will allow your event details to be edited. Finally, after finishing your edits, you must click 'done' (four). Yes, that's right, 4 clicks to do what used to require only the initial click to specify which event you wanted to edit.
    Four times as many clicks for a utility application that has no further improvements, only this annoying change from what was once a very efficient tool.
    I do hope a future "update" will bring back the elegance of the older version with some true improvements.

  • Amfphp - flex remote object error event handler

    I'm using amfphp and I want it to return an error that the flex remote object error event handler will pick up. At the moment I can get only the result handler to do anything in flex.

    Hi,
    Try throwing an exception in the remote method. For example,
    function inverse($x) {
        if (!$x) {
            throw new Exception('Division by zero.');
        else return 1/$x;

  • Why does ical delete my past events when all settings indicate that it should not?

    All of the boxes, about deleting past events, in ical preferences are unchecked, so I can't figure out why ical deletes my past events.  Could it be because of a setting on either my iphone or ipad causing this to happen?

    I had the same problem a few weeks ago and called apple support.  The solution is as follows:
    Most apple users have multiple devices using icloud such as an iPdad, iPhone, and other computers.  In my case, I had two computers, two iPads, and one iPhone.   After speaking to apple support, I realized that one of my ipad's setting were set to delete events older then 2 weeks.   In short, if you are expeirienceing problems with ical deleteing events, you better check all your devices.  If just one of them is set wrong in your preferences, you will lose past events.   Even check computers you gave to your cildren or other members of the family.  You will probably find out that the settings on one of these machines is causing your problems.

  • How do I find a past event(s) in calendar on mountain lion

    How do I find a past event(s) in calendar on mountain lion without manually going back day by day? I would ike to be able to use Calendar as a searchable log.  I do not care about syncing with iOS, just finding an event or notes in an event, such as "oil change", "research paper turned in", "dr. appt."  The find function only works on future evernts.

    I tried the "year" view, but it makes not difference.  A Spotlight search does not present the info in a calendar format, only in an events and reminders format. It also only seems to be finding the "today" view, but it is impossible to be sure since it only shows a time for the event but no date.  There has to be a way to find the last time or all the times I made a Dr.'s appointment without going through an entire year or more day by day.
    Tom

Maybe you are looking for

  • *** Can I change the position/font of the titles?

    I would like to create a slideshow of some of my pictures where the title is also visible. I can see the checkmark to make sure the title is there but I wonder if it's possible to change the location and font of the text. Is there a way to do this? C

  • Just purchased a Macbook Pro 15" 2 no software in the box.

    Just purchased a Macbook Pro 15" 2.7ghz and there was no software in the box.  What if I want to reinstall the OS, what do I do if I want to totally erase and reintall?

  • ORA-06508 PL/SQL: could not find program unit being

    Hi all, I'm having the following problem: I have a trigger that gets fired before update of a field. The trigger source code calls a function from a package. This function calls another function. When the trigger was executed I got the following erro

  • 11.2.0.3 Parallel delete on non-partitioned table

    Friends and mentors... I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature... Task: Trying to delete large data (20

  • Question to understand javax.swing.plaf.FontUIResource("Arial Unicode MS"..

    Hi Commuity! I have an Question about this function! javax.swing.plaf.FontUIResource("Arial Unicode MS", Font.PLAIN, 12); I have read the Java doc but this didn�t help! I wanted to know, what happend, if this Font is not an the Client. So i deleted t