Search Results

Search found 799 results on 32 pages for 'textfield'.

Page 3/32 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Textfield being dequeued before textFieldDidEndEditing is called?

    - by Tony
    I am using a uitableview with a bunch of dynamically created custom cells each with a label and textfield similar to the settings app on the phone. Problem occurs when i have a lot of textfields say 20, the user selects the first textfield, changes its value then scrolls to the end of the table and selects the last textfield to edit. I get a EXEC_BAD_ACCESS in the textFieldDidEndEditing method because i think the textfield value is nil?? I think this might be happending because the 1st textfield that was being edited is being dequeued when the table is scrolled. Everything works fine if you select textfields that are next to each other. Any ideas how to fix this?

    Read the article

  • UINavigation Bar while moving view for writing in a textfield

    - by ObiWanKeNerd
    i'm using this code to move the view when i'm about to type on a textfield, otherwise the keyboard may cover the textfield if it's in the lower side of the screen. I would like to know if there is a way to maintain the UINavigation Bar in it's place, because with this code the bar will move with all the view outside the screen, becoming untouchable until i end editing the textfield (closing the keyboard). CGFloat animatedDistance; static const CGFloat KEYBOARD_ANIMATION_DURATION = 0.3; static const CGFloat MINIMUM_SCROLL_FRACTION = 0.2; static const CGFloat MAXIMUM_SCROLL_FRACTION = 0.8; static const CGFloat PORTRAIT_KEYBOARD_HEIGHT = 216; static const CGFloat LANDSCAPE_KEYBOARD_HEIGHT = 162; - (void)textFieldDidBeginEditing:(UITextField *)textField { CGRect textFieldRect = [self.view.window convertRect:textField.bounds fromView:textField]; CGRect viewRect = [self.view.window convertRect:self.view.bounds fromView:self.view]; CGFloat midline = textFieldRect.origin.y + 0.5 * textFieldRect.size.height; CGFloat numerator = midline - viewRect.origin.y - MINIMUM_SCROLL_FRACTION * viewRect.size.height; CGFloat denominator = (MAXIMUM_SCROLL_FRACTION - MINIMUM_SCROLL_FRACTION) * viewRect.size.height; CGFloat heightFraction = numerator / denominator; if (heightFraction < 0.0) { heightFraction = 0.0; } else if (heightFraction > 1.0) { heightFraction = 1.0; } UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { animatedDistance = floor(PORTRAIT_KEYBOARD_HEIGHT * heightFraction); } else { animatedDistance = floor(LANDSCAPE_KEYBOARD_HEIGHT * heightFraction); } CGRect viewFrame = self.view.frame; viewFrame.origin.y -= animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [self.view setFrame:viewFrame]; [UIView commitAnimations]; } - (void)textFieldDidEndEditing:(UITextField *)textField { CGRect viewFrame = self.view.frame; viewFrame.origin.y += animatedDistance; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:KEYBOARD_ANIMATION_DURATION]; [self.view setFrame:viewFrame]; [UIView commitAnimations]; } Thanks in advance!

    Read the article

  • iPhone: Issue disabling Auto-Cap/autocorrect on a UITextField

    - by phil swenson
    For some reason, even though I disable the auto-cap and auto-correct of my UITextField, it's still capitalizing the first letter of my input. Here is the code: UITextField* textField = [[[UITextField alloc] initWithFrame:CGRectMake(90.0, 10.0, 213.0, 25.0)] autorelease]; [textField setClearButtonMode:UITextFieldViewModeWhileEditing]; textField.returnKeyType = UIReturnKeyGo; textField.autocorrectionType = FALSE; textField.autocapitalizationType = UITextAutocapitalizationTypeNone; textField.delegate = self; if (inputFieldType == Email) { label.text = @"Email:"; textField.keyboardType = UIKeyboardTypeEmailAddress; emailTextField = textField; textField.placeholder = @"Email Address"; } else { // password textField.secureTextEntry = TRUE; label.text = @"Password:"; if (inputFieldType == Password){ textField.placeholder = @"Password"; passwordTextField = textField; } if (inputFieldType == ConfirmPassword){ textField.placeholder = @"Confirm Password"; confirmPasswordTextField = textField; } } See screenshot:

    Read the article

  • Jquery ui datepicker textfield doesn't update

    - by Thorpe Obazee
    $('#passport_expiry').datepicker({dateFormat: 'mm/y'}); I have the above code works. I select a date using the datepicker and it updates the textfield. The problem is that when I try to select another date, it doesn't update the textfield. It seems that when the textfield already has a value, it doesn't update it.

    Read the article

  • Changing the size of the UISearchBar TextField ?

    - by Padraig
    I have a UITableView with an Index on the side; I want to add a UISearchBar to it, but the index overlaps with the "x" to clear the search. I've noticed in the Contacts application, the textfield within the UISearchBar is resized to accommodate this, but I can't work out how to do this in my own app. I have tried the following in my viewDidLoad, but it does not seem to work. UITextField * textField = (UITextField *)[[self.search subviews] objectAtIndex:0]; CGRect r = textField.frame; [textField setFrame:CGRectMake(r.origin.x, r.origin.y, r.size.height, r.size.width-30)]; Any ideas?

    Read the article

  • Java ME right to left TextField label

    - by Nimrod Shory
    Hello, I'm writing a Java ME app and i need the label for the text field to be right aligned.. I've tried setting the layout of the TextField to Item.RIGHT but it doesn't seem to affect anything when running on my test phone (Nokia E71). The text inside the TextField is right aligned and Lists and such items are desplayed correctly (RTL aligned) but the TextField label isn't. Any ideas? Thanks.

    Read the article

  • Drupal Webform textfield dynamic growing list

    - by Bob Crowley
    Just curious... I have a project where people can input their cooking recipes. I would like to build a webform that will have a textfield and when it is filled in a new textfield appears below. A "growing textfield list". Let me try to show it here: Ingredient #1 _________________________________ [add] When you type and ingredient click "add" you then are going to see: Ingredient #1 Potatoes_________________________ Ingredient #2 _________________________________ [add] Sorry for not knowing the proper markup. However if anyone knows: a) the proper term for this ( I call a growing textfield list )? b) how to do it with webform in drupal?

    Read the article

  • Why use <g:textField /> in Grails?

    - by knorv
    What is the reason to use g:textField in Grails if you're already familiar with standard HTML form tags? If I understand correctly the following two markup alternatives are equivalent: <input type="text" name="name" value="${params.name}" id="name" /> <g:textField name="name" value="${params.name}" /> Are there any circumstances under which using g:textField would add value? Am I missing something?

    Read the article

  • Updating textfield in doctrine produces an exception

    - by james-murphy
    I have a textfield that contains say for example the following text:- "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and gravy." This textfield is in a form that simply updates an item record using it's ID. If I edit part of the textfield and replace "and gravy." with "humous." So that the textfield now contains "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and humous." I get the following exception:- Fatal error: Uncaught exception 'Doctrine_Query_Exception' with message 'Unknown component alias humous' in C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php:780 Stack trace: C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(767): Doctrine_Query_Abstract-getQueryComponent('humous') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Set.php(58): Doctrine_Query_Abstract-getAliasDeclaration('humous') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(2092): Doctrine_Query_Set-parse('i.details = 'A ...') C:\Projects\nitrous\lightweight\system\database\Doctrine\Query.php(1058): Doctrine_Query_Abstract-_processDqlQueryPart('set', Array) C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(971): Doctrine_Query-getSqlQuery(Array) C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php(1030): Doctrine_Query_Abstract-_execute(Array) C:\Projects\nitrous\lightweight\system\appl in C:\Projects\nitrous\lightweight\system\database\Doctrine\Query\Abstract.php on line 780 I'm using Doctrine 1.0.6 hooked into CodeIgniter 1.7.0 if anyone is interested. My doctrine query that actually performs the update looks as follows:- public function updateItems($id, $arrayItem) { $query = new Doctrine_Query(); $query->update('Item i'); foreach($arrayItem as $key => $value) { $query->set('i.'.$key, "'".$value."'"); } $query->where('i.id = ?', $id); return $query->execute(); } This seems bizarre because if i replace the entire string "A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and humous." with something completely different like just "test" it doesn't throw an exception and works just fine. This baffles me... is it a bug in Doctrine or have I missed something?

    Read the article

  • flash dynamic textfield, multiline and wordwrap acting funky.

    - by pfunc
    I have this weird thing happening with flash and a dynamic textfield. Basically, someone rolls over a marker on a map, and a tooltip pops up with a dynamic textfield. The textfield is set to multiline=true and wordwrap = true, and I defined a specific width of 160 pixels. The problem is, some of my text is jumping to the next line, some of it is just getting cut off. So if I have a line like "The Cat Jumped Over the Box", On one line I will see "The Cat Jumped" and on the next line I would see "the Box". It looks like it is masking out the "over" line and not pushing it to the next line. It's not doing this for everything, just some longer lines. This is a really weird bug and I have tried for 8 hours to get this fixed. Has anyone ran into this problem before?

    Read the article

  • Rails: textfield list to array of strings

    - by poseid
    I want to take input from a textfield and turn it into an array of strings. After having submitted the "post", I want to display again the textfield, but with the array showed below. I have a view that would look like: <% form_tag "/list2array" do -%> <%= text_area_tag "mylist" %> <div><%= submit_tag 'save' %></div> <% end -%> <% @myArray.each do |item| %> <%= item %> <% end %> And as a start for the controller: class List2ArrayController < ApplicationController def index end def save @myArray = params[:mylist].split("\r\n") end end However, after the post, I only get an empty textfield without values in the array from the previous POST. Do I need to use the model layer for my experiment? How? Or do I need to modify my controller?

    Read the article

  • Custom TableViewCell with TextField and first responder

    - by Robb
    I have a custom TableView cell that contains a TextField and I want it to become the first responder as soon as the view is shown but [textcell.textfield becomeFirstResponder] does not work. I know it's because it's a custom cell in another class and I even tried it there and it didn't work. Anyone know how to pull this off? Thanks...

    Read the article

  • Tags in TextField

    - by mukeshpawar
    My problem is- i have three cell, within that i have each textfield now i want the user is clicking in which textbox. This method textFieldDidEndEditing gives me the value which user is inputting but i dont get any tag of the textfield

    Read the article

  • actionscript textfield display issue

    - by simon
    I have a textfield inside a rectangle (Sprite). The text fits inside the rectangle just fine, however the actual size of the textfield is larger than that of the sprite. (invisible top margin in the font) The problem is when I added an eventlistener to the Sprite that detects mouse clicks, it fires even when I click outside of the rectangle. How can I fix this? (so that child object size does not exceed parent size)

    Read the article

  • unable to calculate textfield values

    - by user1726508
    i am trying to change the input field when users changes the quantity of items in a text field. Here i am iterating my list from my database. Now i have to make invoice for customer. In my code , if i am changing quantity of a single item, then it is effecting all the other items in the list. I want to change only to the specific items,where its quantity has been change. Below code is giving me error. It is changing all the items value on single change of item quantity. my code; <script type="text/javascript"> $(document).ready(function(){ $(function() { $('input[name="quantity"]').change(function() { var unitprice = $('input[name^="unitprice"]').val(); $(this).parents('tr').find('input[name^="price"]').val($(this).val() * unitprice); }); }); }); </script> <tr> <td height="65%" valign="top" width="100%"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <s:iterator value="#session.BOK" status="userStatus"> <tr style="height: 10px;"> <td width="65%" align="left"><s:property value="bookTitile"/></td> <td width="10%" align="left"><s:textfield name="unitprice" value="%{price}" size="4"/></td> <td width="10%" align="center"><s:textfield name="quantity" value="%{quantity}" size="2"/></td> <td width="15%" align="center"><s:textfield name="price" size="6"></s:textfield> </td> </tr> </s:iterator> </table> </td> </tr> output looks like this image...

    Read the article

  • Suggestions for GUI of a multiledia messaging application in J2ME

    - by awaghad-ashish
    Hello everyone, We have developed a messaging application in j2me which adds text message, gets pictures from gallery and attaches them to the message etc and sends it over to a server after encryption, i.e. the client wants the messages to be encrypted. The app is ready but the only problem is that the GUI of the app looks miserable compared to the GUI of native messaging application on Nokia phones. Our GUI consists of a texfield for adding recipients i.e. the user clicks "options" to "add recipients" and is taken to a new form where contacts are shown. but the textfield is not in one line (like in case of native app). Also, we need the user to input the text message in a textField since we cannot have textbox inside a form (but the native app has a textbox as well as a textField ). Are there any ways to achieve such GUIs (one-line textfields, textbox like thing inside a form)? I hope you all understand what I mean, any kind of help will be appreciated. Thanks and regards, Ashish.

    Read the article

  • drupal form textfield #default_value not working

    - by alvin.ng
    I am working on a custom module with multi-page form on drupal 6. I found that #default_value is not working when my '#type' = 'textfield'. However, when '#type'='textarea', it displays correctly with the '#default_value' specified. Basically, I wrote a FormFactory to return different form definition ($form) based on the post parameter received. Initially, it returns the display of directories list, user then selects from radio buttos until a specific directory contains a xml file, it will become edit form. The edit form will have text fields display the data (#default_value) inside the xml file, however the type 'textarea' works here rather than 'textfield'. How can I make my '#default_value' work in this case? Below is the non-working field definition: $form['pageset']['newsTitle'] = array( '#type' => 'textfield', '#title' => 'News Title', '#default_value' => "{$element->newsTitle}", '#rows' => 1, '#required' => TRUE, ); Then I changed it to textarea as shown below to make it work: $form['pageset']['newsTitle'] = array( '#type' => 'textarea', '#title' => 'News Title', '#default_value' => "{$element->newsTitle}", '#rows' => 1, '#required' => TRUE, );

    Read the article

  • Can't touch UITextField on UIScrollView

    - by Chris B
    Hey guys, I know this has been talked about a lot. I think I've gone thru every question on this site, and still have not been able to get this working. I'm new to developing but I have a good sense of what's going on with all of my code. I definitely don't have a lot of experience though, this is my first iPhone app. I'm making a data entry field that is comprised of multiple UITextFields within a UIScrollView. I'll avoid explaining the other details for now, as it seems its a very basic problem. Without a scrollview, the textfields work perfectly. I can touch the textfield and the keyboard or picker view show up appropriately. When I add the textfields to a scrollview, the scrollview works, but then the text fields don't receive my touches. Here's the key: When 'User Interaction' is ENABLED, the scrollview works but the textfield touches are NOT registered. When 'User Interaction' is DISABLED, the scrollview doesn't work, but the textfield touches ARE registered and the keyboard/picker pops up. From the other posts I have seen people creating subclasses and overriding the touches in a separate implementation. I've seen people using custom content views (subviews?), I've seen some solutions that are now obsolete since the APIs have changed in newer versions of the SDK, and I am just completely stuck. I will leave out my code for now, because maybe there is a solution that someone has without requiring my code. If someone needs to see my code, I will put it up. My app is being written in the 3.1.3 SDK. If anyone has ANY information that could help, it would be so greatly appreciated.

    Read the article

  • japanese input display outside of TextField created into ScrollPane

    - by soetheingilynn
    hello... I'm new to ActionScript 2.0. plz kindly help me. I have created the MainMovieClip and Scrollbar as follow .... my problem is that when I input japanese characters,the characters display at the top corner of the swf until I confirm the input. how can I do it?? if I install FlashPlayer "flashplayer10_1_rc2_plugin_041910", then the japanese characters display in the textfield normally....why is that??? plz..help me. with flash player 10.0, I can't input the japanese characters in the textfield. var mcMain:MovieClip = this.createEmptyMovieClip("mcMain", this.getNextHighestDepth()); scrp.contentPath = "scrollMovieClip"; mcMain = scrp.content; var textholder:TextField = mcMain.createTextField("txt", mcMain.getNextHighestDepth(), 50, 50, 100, 50); mcMain.txt.setFocus(); mcMain.txt.type = "input"; mcMain.txt.wordWrap = true; mcMain.txt.multiline = true; mcMain.txt.background = true; mcMain.txt.border = true; mcMain.txt.selectable = true; thanks in advanced...anyone.

    Read the article

  • How to stretch textfield in a JasperReport as per dynamic content?

    - by Debadatta Viva la Vida
    http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tree-template" pageWidth="595" pageHeight="842" columnWidth="481" leftMargin="57" rightMargin="57" topMargin="72" bottomMargin="72" want this field to auto stretch as per content <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="80" width="463" height="20"/> <textElement> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{goals}==null ? "Not Defined":$F{goals}]]></textFieldExpression> </textField> want this field to auto stretch as per content <staticText> <reportElement stretchType="RelativeToTallestObject" x="0" y="100" width="98" height="20"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Status Details]]></text> </staticText> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToTallestObject" x="2" y="120" width="463" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{statusDetails}==null ? "Not Defined":$F{statusDetails}]]></textFieldExpression> </textField> <staticText> <reportElement stretchType="RelativeToTallestObject" x="0" y="140" width="98" height="20"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Risk Mitigation]]></text> </staticText> <textField> <reportElement stretchType="RelativeToTallestObject" x="18" y="160" width="463" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{mitigation}==null?"Not Defined":$F{mitigation}]]></textFieldExpression> </textField> <textField> <reportElement stretchType="RelativeToTallestObject" x="79" y="40" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[new SimpleDateFormat("MMM dd,yyyy").format($F{releaseDate}.getTime())]]></textFieldExpression> </textField> <line> <reportElement x="0" y="180" width="481" height="1"/> </line> </band> </detail> <columnFooter> <band height="12" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="13" splitType="Stretch"> <frame> <reportElement mode="Opaque" x="0" y="0" width="477" height="13" forecolor="#D0B48E" backcolor="#9DB1B8"/> <textField pattern="EEEEE dd MMMMM yyyy"> <reportElement style="Column header" x="2" y="0" width="197" height="13" forecolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement style="Column header" x="450" y="0" width="27" height="13" forecolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> <reportElement style="Column header" x="370" y="0" width="80" height="13" forecolor="#FFFFFF"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> </textField> </frame> </band> </pageFooter> <summary> <band splitType="Stretch"/> </summary>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >