[fpc-devel] Linux loadlibrary vs Windows

2006-05-13 Thread Tony Maro
I use the Synapse TCP toolkit.  I recently updated to 2.0.2 (can't get a
full working 2.0.3 in Windows yet for some reason) and found that
Synapse suddenly didn't compile in Linux.

Now, it's likely that the Synapse toolkit has already been updated, but
my point is the difference now between Linux and Windows.  Previously
the same code worked, but now you have to remove the pointer(*) typecast
from Linux, but it still had to be there for Windows.

Was this intentional?  Both compilers (Linux and Win32) are running
2.0.2 now.

Here's what I had to do to the Synapse toolkit:

function FreeLibrary(Module: HMODULE): LongBool;
begin
  {$ifdef linux}
  Result := dynlibs.UnloadLibrary(Module);
  {$else}
  Result := dynlibs.UnloadLibrary(pointer(Module));
  {$endif}
end;

function GetProcAddress(Module: HMODULE; Proc: PChar): Pointer;
begin
  {$ifdef linux}
  Result := dynlibs.GetProcedureAddress(Module, Proc);
  {$else}
  Result := dynlibs.GetProcedureAddress(pointer(Module), Proc);
  {$endif}
end;  

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Stop the download HORROR

2006-02-13 Thread Tony Maro
Felipe Monteiro de Carvalho wrote:

Hello,

The Lazarus installer comes with Free Pascal, so you only need to do
one download to get both. It's located here:
http://sourceforge.net/project/showfiles.php?group_id=89339

If you don't want Lazarus and you only want the Free Pascal Compiler,
then you need to go to Free Pascal website.

The website is here: www.freepascal.org/

The compiler download is here: http://www.freepascal.org/down/i386/win32.html

Also if you want the latest svn snapshot from last night, you can
download the installer from the USA mirror at http://lazarus.maro.net/

-Tony Maro
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] using sockets on linux and win32

2006-01-26 Thread Tony Maro
Stefan Kisdaroczi wrote:
 Hi,

 im trying to use sockets in a unit which should work on linux and win32.

 I use the sockets unit, but for things like SOL_SOCKET, TTimeval (for 
 setsockopt), SO_RCVTIMEO, fpgeterrno
 I finally had to use unix,unixtype,baseunix. This on Linux.

 Now I try to compile it on windows:
 It seems I need SocketError and not fpgeterrno ( there is a thread about that 
 some days old ).
 But where do I find SOL_SOCKET for windows? using winsock did not help.
 I searched for a good example using google, searched the fpc docs... there 
 seems to be a lot of outdated information.

 And now the question:
 Has someone an uses-clause compatible with linux and windows for an app 
 really using sockets and not only for a simple hello socket?

 thank you
 kisda
I'd recommend Synapse tools.  They're blocking only, but I have used
them extensively.  They even support HTTP file transfers and SSL.

But, I'm not too up on what the latest sockets development in FPC has
been, perhaps there's something better now.

-Tony

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to get contents of TDOMNode.NodeValue ???

2005-10-31 Thread Tony Maro

Alexander Todorov wrote:


document

messageHello word/message

/document

I did :

ShowMessage(Document.FindNode('message').NodeValue)
but it returns an empty string. Showing NodeName returns 'message'.
How to get the contents of the message tag  Is it working ?
 

The real problem is that the computer recognized that it is NOT a true 
Hello World message (word, not world) and it refused to display due to 
the typo ;-)  just kidding.


As I recall, there's another child node in the object heiarchy when you 
have text between the tags.  It's a #text subnode to the message 
node.  Someone with more experience in that can expound.


If you use Lazarus, my TMPack has a XML Treeview component that loads an 
XML file into a TTreeView for visual display.  It might you help 
visualize what's going on better.  I've attached a tiny screenshot based 
on your example XML data.


http://tony.maro.net/mod.php?mod=downloadsop=showcatid=2level=1


Also if we have

tag
 inner_tag
.
 inner_tag
.
/tag

will NodeValue return the string between the tag tag 

 

No, it returns nothing, and you'll have to look for child nodes to the 
tag to find inner_tag. 

The main problem is that you are thinking of an XML file as a text file, 
when in fact it's a string of interconnected objects.  It's kind of like 
thinking of a .frm file textually (Is that a word) because it's stored 
as a text file, when in fact it's a represenation of objects that make 
up a form.


-Tony
attachment: xmlview.jpg
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] FindFirst broken due to ExpandFileName bug?

2005-09-16 Thread Tony Maro

Michael Van Canneyt wrote:


This is a snapshot compiler, please use the official compiler if you can.

If you use snapshots, use only the latest possible. The development compiler 
is not guaranteed bug free, as you can see. The current development compiler

has no problem with your code, so that is the one you should use...

The fixbranch compiler also no longer has the problem:

home: compiler/ppc386 -l -Furtl/units/i386-linux ~/testp
Free Pascal Compiler version 2.0.1 [2005/09/02] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
home: ~/testp
/home/michael/

Maybe you can update that one (not to the 2.1.1 branch)
 

Thanks - I guess then that confirms that it _was_ an issue (which is why 
I posted this here rather than run do a bug report.)  I forget exactly 
why I ended up grabbing the snapshot that day, but there was some reason 
I'm sure.  I'm not one to update unless I have to or I get several 
months behind ;-)


-Tony
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] FindFirst broken due to ExpandFileName bug?

2005-09-14 Thread Tony Maro

Michael Van Canneyt wrote:


On Mon, 12 Sep 2005, Tony Maro wrote:

 


I just tried to use FindFirst to get a listing of files in a directory.  I
passed FindFirst the following:

  if FindFirst('/home/tony/test/*',faAnyFile, Res)  0 then begin

It never would return any results.  Then I noticed that FindFirst calls:

GlobSearchRec^.Path:=ExpandFileName(ExtractFilePath(Path));

So I ran:

  ExpandFileName(ExtractFilePath('/home/tony/test/*'));

And I got:

  /home/tony/LazarusFiles/testapp//home/tony/test/
   



Do you still have this bug ? 
The most recent compiler/rtl gives the following, which is IMHO correct:


 


I'm running:
Free Pascal Compiler version 2.0.1 [2005/07/20] for i386
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] DB Bug in 2.0.1?

2005-07-21 Thread Tony Maro

Joost van der Sluis wrote:

I've also noticed that the TDBGrid component in Lazarus no longer allows 
reliable editing of the data.  Most of the time it just reverts the cell 
back to it's previous value, but sometimes it will let the change save 
(and I'm not sure why it's not consistent.)  I'm assuming this might be 
related to the recent db subsystem changes?
   



Is that fpc-related or lazarus-related? (ie: does it work with fpc
2.0.0?) Several people including myself reported this, but Jesus Reyes
can't reproduce it. (If it's fpc-related, i'll have a look at it)

I'm not sure to be honest with you.  You can't compile the latest 
Lazarus CVS with FPC 2.0.0, and the problem doesn't exist in my 2.0.0 
FPC + older Lazarus.  It was introduced on my PC when I upgraded my FPC 
to 2.0.1 so I could update my Lazarus... - meaning I updated both then 
found the problem, so I don't know which causes it.


I was assuming that if the TDataSet components were changed recently 
that it might be the cause...


I'll see if I can't make an already-compiled demonstration app and send 
it to Jesus Reyes so he can see it happen.


Thanks,
Tony

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] DB Bug in 2.0.1?

2005-07-20 Thread Tony Maro

Jonas Maebe wrote:



On 21 jul 2005, at 00:40, Tony Maro wrote:


Can someone confirm the date issue for me?



I can't confirm it, but I do want to mention that I fixed all  
datetime-related routines for *nix platforms in sysutils a while ago.  
They operated based on the supposition that the dates they get are in  
Windows format, as opposed to the number of seconds since x/x/1970.


Maybe some databases always store the date in Windows format and  
maybe some database units counted on this bug... 


I wouldn't think so in this case - it's not just returning the wrong 
date, it's always returning the SAME wrong date, regardless of the value 
in the database table.  But I won't rule it out as a possibility.  I'll 
point Micha to this thread.


-Tony


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] DB Bug in 2.0.1?

2005-07-20 Thread Tony Maro

Jonas Maebe wrote:



On 21 jul 2005, at 00:40, Tony Maro wrote:


Can someone confirm the date issue for me?



I can't confirm it, but I do want to mention that I fixed all  
datetime-related routines for *nix platforms in sysutils a while ago.  
They operated based on the supposition that the dates they get are in  
Windows format, as opposed to the number of seconds since x/x/1970.


I have a concern on that - and please keep in mind I've not even looked 
at the code, so I don't know if it's an issue or not.


My main purpose in using FPC is to write cross-platform applications.  
From what I gather, I'll now need to understand that TDateTime doesn't 
actually store things the same way on different OS's?  I know, FPC's 
goal is not specifically Delphi compatibility, but...


Here's a quote I found online:
In Delphi for Win32 (and Kylix), TDateTime is defined as a Double 
(64-bit floating-point number). Date and time information is stored as 
the count of days since midnight on 30-Dec-1899.


Here you can see that even Kylix uses the same methodology in storing 
TDateTime values.


I can see both perspectives, but if the idea is to make it easier to 
develop cross-platform software, I'd expect TDateTime to be stored the 
same way across platforms regardless of how the OS counts.  A lot of 
software written for Delphi is going to be awfully hard to convert for 
Linux, Mac, etc if TDateTime is stored differently everywhere.


-Tony

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] David Intersimone Interview about Freepascal andLazarus!!!

2005-06-03 Thread Tony Maro

 Well, he does not say anything about the project specifically, just that
 Borland is committed to Delphi, surprise, surprise :-)
 
 Micha 

Actually, when asked if Lazarus, FPC, etc are competitors to Delphi he says:
I think they're just other languages or other projects for people to take a
look at. 

I.E.  Yes, it's called competition.  He's also afraid to admit that FPC +
Laz actually IS the same language as Delphi and tries to make people believe
it's not the same language...  It's NOT the same IDE, but it IS the same
LANGUAGE.

-Tony

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.5.2 - Release Date: 6/3/2005
 


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] First benchmark of Abbrevia 4.0

2005-03-29 Thread Tony Maro
On Tue, 2005-03-29 at 12:29 +0200, Michael Van Canneyt wrote:
 
 On Sun, 27 Mar 2005, DrDiettrich wrote:
 
  A friend of mine just has tested my archiver, with the following results
  for an TAR with a million of files:
  
  PowerArchiver: 530 minutes.
  My Unarch: 160 minutes.
 
 Huh ? 
 Who creates archives with million of files ?
 Who creates a million of files in the first place ?!

Any microsoft app seems to... I mean, OOo is what, a few hundred MB
while equivalent MS is gigs+

If we are to be truly cross-platform we must be prepared for
cross-platform bloat as well.

;-)


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] webserver

2005-03-29 Thread Tony Maro
On Tue, 2005-03-29 at 21:56 +0400, Alexey Barkovoy wrote:

  But you're the only one to report problems, which suggests the problem is
  somewhere on your side. Maybe a proxy ?
 
 Well I'm having problems with www.freepascal.org for around a month now 
 (maybe 
 even more). Sometimes it's just reappears - last time it's happened in sunday 
 - 
 I've succesfully filed bug report and downloaded sources from CVS. But next 
 day 
 it again disappeared. And now not reachable either throw www.freepascal.org 
 or 
 62.166.198.202.

I hate being a me to or not me, but it works fine from here (WV,
USA).  Web responds quickly, however last week I did notice some
slowdowns.  Here's a traceroute:

traceroute to www.freepascal.org (62.166.198.202), 30 hops max, 38 byte
packets
 1  192.168.1.1 (192.168.1.1)  0.726 ms  0.674 ms  0.698 ms
 2  L200.DSL-RTR1.CHAR.verizon-gni.net (151.205.95.1)  27.748 ms  27.505
ms  27.541 ms
 3  130.81.12.89 (130.81.12.89)  27.846 ms  27.932 ms  27.801 ms
 4  so-2-2-1-0.BB-RTR1.PHIL.verizon-gni.net (130.81.18.30)  45.182 ms
45.109 ms  44.786 ms
 5  so-1-0-0-0.PEER-RTR1.PHIL.verizon-gni.net (130.81.7.226)  43.275 ms
43.577 ms  43.098 ms
 6  dca-edge-03.inet.qwest.net (65.118.218.45)  46.026 ms  46.443 ms
47.013 ms
 7  dca-core-02.inet.qwest.net (205.171.9.61)  46.072 ms  46.209 ms
46.054 ms
 8  dca-brdr-01.inet.qwest.net (205.171.9.54)  46.780 ms  45.944 ms
46.029 ms
 9  so0-1-0-622M.ar3.wdc2.gblx.net (208.51.74.9)  46.059 ms  46.696 ms
46.026 ms
10  so0-0-0-2488M.ar3.AMS2.gblx.net (67.17.73.86)  129.326 ms  128.660
ms  128.834 ms
11  Versatel-Nederland.so-3-0-0.ar3.AMS2.gblx.net (64.211.166.182)
131.008 ms Versatel-Nederland.so-2-0-0.ar3.AMS2.gblx.net (64.212.109.2)
130.687 ms Versatel-Nederland.so-3-0-0.ar3.AMS2.gblx.net
(64.211.166.182)  130.895 ms
12  62.58.126.196 (62.58.126.196)  134.834 ms  134.170 ms  133.728 ms
13  unlabelled.versatel.net (62.58.126.46)  134.015 ms  135.156 ms
133.503 ms
14  cust198-193.dsl.versadsl.be (62.166.198.193)  138.201 ms  138.953 ms
138.834 ms
15  cust198-202.dsl.versadsl.be (62.166.198.202)  138.213 ms  139.142 ms
138.955 ms


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Unhandled Exception if CTRL-C pressed.... hehe

2005-02-13 Thread Tony Maro
Just installed CVS and I always verify the correct version is being run 
by just running the compiler at the console without arguments to check 
the version number, then CTRL-C out the first press enter prompt.  
Check it out:

[EMAIL PROTECTED] fpc]$ fpc
Free Pascal Compiler version 1.9.7 [2005/02/13] for i386
Copyright (c) 1993-2005 by Florian Klaempfl
/usr/local/lib/fpc/1.9.7/ppc386 [options] inputfile [options]
put + after a boolean switch option to enable it, - to disable it
 -a the compiler doesn't delete the generated assembler file
 -allist sourcecode lines in assembler file
 -anlist node info in assembler file
 -apuse pipes instead of creating temporary assembler files
 -arlist register allocation/release info in assembler file
 -atlist temp allocation/release info in assembler file
 -Ax  output format:
 -Adefault  use default assembler
 -Aas   assemble using GNU AS
 -Anasmcoff coff (Go32v2) file using Nasm
 -Anasmelf  elf32 (Linux) file using Nasm
 -Anasmwin32Win32 object file using Nasm
 -AnasmwdosxWin32/WDOSX object file using Nasm
 -Awasm obj file using Wasm (Watcom)
 -Anasmobj  obj file using Nasm
 -Amasm obj file using Masm (Microsoft)
 -Atasm obj file using Tasm (Borland)
 -Aelf  elf32 (Linux) using internal writer
*** press enter ***
   

[EMAIL PROTECTED] fpc]$ Error: Compilation aborted
An unhandled exception occurred at $0805BB23 :
Exception : Ctrl-C Signaled!
 $0805BB23
 $BFFFE77C
 $080546DE
 $080575C6
 $0805797E
 $08059410
 $08059505
 $08081352
 $08084AD9
 $0805F6E6
 $0805F7A5
 $08048278
   

[EMAIL PROTECTED] fpc]$
--
Thanks,
Tony Maro
Check out CheckBook Tracker, a free personal finance software for Linux!
http://tony.maro.net

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Mac G3 and FPC

2004-11-17 Thread Tony Maro
I have a client who wants to give me a G3 laptop for future development 
work.  (yes, I said give - no cost on my part.)

I know that FPC has some functionality starting with testing on the G4...
I know almost NOTHING about Mac's, so my question is, is the G3 so 
different from the G4 that I can't expect to run FPC 1.9.x on it within 
any reasonable timeframe (or ever)?

Yes, I know it's initial stages right now, but a long term goal for this 
project is to compile a Lazarus applictation for Mac - 1 year / 1.5 
years away has been discussed

Thanks,
Tony Maro
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] installing lazarus on linux

2004-10-04 Thread Tony Maro
Treeve Jelbert wrote:
I tried the latest source tarball of lazarus and did 'make' as instructed.
everything compiles ok
then I did 'make install PREFIX=/usr/share/lazarus'
 

Wrong list - try the lazarus list.
However, Lazarus needs no install.  Just a make will do it for you.  
In fact I don't think you CAN install it separate like that because the 
IDE needs it's full sources handy to work properly.

-Tony
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]FPC CVS breaks Lazarus build within IDE

2004-08-13 Thread Tony Maro
I just updated my FPC cvs today.
My last update was 3 or 4 days ago.
I haven't updated Lazarus in a week or so.
The latest FPC update breaks building Lazarus from inside the IDE.  For 
those familiar, if you try to install a package, Lazarus will optionally 
rebuild itself.  Now it will either freeze or crash when you try to do this.

I tried to get a crash, but lately only got the freeze.  Here's the last 
console out from Lazarus when it stops responding:

TPascalParserTool.BuildTree B OnlyIntf=False  project1.lpr
TMainIDE.DoNewEditorFile end unit1.pas
TMainIDE.DoNewProject end
[TExternalToolList.Run] /usr/bin/make ide OPT=-Cn
Xlib: sequence lost (0x10200  0x5c9a) in reply type 0x10!
Xlib: sequence lost (0x1  0x5c9a) in reply type 0x10!
I know this isn't a Lazarus list, but like I said, I haven't changed 
Lazarus code that worked on the CVS from a few days ago, so I assume 
it's an FPC issue.

Building from the console with make works fine.  There was some recent 
discussion about this regarding Win32 building, but this is in Linux 
that I'm experiencing it.

Thanks,
Tony
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel]DateSeparator

2004-08-08 Thread Tony Maro
[EMAIL PROTECTED] wrote:
As you can see it is a typed const, which means you can set it to any
character you like. To solve your problems, set it to '/' at program startup,
and you should be fine. 

Same for the other constants.
 

Ah... okay.  So just a lack of knowledge on my part.
Thanks guys,
Tony
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]DateSeparator

2004-08-07 Thread Tony Maro
The DateSeparator is defined in sysinth.inc as
Const
  { Character to be put between date, month and year }
  DateSeparator: char = '-';
  { Format used for short date notation }
  ShortDateFormat: string = 'd/m/y';
  { Format used for long date notation }
  LongDateFormat: string = 'dd  ';
Which means if I try to display something in the standard American 
format of mm/dd/yyy using:

FormatDate('mm/dd/',mydate)
I end up with mm-dd-.  The / gets replaced with the DateSeparator 
constant.  Since it's an FPC constant, I can't easily change this. 

Basically, this makes every date format function useless for me.
I see a note above it that says use InitInternational to set this, but 
that procedure seems to do nothing of the sort.

Can we not change all the defines in sysinth.inc to VAR instead of CONST 
so they could be manipulated by the programmer?

-Tony Maro
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel]Access violation with IndexName property of TDbf

2004-08-03 Thread Tony Maro
Tony Maro wrote:
I'm not sure if this is a TDbf issue, or an FPC db issue, so I'm 
posting both places.  I'm using CVS of FPC from about 1 hour ago.

Basically, whatever I do, if I try to set the IndexName or 
IndexFieldNames property of the TDbf I get an access violation.

Found it...
This only occurs if there are no records yet.  Here's why:
On or aboutdataset.inc: 1582
   If (GetRecord(Fbuffers[FRecordCount-1],gmcurrent,True)grOk) and
Think of what happens if there's no records.  It passes:
GetRecord(FBuffers[-1],...
Access Violation.
Don't ask me the proper way to fix it though.
-Tony Maro
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]Another TDataSet issue to think about (I think)

