ftp.nice.ch/pub/next/developer/resources/palettes/OATextFieldPalette.950321.s.gnutar.gz#/OATextFieldPalette.950321/OATextField.subproj/OATextFieldCell.rtf

This is OATextFieldCell.rtf in view mode; [Download] [Up]

Release 1.0  Copyright ©1994 by M. Onyschuk and Associates Inc.  All Rights Reserved.






OATextFieldCell






Inherits From:	TextFieldCell

Declared In:	<OATextField/OATextFieldCell.h>





Class Description

OATextFieldCell is a subclass of TextFieldCell which implements a number of standard formatting behaviors, and which offers extensible formatting both during and after text data entry through the use of OATextFieldFormatter objects.

Formatting features include character filtering, case mapping, data entry length enforcement, and data entry integer value enforcement. OATextFieldCells also offer support for colorization and standardized input font and size through the defaults database.

OATextFieldCell accomplishes its text filtering through the use of custom text filters applied to a Text object during text entry. Developers are shielded from the complexities of using text filters through the formatter abstraction provided by the OATextFieldFormatters class.





Instance Variables

OACharacterFiltering characterFiltering;
char *filteringExceptions;
OACaseMapping caseMapping;
BOOL isSettingValue;
BOOL removeLeadingWhitespace;
BOOL removeTrailingWhitespace;
int minimumLength;
int maximumLength;
BOOL checkMinimumLength;
BOOL checkMaximumLength;
BOOL isNullable;
BOOL isMandatory;
int maximumValue;
int minimumValue;
BOOL checkMinimumValue;
BOOL checkMaximumValue;
NXTextFilterFunc oldTextFilter;
OATextFieldFormatter *formatter;



characterFiltering	No description.

filteringExceptions	No description.

caseMapping	No description.

isSettingValue	No description.

removeLeadingWhitespace	No description.

removeTrailingWhitespace	No description.

minimumLength	No description.

maximumLength	No description.

checkMinimumLength	No description.

checkMaximumLength	No description.

isNullable	No description.

isMandatory	No description.

maximumValue	No description.

minimumValue	No description.

checkMinimumValue	No description.

checkMaximumValue	No description.

oldTextFilter	No description.

formatter	No description.






Method Types

	- awake
	- awakeFromNib
	- caseMapping
	- characterFiltering
	- doesCheckMaximumLength
	- doesCheckMaximumValue
	- doesCheckMinimumLength
	- doesCheckMinimumValue
	- doesRemoveLeadingWhitespace
	- doesRemoveTrailingWhitespace
	- edit:inView:teditor:delegate:event:
	- endEditing:
	- filteringExceptions
	- init
	- isMandatory
	- isNullable
	- maximumLength
	- maximumValue
	- minimumLength
	- minimumValue
	- read:
	- select:inView:editor:delegate:start:length:
	- setCaseMapping:
	- setCharacterFiltering:
	- setChecksMaximumLength:
	- setChecksMaximumValue:
	- setChecksMinimumLength:
	- setChecksMinimumValue:
	- setFilteringExceptions:
	- setMandatory:
	- setMaximumLength:
	- setMaximumValue:
	- setMinimumLength:
	- setMinimumValue:
	- setNullable:
	- setRemovesLeadingWhitespace:
	- setRemovesTrailingWhitespace:
	- setTextFieldFormatter:
	- setTextFieldFormatterNoCopy:
	- textFieldFormatter
	- write:





Instance Methods

awake
-  awake

Resets the receiver's text value from its current case mapping setting, removes leading and trailing whitespace as appropriate, and sets the receiver's font and color as specified by the defaults database.

See also: 




awakeFromNib
-  awakeFromNib

Invokes the receiver's -awake method.

See also:  -awake




caseMapping
-  (OACaseMapping)caseMapping

Returns the receiver's current case mapping setting.

See also:  -setCaseMapping:




characterFiltering
-  (OACharacterFiltering)characterFiltering

