Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-04

I got tired of waiting for a TMaskedEdit

12 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

:-)

Much still needs implemented, but basic functionality is there. There is no support for character sets that use more than one byte per char. I'm also not sure how well it will react to the clipboard.

Probably will have some issues going from Delphi to Lazarus, but it solves my problem of needing a mask for my calendar edit control. I have tested it with some basic masks, but there may be problems with more complex display.

Tony Maro http://tony.maro.net/ Looking for a free replacement for Microsoft Money? Check out CheckBook Tracker for Linux (GPL) -------------- next part -------------- A non-text attachment was scrubbed... Name: gz00017.gz Type: application/octet-stream Size: 7421 bytes Desc: "mask.pp.gz" Url : http://localhost/pipermail/lazarus/attachments/20030404/0a446771/gz00017.obj

Reply by email

Tony Maro
to Jesus Reyes: Hi, Tony its nice!. I tested and It seem to have problems with backspace. Regards. Jesus…

Works for me, except it wraps off the left side back to the right for some reason... lol

-Tony

Jesus Reyes wrote 42 lines
Hi, Tony its nice!. I tested and It seem to have problems with backspace. Regards. Jesus Reyes A. --- Tony Maro escribi�: > > :-) > > Much still needs implemented, but basic functionality is there. > There is no > support for character sets that use more than one byte per char. > I'm also > not sure how well it will react to the clipboard. > > Probably will have some issues going from Delphi to Lazarus, but it > solves my > problem of needing a mask for my calendar edit control. I have > tested it > with some basic masks, but there may be problems with more complex > display. > > -- > Tony Maro > http://tony.maro.net/ > > Looking for a free replacement for Microsoft Money? > Check out CheckBook Tracker for Linux (GPL) > > ATTACHMENT part 2 application/x-gzip name=mask.pp.gz _________________________________________________________ Do You Yahoo!? La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Thanks, Tony Maro Need a Linux replacement for Microsoft Money? Check out CheckBook Tracker! http://tony.maro.net/

Reply by email

Jesus Reyes
to Tony Maro

Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying to do is not to store the literals '-'. When I use 00-00-00;1;? it works ok :).

Jesus Reyes A.

--- Tony Maro escribi�: > Works for me, except it wraps off the left side back to the right

Show quoted text 66 lines
for some reason... lol -Tony On Fri, 2003-04-04 at 15:52, Jesus Reyes wrote: > Hi, Tony its nice!. I tested and It seem to have problems with > backspace. > > Regards. > > Jesus Reyes A. > > --- Tony Maro escribi�: > > > :-) > > > > Much still needs implemented, but basic functionality is there. > > There is no > > support for character sets that use more than one byte per char. > > I'm also > > not sure how well it will react to the clipboard. > > > > Probably will have some issues going from Delphi to Lazarus, but it > > solves my > > problem of needing a mask for my calendar edit control. I have > > tested it > > with some basic masks, but there may be problems with more complex > > display. > > > > -- > > Tony Maro > > http://tony.maro.net/ > > > > Looking for a free replacement for Microsoft Money? > > Check out CheckBook Tracker for Linux (GPL) > > > > > ATTACHMENT part 2 application/x-gzip name=mask.pp.gz > > > _________________________________________________________ > Do You Yahoo!? > La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives -- Thanks, Tony Maro Need a Linux replacement for Microsoft Money? Check out CheckBook Tracker! http://tony.maro.net/ _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Reply by email

Jesus Reyes
to Tony Maro: :-) Much still needs implemented, but basic functionality is there. There is no support…

Hi, Tony its nice!. I tested and It seem to have problems with backspace.

Regards.

Jesus Reyes A.

--- Tony Maro escribi�: >

Show quoted text 24 lines
:-) Much still needs implemented, but basic functionality is there. There is no support for character sets that use more than one byte per char. I'm also not sure how well it will react to the clipboard. Probably will have some issues going from Delphi to Lazarus, but it solves my problem of needing a mask for my calendar edit control. I have tested it with some basic masks, but there may be problems with more complex display. -- Tony Maro http://tony.maro.net/ Looking for a free replacement for Microsoft Money? Check out CheckBook Tracker for Linux (GPL) ATTACHMENT part 2 application/x-gzip name=mask.pp.gz

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Reply by email

Tony Maro
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…

Mmm... I see what you mean. The 00-00-00;0;? works GREAT until you use backspace... then weirdo