2004-08-03 Thread Tony Maro
I've got a TDbf on a form. 
I've got a TDataSource attached to it.
I've set an event handler on the DataSource.OnDataChanged.

When I set the TDbf active, it's triggering an OnDataChanged BEFORE the 
dataset is fully active.  If you do reading of data within the event 
handler, it results in Operation cannot be performed on an inactive 
dataset.

Wouldn't the dataset already be open to trigger an OnDataChanged?
-Tony Maro
___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel]Access violation with IndexName property of TDbf

2004-08-02 Thread Tony Maro
I'm not sure if this is a TDbf issue, or an FPC db issue, so I'm posting 
both places.  I'm using CVS of FPC from about 1 hour ago.

Basically, whatever I do, if I try to set the IndexName or 
IndexFieldNames property of the TDbf I get an access violation.

Here's a sample:
var
  MyDbf: TDbf;
begin
 MyDbf := TDbf.Create(nil);
 MyDbf.FilePath := 'data/';
 { we want to use Visual dBase VII compatible tables }
 MyDbf.TableLevel := 7;
 MyDbf.Exclusive := True;
 MyDbf.TableName := 'customers.dbf';
 With MyDbf.FieldDefs do begin
  Add('Id', ftAutoInc, 0, True);
  Add('Name', ftString, 80, True);
 End;
 MyDbf.CreateTable;
 MyDbf.Open;
 MyDbf.AddIndex('custid', 'Id', [ixPrimary, ixUnique]);
 MyDbf.AddIndex('custname.ndx','Name', [ixCaseInsensitive]);
 MyDbf.Close;
 MyDbf.Free;
 MessageDlg('Created.', mtInformation,[mbOk],0);
 MyDBF := TDBf.Create(nil);
 MyDBF.FilePath := 'data/';
 MyDBF.TableLevel := 25;
 MyDBF.TableName := 'customers.dbf';
 MyDBF.Open;
 MyDBF.OpenIndexFile('custname.ndx');
 MyDBF.IndexName := 'custname';
 //MyDBF.IndexFieldNames := 'Name';   // doesn't work either
 //MyDBF.IndexName := 'custid'; // doesn't work EITHER...
 MyDbf.Close;
end;
And the obligatory backtrace:
(gdb) run
Starting program: /home/tony/Projects/testcrash/project1
Program received signal SIGSEGV, Segmentation fault.
0x0806a29c in DBF_TDBF_$__GETRECORD$PCHAR$TGETMODE$BOOLEAN ()
(gdb) bt full
#0  0x0806a29c in DBF_TDBF_$__GETRECORD$PCHAR$TGETMODE$BOOLEAN ()
No symbol table info available.
#1  0x08070de8 in DB_TDATASET_$__RESYNC$TRESYNCMODE ()
No symbol table info available.
#2  0x0806b252 in DBF_TDBF_$__RESYNC$TRESYNCMODE ()
No symbol table info available.
#3  0x0806cf63 in DBF_TDBF_$__SETINDEXNAME$ANSISTRING ()
No symbol table info available.
#4  0x0816dd29 in TFORM1__BUTTON1CLICK (SENDER=0x40440ea8, this=0x4043eae8)
   at unit1.pas:59
   MYDBF = (TDBF *) 0x4057c014
#5  0x08102158 in TCONTROL__CLICK (this=0x40440ea8) at control.inc:1813
No locals.
#6  0x080d6b25 in TBUTTONCONTROL__CLICK (this=0x40440ea8)
   at buttoncontrol.inc:51
No locals.
#7  0x080ca201 in TCUSTOMBUTTON__CLICK (this=0x40440ea8) at buttons.inc:187
   FORM = (TCUSTOMFORM *) 0x0
#8  0x080ca220 in TCUSTOMBUTTON__WMDEFAULTCLICKED (MESSAGE=
 {MSG = 1031, WPARAM = -1073746528, LPARAM = 26, RESULT = 
1075674240, WPARA MLO = 60832, WPARAMHI = 49151, LPARAMLO = 26, LPARAMHI 
= 0, RESULTLO = 31872, RE SULTHI = 16413}, this=0x40440ea8) at 
buttons.inc:199
No locals.

___
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel