Return key in iOS?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Return key in iOS?

Casey Ransberger-2
 
So I have been hacking a bit in iOS land. I looked at Bert's Etoys example and ultimately settled on a similar approach to making the keyboard visible. Everything is more or less golden, except that the return key doesn't do anything. Smalltalk methods look funny all on one line:/

It's quite likely something I'm doing wrong in Cocoa land, but it occurs to me that the return key might be putting linefeeds into whatever text input buffer is there, and that might explain why Squeak isn't advancing to the next line.

Is this a known issue?

--
Casey Ransberger
Reply | Threaded
Open this post in threaded view
|

Re: Return key in iOS?

Bert Freudenberg
 

On 22.12.2010, at 02:31, Casey Ransberger wrote:

So I have been hacking a bit in iOS land. I looked at Bert's Etoys example and ultimately settled on a similar approach to making the keyboard visible. Everything is more or less golden, except that the return key doesn't do anything. Smalltalk methods look funny all on one line:/

It's quite likely something I'm doing wrong in Cocoa land, but it occurs to me that the return key might be putting linefeeds into whatever text input buffer is there, and that might explain why Squeak isn't advancing to the next line.

Is this a known issue?

--
Casey Ransberger

This was in one of the patches I sent to John a couple months ago:

Index: platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m
===================================================================
--- platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m (revision 196)
+++ platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m (working copy)
@@ -231,6 +233,10 @@
    options: 0 range: picker remainingRange: NULL];
  [lookupString release];
 
+ // LF -> CR
+ if (macRomanCharacter == 10)
+ macRomanCharacter = 13;
+
  evt.pressCode = EventKeyDown;
  BOOL isUppercase = [[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember: unicode];
  evt.modifiers = isUppercase ? ShiftKeyBit : 0;


- Bert -