Bleh. My backspace code is a horrible hack anyway. Give me some time I'll see what I can do. Part of the problem is I don't understand the way it was originally supposed to work.

Jesus Reyes wrote 84 lines
Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying to do is not to store the literals '-'. When I use 00-00-00;1;? it works ok :). Jesus Reyes A. --- Tony Maro escribi�: > Works for me, except it wraps off the left side back to the right > for > some reason... lol > > -Tony > > On Fri, 2003-04-04 at 15:52, Jesus Reyes wrote: > > Hi, Tony its nice!. I tested and It seem to have problems with > > backspace. > > > > Regards. > > > > Jesus Reyes A. > > > > --- Tony Maro escribi�: > > > > :-) > > > > > > Much still needs implemented, but basic functionality is there. > > > > There is no > > > support for character sets that use more than one byte per > char. > > > I'm also > > > not sure how well it will react to the clipboard. > > > > > > Probably will have some issues going from Delphi to Lazarus, > but it > > > solves my > > > problem of needing a mask for my calendar edit control. I have > > > tested it > > > with some basic masks, but there may be problems with more > complex > > > display. > > > > > > -- > > > Tony Maro > > > http://tony.maro.net/ > > > > > > Looking for a free replacement for Microsoft Money? > > > Check out CheckBook Tracker for Linux (GPL) > > > > > > > > ATTACHMENT part 2 application/x-gzip name=mask.pp.gz > > > > > > _________________________________________________________ > > Do You Yahoo!? > > La mejor conexi�n a internet y 25MB extra a tu correo por $100 al > mes. http://net.yahoo.com.mx > > > > _________________________________________________________________ > > To unsubscribe: mail with > > "unsubscribe" as the Subject > > archives at http://www.lazarus.freepascal.org/mailarchives > -- > Thanks, > > Tony Maro > > Need a Linux replacement for Microsoft Money? > Check out CheckBook Tracker! > http://tony.maro.net/ > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives _________________________________________________________ Do You Yahoo!? La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Thanks, Tony Maro Need a Linux replacement for Microsoft Money? Check out CheckBook Tracker! http://tony.maro.net/

Reply by email

Mattias Gaertner
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…
Show quoted text 43 lines
On 16 Apr 2003 02:17:32 -0500 Tony Maro wrote: > On Wed, 2003-04-16 at 01:57, Mattias Gaertner wrote: > > On 16 Apr 2003 01:41:44 -0500 > > Tony Maro wrote: > > > > > I've noticed that the csDesigning check doesn't seem to work > > > anymore. Is there a bug in Lazarus or the LCL that breaks this? I > > > can't get the designing check to work in anything I do... > > > > It works for me. When/Where do you check csDesigning? > > > > Well, the mask.pp is pretty complex in that and may have a bug, however > the help system component I'm working on is simple. > > constructor THelpSystem.create(AOwner: TComponent); > begin > // squeeze myself into the form's OnKeyUp event > // without ignoring anything already set there... > FForm := nil; > FOldKeyUp := nil; > FItems := TStringList.Create; > > if not(csDesigning in componentstate) then begin > if AOwner is TForm then begin > FForm := AOwner as TForm; > if assigned(FForm.OnKeyUp) then begin > FOldKeyUP := FForm.OnKeyUp; > end; > FForm.OnKeyUP := @FormKEYUP; > FForm.KeyPreview := True; > end; > end; > > inherited create(AOwner); > end; csDesigning is copied from its owner in the constructor of TComponent. Before the 'inherited Create' you can use this: if (Ownernil) and not (csDesigning in Owner.componentstate) then begin

Sorry, I ment AOwner.

Mattias

Reply by email

Mattias Gaertner
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…
Show quoted text 35 lines
On Wed, 2003-04-16 at 01:57, Mattias Gaertner wrote: > On 16 Apr 2003 01:41:44 -0500 > Tony Maro wrote: > > > I've noticed that the csDesigning check doesn't seem to work anymore. > > Is there a bug in Lazarus or the LCL that breaks this? I can't get > > the designing check to work in anything I do... > > It works for me. When/Where do you check csDesigning? > Well, the mask.pp is pretty complex in that and may have a bug, however the help system component I'm working on is simple. constructor THelpSystem.create(AOwner: TComponent); begin // squeeze myself into the form's OnKeyUp event // without ignoring anything already set there... FForm := nil; FOldKeyUp := nil; FItems := TStringList.Create; if not(csDesigning in componentstate) then begin if AOwner is TForm then begin FForm := AOwner as TForm; if assigned(FForm.OnKeyUp) then begin FOldKeyUP := FForm.OnKeyUp; end; FForm.OnKeyUP := @FormKEYUP; FForm.KeyPreview := True; end; end; inherited create(AOwner); end;

