Re: [fpc-pascal] Re: Handling with sources and exebutables with different names

2012-05-18 Thread Tomas Hajny
On Thu, May 17, 2012 21:09, luciano de souza wrote: > Actually, there are no errors. > > Using cmd.exe on Windows 7 and FPC 2.6.0, I did: > > fpc test.pas -oindex.cgi > > I got test.exe and no errors are raised. Please add option -s (i.e. 'fpc -s test.pas -oindex.cgi') and post content of the gene

Re: [fpc-pascal] FSplit is deprecated

2012-05-18 Thread Bernd
2012/5/17 Marco van de Voort : > So use functions from 2.0.x like sysutils.extract* Found it, thank you. I was a little bit impatient yesterday, I should have searched a little longer on my own. Due to the extraordinarily high quality of FPC and Lazarus I have begun to take absolute perfection

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-18 Thread Bernd
2012/5/13 Sven Barth : > Currently the Windows RTL uses (nearly?) always the Ansi functions > (exception might be WinCE as there the Ansi functions don't exist), so using > TFileStream won't help here. Does AssignStream() also accept any other THandleStream? Maybe you can just make your own TFile

[fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Zaher Dirkey
Hi, I have 2 objects inherited from the base one T_A = class(TObject); T_B1 = class(T_A); T_B2 = class(T_A); T_B3 = class(T_A); Now if I want to extend T_B1 it is easy to inherit it to T_C1 = class (T_B1) and add many functions to it, but. I want the same extend T_B2 not T_B3, 1 - The first

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Michael Van Canneyt
On Fri, 18 May 2012, Zaher Dirkey wrote: Hi, I have 2 objects inherited from the base one T_A = class(TObject); T_B1 = class(T_A); T_B2 = class(T_A); T_B3 = class(T_A); Now if I want to extend T_B1 it is easy to inherit it to T_C1 = class (T_B1) and add many functions to it, but. I want

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Zaher Dirkey
On Fri, May 18, 2012 at 9:18 PM, Michael Van Canneyt wrote: > > Maybe you can try interfaces and interface delegation. > > I don't think so, class T_A is not my code or it is very strict to modify it, also i am talk about multiple implementation not interfacing objects (or you can provide me and

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Sven Barth
On 18.05.2012 20:38, Zaher Dirkey wrote: Hi, I have 2 objects inherited from the base one T_A = class(TObject); T_B1 = class(T_A); T_B2 = class(T_A); T_B3 = class(T_A); Now if I want to extend T_B1 it is easy to inherit it to T_C1 = class (T_B1) and add many functions to it, but. I want the

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Bernd
2012/5/18 Zaher Dirkey : > Hi, > > I have 2 objects inherited from the base one > > T_A = class(TObject); > > T_B1 = class(T_A); > T_B2 = class(T_A); > T_B3 = class(T_A); How about this: T_A = class(TObject); T_AX = class(T_A);// <-- this class implements your extensions T_B1 = class(T_AX);

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Zaher Dirkey
On Fri, May 18, 2012 at 11:27 PM, Bernd wrote: > > _B3 = class(T_A); > How about this: > > T_A = class(TObject); > > T_AX = class(T_A);// <-- this class implements your extensions > > T_B1 = class(T_AX); // TB_1 and > T_B2 = class(T_AX); // TB_2 inherit it > T_B3 = class(T_A); > > > I can't

Re: [fpc-pascal] Extend multiple classes with same code

2012-05-18 Thread Jorge Aldo G. de F. Junior
You simply cant do it. Not even multiple inheritance would help you in this case. You will have to extend each class by hand. Multiple inheritance would allow you to join back branches in the class hierarchy, but in this case you want to add the same functionality to multiple branches, but keep t