Returns the receiver's current character filtering setting.

See also:  -setCharacterFiltering:




doesCheckMaximumLength
-  (BOOL)doesCheckMaximumLength

Returns YES if the receiver enforces a maximum length on input.

See also:  -setChecksMaximumLength:




doesCheckMaximumValue
-  (BOOL)doesCheckMaximumValue

Returns YES if the receiver enforces a maximum value on input.

See also:  -setChecksMaximumValue:




doesCheckMinimumLength
-  (BOOL)doesCheckMinimumLength

Returns YES if the receiver enforces a minimum length on input..

See also:  -setChecksMinimumLength:




doesCheckMinimumValue
-  (BOOL)doesCheckMinimumValue

Returns YES if the receiver enforces a minimum value on input..

See also:  -setChecksMinimumValue:




doesRemoveLeadingWhitespace
-  (BOOL)doesRemoveLeadingWhitespace

Returns YES if the receiver strips leading whitespace on input.

See also:  -setRemovesLeadingWhitespace:




doesRemoveTrailingWhitespace
-  (BOOL)doesRemoveTrailingWhitespace

Returns YES if the receiver strips trailing whitespace on input.

See also:  -setRemovesTrailingWhitespace:




edit:inView:teditor:delegate:event:
-  edit:(const NXRect *)aRect
inView:tcontrolViewj
editor:textObj
delegate:anObject
event:(NXEvent *)theEvent

Inserts a custom text formatter used to implement many of the validations provided by OATextFieldCell.




endEditing:
-  endEditing:anObject

Restores the shared Text object's text formatter to its original state.

See also:  -edit:inView:editor:delegate:event:




filteringExceptions
-  (const char *)filteringExceptions

Returns a C style string containing characters accepted by the receiver despite its text filtering setting.

See also:  -setFilteringExceptions:, -characterFiltering:, -setCharacterFiltering:




initTextCell:
-  initTextCell:

Initializes the receiver and invokes its -awake method for further initialization.

See also:  -awake




isEntryAcceptable:
-  (BOOL)isEntryAcceptable:(const char *)aValue

Returns YES if aValue constitutes a valid entry to the receiver. This method is overridden to perform formatting using the receiver's custom formatter, if a formatter is defined for the receiver.

See also: -formatString:  (OATextFieldFormatter class)  




isMandatory
-  (BOOL)isMandatory

Returns YES if the receiver is marked mandatory.

See also:  -setMandatory:




isNullable
-  (BOOL)isNullable

Returns YES if the receiver may contain no data.

See also:  -setNullable:




maximumLength
-  (int)maximumLength

Returns the receiver's maximum text length.

See also:  -setMaximumLength:




maximumValue
-  (int)maximumValue

Returns the receiver's maximum integer value.

See also:  -setMaximumValue:




minimumLength
-  (int)minimumLength

Returns the receiver's minimum text length.

See also:  -setMinimumLength:




minimumValue
-  (int)minimumValue

Returns the receiver's minimum integer value.

See also:  -setMinimumValue:




read:
-  read:(NXTypedStream *)aStream

Reads the reciever from aStream.

See also:  




select:inView:editor:delegate:start:length:
-  select:(const NXRect *)aRect
inView:controlView
editor:textObj
delegate:anObject
start:(int)selStart
length:(int)selLength

Inserts a custom text formatter used to implement many of the validations provided by OATextFieldCell.




setCaseMapping:
-  setCaseMapping:(OACaseMapping)aValue

Sets the receiver's case mapping option to one of  MAP_TO_NONE, MAP_TO_UPPER, MAP_TO_LOWER, MAP_TO_PROPER, or MAP_TO_STUDLY, causing the receiver to perform no case mapping, upper case mapping, lower case mapping, first-character-upper case mapping, or random case mapping respectively.

See also:  -caseMapping




setCharacterFiltering:
-  setCharacterFiltering:(OACharacterFiltering)aValue

