Guadagnini David wrote:
In attach You can found my TMaskEdit component that work well in Windows
At first glance this looks like a clean implementation without copied
code (can sombody this verify agains cppbuilder implementations)
Some remarks about the code:
Try to avoid Arguments and Methods prefixed with _
For Aguments there is no problem in prefixing them with "A", for
property getters there is nothing wrong with prefixing them with Get. In
your case, GetIsMask makes perfectly clear that it "reads" the IsMasked
property.
Variable names like X1, X2, XX1, XX2
Please name them after there use: GetSel(X1, X2) could also be coded
like: GetSel(SelStart, SelLength) (or was it SelStop)
You see... with naming them it will be clear.
Why using the C approach for naming all kinds is Char_xxx (as char).
Pascal has a perfect suitable type for this : enum.
No cludging winth #nn and mak sure they are unique etc.
in CanInsertChar, why do you use short stings and why assigning S :=
FMask instead of accessing Fmask.
Anyway, I think that after some cleanup, this will be usable code.
and in Linux but have a little bug: the message WM_PAST seems that is
never invoked. I tried to override the procedure PasteFromClipboard of
the component TCustomEdit but is the same. Some idea?
Pasting is handled by the widget itself. unlike in windows, I think a
paste isn't redirected yout
marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives