~~NOTOC~~ ====== SPTextField with Input ====== ---- dataentry extension ---- type : mod author_mail : briancensor@gmail.com Brian Ensor description : Lets you type into an SPTextField lastupdate_dt : 2011-03-13 compatible : v1.1 depends : tags : text, input, field, keyboard homepage_url : https://gist.github.com/868480 download_url : https://gist.github.com/gists/868480/download ---- \\ [[/users/brian/start|My Wiki Page]] \\ ===== Usage ===== {{http://img864.imageshack.us/img864/5500/screenshot20110313at401.png|}} You will need to add the files to your Sparrow source. SPTextField *inputField = [[SPTextField alloc] initWithWidth:300 height:220 text:@"This text is editable.\ninputField.inputEnabled = YES;\ninputField.returnKeyType = UIReturnKeyDone;" fontName:@"Helvetica" fontSize:12 color:0x000000]; inputField.inputEnabled = YES; inputField.returnKeyType = UIReturnKeyDone; [self addChild:inputField]; [inputField release]; [inputField addEventListener:@selector(inputBegan:) atObject:self forType:SP_EVENT_TYPE_INPUT_BEGAN]; [inputField addEventListener:@selector(inputEnded:) atObject:self forType:SP_EVENT_TYPE_INPUT_ENDED]; [inputField addEventListener:@selector(inputCancelled:) atObject:self forType:SP_EVENT_TYPE_INPUT_CANCELLED]; ===== Changelog ===== * 2011/03/13: First public version ===== Source Code ===== %gist(868480)% Embr Just tried adding this, I replaced the textfield files in the Sparrow framework and added both lines to my textfield: inputField.inputEnabled = YES; inputField.returnKeyType = UIReturnKeyDone; Gave the following errors: error: request for member 'inputEnabled' in something not a structure or union error: request for member 'returnKeyType' in something not a structure or union Do I have to add something to the implementation to make it work? Thanks