Re: [fpc-pascal] Debian, Jessie, Linux64 failed to install FPC3.0 64bit
this one of mirrors i used ftp://gd.tuwien.ac.at/languages/pascal/fpc/dist/3.0.0/x86_64-linux/ On Mon, Oct 10, 2016 at 9:11 AM, Zaher Dirkey <parm...@gmail.com> wrote: > Hi i tried to install FPC 64 but in Debian 64 bit but i feel it currpted, > i downloaded it from individual mirror but same. > It finished with strange name encoded file like in picture (attached) and > bad file format for fpc execute file > > I uses "sh install.sh" in /usr directoy > > Is there any good copy to use? > > > [image: Inline image 1] > Best Regards > Zaher Dirkey > -- I am using last revision of Lazarus, FPC 3.0 on Windows8.1 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Free Pascal - Github
On Thu, Apr 24, 2014 at 2:35 PM, Karoly Balogh (Charlie/SGR) char...@scenergy.dfmk.hu wrote: Thank you! In fact the timings were a bit screwed, because I contacted Github about your contact before this issue popped up here. It was also discussed a bit in the team. Since discussions about Git end up in a flamewar sometimes, I didn't dare to ask publicly here. Maybe it was a mistake. :) Thanks again, Charlie No problem, It is normal way, If you want to work on this org I will remove my self as owner and developer, it is now under your hands, just confirm me. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Free Pascal - Github
On Thu, Apr 24, 2014 at 5:56 PM, Karoly Balogh (Charlie/SGR) char...@scenergy.dfmk.hu wrote: Well, I took over a bit already, and did some minor modifications. :) Or I don't know what do you mean by a confirmation. So yes, I have full access to it now, thank you. It is belong to you now, I removed my self as owner, have fun :) . Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Free Pascal - Github
On Wed, Apr 23, 2014 at 3:14 PM, Karoly Balogh (Charlie/SGR) char...@scenergy.dfmk.hu wrote: On Wed, 23 Apr 2014, silvioprog wrote: Is Free Pascal from Github updated? I saw last update in: https://github.com/graemeg/freepascal nickysn authored 11 days ago Yes, it's sometimes not updated, sadly. It also doesn't have up to date fixes branch, IIRC. Can I follow normally Free Pascal from GIT? Not now, I'm working on it to make a better Git/GitHub mirror though. You asked me to take fpc user orginazation/repo at githib? In fact i reserved it for offical freepascal team, but if no one interested about it u can take it. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Free Pascal - Github
On Wed, Apr 23, 2014 at 9:34 PM, Florian Klämpfl flor...@freepascal.orgwrote: Well, you can consider Charlie as part of the freepascal team ;) Ok, Done, he is the owner of https://github.com/orgs/fpc Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 8:50 AM, Sven Barth pascaldra...@googlemail.comwrote: You need to add a Result.Assign(Self) to your clone call and implement a virtually inherited Assign method in each class where you copy all fields. This is how TPersistent and its descendants do it as well. Yes I added assign, but as example above, it is crashed when creating it Result:=TBaseObject(ClassType).Create; -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 10:02 AM, Michael Van Canneyt mich...@freepascal.org wrote: Var C : TBaseObjectClass; begin C:=TBaseObjectClass(ClassType)**; Result:=C.Create; end; Yes, that help me, thanks. Now about assigning I must repeat it (assign) for every child class copy its field members, is there any trick to copy the values like assigning record var to another record var? I know it is kind of strange way :P Thanks Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 12:46 PM, Michael Van Canneyt mich...@freepascal.org wrote: There is no such safe mechanism. The best you can do is make the properties published, and write an RTTI lookup routine that copies all Published values. I've done this several times, it works well for most situations. It is not the fastest way like assigning a record, can we ask it as a feature in FPC ? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 12:57 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: type TMyClass = class(TPersistent) private type TMyClassVars = record a,b,c: string; end; private F: TMyClassVars; public procedure Assign(Source: TPersistent); property a: string read F.a write F.a; end; But in derived classes fields will not assigned? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 12:58 PM, Graeme Geldenhuys gra...@geldenhuys.co.uk wrote: Also be careful about the pitfalls of cloning a class. eg: How you want to handle more complex cases. eg: Cloning a class with a reference to another class, or cloning a class with an embedded class (field), etc... tiOPF's implementation allows the developer to decided how such cases should be handled. The idea is simply than needs to use a stream or RTTI, it is like a record, if looked at an object like as a record but it is inheritable. Compile can now every object body, and do the assigning as record assign. That's the feature I like to have. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Clone a instance of object
On Mon, Sep 23, 2013 at 4:28 PM, Zaher Dirkey parm...@gmail.com wrote: The idea is simply than needs to use a stream or RTTI, it is like a record, if looked at an object like as a record but it is inheritable. Compile can now every object body, and do the assigning as record assign. That's the feature I like to have. Best Regards This is a funny example about what in my mind about what I talk (I know it is stupid and unsafe) If you look it is only for the class that not yet inherited yet, and work only for the top class, but the compiler can guss all inheited/derived classes and make the same assign. If some understand it, maybe give more explain. - type TmyRec = record s: string; i: integer; end; PmyRec=^TmyRec; TmyObj = class(TObject) s: string; i: integer; end; procedure TForm1.Button1Click(Sender: TObject); var o1, o2: TmyObj; begin o1 := TmyObj.Create; o2 := TmyObj.Create; o1.s := 'test1'; o1.i := 122; PmyRec(@o2)^ := PmyRec(@o1)^; WriteLn(o2.s); WriteLn(o2.i); end; - Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Clone a instance of object
Hi, I have objects (classes) derived from base one TBaseObject = class(TObject) public constructor Create; virtual; function Clone:TBaseObject; end; TMyObject = class(TBaseObject) my fields here end; o1, o2:TmyObject; o1 already created; o2 := o1.Clone; in Clone i want to create new object from TmyObject but in base object in Clone method,like this TBaseObject.Clone:TBaseObject; begin Result:=TBaseObject(ClassType).Create;//I know it is wrong here end; A ny good idea? -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to save a huge XML?
On Tue, Jun 18, 2013 at 5:01 PM, Michael Van Canneyt mich...@freepascal.org wrote: Regardles of XML or not: keeping logs in memory is simply a bad idea. Log it to a csv file, and at the end you can convert it to xml for your client, you can do that without loading it into memory, process it line by line. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to save a huge XML?
On Tue, Jun 18, 2013 at 6:00 PM, Marcos Douglas m...@delfire.net wrote: But in that way I will have two process to run. I'll write a XML using strings... but thank you. one process, but in function like TXMLLogger.Finish you can convert it, using strings in memory, it will eat your memory. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to save a huge XML?
On Tue, Jun 18, 2013 at 7:59 PM, Marcos Douglas m...@delfire.net wrote: ?xml version=1.0 encoding=utf-8? root connection login=uref database=DB_REF/ start dh=2013-06-18T13:54:57/ line idDoc=912 status=ok/ line idDoc=913 status=ok/ line idDoc=914 status=ok/ line... finish dh=2013-06-18T13:54:58/ /root What about when opening first time the file, write head lines ?xml version=1.0 encoding=utf-8? root connection login=uref database=DB_REF/ start dh=2013-06-18T13:54:57/ then when every log you write (simple with format function) line idDoc=xxx status=xxx/ And when finish it write the footer finish dh=2013-06-18T13:54:58/ /root I mean writing directly to the file without put it in DOM or any kind of document in the memory. -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Is THostResolver creating a thread?
Maybe it use the thread again, try many requests if there is more threads? On Wed, May 8, 2013 at 4:35 PM, silvioprog silviop...@gmail.com wrote: 2013/5/8 Michael Van Canneyt mich...@freepascal.org On Wed, 8 May 2013, silvioprog wrote: Oops, 2013/5/8 silvioprog silviop...@gmail.com [...] uses resolve, winsock; procedure TForm1.Button1Click(Sender: TObject); var FHostEntry: PHostEnt; begin FHostEntry := gethostbyname('www.google.com.**brhttp://www.google.com.br '); end; ... gethostbyname('www.google.com'**) ... The resolver or netdb units do not create threads by themselves. But the windows Winsock routines may create threads (I would expect this), and these may show up in your process manager. Michael. But my project will always have a thread that is never released? Even when I freed my objects, that thread is still there. Well, if this is done by the Windows API, I think we have nothing to do hehe... -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Mon, May 6, 2013 at 9:10 PM, Ludo Brands ludo.bra...@free.fr wrote: Watch out for Synchronize(@DoReceive) in a recv loop. That is going to drag down your performance considerably. Maybe you do need to call synh, leave it to the user to add it in his event, or make it as an option. For that i hate using components as GUI components, no events in my classes. -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Sat, May 4, 2013 at 8:47 AM, silvioprog silviop...@gmail.com wrote: repeat if Socket.CanRead(timeout) then begin insock:=Socket.Accept; if insock-1 then //start working with insock else //deal with error end; until ThreadTerminated; Ludo Thank you! If you success, tell us, i must fix my sockets too :) -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Compileability of target WinCE restored
Did tried my modification in the bug tracker? On Sat, May 4, 2013 at 2:09 PM, Sven Barth pascaldra...@googlemail.comwrote: Hello together! I've now restored the possiblity to compile arm-wince and i386-wince in revision 24420. Sorry for the long time of broken compilation and the resulting inconvenience. I'm planning to setup automated test suite runs for arm-wince to avoid such problems in the future. Regards, Sven __**_ fpc-pascal maillist - fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Sat, May 4, 2013 at 8:45 AM, Ludo Brands ludo.bra...@free.fr wrote: Take a look at TBlockSocket.InternalCanRead and TBlockSocket.CanRead in synapse on how to set up select correctly. Then do something like repeat if Socket.CanRead(timeout) then begin insock:=Socket.Accept; if insock-1 then //start working with insock else //deal with error end; until ThreadTerminated; I have put Select before Accept and it doesn't work, it blocked forever without accepting any connection. Accept function who block the thread and get new connection. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Sat, May 4, 2013 at 5:40 PM, Ludo Brands ludo.bra...@free.fr wrote: Can you show the code you use? You tested on Windows, linux, Mac, ...? Only on Windows XP source here https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnServers.pas about line 323 i changed it to similar to this, but not committed it begin if Socket.Select(1, slRead) = erNone then --- Blocked here forever aSocket := Socket.Accept else aSocket := nil; Enter; select function here DoSelect line 132 https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnWinSockets.pas I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
But mnServer is works with me for a years, and there is mnHttpServer demo and it is work fine too without Select before Accept https://sourceforge.net/p/minilib/source/ci/master/tree/socket/demo/lazarus/ On Sat, May 4, 2013 at 6:05 PM, Zaher Dirkey parm...@gmail.com wrote: On Sat, May 4, 2013 at 5:40 PM, Ludo Brands ludo.bra...@free.fr wrote: Can you show the code you use? You tested on Windows, linux, Mac, ...? Only on Windows XP source here https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnServers.pas about line 323 i changed it to similar to this, but not committed it begin if Socket.Select(1, slRead) = erNone then --- Blocked here forever aSocket := Socket.Accept else aSocket := nil; Enter; select function here DoSelect line 132 https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnWinSockets.pas I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
Hmm there is diffrents Yours res:=select(sock+1,@readfds,@writefds,@exceptfds,@tv); Mine c := WinSock2.select(0, PSetRead, PSetWrite, nil, @TimeVal); 0 here in mine, in yours sock+1 (FHandle+1 in mine). I will take more testing. On Sat, May 4, 2013 at 8:01 PM, Ludo Brands ludo.bra...@free.fr wrote: On 05/04/2013 05:05 PM, Zaher Dirkey wrote: On Sat, May 4, 2013 at 5:40 PM, Ludo Brands ludo.bra...@free.fr mailto:ludo.bra...@free.fr wrote: Can you show the code you use? You tested on Windows, linux, Mac, ...? Only on Windows XP This is a small test program that works for me on XP and linux: program testselect; {$mode objfpc}{$H+} uses Classes,sockets, {$ifdef unix} unix,baseunix,unixtype {$else} ctypes,WinSock2 {$endif} ; CONST LISTENPORT=1234; var sock: cint; sa,clsa:sockaddr; tv:TTimeVal; readfds,writefds,exceptfds:tfdset; c: Integer; res: cint; len: tsocklen; one: Integer; begin sock:=fpsocket(AF_INET, SOCK_STREAM, 0); if sock=-1 then begin writeln('socket failed with ',socketerror); exit; end; one:=1; if fpsetsockopt(sock, SOL_SOCKET, SO_REUSEADDR, @one, sizeof(one))=-1 then begin writeln('setsockopt failed with ',socketerror); exit; end; fillchar(sa,sizeof(sa),0); sa.sin_port:=htons(LISTENPORT); sa.sin_family:=AF_INET; sa.sin_addr.s_addr:= INADDR_ANY; if fpbind(sock,@sa,sizeof(sa))=-1 then begin writeln('bind failed with ',socketerror); exit; end; if fplisten(sock,10)=-1 then begin writeln('listen failed with ',socketerror); exit; end; c:=1; repeat tv.tv_sec:=1; tv.tv_usec:=0; {$ifdef unix} fpFD_ZERO(readfds); fpFD_ZERO(writefds); fpFD_ZERO(exceptfds); fpFD_SET(sock,readfds); res:=fpselect(sock+1,@readfds,@writefds,@exceptfds,@tv); if (res=-1) and (socketerrorESYSEINTR) then begin writeln('select failed with ',socketerror); exit; end; if (res0) and (fpFD_ISSET(sock,readfds)0) then begin {$else} FD_ZERO(readfds); FD_ZERO(writefds); FD_ZERO(exceptfds); FD_SET(sock,readfds); res:=select(sock+1,@readfds,@writefds,@exceptfds,@tv); if (res=-1) and (socketerrorWSAEINTR) then begin writeln('select failed with ',socketerror); exit; end; if (res0) and (FD_ISSET(sock,readfds)) then begin {$endif} fillchar(clsa,sizeof(clsa),0); len:=sizeof(clsa); if fpaccept(sock,@clsa,@len)=-1 then begin writeln('accept failed with ',socketerror); exit; end; writeln('connection accepted'); c:=c+1; end; until c=2; closesocket(sock); end. If you run the program and do from a console a telnet localhost 1234 to connect to the program, it will print 'connection accepted' and close immediately. Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Sat, May 4, 2013 at 9:42 PM, Ludo Brands ludo.bra...@free.fr wrote: However, in your code you do if (c = 0) or (c = SOCKET_ERROR) then begin Error; which is not correct. c=0 is the result of select returning after a timeout. It is not an error. The fact that if Socket.Select(1, slRead) = erNone then is blocked forever is not normal. It should at least return after 10 seconds. I am not testing in linux it is broked with me and i have not good internet to fix it. now in this example http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspx They not use Select before accept and in http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx The parameter *readfds* identifies the sockets that are to be checked for readability. If the socket is currently in the *listen*http://msdn.microsoft.com/en-us/library/windows/desktop/ms739168%28v=vs.85%29.aspxstate, it will be marked as readable if an incoming connection request has been received such that an *accept*http://msdn.microsoft.com/en-us/library/windows/desktop/ms737526%28v=vs.85%29.aspxis guaranteed to complete *without blocking*. I still not sure in windows need Select, but maybe in Linux only, but i can't test it there. -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 12:18 PM, Ewald ew...@yellowcouch.org wrote: That's true, but at least it returns control to you (= the programmer), so you can close the handles manually. I am notprefer force to close any thing, that will make more bugs in your application, while it is work fine with other programmesr without using cancel it. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 6:57 PM, silvioprog silviop...@gmail.com wrote: when I close the server with one or more clients connected, I got a memory leak. Check if the thread freed? Try to stop server manually (by button or in Close event in the form) Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 7:22 PM, Ewald ew...@yellowcouch.org wrote: Accept but without errors You cant, Accept give you a handle of new socket or give you an error, not all is fatal error, just check what is it, if it a closed handle or shutdown. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 9:13 PM, Marco van de Voort mar...@stack.nl wrote: Select on the main socket before doing the accept? No i am not use Select before Accept, accept is blocking the thread. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 11:27 PM, Marco van de Voort mar...@stack.nl wrote: That's the point. Don't. Use a select, it has a timeout, and accept only if select shows activity on the listened to socket. Not sure, but i believe i used it in the past and have problems with it, We can leave it to silvio to test it :P -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 11:47 PM, Zaher Dirkey parm...@gmail.com wrote: On Fri, May 3, 2013 at 11:27 PM, Marco van de Voort mar...@stack.nlwrote: That's the point. Don't. Use a select, it has a timeout, and accept only if select shows activity on the listened to socket. Not sure, but i believe i used it in the past and have problems with it, We can leave it to silvio to test it :P I use Select for incoming Data not for incoming client connections! Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
After termintate you need to wait the thread to stop, WaitFor here the function. Search for WaitFor in https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnServers.pas On Thu, May 2, 2013 at 8:57 PM, silvioprog silviop...@gmail.com wrote: destructor TTcpIpServerSocketThread.Destroy; begin FSocket.StopAccepting; FSocket.Free; inherited Destroy; end; -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Thu, May 2, 2013 at 10:45 PM, silvioprog silviop...@gmail.com wrote: Yes, but in this case, WaitFor blocks my app. Yes, but before terminate your socket/client connections, you need also close the handle of it, or stop receive, it will return immateriality without receive (with error), so all connections will drop, and you wait to finish that. -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Thu, May 2, 2013 at 11:47 PM, silvioprog silviop...@gmail.com wrote: I tested current code on Linux, but unfortunately when I try to close, the app stays locked. :| Yes headache :P Do not close, i use Shutdown function TmnSocket.DoShutdown(How: TmnShutdown): TmnError; const cHow: array[TmnShutdown] of Integer = (0, SHUT_RD, SHUT_WR, SHUT_RDWR); var c: Integer; begin CheckActive; c := fpshutdown(FHandle, cHow[How]); if c = SOCKET_ERROR then begin Result := erFail; //RaiseLastOSError; do not raise an error, maybe it is disconnected by the other side end else Result := erNone; end; -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to close TInetServer without except?
On Fri, May 3, 2013 at 12:51 AM, Ewald ew...@yellowcouch.org wrote: pthread_cancel() pthread_cancel() not clos e the handles i though. -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MS DOS 8086 compiler?
On Sat, Apr 27, 2013 at 3:11 PM, Bart bartjun...@gmail.com wrote: I still have a portable (ahum, 5 kg) IBM XT with 5.25 floppy disk. HD is appr. 10 MB (decaying...) Yay Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] RAD Studio XE4 Released?
The price is greater than my salary for a year, (When i have a job). On Tue, Apr 23, 2013 at 10:49 PM, vfclists . vfcli...@gmail.com wrote: http://www.h-online.com/developer/news/item/RAD-Studio-XE4-focuses-on-cross-platform-apps-1848176.html http://www.embarcadero.com/press-releases/embarcadero-technologies-unveils-multi-device-true-native-app-development-suite -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v1.0 release for FPC 2.6.2
1 - I have the source from Git, how to start without download the binary? 2 - What the best demo to open and start new project? I have a new project i like to build it on fpgui small one :) On Sat, Apr 20, 2013 at 9:16 PM, Graeme Geldenhuys gra...@geldenhuys.co.ukwrote: fpGUI v1.0 is available I'm glad to announce the 1.0 release of fpGUI. This has been over a years worth of development, so a complete list of changes will be to big to list here. Here are just some highlights: - Improvements to the UI (forms) Designer - Lot of DocView improvements (Bookmark management, Image decoding support in INF files, RichView component improvements etc.) - AggPas integration as an experimental backend. AggPas is a 2D graphics library implemented in 100% Pascal, and includes some amazing features that really enhances the quality of fpGUI's canvas class. - New example apps, and improvements to existing demo apps like Maximus and Debug Server. etc. For more details, run any of the following commands: git log --oneline v0.8..v1.0 (console viewer) or gitk v0.8..v1.0(gui viewer) Downloads - An archived source download of fpGUI, and pre-built binaries for DocView (fpGUI's Documentation Viewer) can be found at the following URL: http://sourceforge.net/projects/fpgui/files/fpGUI/1.0/ ...or clone the source code repository by using any of the following commands: from SourceForge: git clone git://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui from GitHub: git clone git://github.com/graemeg/fpGUI.git or git clone https://github.com/graemeg/fpGUI.git The 'master' branch contains the latest released fpGUI (v1.0), and the 'develop' branch contains the latest development work on fpGUI. Documentation - Pre-built documentation in the highly optimized INF file format (for use with DocView) is also available for download in a single archive, just 1.9MB in size. The documentation archive contains the following help files: - Class documentation for fpGUI Toolkit - The Free Pascal Language Reference - FPC Runtime Library (rtl) help - FPC Free Component Library (fcl) help The download URL is: http://sourceforge.net/projects/fpgui/files/fpGUI/Documentation/ If you want integrated help in your IDE or Programmer Editor of choice, the following URL describes how to do it: http://fpgui.sourceforge.net/docview_ide_integration.shtml For more details, please visit the fpGUI home page: http://fpgui.sourceforge.net Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Yet again Objects auto destruction
I think it is not the first time this topic was opened, but still think we need when using object to have automatically destructor called by compiler when the object freed TmyObject = object FSQL: TStringList; constructor Init(SQL: string); destructor Free; end; constructor TmyObject.Init(SQL: string); begin FSQL:=TStringList.Create; end; destructor TmyObject.Free; begin FSQL.Free; end; Here in the example we can call init manually and it is not a problem, because it is always we know who is create this object. But free or destroy can not call it manually, we not know who will kill that object first, because many of another object assigned to it. Ref http://lists.freepascal.org/lists/fpc-pascal/2006-August/011626.html I know about Interfaces but i hate use it, All just we need new feature to call destroy when freeing the object. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] why connect is deprecated
You can get some hints from minilib https://sourceforge.net/p/minilib socket directory On Tue, Apr 16, 2013 at 2:53 PM, Xiangrong Fang xrf...@gmail.com wrote: using the socket like read/write file is very convenient. This is the first time I use fpc to write socket program, it is much easier than I used Indy or ICS in Delphi several years ago. I hope to modernize or make it more stable, instead of deprecate it. Of course deprecate Connect and use fpConnect + Sock2Text manually is not a big deal. 2013/4/16 Jonas Maebe jonas.ma...@elis.ugent.be On 16 Apr 2013, at 12:13, Marco van de Voort wrote: In our previous episode, Jonas Maebe said: As far as I can see, all errors are returned via inoutres/IOResult in the same way as happens with disk-based IO. Yes. An attempt is made to map some of the errors to I/O. Anyway, if sb wants to support and modernize them, I have no problem with that. But that hasn't happened since 2005-2007 or so. What needs to be modernised about it? It's not like our disk i/o error code handles many more different error codes, nor are those errors much more specific. I remember the old discussion, but I never understood how the error reporting of the sockets code and the generic I/O code differed in a way that made the former worse than the latter. That would also make it possible to directly map socketerror to getlastresult/fpgeterrno, instead of caching it in another threadvar. IIRC the problem with removing socketerror would be that it could easily break existing code (given that socketerror is not overwritten by calls other than those from the sockets unit). Jonas __**_ fpc-pascal maillist - fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Free member after inherited Destroy;
Is it safe to free memeber object after call inherited in Destroy? in Delphi/ObjFPC modes type TMyObject=class(TObject) FMyMember:TmyMemberObject; destructor TMyObject.Destroy; begin inherited Destroy; FreeAndNil(FMyMember); end; -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] File Association and opening with already running app
Please tell us you success story when you done For me i am using SimpleIPC https://github.com/parmaja/miniedit/blob/master/source/gui/mne.lpr look at AnotherInstance and MainUnit.pas Works good in Windows but not tested in Linux. On Thu, Apr 4, 2013 at 12:08 PM, Graeme Geldenhuys gra...@geldenhuys.co.ukwrote: Hi, I'm posting it here, but it is not a Lazarus question, but a general GUI app (created with FPC) question. Example of what I want to achieve. Say I have gEdit (Gnome editor) open and have a file loaded. Now if I am in a console and type 'gedit someotherfile.txt' [or double click a text file in Nautilus], it doesn't start a new instance of gedit, the existing instance opens the new file - gedit supports multiple opened files in a tabbed view. How do they accomplish this? I would like to implement something like that for fpGUI, and it must work under all fpGUI supported desktop platforms. I know under Windows you can check if an instance of an application is already running, and stop your current instance. Still not sure how to transfer the open a new file action to that existing instance. As for Linux, FreeBSD etc, I have no clue how to do it. For those not in the know, fpGUI is based directly on GDI or XLib (not Qt, GTK etc). Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FBLib (firebird library for FPC, Delphi and Kylix) has moved
For understand, now it is the original repo for it or it is just a fork for it I always like the take the source original from the author. As i know, the site is http://fblib.altervista.org but no repo for it? On Tue, Mar 26, 2013 at 2:17 AM, Graeme Geldenhuys gra...@geldenhuys.co.ukwrote: Hi, For years the FBLib (Firebird database library for Free Pascal, Delphi and Kylix) has lived in the '3rdParty' directory tree of tiOPF. We are cleaning up the tiOPF repository, and so I have now moved the FBLib project out to Github, into its own repository. The repository history is intact. I still need to add a few more patches I have locally, and some Lazarus based support apps. All future development of FBLib will now happen on Github. To get a copy of the code: git clone git://github.com/graemeg/firebird-lib.git Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] differences between .pp and .pas files
I am using pas for units that Delphi compatible you can compile it with Delphi, now pp it is only FPC compiled not compatible with Delphi. On Mon, Feb 25, 2013 at 7:34 AM, Eric Kom eric...@metropolitancollege.co.za wrote: Good day, Please what is a difference between .pp and .pas files extension? -- Kind Regards Eric Kom System Administrator Programmer - Metropolitan College __**___ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends./ --**--- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 eric...@kom.za.net | erickom@metropolitancollege.**co.zaeric...@metropolitancollege.co.za www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5 __**_ fpc-pascal maillist - fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] OT a bit - Planet Object Pascal
On Mon, Feb 18, 2013 at 10:26 PM, Frank Church vfcli...@gmail.com wrote: v1.0 release. http://wiki.freepascal.org/New_IDE_features_since This is a very useful page. I didn't know that Lazarus was that well featured. Yes, we didn't know that, that is the problem, there is no good map in that jungle. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] OT a bit - Planet Object Pascal
On Tue, Feb 19, 2013 at 1:31 PM, Martin laza...@mfriebe.de wrote: Here is another page, not as many pictures, but a good list of useful features: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools I meant we need recategory this articles under a good index/tree, so we can start from home index to discover the wiki. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] About Putting everything in one repo
Hi, FPC and Lazaurs team I noticed there is new component (PascalScript) ported to lazarus/components/ and in the past AggPas also ported, The idea, why you put many components not used for most users, same ask in FPC My example to understand me I use SQLite, we found a bug and this bug fixed by FPC team, now we must wait long time to have new release with this simple bug fixed. But if the SQLite unit in another repository, this Extended repo can published the releases more faster than FPC releases, If FPC release come one every year this repo collected and released 4 time in this year. Same idea for Lazarus, i know Lazarus has Lazarus-ccr, for that i asked why you extending the Components directory in the official Lazarus repository. Sorry for my poor English. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] About Putting everything in one repo
On Sun, Sep 2, 2012 at 1:20 PM, Florian Klämpfl flor...@freepascal.orgwrote: If somebody is interested to do so, he can do this. What does prevents someone technically (!) from releasing SQLit unit update installers from the currently used repository? Partial agree, but In another repo, you can have separated milestones, bugs must finished before release the new version, it is like when release Lazarus based on the same versions of FPC. Not only Sqlite, there is many packages like it, sqlite here for example. snapshots not resolve the problem because it have included the core of FPC, and it is not stable. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] About Putting everything in one repo
On Sun, Sep 2, 2012 at 2:18 PM, Martin laza...@mfriebe.de wrote: The reason Pascalsript went into the main SVN is, that (if all goes well) then it will be used by the IDE itself. So the IDE will need it to be build. That is good news for me :) I also mentioned AggPas, if it have the same reason i think we need more searches to understand the code changes, but no problem. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: About Putting everything in one repo
On Sun, Sep 2, 2012 at 2:25 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: Why don't you use FPC fixes (e.g. FPC 2.6.1) then, and help backport stable fixes from trunk to fixes? Is that in the download page? And is it have the last fixed for this kind of non core packages? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: About Putting everything in one repo
On Sun, Sep 2, 2012 at 2:55 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: It's a branch in the svn repository. And Lazarus builds based on fixes 2.6 appear on the snapshots page. For Linux/OSX, you'll probably find those on the snapshots page. For fpc only: see also http://www.freepascal.org/develop.var Anyway, I'd rather use svn - of course, in my case fpcup ;) because I don't want to download the entire distribution all the time, only the changes. It is for expert user not for normal user. And is it have the last fixed for this kind of non core packages? It has the last fixes that were considered stable and were backported for all FPC packages. So, i prefer to make fixes snapshots in the main downloads page but with minor version number like this 2.6.0.1, because: how can i publish my project and mentioned what snapshot must used to work or compiled?. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: About Putting everything in one repo
On Sun, Sep 2, 2012 at 3:30 PM, Reinier Olislagers reinierolislag...@gmail.com wrote: Apart from that I don't really understand. Are you saying you want to maintain your own FPC distribution that contains fixes so people can use it to compile your software? No :) I need more faster release versions, no need to include release a core files, only packages with minor version number, most product i used it have this release like PHP, SQLITE, FirebirdSQL. not using snapshots or SVN. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Including binary data making easy
On Mon, Mar 23, 2009 at 6:22 PM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: Ah, but you are missing the point. We are programmers. We do NOT forget! :-) I forgot that! Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Including binary data making easy
On Mon, Mar 23, 2009 at 5:09 PM, Michael Van Canneyt mich...@freepascal.org wrote: You can use RCData resources, that works on all platforms. Then you need to use LoadResource() I Like so, to have this syntax {$r 'mysqlfile.sql' mysqlfile} or {$r 'mytextfile.txt' mytxtfile} and then use LoadResource to get it, as like lfm files Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] buffered filestream
On Sun, Jun 10, 2012 at 4:00 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Hi, Is there already a buffered file stream in the fpc sources? Or maybe a generic buffered input stream that can be used with TFileStream? check mine, http://minilib.svn.sourceforge.net/viewvc/minilib/trunk/lib/mnStreams.pas?view=markup Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: TList Notify count changed
On Tue, May 22, 2012 at 8:08 PM, Zaher Dirkey parm...@gmail.com wrote: procedure SetCount(NewCount: Integer); Might i ask to make TList.SetCount a virtual method? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] TList Notify count changed
In TList how can i notify if Count is changed with New and Old values as like in SetCount, SetCount procedure not virtual? procedure SetCount(NewCount: Integer); I am using last revision of Lazarus, FPC 2.6 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Extend multiple classes with same code
On Sat, May 19, 2012 at 2:10 AM, Jorge Aldo G. de F. Junior jagf...@gmail.com wrote: 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 the branches separate entities. This is impossible with current freepascal OOP and i dont think this is even a good thing to have. I have no Idea about multiple inheritance. I am thinking now if i can assign a helper to more than one class by make base helper, then inherit it for every class B1 and B2. I will try and post a feedback. It could be done multi-class helper, kind of class helper that works on multiple classes. But i dont even know of a language that has such possibility (i dont know much languages anyway). I hope i can find one, not for me for my kids in the future ;) Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Extend multiple classes with same code
On Sat, May 19, 2012 at 7:54 PM, Jorge Aldo G. de F. Junior jagf...@gmail.com wrote: but i cant imagine someone creating a helper class for TObject). It is in the example above but in real it base class of mine, TmncCustomField in fact But it fail for me, because there is overridden functions. BTW thanks for you all Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Extend multiple classes with same code
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 idea is adding this functions to T_A, but it is not my class to modify it, or it is protected from my modify. 2 - Copy and paste this functions to T_B2, but in that case I need every time to fix functions in B1 I must do it in B2, that make it so hard, and not good programming quality. Is there any new idea to do that, what about Helper, generics, i read about it i felt it is not fit to my problem (or i am wrong). Thanks in advance Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Extend multiple classes with same code
On Fri, May 18, 2012 at 9:18 PM, Michael Van Canneyt mich...@freepascal.org 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 example). Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Extend multiple classes with same code
On Fri, May 18, 2012 at 11:27 PM, Bernd prof7...@googlemail.com 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, in fact it is my mistak when i explained. B1 B2 is in the base unit like as A, i cant modify it, very strict. My projects is db layer, i have TmyCustomField, TmyFields=class(TmyCustomField) and TmyParams=class(TmyCustomField), that in the base unit. now i like to inherit both TmyFields and TmyParams to add functions work on Firebird, TmyFirebirdFields and TmyFirebirdParams, both have same functions to work on buffer SQLDA. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] class of - instance created is wrong
On Thu, Mar 15, 2012 at 12:52 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 15 March 2012 12:31, Leonardo M. Ramé wrote: Hi Graeme, this is completely off topic. Does AggPas works in 64bits Linux? I remember it didn't compile last year. I does now! ;-) I haven't publish my copy of AggPas yet (which contains the 64-bit fixes). I'll probably push those changes to the fpGUI repository later today or tomorrow. Would u push it to new repository (under ur account). I'll also supply some of the vital patches to the Lazarus community, so they can fix their AggPas copy. And why there is many of AggPas, what happened to the original one? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] class of - instance created is wrong
On Sun, Mar 18, 2012 at 9:22 AM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: I'm planning to publish it to the fpGUI repository today. No, I meant not under fpGUI, thanks. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Spam
On Sun, Mar 11, 2012 at 2:28 PM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: On 11 Mar 2012, at 13:21, Frank Church wrote: I agree that it is too early to moderate join requests on account of this one message . I won't moderate join requests (there is no way to know whether a new subscriber will be a spammer or not). It's just that their messages will default to being moderated, and I will generally clear that moderation flag the first time they send a mail if it's not spam. This is the first spam I can remember seeing on this mailing list in a long while. That's because of preventative measures (such as holding all mails from non-subscribers for moderator approval -- this also results in lost messages, because sometimes people mail from a different address or are simply not subscribed). It's not because we ignore what spammers do. Give it some more time and moderate it if the amount of spam increases to an annoying level. I don't want to wait until that point. And I can also disable this measure again if no new spammers try to join in the upcoming months. It's not like we get 10 new subscribers a day or so (more like 5 to 10 per month, and many of those don't post). In WordPress you need only moderate the new posts for the users, users have over 5 posts (5 for example), WordPress will automatically accpet the post without moderate from that user. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Currency and ABS(-674.59)
2012/3/6 Flávio Etrusco flavio.etru...@gmail.com I'm glad I never worked with banking/financial systems :-$ In accounting/financial systems there is Debit and Credit numbers it must equal and Debit - Credit = 0, with this bug it fail. I am an accountant and i know if there is 0.0001 diff in balance sheet, my boss will fire me :P I still believe the results in i386 must be equal also to other systems/platforms even if it calculated in slow code. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Currency and ABS(-674.59)
On Thu, Mar 8, 2012 at 3:28 AM, Marcos Douglas m...@delfire.net wrote: Integer math... what did you mean? Integer math = Currency or in DB numeric(18, 4) in Firebird create domain AMOUNT as numeric(18,4); On Thu, Mar 8, 2012 at 12:43 AM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: This is why our accounting app uses Integer math (and when stored in the database). Only when amounts are displayed to the user, do we convert the integer value to currency. This greatly reduced our calculation and rounding problems. Yes i do that from more than 10 years, Float/Extended have problem when rounding it and sum that rounding, it is only good in Science not Accounting. Currency for me is Int64 (* int of 1 or binary shifted) it is more stable and not lose any cent when sum the balances, until i passed it to ABS, ABS convert it to float and return back to Currency, that my problem here. In the future i like to have new kind of Currency (integer) but more extend (* 100 for example). Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Currency and ABS(-674.59)
On Mon, Mar 5, 2012 at 12:22 AM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: This particular problem could obviously be resolved by adding a currency-specific version of abs() Can i ask to add overload function for ABS(Currency) be a feature request in FPC? Thanks I am using last reversion of Lazarus, FPC 2.6 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Currency and ABS(-674.59)
On Tue, Mar 6, 2012 at 2:56 PM, Sven Barth pascaldra...@googlemail.comwrote: No, Currency is based on Extended on i386 and x86_64 (except win64!). Hmm, but it is break the balance in the budget of my customer. I resolved it by adding CurrABS function, but i don't think it is good idea. Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Currency and ABS(-674.59)
I found this problem in Delphi and FPC, please test it and confirm if it is a bug. --- program test_abs_curr; uses sysutils; var a: Currency; begin a := 674.59; if aabs(-a) then writeln('not equal') else writeln('equal'); end. --- I am using last reversion of Lazarus, FPC 2.6 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Pass array of record as parameter
On Thu, Feb 9, 2012 at 7:53 PM, Thomas Young tygraph...@me.com wrote: This is how I would do that. There may be a better way. TInfo=record s: string; i: integer; end; ATInfo = array[1..100] of TInfo; ATInfoPtr = ^ATInfo; Var A:ATInfoPtr; function func1(a:ATInfoPtr); Thomas Young 330-256-7064 www.tygraphics.net Sent from my iPhone On Feb 9, 2012, at 12:24 PM, Everton Vieira tonvie...@gmail.com wrote: TInfo=record s: string; i: integer; end; function func1(a: array of TInfo); Thanks, but that is not my expected answer, my ask about dynamic array of record and without define a variable to pass it by params, for example i can pass the params for array of string like this func2(['t1', 't1']); this work, but i want to extend the params info? Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Pass array of record as parameter
On Thu, Feb 9, 2012 at 8:10 PM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: Declaring record constants inline in the code is not supported by FPC (regardless of whether it's for an array parameter, an assignment or something else). There are no plans to add support for it either. Ouch :P , bad news, but it save my trying time, thanks. Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: RE : [fpc-pascal] Pass array of record as parameter
On Thu, Feb 9, 2012 at 8:21 PM, Ludo Brands ludo.bra...@free.fr wrote: ** Thanks, but that is not my expected answer, my ask about dynamic array of record and without define a variable to pass it by params, for example i can pass the params for array of string like this func2(['t1', 't1']); this work, but i want to extend the params info? You can use a small helper function like this: type TInfo=record s: string; i: integer; end; function makeinfo(s:string;i:integer):TInfo; begin result.s:=s; result.i:=i; end; ... func1([makeinfo('test1', 1), makeinfo('test2', 2)]); Yes, it is good idea, i will try it :D Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Problem using make install in Windows
On Tue, Feb 7, 2012 at 8:36 PM, Sven Barth pascaldra...@googlemail.comwrote: On 07.02.2012 19:09, Felipe Monteiro de Carvalho wrote: Thanks, you were right =) But strange that it considered my \ a space. I know that \ is a escaping for a space, but there was no space in the end. That's a problem of Make at least on Windows and was already mentioned on one of the lists some time ago. Maybe Make on Unix will expose the same problem, but there you normally don't use \ as a trailing path delimiter ;) Regards, Sven On Windows (2000/XP and above) You can use / instead of \ that resolve some problems in my PHP projects Best Regards Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Interface, _AddRef, _Release, etc.
On Thu, Sep 15, 2011 at 12:27 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 14/09/2011 23:17, Marcos Douglas wrote: procedure Run; var f: TFoo; // type is class, not interface o: TObj; begin f := TFoo.Create; This is just wrong. 1 - If i use the class not Interface is the recount used? 2 - Is that compatible with Delphi? In 1 i meant, as i expected if i use f:IFoo the refcount counted, but if i use f:TFoo methods of reference not triggered? Thanks Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
On Mon, Sep 12, 2011 at 9:08 PM, Fabio Luis Girardi fluisgira...@gmail.comwrote: Hi! I'm porting a multi-thread project to WinCE. Everything works fine, except when I put a Label (or any window control) on any form and link it with the data coming from any thread. My question is: What's the current state of the WinCE port with threads? I have multi thread server on WINCE for SYNC my data from the other PC and work fine, also i have example for WebServer work on WINCE also. Some time my application hang when synchronize to log or access the gui, but i sloved it by reduce info passed to the gui, or do no pass any object that created by threads or other threads to the main thread. You can descript your problem to the FPC team when you have it. Best Regard Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Userfriendly editor
On Thu, Jun 9, 2011 at 10:38 AM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: Interresting, my needs are very basic, so I have some questions (maybe the answers could be put in the wiki): 1 What are the commands to download the source via git? There is download button in github project page for downloading the source. https://github.com/parmaja/miniedit/archives/master 2 Does it support opening files by passing a command line argument? Yes, and one instance 3 Which syntaxes does it support? All syntaxes that SynEdit can support it. 4 Which encodings does it support? Only UTF8, i need to write function to detect the encoding from the file. 5 It seams that it has no install script, I can contribute one, if there are instructions about how to generate a patch using git There is installer for Win32 using InnoSetup, but my target it is to be portable, so it is no need to have installer. For linux, you can write it. 6 Which rendering component does it use? SynEdit? Yes, Lazarus SynEdit But i still need to work on it before make a beta version of it. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Userfriendly editor
On Thu, Jun 9, 2011 at 12:33 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Thu, Jun 9, 2011 at 12:13 PM, Zaher Dirkey parm...@gmail.com wrote: 1 What are the commands to download the source via git? There is download button in github project page for downloading the source. https://github.com/parmaja/miniedit/archives/master What is this NativeLib package that it requires? I tryed to simply remove this dependency, but then it can't find mnSockets Yes, it is need minilib http://sourceforge.net/projects/minilib http://minilib.svn.sourceforge.net/viewvc/minilib/ I Updated the Wiki in github -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Userfriendly editor
On Thu, Jun 9, 2011 at 3:12 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Thu, Jun 9, 2011 at 3:06 PM, Zaher Dirkey parm...@gmail.com wrote: commits, Thanks for being patient. Some more issues: 1 miniedit is missing a dependency on the package minisocket, even while it requires it not understand? 2 The file mnStream.pas cannot be found by the package minisockets (it wasn't commited, it seams) mnStreams.pas not mnStream.pas It is exists in minilib\lib -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Userfriendly editor
On Thu, Jun 9, 2011 at 3:47 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Thu, Jun 9, 2011 at 3:43 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: But the paths in the package are wrong. Your lpk file says: - Item9 -Filename Value=mnStreams.pas/ -UnitName Value=mnStreams/ - /Item9 Ah, That is because u r trying to compile minisockets.lpk. it is very old :P In fact i only compile NativeLib.lpk, other sources i used it directly, but i think your way the correct way. Actually this unit should not be in this package, but in a separate package for the lib dir. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] When the variable freed in Optimize compile
Hi, I know when compile the project with optimize in Delphi the variable freed/allocated after the last line used. How can i make same in FPC, O3 not worked for me. I used FPC 2.4.4 var c: Currency; begin c := 10; writeln(c); now c freed some code here end; Thanks in advance. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] When the variable freed in Optimize compile
On Wed, Jun 8, 2011 at 11:22 AM, michael.vancann...@wisa.be wrote: On Wed, 8 Jun 2011, Zaher Dirkey wrote: Hi, I know when compile the project with optimize in Delphi the variable freed/allocated after the last line used. How can i make same in FPC, O3 not worked for me. I used FPC 2.4.4 var c: Currency; begin c := 10; writeln(c); now c freed some code here end; C (as a currency) is never 'freed'. It is declared throughout the whole procedure. What if C is string or Interface of TInterfacedObject? Thanks -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Userfriendly editor
On Wed, Jun 8, 2011 at 3:03 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: Does anyone know something similar to Notepad++ written in FPC/Lazarus? I am working on my MiniEdit, it is not for PHP only, but still need to more of times. http://www.parmaja.com/pages/63 https://github.com/parmaja/miniedit -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Inherit interface from 2 interfaces
On Tue, Apr 12, 2011 at 11:42 AM, michael.vancann...@wisa.be wrote: On Tue, 12 Apr 2011, Andreas Dorn wrote: On Fri, 8 Apr 2011,michael.vancanneyt worte: The whole idea of interfaces is to avoid multiple inheritance. Hm. I don't believe that. One of the major points of interfaces is indeed to avoid the problems of multiple class inheritance (diamond problems - i.e. problems caused by conflicting implementations of a method in different ancestor classes). But Interfaces themselves don't have an implementation, so those diamond problems simply don't exist for them. Of course they do. If they inherit from 2 interfaces that have the same method with a different signature, you have a problem. InterfaceA = Interface Function IsValid : Integer; end; InterfaceB = Interface Function IsValid : String; end; How to define : InterfaceC = Interface(InterfaceA,InterfaceB) I think, compile raise error duplicated methods, Same if inherit from one and add a method already exists in parent interface. Regards -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TMenu - barbreak Delphi Compatbility.
On Wed, Apr 13, 2011 at 12:08 AM, Paul Ishenin webpi...@mail.ru wrote: 12.04.2011 21:52, Justin Smyth wrote: Guys. In Delphi you can set the break to barbreak to break the menu in half , whats the best way ( if possible to do this in lazarus ) ? This is a windows only feature and it is not implemented in lazarus. And it is not work for Right To Left in Delphi or any application Windows Regards -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Inherit interface from 2 interfaces
2011/4/7 Flávio Etrusco flavio.etru...@gmail.com On Wed, Apr 6, 2011 at 1:37 PM, Zaher Dirkey parm...@gmail.com wrote: Can i do that? type IIntf3 = interface(IIntf11, IIntf2) end; Thanks in advance. -- Zaher Dirkey For Corba interfaces, yes. Not for COM interfaces. http://www.freepascal.org/docs-html/ref/refse39.html I added {$INTERFACES CORBA} but same error ~Fatal: Syntax error, ) expected but , found~ in the line ~IIntf3 = interface(IIntf11, IIntf2)~ -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Inherit interface from 2 interfaces
Can i do that? type IIntf3 = interface(IIntf11, IIntf2) end; Thanks in advance. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] utf8bidi and freebidi in rtl
On Sun, Apr 3, 2011 at 3:42 PM, ik ido...@gmail.com wrote: Hello, Is there a reason why both units are not deployed by FPC ? Thanks, Ido [Off Topic] I also have minibidi http://www.parmaja.com/pages/59 Regards -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] More Win CE
On Wed, Nov 17, 2010 at 10:54 AM, Sven Barth pascaldra...@googlemail.comwrote: For me Windows Mobile is THE free mobile OS on the market. I can write applications in any language I want (which supports Windows Mobile...), I can play around in the OS as I want it. I can basically do anything with that Phone that is mine as I see necessary. That's why I dislike Apple, cause they basically think the phone still belongs to them, and that's why I dislike Android, because I'm forced to use Java if I want to produce real applications. And now comes Windows Phone 7 and destroys this dream mobile OS of mine. Thank you Microsoft. That is also my pain, i feel something force me to move to .NET or Java, or i must wait for a miracle. What about to http://wiki.openmoko.org/wiki/Main_Page? -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] More Win CE
On Fri, Nov 12, 2010 at 9:37 PM, Sven Barth pascaldra...@googlemail.comwrote: On 12.11.2010 14:56, Uffe Kousgaard wrote: Does the output from the wince compiler work with specific versions of win CE? This page lists versions 3.0, 4.20 and 5.2 : http://en.wikipedia.org/wiki/Windows_Mobile I had tested it on Windows Pocket PC 2003, Windows Mobile 5, 6, 6.5 and 6.5.3. Of course it depends on what features of the OS you use, but basically it should run down to Windows Pocket PC 2003 and maybe even 2002. According to Wikipedia these OSes have the following CE versions: Windows Pocket PC 2002: Windows CE 3.0 Windows Pocket PC 2003: Windows CE 4.2 Windows Mobile 5: Windows CE 5.0(?) Windows Mobile 6: Windows CE 5.2 Windows Mobile 6.5: Windows CE 5.x Windows Mobile 6.5.3: Windows CE 5.x I test it and worked for me in real devices Windows 5.0, Windows 5.2 WM5.0, WM6.0 WM6.5 -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Real length of WideString
How to get the real length of WideString variable. Thanks in advance. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Real length of WideString
On Thu, Oct 21, 2010 at 1:41 AM, Zaher Dirkey parm...@gmail.com wrote: How to get the real length of WideString variable. Hmm, I think i found my problem but not understand it, i used Lazarus as editor to write the code var ws: widestring; begin ws:= 'زاهر'; Label3.Caption := inttostr(length(ws)); //= 8 It is different with ws:= UTF8Decode('زاهر'); Label3.Caption := inttostr(length(ws)); //= 4 -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Can variables be declared within a block?
On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Thu, 14 Oct 2010, Frank Church wrote: Can variables be declared within a begin end block? No. That found in Gnu Pascal Can we ask to be feature request? Thanks -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Any recommendations for a good in-memory storage type
On Wed, Sep 22, 2010 at 1:31 PM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: Hi, While implementing drag-n-drop support in fpGUI, I created a TfpgMimeData class. This class will hold various data items, and a mime-type describing each of the data items. Obviously the TfpgMimeData class should be able to handle any data type. So my question is, what is a good universal type to store all kinds of data (strings, images (binary data), sound etc)? The possible ideas I can think of is the following: TByteArray Variants TMemoryStream So which one would be more fitting for any mime types, or is there another option I didn't think of? Here is a simple usage example of the TfpgMimeData class - to help put this in perspective: var m: TfpgMimeData; d: TfpgDrag; a: TfpgDropAction; begin m := TfpgMimeData.Create; m.SetData('text/plain', 'My name is Earl'); m.SetData('text/html', 'My name is bEarl/b'); // text/plain can actually be created from this automatically m.SetData('image/png', MyPNGImage); d := TfpgDrag.Create(self); d.MimeData := m; d.StartDrag([daCopy]); // d manages the lifespan of m // d will be freed automatically when drag action is complete or cancelled end; Just initial idea. TfpgMimeData class(TfpgDragData); Picture:TPic ... end; var m: TfpgDragData; d: TfpgDrag; a: TfpgDropAction; begin m := TfpgMimeData.Create; m.SetData('text/plain', 'My name is Earl'); m.SetData('text/html', 'My name is bEarl/b'); // text/plain can actually be created from this automatically m.SetData('image/png'); (m as TfpgMimeData).Picture.Assign(MyPNGImage); d := TfpgDrag.Create(self); d.DragData := m; d.StartDrag([daCopy]); // d manages the lifespan of m // d will be freed automatically when drag action is complete or cancelled end; -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Compile ANSI unit as UTF8
On Mon, Sep 6, 2010 at 11:16 AM, Jonas Maebe jonas.ma...@elis.ugent.bewrote: On 06 Sep 2010, at 01:28, Zaher Dirkey wrote: I have unit with Ansi strings but i want to compile it as UTF-8 how to ask the compiler to convert it to utf8 before compile it? The compiler itself can only convert from utf-8 and several ISO code pages into utf-16 at compile time (i.e., change string constants into widestring constants). If you want to convert them to utf-8, you have to use a text editor as Felipe mentioned. Becuase i use this unit in Delphi 7 and Lazarus with my local language. What for -Fmx parameters? Thanks -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Compile ANSI unit as UTF8
On Mon, Sep 6, 2010 at 8:50 AM, ik ido...@gmail.com wrote: You can use {$codepage utf8} I think, but if you are using ISO8859-6 (Arabic right ?) then I'm not sure that it will convert it, but rater treat it as a UTF-8 Ido Yes it is Arabic in Windows Win1256, but {$codepage utf8} not worked, it is give me Malformed string. Thanks -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Compile ANSI unit as UTF8
Hi, I have unit with Ansi strings but i want to compile it as UTF-8 how to ask the compiler to convert it to utf8 before compile it? Thanks in advance -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Extended, Currency and TDateTime memory layout
On Sat, Aug 7, 2010 at 9:56 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: A currency is a Int64, which is the currency amount multiplied by 1. Well, apparently Delphi 6 RTTI thinks that it is a float. Check this code: 471 else if ElmTypeInfo.Kind in [tkFloat] then begin 472 case TypeData.FloatType of 473 ftSingle: Stream.Write(DynArray^, ArrayLength * SizeOf(Single)); 474 ftDouble: Stream.Write(DynArray^, ArrayLength * SizeOf(Double)); 475 ftComp: Stream.Write(DynArray^, ArrayLength * SizeOf(Comp)); 476 ftCurr: Stream.Write(DynArray^, ArrayLength * SizeOf(Currency)); 477 ftExtended: Stream.Write(DynArray^, ArrayLength * SizeOF(Extended)); 478 end; A Currency is a Int64 not float, if you assign currency to float variable (double/extended) and return back to currency variable, you will not get the same value. Typecast the currency as Int64, assign it to int64 variable and vise versa you will not lose any thing. Best regards -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] winCE delopment and devices explorer
On Sat, Jul 31, 2010 at 5:37 PM, Codebue Fabio - P-Soft f.code...@p-soft.biz wrote: There are some way to see my computer disk from my windows CE device? Saving directly From WinCE to PC, No. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Initialize the object (not class)
I have used object to make more easy, not need to create or free it, MyObject = object private FProp1: integer; public Prop1: integer read FProp1 write FProp1 procedure Proc1; end; used like var O: MyObject; begin O.Proc1; end; 1 - The problem, i have random value in the prop1(I am not sure about it), is that mean i must initiliaze it. 2 - is there a method i can override it to init my properties without to call it manualy O.init; Thanks in advance -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search Engine friendly CGI web apps and pages
On Tue, Jul 13, 2010 at 5:54 PM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: While we are on the topic of CGI and Apache. Any idea how to tell Apache that a specific file is a CGI program, even though that file has no file extension like the obvious .cgi suffix? This is not to serious - I think Google accepts URLs with a '.' (dot) in the path. eg: http://www.mydoman.com/mmaths/project1.cgi/myparam in .htacces with rewrite mode is enabled, it easy to convert new style to old one RewriteEngine on RewriteRule ^$project1.cgi [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) project1.cgi?action=$1 [QSA,L] RewriteRule ^project1.cgi$ project1.cgi And you have many examples on internet to understand RewriteEngine Thanks -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal