Sign in Join

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

Mailing lists / lazarus / 2003-11

a patch about propedits.pp!

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to GongYu: hello everyone! i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName…
Show quoted text 30 lines
GongYu wrote: > hello everyone! > i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName > procedure > now when you double click on property event page ,the procduced > procedure name now like delphi for example: > before modify > when you dubleclick on form1 ,it show Form1CREATE > after modify > when you dubleclick on form1 ,it show Form1Create > sorry for pool english! > ps : > anyone can tell me how to use diff? > > function TMethodPropertyEditor.GetTrimmedEventName: shortstring; > var > tmp:string; > begin > Result:=LowerCase(GetName); > if (Length(Result) >= 2) > and (Result[1] in ['o']) and (Result[2] in ['n']) > then > System.Delete(Result,1,2); > tmp:=leftstr(result,1); > System.Delete(Result,1,1); > Result:=Uppercase(tmp)+Result; > end; This is solved when using FPC 1.9.x anyways since this version stores properties etc. in rtti without upper casing them.

Right.
Nevertheless for 1.0.x for the biggest part of the methods it will create nicer names. So, I added it with an IFDEF.

Mattias

Show quoted text 6 lines
_________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Michal Bukovjan
to GongYu: hello everyone! i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName…
GongYu wrote 12 lines
hello everyone! i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName procedure now when you double click on property event page ,the procduced procedure name now like delphi for example: before modify when you dubleclick on form1 ,it show Form1CREATE after modify when you dubleclick on form1 ,it show Form1Create sorry for pool english! ps : anyone can tell me how to use diff?

You can create a patch against CVS by issuing a command:

cvs diff -u [filename_or_dir...]

You can redirect outout to create a file:

cvs diff -u [filename_or_dir...] > mypatch.diff

See "man diff" for more options.

Michal

Reply by email

Florian Klaempfl
to GongYu: hello everyone! i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName…
GongYu wrote 25 lines
hello everyone! i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName procedure now when you double click on property event page ,the procduced procedure name now like delphi for example: before modify when you dubleclick on form1 ,it show Form1CREATE after modify when you dubleclick on form1 ,it show Form1Create sorry for pool english! ps : anyone can tell me how to use diff? function TMethodPropertyEditor.GetTrimmedEventName: shortstring; var tmp:string; begin Result:=LowerCase(GetName); if (Length(Result) >= 2) and (Result[1] in ['o']) and (Result[2] in ['n']) then System.Delete(Result,1,2); tmp:=leftstr(result,1); System.Delete(Result,1,1); Result:=Uppercase(tmp)+Result; end;

This is solved when using FPC 1.9.x anyways since this version stores properties etc. in rtti without upper casing them.

Reply by email

GongYu

hello everyone!
i modified the propedits.pp TMethodPropertyEditor.GetTrimmedEventName procedure now when you double click on property event page ,the procduced procedure name now like delphi for example:
before modify
when you dubleclick on form1 ,it show Form1CREATE after modify
when you dubleclick on form1 ,it show Form1Create sorry for pool english!
ps :
anyone can tell me how to use diff?

function TMethodPropertyEditor.GetTrimmedEventName: shortstring;
var
tmp:string;
begin
  Result:=LowerCase(GetName);
  if (Length(Result) >= 2)
  and (Result[1] in ['o']) and (Result[2] in ['n'])
  then
    System.Delete(Result,1,2);
  tmp:=leftstr(result,1);
  System.Delete(Result,1,1);
  Result:=Uppercase(tmp)+Result;
end;

����������������������������GongYu

����������������������������������2003-11-08

Reply by email