MaskEditField

© 2002-2003 Einhugur Software - All Rights Reserved.

Author Björn Eiríksson
E-mail support@einhugur.com
Web Site http://www.einhugur.com/

Version 1.4.0
Compatible PPC - Carbon - Win32.
Requirements REALbasic MacIO IDE 4.0 or later,
or REALbasic Windows IDE 5.2 or later.
(If using REALbasic 4.5 then use 4.5.1f3 or
later, as REALbasic 4.5.0 has a bad bug
in it that makes this plugin unusable).
Plugin Dependencies: None.

MaskEditField is a class that inherits from REALbasic's built in EditField control. To create a instance of the MaskEditField then put a EditField on a window and change its "Super" property to MaskEditField.

Einhugur website:
http://www.einhugur.com/index.html

Note:
To install MaskEditField you have to create a folder called Plugins in the same folder as your REALbasic application is located in and drop the MaskEditField into it.

Agreement
This product is a commercial software, only registered users are allowed to use it.

Einhugur Software will disable all serial numbers found on Internet and all serial numbers of decoded plugins that have illegally been posted on Internet.

Einhugur Software and the author, Björn Eiríksson, are in no way responsible for the bugs that might be found in this product. However, Einhugur Software will do its best to fix the bugs.

Officially we only support versions noted above and up to current official (not alpha or beta versions) version of REALbasic at the date of when this plugin is published. We cannot predict what changes might come in future versions of REALbasic.



Björn Eiríksson - Einhugur Software


support@einhugur.com


http://www.einhugur.com/index.html


MaskEditField

MaskEditField is a class that inherits from REALbasic's built in EditField control. To create a instance of the MaskEditField then put a EditField on a window and change its "Super" property to MaskEditField.

Methods:
Methods are all the same as in the built in EditField control.

Events:
Events are all the same as in the built in EditField control but some
get listed in the RB Plugin Plunger because they have been internally
overloaded.

Properties:
Methods are all the same as in the built in EditField control, except the one
that was added ("Mask")

Mask as String
Value as String

Supported platforms:
* MacOS PPC
* MacOS Classic Carbon
* MacOS X
* Windows x86


GotFocus

Events are all the same as in the built in EditField control but some get listed in the RB Plugin Plunger because they have been internally overloaded.

The GotFocus event behaves excatly like the GotFocus event for EditField


KeyDown

Events are all the same as in the built in EditField control but some get listed in the RB Plugin Plunger because they have been internally overloaded.

The KeyDown event behaves excatly like the GotFocus event for EditField


LostFocus

Events are all the same as in the built in EditField control but some get listed in the RB Plugin Plunger because they have been internally overloaded.

The LostFocus event behaves excatly like the GotFocus event for EditField


GotFocus

Events are all the same as in the built in EditField control but some get listed in the RB Plugin Plunger because they have been internally overloaded.

The GotFocus event behaves excatly like the GotFocus event for EditField


Mask

Mask as String

Set this property in the Open event of the Control.

Supported mask Meta characters:
# - Number
? - Any character
$ - Character A-Z or a-z (regular English alphabet)
\ - Forces next character in the mask to be a constant.
This is useful for example if you need to put # as a mask
constant which normally is a reserved meta character,
then you could do it by putting \# in the mask.

Everything else in the Mask will be used as a constant in the
edit field.

For example:
### cm
Will allow 3 number characters, and after that
a constant space and cm will be displayed in the
edit field. (The user cannot change such constant).

\$##
Will display a $ sign and allow for 2 number characters
after the $ sign.


Notes:
The Text in the MaskEditField should be empty when the Mask property is set.

The Mask property is only a input filter, it does not in any way attempt to filter when is set explicitly with the Text property with programming code.


Value

Value as String

Use this property to read or write the text value without mask constants from the control.

Notes:
When reading from the control then the leading "_" is included in the value. This is done on purpose because if a character would be missing from the middle of the Mask then you would have no way to determine which character was missing and when putting the value back into the control then the control would have no way to know which character was missing if not for the "_".

When writing to the Value property then no validation is done on the string that you put into it, its only guided into correct places between masking constants.




1.4.0:
* The plugin now also ships with a version for the REALbasic Windows IDE.
* Did a few minor internal tweaks.

1.3.4:
* Fixed a problem where the copy protection could cause
unwanted nag on the new REALbasic 5.0.
* Did preliminary tests on REALbasic 5.0 which the plugin passed
with good results. (1.3.2 also passes it except for the
nag in the copy protection).

1.3.2:
* The MaskEditField will now let Escape, Return and Enter keys go
unfiltered so Cancel and Default buttons will operate correctly in
dialogs.

1.3:
* The MaskEditField will now respect the ReadOnly property if
it is set to true.
* Fixed a problem with the mask getting shorter if backspace
was pressed when only part of the text in the control was selected.

1.2.2:
* Fixed a problem with the backspace key in certain cases.
* Fixed more problems with the Value setter property.

1.2.1:
* Fixed a glitch in the Value setter property.

1.2:
* Improved unicode support.
* Added a Value read and write property which gets or sets
the text value without masking constants.
* Added support for \ meta tag which enables usage of
reserved mask characters as constants. For example
then a # sign can now be used as a constant if a \ is put in front of it.
* Added support for A to Z characters only masks.
* Optimized key filtering for speed.
* The getter for the Mask property now works.

1.0:
* The Initial version.