How to get the actual key pressed in a UITextField

Hi all , now i develop a program on iphone SDK 3.0 GM.
I have an UITextField (created programmatically) and I have implemented the delegate as well as the UITextFieldTextDidChangeNotification so that I can react to changes in the text values.
However, I specifically want to know when the user presses the backspace key in the UITextField when there is currently no text in the field. I can't find where I can get a specific notification of the actual key pressed, as opposed to the resulting state of the text. I'm sure there is a way to do this...help?

I can imagine why you want to do it. I had the same problem myself and managed to circumvent it in a slightly painful way. What I did was to subclass UITextField to create a text field that always had text in it, even when it "seemed" empty. In fact the first character of the text is a space character, and then what follows is the actual text. In this way, your delegate will always get called about a backspace (when it's an attempt to delete the leading space character, obviously you should return NO in the textField: shouldChangeCharactersInRange: replacementString: method). I won't get into the details of exactly how to set everything up, like I said it is kind of elaborate and I wouldn't really recommend it unless you are desperate to have that kind of functionality.

Similar Messages

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • How to get the actual font name from a font file?

    Hi
    I have only the font Path I have to get the font name from that path. Any idea how to get the actual font name?
    Thanks,

    I would ask you these questions:
    Why do you need to do this?  What are you ultimately trying to accomplish?
    Are you really asking about the InDesign SDK?
    Do you really need to get the "name" of a font from an arbitrary file?  Or do you want information about a font installed on the system?  If so, what OS?
    Do you need to be able to handle any font format?
    Which font "name" do you mean?
    What language do you want the name in?
    (1) It's not clear what you're trying to accomplish.  A bit more information about your ultimate goal would be helpful.
    (2) This question is not at all specific to the InDesign SDK.  Are you really trying to do something in the context of an InDesign plug-in?  If so, you probably want to look at IID_IFONTFAMILY and the IFontFamily::GetFamilyName function.
    (3) If you are asking more generally, Windows and Mac both have system API calls to get this information, although those tend to deal with installed system fonts, not with arbitrary font files per se.
    Also, you can parse the name table from a True Type or Open Type font without using any system APIs; as True Type and Open Type are well-documented standards.  I would start by reading these:
    The Naming Table
    Font Names Table
    (4) Although there are other standards, such as Type 1 (PostScript) fonts, and True Type Collection files and other formats, especially on Mac.
    (5) Also, when you start down this road, you will quickly realize that your seemingly simple question is actually ambiguous, and that the answer is kind of complicated, because a font can have many names (a family name, a full font name, a style name, a PostScript name, etc.).
    (6) And not only does a font have multiple names, it can have each of those names in multiple languages and encodings.
    Any clarification would make this a better question.

  • I create a mobile game. How to get the signing key?

    I create a mobile game. How to get the signing key? Is the certificate is payable? Sorry if the topic is in the wrong section.

    You need to be an iOS/Mac OS X developer.
    https://developer.apple.com/devcenter/

  • How to get the Primary key from  Synonym

    Hi ,
    I want to get the Primary Keys for my tables . I used
    java.sql.DatabaseMetaData databasemetadata = connection.getMetaData();
        ResultSet rs = databasemetadata.getTables(null, null, "%", null);
    rs.next();
        System.out.println(" TABLE_CAT "+ rs.getString(1));
        System.out.println(" TABLE_SCHEM  "+rs.getString(2));
        System.out.println(" TABLE_NAME "+rs.getString(3));
        System.out.println(" TABLE_TYPE  "+rs.getString(4));
        System.out.println(" REMARKS "+rs.getString(5)); gives :
    TABLE_CAT null
    TABLE_SCHEM PROGRESS
    TABLE_NAME ApplicConv
    TABLE_TYPE SYNONYM
    REMARKS null
    Now if I use :
      rs = databasemetadata.getPrimaryKeys(null,"PROGRESS","Applicconv");
      System.out.println("Is result set Non empty "+rs.next()); gives :
    Is ResultSet non empty false .
    Can you tell me why this result is empty? Is it because of my table is a Synonym?
    If it is Synonym how to get the primary key ?

    You can use DatabaseMetaData#getPrimaryKeys.

  • How to get the actual value rather than pixel value in vision assistant

    how to get the actual value rather than pixel value by vision assistant in my program.As shown in the figure            this is my programme   this is the result       But i want to get this result

    Check the documentation for the "ADF Dialog Framework"
    It may help
    Atilio

  • My iPhone getting stolen,how I get the actual location my iPhone way using the apps find my iPhone?

    My iPhone getting stolen,how I get the actual location the full address to find my iPhone way using the apps find my iPhone?

    If you set up the Find My iPhone service prior to your iPhone going missing - the app is for tracking a device from another iOS device - then there is a chance that can be tracked, though it depends on a number of factors (the iPhone is turned on, connected to either the 3G or a WiFi network, or has not had the Find My iPhone service disabled or the iPhone been completely restored). Log into icloud.com and go to the Find My iPhone section. If you did not set up Find My iPhone, check with your cell carrier. Some carriers offer their own tracking service, though you usually have to pay for it. 
    If your carrier does not offer such a service and you did not set up Find My iPhone, then there is no way to track the unit. Contact the police and change any passwords for any online accounts you may have used from your iPhone (the iTunes Store, for instance). 
    Regards.

  • Help!! I can't find how to get the enter key......

    Hi...
    I am information technology student. I am now first year second semester
    I need help because I don't know how to catch the enter key in JTextField.
    I want to submit the form when user press the enter key in JTextField....
    I only can find KeyEvent.VK_ENTER ( actually that is not what I want)
    Another thing is
    "How to add a JMenuItem into a JMenuItem...."
    I want to do like this.... When you click the "Tools bar" in View item.. another menu comes out...???"
    He he... I hope you all can understand what I mean.. because I know my english is not so good... because I am from Myanmar.
    for(int i=0;i<1;i--)
    System.out.println("Thanks A lot");
    Thu Rein Nyo...
    You also can reply by e-mail.. thanks

    Hi...
    I am information technology student. I am now first
    year second semester
    I need help because I don't know how to catch the
    enter key in JTextField.it can be done easily by adding an actionListener to the JTextField. So when u enter something in the field and press enter the event will be caught and the code which u write in that will get executed.
    Eg:
    JTextField.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    Your code comes here.
    Another thing is
    "How to add a JMenuItem into a JMenuItem...."
    I want to do like this.... When you click the "Tools
    bar" in View item.. another menu comes out...???"I think you are gettin confused with JMenu and JMenuItem. What u need to do is create a JMenu add another JMenu to it and add JMenuItems to it.. and ur problem will be solved.
    He he... I hope you all can understand what I mean..
    because I know my english is not so good... because I
    am from Myanmar.
    for(int i=0;i<1;i--)
    System.out.println("Thanks A lot");
    Thu Rein Nyo...
    You also can reply by e-mail.. thanks

  • How to get the PRIMARY KEY of a table at runtime ???

    Hi everybody,
    My requirement is to update a z-table at runtime according to the data given ata runtime. So the main difficulties for me is that whenever I tried to update the table based on the data given in UI many rows are getting updated as these fields are not unique. So I think if I can get the PRIMARY KEY along with these given fields then I can update only one row at a time.
    So Can anyone suggest me how to get PRIMARY KEY of a table based on the data in UI..??
    Any suggestions will be appreciated..
    Thanks,
    Sekhar

    U will get primary keys of transparent tables using FM "REUSE_FIELDCALATLOG_MERGE".
    pass tyour table name and u will get fieldcatalog filled. In tht their is a field called "KEY" if it has 'X' then tht field is a primary key of transparent tables & if it has "space" then it is not a primary key...
    Or else you can try with 'DDIF_TABT_GET'
    Or try this code
    PARAMETERS: p_table TYPE tabname OBLIGATORY.
    DATA: go_strucdescr   TYPE REF TO cl_abap_structdescr,
          gt_tab_fields   TYPE ddfields.
    FIELD-SYMBOLS: <gwa_tab_field> TYPE dfies.
    TRY .
    *   Get the details of the DDIC table
        go_strucdescr ?= cl_abap_elemdescr=>describe_by_name( p_table ).
      CATCH cx_sy_move_cast_error .
        MESSAGE 'Error while casting' TYPE 'S'. RETURN.
    ENDTRY.
    * Check if input is a DDIC table
    CHECK go_strucdescr->is_ddic_type( ) = 'X'.
    * Get the details of the table fields
    gt_tab_fields = go_strucdescr->get_ddic_field_list( ).
    * Display the Key fields of the table
    LOOP AT gt_tab_fields ASSIGNING <gwa_tab_field> WHERE keyflag = 'X'.
      WRITE: / <gwa_tab_field>-fieldname.
    ENDLOOP.

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get the actual screen size

    Hi,
    I have to get the actual screen size of the cliend in an applet, if i use method
    Dimension dmx = Toolkit.getDefaultToolkit().getScreenSize();
    it does not gives the actual screen size, like the screen size will be different if the application bar ( where we have start button on windows ) is Auto hide, and will be different it is not Auto Hide, or some users ike to keep the application bar on right or left of screen or on top..
    So how do we get the actual display size of screen

    Hi,
    I got how to do if using applet
    in screen object of java script we have methods to get the available width and availabe size
    screen.availWidth
    screen.availHeight
    here is the link for more info
    http://developer.netscape.com/docs/manuals/js/client/jsref/screen.htm
    http://forum.java.sun.com/thread.jsp?thread=275329&forum=57&message=1063410

  • How to get the actual height of JEditorPane?

    I have a basic question on the JEditorPane. Do I have to show the JEditorPane on a temporary Frame in order to get the actual height? My work around is to show the JEditorPane on a frame, get the JEditorPane height, then dispose the frame. It would be nice if I can get the actual height of JEditorPane without showing the frame.
    This is test my code.
    import java.awt.*;
    import java.lang.*;
    import java.net.*;
    import javax.swing.*;
    public class Test {
    public static void main (String [] args) {
    double w = 0;
    double h = 0;
    JEditorPane editorPane = null;
    try {
    URL url = new URL("file:test.html");
    editorPane = new JEditorPane(url);
    } catch (Exception e) {}
    editorPane.setPreferredSize(new Dimension(400, 700));
    w = editorPane.getWidth();
    h = editorPane.getHeight();
    // output "width: 0 height: 0"
    System.out.println("width: " + w + " height: " + h);
    // This my work around the get the actual height
    JScrollPane scrollPane = new JScrollPane(editorPane);
    JFrame frame = new JFrame("TESTING");
    frame.getContentPane().add(scrollPane);
    frame.pack();
    frame.show();
    // wait for loading data
    try {
    Thread.sleep(20000);
    } catch (Exception e) {}
    w = editorPane.getWidth();
    // actual height based on the width and the size of test.html
    h = editorPane.getHeight();
    // output "width: 597 height: 24320"
    // 24320 is the actual height that i want
    System.out.println("width: " + w + " height: " + h);
    frame.dispose();

    This thread uses a PropertyChangeListener to notify you when the page is finished loading.
    http://forum.java.sun.com/thread.jsp?forum=57&thread=333171

  • How to get the Actual Query of View Object

    Hi all,
    I have a standard. I need to modify the query of the VO attached to a picklist based on responsibility. I am able to achieve my requirement but it is getting reflected for all the responsibilities even though i extended the controller for a particular responsibility. I used setQuery() to change the query of my VO. When checking "About this page". The code i added also shown in the page. Now i want to get the actual query to the VO before the controller is extended so that i can set the modified query or actual query based on my responsibility. Kindly share your knowledge.
    Regards,
    Pradeep

    Hi,
    I guess following query will not work ,Why use 2 where clauses.
    SELECT * FROM (select NVL(VENUE_NAME,' ') "Venue",
    NVL(VENUE_CITY,' ') "City",
    NVL(COUNTRY_DESC,' ') "Country",
    EVENT_NUMBER
    From NS_EVENT_VENUE_DETAILS,NS_COUNTRY_MASTER WHERE COUNTRY_CODE = VENUE_COUNTRY) QRSLT WHERE (QRSLT.EVENT_NUMBER = 1539
    you can as following using bind variable.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CEGDGIJH

  • How to get the decision key in abap program

    Hi guys.
    I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
    How i get this ids decisions through a abap program.
    I need to know this because i have to pass this id to a Z Function Model.
    Thanks!

    The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
      EXPORTING
        workitem_id                    = im_wi_id
      TABLES
        simple_container             = lt_container
    READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
    If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
    CALL FUNCTION 'SAP_WAPI_DECISION_READ'
    EXPORTING
    workitem_id  = im_wi_id
    TABLES
    alternatives = lt_alts.

  • How to determine the exact key pressed when numlock disabled?

    Hi there,
    I am trying track the keyboardevent that triggered by pressing numpad keys as hotkey, but when the numlock is disabled, the same keycode, same keylocation was gotten as pressing in the standard keyboard. how can I determine if the numpad was pressed or the other control keys were pressed?
    Thank you!
    Andy

    Hi there,
    I am trying track the keyboardevent that triggered by pressing numpad keys as hotkey, but when the numlock is disabled, the same keycode, same keylocation was gotten as pressing in the standard keyboard. how can I determine if the numpad was pressed or the other control keys were pressed?
    Thank you!
    Andy

Maybe you are looking for

  • Problem with versions

    I am very new in sql server.  I downloaded sql server express 2012.  I then downloaded adventureworks sample database.  I used the following command to attach the database: CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'M:\Data\AdventureWorks2012

  • Changing iMac screen saver

    I have one of the newer iMacs. I was using the screen saver with the colorful lines swirling around. I wanted to see what the slides screen savers would look like so i switched to that. Now i want to go back to the swirling colorful lines but I don't

  • Problems purchasing Busberry app (Chicago bus tracker)

    I'm using a Bold 9650. So I managed to download and use the trial version, which let's you use the app 5 times. However, when I use the link within the app to purchase the full version, or if I go to the developer's page directly to try to purchase i

  • Case sensitive string variable?

    Hello, I use the following code to determine whether I am opening a DAT file or a TDM file. Some of it is complicated by a bug in 2010 but that is not relevent for this particular problem. Up until today it has worked perfectly, probably because the

  • Mass transport of Model Orders

    Hi, I have a question. I need to transport multiple objects via one transport u2013 Model Orders. The standard transaction allows me only include Model Orders one by one;( This is how it looks like in a transport when you transport it standard way: C