Text deletion events

hi,
i am extending the TextInput control, i have managed to catch
the text typing events...
my question is:
how can i catch the text deletion (delete and backspace
keys) events ??
thanks,
jaimon

Listen for the "keyDown" event, and the examine the
event.charCode for a value of 8 or 127 respectively.
If you want to prevent the backspace/delete, it's not so easy
- you cannot prevent propagation of the keyDown event. Here's what
I do (not pretty, but it works):
var caretOffset:uint = textField.selectionEndIndex;
textField.setSelection(caretOffset, caretOffset);
textField.replaceSelectedText(' ');
if (event.charCode == 127)
textField.setSelection(caretOffset, caretOffset);
This works by putting a space in the position that's about to
be deleted or backspaced over, so the end effect after the deletion
is unchanged. Because backspace also moves us back, we move the
cursor to after the inserted space.
Tim

Similar Messages

  • Itunes show deleted events in iphoto

    Hi guys,
    as firts sry for my english :/
    I done all updates for my system (10.8.2, iPhoto etc) yesterday, now I have a confused bug.
    After install the new update for iPhoto, my libary done an "refresh", ok thats normal after an update. In iPhoto all events, pictures etc are ok, but in itunes (iphone-> pictures) I get an very confused bug. itunes show me by events an incorrect sort (ok thats the small problem) but he show me deleted events, too :/
    I merge some events to an new event in the past, but now itunes show me the old not existens events and complete delete events too.
    Albums and faces are without this problems.
    Did anywhere have the same bug or now an solution for this?

    iPhoto uses an xml file within the Library package to do this sharing to other apps. It may be malformed in some way, often it doesn't work terribly well with non Ascii characters - that is anything except 0-9 or a-z. So, things like & or diacritical characters à or ë or whatever, can cause problems whereever they are used.
    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Find the AlbumData.xml file and open it in a Text Editor.
    Search it for non-Ascii characters and replace them. Save it and try again.

  • Captivate 6 Text Entry Events Do Not Pass

    I am a long-time user of Captivate going back to version 2. I've created a simulation course with numerous text entry events that do not validate correctly. I am typically using the TAB key to validate the text entered. I have several lessons where everything works fine, but many that have problems.
    Typically when TAB is used at the end of a key press, you will see focus shift to the first button on the Play bar - and this does not cause any problems. I see this behavior on the events in my course that work. However, for the ones that do not work, I see the focus shifting to the Address Bar and the event will not pass.
    The only workaround I have employed is to use On Focus Lost: Go to Next. This is not a great solution because the text no longer validates with this setting. These events will pass no matter what is entered.
    I would really appreciate your help with this! My course is due soon. I would be happy to provide more information or upload my file for your inspection. Thank you!

    For anyone who might be experiencing the same problem and looking for an answer - this is still 100% broken in Captivate version 6. None of the fixes discussed in the above referenced thread work. I tried playbar widgets, editing the playbars in Flash. No luck.
    Adobe just moves forward from version to version not fixing the bugs they create in prior versions. That's your incentive to upgrade, folks.
    Best workaround I can offer is Use ENTER as your validation keystroke. It doesn't have the same problems associated with TAB. Good luck!

  • Deleting event in iCal 5.0.1 not syncing with Google Calendar

    When I delete an event from iCal, it does not sync with Google Calendar.  However, when I create an event in iCal, it syncs just fine with Google Calendar. Creating and deleting events from Google Calendar syncs fine with iCal.  Has anyone else experienced this problem?

    12/13/2011 - call to google tech support
    Recent support call with Google: iCal deleting events still broken.  this is big for us.  We have users that have accounts for and/or subscribe to multiple calendars, and took a while to teach them to use iCal, so web based calendars will be foreign to them (even though I like the web based).  There is no timeline in place according to Google Tech Support.  I feel like the issue is really Apple's issue, so Google is waiting on them to fix, this type of urgency(or lack of) is right up their alley.  Oh well.
    Does anyone have any suggestions on alternate calendar apps for Mac?  Specifically for google calendars?
    "Regarding the issue about not being able to delete Google Calendar events within iCal, as mentioned it is a known issue which unfortunately we don't have a time frame to offer you.
    You can visit  http://support.google.com/calendar/bin/static.py?hl=en&page=known_issues.cs for Google Calendar known issues.
    You can submit a feature request at https://www.google.com/moderator/#16/e=ba1ca which is also located at the bottom of your Control Panel as ‘Suggest a feature.’ "

  • HT2513 I can't delete events recurring annually...not part of birthday calendar, one's I've added manually.  I've tried delete key, cut event, changing to no recurrence, they just revert to original recurrence and will not be removed from my calendar.  Th

    I can't delete events recurring annually...not part of birthday calendar, these are events I've added manually.  I've tried delete key, cut event, changing to no recurrence, they just revert to original recurrence and will not be removed from my calendar.  Events that occur weekly I'm able to delete, this is only happening with events recurring annually.  Very frustrating.  Thanks for any ideas.

    If you are using a PC, log on to iCloud using Safari (rather than Explorer) to reset the photostream. Then turn iPhone/iPad photostream off and back on. I was getting the same server error as you and this advice from another blog worked for my iPhone and iPad.  But I still can't get photostream deleted from my apple tv. There does not seem to be a photostream on/off control In Apple tv 4.4 software.  I tried switching the screen saver to one of the ones that comes preloaded on the device, then back to photostream but all the old photos are still there.  If anyone can help with this, I would appreciate it.

  • Error while deleting events from the integration event queue

    I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
            IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
            input.setDateTime("");
            input.setLastEventId("");
            try {
                 ((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
            } catch (Exception e) {
                 log.error("Deleting events from integration queue failed: ", e);
            }Alas, I get the following error message:
    Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
    Thanks in advance for any input.

    Dont keep this attributes null
    input.setDateTime(""); //Put a Default Time way in
    the past. Ex:"1/1/2000"
    input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything.

  • How do i delete events in i movie 11?

    how do i delete events in i movie 11?

    Hey,
    You just need to select an event, right-click, and select delete event. It will then give you an option of how you want to delete it.
    The iMovie Guy

  • How can I make albums from events then delete events without deleting the album?

    Hey, just need a little help!
    How can I make albums from events then delete events without deleting the album?
    Many thanks

    You'll be more likely to get help with this if you ask in the iPhoto forum:
    https://discussions.apple.com/community/ilife/iphoto
    You'll need to tell people what version of iPhoto you have so they can give you correct advice.
    Regards.

  • My IPAD (original version) is deleting everything over 30 days from my calendar.  How can I prevent this and how can I get the deleted events back?

    My IPAD (original version) is deleting everything over 30 days from my calendar.  How can I prevent this and how can I get back the deleted events? 

    You are most welcome

  • Sms texts deleted by mistake

    sms texts deleted by mistake by swiping against the wrong person's name

    Only chance to get them back would be restoring from the latest backup, which would set back all other data as well.

  • How to handle Text  change event in text box in SAP B1

    Hello Expert...
    How to handle Text  change event in source.
    Please define the Event when i change the text in textbox..
    currently i am using the Lost focus event but it is only occur when tab focus lost from that text box.
    So please required solution ASAP..
    Regards,
    Abhinav Lalpurwala
    Edited by: Abhinav Lalpurwala on Aug 5, 2011 3:19 PM

    Hi,
    Catch the et_VALIDATE event, when InnerEvent = False and ItemChanged = True.
                If pVal.EventType = BoEventTypes.et_VALIDATE Then
                    If pVal.InnerEvent = False And pVal.ItemChanged Then
                        'TODO Your code here...
                    End If
                End If
    Regards,
    Vítor Vieira

  • After deleting events they reappear

    Using  MacBook Pro, running 10.6.8, I setup an event up in iCal and when editing to correct information the event was duplicated, one with the correct information one that was originally edited to correct information. Now when deleting events they disappear for about 20 seconds and then reappear.
    How can I correct this?

    I want to let others know I have resolved this issue.

  • Correlations in Workflow - wait for Delete event problem

    Hi All,
    I am working on version ECC5.
    I have a workflow that needs to wait for any changes to i0008, i0007, i0509 and i2001 for the person who is the subject of the workflow.  I have used correlations to do this and it is all working fine except for the Delete event.
    For each infotype I wait for each event ie. Approved, Changed, Created, ApprovedCancelled and Delete.  When the events are published the wait event is triggered and the workflow goes to the next steps where it does a recalculation,  fires off a new workflow and ends the current one.  This is working for all of the events except Delete.  The Delete event is set up exactly the same as the rest, but somehow the workflow wait event is not triggered.  It is happening with the Delete event for all the Infotypes I am waiting for.
    Does anybody have any suggestions as to what may be the problem. 
    Thanks
    Sandra

    Arghadip/Martin thanks for your replies.
    Yes, the delete event is being published.  I am using the same object e.g BasicPay for the delete event that I am using for the other events - Approved, Created etc. that are working.   The correlation and the wait for event steps are set up exactly the same way as they are for the events that are working.  I find it curious that the delete event doesn't work for any of the infotypes.   Why?  Could it be that when a record is deleted the object no longer exists?
    Any suggestions?
    Thanks
    Sandra

  • Process Task Child Table Delete Event passes empty values

    Hi All,
    I'm trying to implement a delete event in a process task for a child table. I am assuming the value to be deleted
    should be getting passing into the adapter but it's passing empty strings instead. The insert event is working fine however.
    Any one else using the delete event that works?
    Thanx
    Fred

    Hi Kevin.
    Any idea how to programmatically access the "old value" variant of a form field?
    It's the sort of thing one needs occasionally when a value changes and some associated capability needs to be updated. The old value specifies what needs to be removed while the new value tells the system what is to be added in its place.
    (It so happens in our environment that we have dozens of these values per user profile, so it would be very painful to store "old" values in a parallel set of fields.)
    Thanks,
    Dan

  • ICal 4.0 and Snow Leopard: can't add / edit / delete events + workaround

    Hi,
    iCal 4.0 under 10.6.1, any changes I made in iCal was reversed when I quit and reopened iCal. Plus my changes didn't sync to my iPod.
    When looking at the Console.app, I saw:
    2009/09/15 13:31:51 iCal[11918] save failed: Error Domain=CalCalendarStorePersistenceErrorDomain Code=1 UserInfo=0x115d4c780 "The end date can’t be set to occur before the start date. Change the end or start date." {
    NSLocalizedDescription = "The end date can\U2019t be set to occur before the start date. Change the end or start date.";
    I tried to export / delete / import all my calendars, that didn't help. Then I noticed I also have the calendar automatically generated for the birthdays from my address book.
    I unchecked "Show Birthdays calendar" from the General preferences. Now iCal works again (I can add / edit / delete events and the error message doesn't show in the Console.app anymore)
    Cheers,
    Janus

    I have updated my OS to 10.9 hoping this to fix my problem.... but nothing... It's still the same....

Maybe you are looking for

  • When i press record thru the mic it Freezes

    Its only for real instruments, otherwise it records fine if I'm using a software instrument. It freezes and i get the wheel of death for three minutes until it finally records.

  • How to upload .csv file with tab as delimiter.

    HI, I want to upload a .csv file with tab as delimiter to unix path in background.                                                                                                              I know there is function module 'GUI_UPLOAD', but in my ca

  • Aol emails undeliverable

    I'm having a problem with emails from aol accounts not being delivered and the sender gets an "undeliverable" message. How can I resolve this? 

  • Used system update, now safari crashes, can't intiate a new system update

    I used the software update in Tiger, updated the latest version of the security update and the itunes...now everytime I open up safari it crashes, and I can intiate a new software update as it crashes too. Any ideas on how to fix?

  • Ios 7 app udates

    With automatic updates, I am curious if there will be some type of communication telling us what was updated, and what the update was.