csDesigning is copied from its owner in the constructor of TComponent. Before the 'inherited Create' you can use this:

if (Ownernil) and not (csDesigning in Owner.componentstate) then begin

Mattias

Show quoted text 16 lines
Despite the fact that the section that assigns the OnKeyUp event is supposed to be checking to see if we're csDesigning, as soon as you drop this component on a form, it affects the OnKeyUp event of the form, changing it to "<unpublished>". Now, I don't plan on using this code later, because of the changes discussed, but it illustrates the problem I'm having. This is a fresh CVS download of Lazarus from a few hours ago. -Tony _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Tony Maro
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…
Jesus Reyes wrote 5 lines
Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying to do is not to store the literals '-'. When I use 00-00-00;1;? it works ok :). Jesus Reyes A.

Still a glitch or two, but this comes a heck of a lot closer. Code needs some serious cleanup now, but it's functional for storing / not storing the mask, and for the replacement blank space characters as well (I think.)

I've noticed that the csDesigning check doesn't seem to work anymore. Is there a bug in Lazarus or the LCL that breaks this? I can't get the designing check to work in anything I do...

Initial display of the mask may be weird. I can't quite seem to get it to handle creation properly. I think it's related to the possible csDesigning bug I mentioned.

Thanks,

Tony

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gz00020.gz
Type: application/octet-stream
Size: 8059 bytes
Desc: "mask.pp.gz"
Url : http://localhost/pipermail/lazarus/attachments/20030416/b3b8ab7a/gz00020.obj

Reply by email

Mattias Gaertner
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…
Show quoted text 15 lines
On Mon, 2003-04-07 at 15:06, Jesus Reyes wrote: > Maybe I'm using it the wrong way, try the next editmask: > '00-00-00;0;?'. What I'm trying to do is not to store the literals > '-'. When I use 00-00-00;1;? it works ok :). > > Jesus Reyes A. Still a glitch or two, but this comes a heck of a lot closer. Code needs some serious cleanup now, but it's functional for storing / not storing the mask, and for the replacement blank space characters as well (I think.) I've noticed that the csDesigning check doesn't seem to work anymore. Is there a bug in Lazarus or the LCL that breaks this? I can't get the designing check to work in anything I do...

It works for me. When/Where do you check csDesigning?

Initial display of the mask may be weird. I can't quite seem to get it to handle creation properly. I think it's related to the possible csDesigning bug I mentioned.

Mattias

Reply by email

Tony Maro
to Jesus Reyes: Maybe I'm using it the wrong way, try the next editmask: '00-00-00;0;?'. What I'm trying…
Mattias Gaertner wrote 9 lines
On 16 Apr 2003 01:41:44 -0500 Tony Maro wrote: > I've noticed that the csDesigning check doesn't seem to work anymore. > Is there a bug in Lazarus or the LCL that breaks this? I can't get the > designing check to work in anything I do... It works for me. When/Where do you check csDesigning?

Well, the mask.pp is pretty complex in that and may have a bug, however the help system component I'm working on is simple.

constructor THelpSystem.create(AOwner: TComponent);
begin
  // squeeze myself into the form's OnKeyUp event
  // without ignoring anything already set there...
  FForm := nil;
  FOldKeyUp := nil;
  FItems := TStringList.Create;
  if not(csDesigning in componentstate) then begin
    if AOwner is TForm then begin
      FForm := AOwner as TForm;
      if assigned(FForm.OnKeyUp) then begin
        FOldKeyUP := FForm.OnKeyUp;
      end;
      FForm.OnKeyUP := @FormKEYUP;
      FForm.KeyPreview := True;
    end;
  end;
  inherited create(AOwner);
end;

Despite the fact that the section that assigns the OnKeyUp event is supposed to be checking to see if we're csDesigning, as soon as you drop this component on a form, it affects the OnKeyUp event of the form, changing it to "<unpublished>".

Now, I don't plan on using this code later, because of the changes discussed, but it illustrates the problem I'm having.

This is a fresh CVS download of Lazarus from a few hours ago.

-Tony

Reply by email