Sets the receiver's character filtering option to one of ALLOW_ALL, ALLOW_LETTERS, ALLOW_NUMBERS, or ALLOW_ALPHANUMERIC causing the receiver to accept all characters, letters only, or numbers only respectively. To allow exceptions to be passed through the filter, use the receiver's -setFilteringExceptions: method.

See also:  -characterFiltering, -setFilteringExceptions:




setChecksMaximumLength:
-  setChecksMaximumLength:(BOOL)aValue

Enables or disables the receiver's check for maximum input length.

See also:  -doesCheckMaximumLength




setChecksMaximumValue:
-  setChecksMaximumValue:(BOOL)aValue

Enables or disables the receiver's check for maximum integer input value.

See also:  -doesCheckMaximumValue




setChecksMinimumLength:
-  setChecksMinimumLength:(BOOL)aValue

Enables or disables the receiver's check for minimum input length.

See also:  -doesCheckMinimumLength




setChecksMinimumValue:
-  setChecksMinimumValue:(BOOL)aValue

Enables or disables the receiver's check for minimum integer input value.

See also:  -doesCheckMinimumValue




setFilteringExceptions:
-  setFilteringExceptions:(const char *)aValue

Sets the C style string containing characters accepted by the receiver despite its text filtering setting.

See also: -filteringExceptions, setCharacterFiltering:  




setMandatory:
-  setMandatory:(BOOL)aValue

Sets whether the receiver is must be filled with data, or whether entering data into the receiver is optional. With certain entries into the defaults database, OATextFieldCells can color themselves to indicate whether they are mandatory or optional.

See also:  -isMandatory




setMaximumLength:
-  setMaximumLength:(int)aValue

Sets the maximum length of input text accepted by the receiver.

See also:  -maximumLength




setMaximumValue:
-  setMaximumValue:(int)aValue

Sets the maximum integer value accepted by the receiver.

See also:  -maximumValue




setMinimumLength:
-  setMinimumLength:(int)aValue

Sets the minimum length of input accepted by the receiver.

See also:  -minimumLength




setMinimumValue:
-  setMinimumValue:(int)aValue

Sets the minimum integer value accepted by the receiver.

See also:  -minimumValue




setNullable:
-  setNullable:(BOOL)aValue

Sets whether the receiver may contain no data.

See also:  -isNullable




setRemovesLeadingWhitespace:
-  setRemovesLeadingWhitespace:(BOOL)aValue

Sets whether the receiver removes leading whitespace after data entry is complete.

See also:  -doesRemoveLeadingWhitespace




setRemovesTrailingWhitespace:
-  setRemovesTrailingWhitespace:(BOOL)aValue

Sets whether the receiver removes trailing whitespace after data entry is complete.

See also:  -doesRemoveTrailingWhitespace:




setTextFieldFormatter:
-  setTextFieldFormatter:(OATextFieldFormatter *)aValue

Sets the receiver's OATextFieldFormatter object to a copy of aValue by copying aValue and invoking the receiver's setTextFieldFormatterNoCopy: method. TextFieldFormatters are objects which specify special data entry behavior both during text entry, and after text entry is complete.

See also:  -textFieldFormatter, -setTextFieldFormatterNoCopy: -copyFromZone: (OATextFieldFormatter class)




setTextFieldFormatterNoCopy:
-  setTextFieldFormatterNoCopy:(OATextFieldFormatter *)aValue

Sets the receiver's OATextFieldFormatter object to aValue. TextFieldFormatters are objects which specify special data entry behavior both during text entry, and after text entry is complete.

See also:  -textFieldFormatter:




textFieldFormatter
-  (OATextFieldFormatter *)textFieldFormatter

Returns the receiver's text field formatter.

See also:  -setTextFieldFormatterNoCopy:, -setTextFieldFormatter:




write:
-  write:(NXTypedStream *)aStream

Writes the receiver to aStream.

See also:  -read




These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.