iOS text field - autoCapitalization does not seem to work
Posted: Thu Sep 15, 2011 3:10 am
				
				I have successfully created an iOS text field and am using several settings such as borderStyle and visible but I cannot make "autoCapitalization" have any effect.
See the attached (zipped) LiveCode file.
Here is the card script:
I call inputCreate from 8 different buttons, 4 use "input" for pInput_or_Multiline and 4 use "multiline".
The buttons also exercise the 4 values for autoCapitalization: none, words, sentences and all characters.
Here is an example of one of the button scripts:
Regardless of how I create the iPhone text control the autoCapitalization behavior is the same which I believe is "sentences".
Steven (Colorado, USA)
			See the attached (zipped) LiveCode file.
Here is the card script:
Code: Select all
on closeCard
    iphoneControlDelete "testinput"
end closeCard
-----------------------------------------------------------------
on inputCreate pInput_or_Multiline, pAutoCapitalizationValue
   put "iOS text edit: " & pAutoCapitalizationValue into field "iOS_Label"
   
   # handle the input creation event
   if "testinput" is among the lines of iphoneControls() then
      # ensure that only one native text input is open
      iphoneControlDelete "testinput"
   end if 
   
   iphoneControlCreate pInput_or_Multiline, "testinput"
   
   # set the native text input field to the size and position of the graphic input rectangle
   iphoneControlSet "testinput", "rect", the rect of graphic "InputRect"
   iphoneControlSet "testinput", "visible", true
   iphoneControlSet "testinput", "autoCapitalization", pAutoCapitalizationValue
   iphoneControlSet "testinput", "text", "control replaced."
   
   iphoneControlSet "testinput", "borderStyle", "rounded"
   
   iphoneControlDo "testinput", "focus"
   
end inputCreateThe buttons also exercise the 4 values for autoCapitalization: none, words, sentences and all characters.
Here is an example of one of the button scripts:
Code: Select all
on mouseUp
   inputCreate "multiline", "words"
end mouseUp
Steven (Colorado, USA)