Re: [fpc-pascal] Cloning objects?

2014-03-19 Thread Andreas Schneider
On 19.03.2014 23:01, Timothy Groves wrote: > Is there a drop-dead simple way to clone an object? > > I've got a small tree of classes (tBaseProfile, and four descendants > of such). Only the descendant classes are instantiated. I need to be > able to create new copies of these objects for use in

Re: [fpc-pascal] Cloning objects?

2014-03-19 Thread Howard Page-Clark
On 19/03/2014 22:01, Timothy Groves wrote: Is there a drop-dead simple way to clone an object? The convention established in Delphi for TPersistent descendants is to provide an Assign method to do this, so for TPersistent descendants (components, controls etc.) you can just override this meth

Re: [fpc-pascal] Linking object file

2014-03-19 Thread Darius Blaszyk
Hi md, Linking with C files works just fine. No problem with that. However I would like to link regular FPC object files instead. Please see the three files I attached in my first email. For some reason the linker could not find the implemented procedure. So the question is, how to modify the

Re: [fpc-pascal] Linking object file

2014-03-19 Thread m...@rpzdesign.com
Darius: I just went through this and it is fresh in my mind, but with 32 bit code. I used CodeBlocks with MingGW to compile the c source code to a static library with an mylib.A suffix. I am pretty sure you cannot use MSVC to compile the c code. Then use the {$LINKLIB path/mylib.a} directive

Re: [fpc-pascal] Cloning objects?

2014-03-19 Thread silvioprog
2014-03-19 19:01 GMT-03:00 Timothy Groves : > Is there a drop-dead simple way to clone an object? > > I've got a small tree of classes (tBaseProfile, and four descendants of > such). Only the descendant classes are instantiated. I need to be able to > create new copies of these objects for use i

[fpc-pascal] Cloning objects?

2014-03-19 Thread Timothy Groves
Is there a drop-dead simple way to clone an object? I've got a small tree of classes (tBaseProfile, and four descendants of such). Only the descendant classes are instantiated. I need to be able to create new copies of these objects for use in other lists. At the moment, I am writing a Dupl

Re: [fpc-pascal] Searching Text Files

2014-03-19 Thread Michael Schnell
On 03/19/2014 12:19 AM, Martin Collins wrote: One of the things I want to do is search for text/phrases within the pdfs. Do you already know in what way text is coded in PDFs ? I suppose this can be very complicated. - finding the areas in the file that in fact contain text - using the appr

Re: [fpc-pascal] Searching Text Files

2014-03-19 Thread Martin Collins
Thanks for your advice & help Mark, Typical, after spending ages searching, I finally found a couple of pascal solutions this morning once I googled with the word Delphi instead of freepascal/lazarus. Then checked and of course freepascal has the same functionality. The first is reading the

Re: [fpc-pascal] Searching Text Files

2014-03-19 Thread Mark Morgan Lloyd
Martin Collins wrote: Hi, I'm writing a little personal program in Lazarus that manages pdf files. One of the things I want to do is search for text/phrases within the pdfs. Has anybody tried to do this before and if so what is the best (easiest) way you've come across? I've detailed what I

[fpc-pascal] Searching Text Files

2014-03-19 Thread Martin Collins
Hi, I'm writing a little personal program in Lazarus that manages pdf files. One of the things I want to do is search for text/phrases within the pdfs. Has anybody tried to do this before and if so what is the best (easiest) way you've come across? I've detailed what I've been doing below, b