Re: [fpc-pascal] ExtractFilePath(GetModuleName(0)) problem

2009-04-12 Thread Michael Van Canneyt


On Sat, 11 Apr 2009, lloyd thomas wrote:

 Need Help please confini :=
 ExtractFilePath(GetModuleName(0))+'\myfile.ini'; returns C:Program
 FilesMyApp\myfile.ini should be C:\Program Files\MyApp\myfile.ini . Am I
 doing something wrong?
 
 The Problem is intermitent
 
 {$IFDEF Windows}
 confini  := ExtractFilePath(GetModuleName(0))+'\Myfile.ini';

Another thing: Do not add a \ yourself. ExtractFilePath returns
as the last character a \ , so you'll have MyApp\\MyFile.ini 
in the end, and I think windows doesn't like that.

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


Re: [fpc-pascal] ExtractFilePath(GetModuleName(0)) problem

2009-04-12 Thread Michael Van Canneyt


On Sat, 11 Apr 2009, lloyd thomas wrote:

 Need Help please confini :=
 ExtractFilePath(GetModuleName(0))+'\myfile.ini'; returns C:Program
 FilesMyApp\myfile.ini should be C:\Program Files\MyApp\myfile.ini . Am I
 doing something wrong?
 
 The Problem is intermitent
 
 {$IFDEF Windows}
 confini  := ExtractFilePath(GetModuleName(0))+'\Myfile.ini';
 {$ENDIF}
 {$IFDEF Linux}
 confini  := GetAppConfigDir(True)+'/callcollex.conf';
 {$ENDIF}
 
IniFile := TIniFile.Create(confini);
 
 returns  an  error as follows
 project raised exception class 'EFopenError' with message:
 Unable to open file C:Program FilesMyApp\myfile.ini

Try using ParamStr(0) instead of GetModuleName()
I've never had any problems with that.

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


[fpc-pascal] httpdefs.pp multipart/form-data

2009-04-12 Thread Leonardo M . Ramé

Hi, I'm looking at httpdefs.pp file from FCL-Web and found that it handles 
multipart/form-data. I've been using a 3rd party parser for this kind of data, 
but it lacks of a good method of parsing large file uploads.

My question is: ProcessMultipart method, handles the parsing in chunks of data, 
instead of loading the whole data into memory?.

Thanks in advance,
Leonardo.



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


[fpc-pascal] ExtractFilePath(GetModuleName(0)) problem

2009-04-12 Thread lloyd thomas
Need Help please confini :=
ExtractFilePath(GetModuleName(0))+'\myfile.ini'; returns C:Program
FilesMyApp\myfile.ini should be C:\Program Files\MyApp\myfile.ini . Am
I doing something wrong?

The Problem is intermitent

{$IFDEF Windows}
confini  := ExtractFilePath(GetModuleName(0))+'\Myfile.ini';
{$ENDIF}
{$IFDEF Linux}
confini  := GetAppConfigDir(True)+'/callcollex.conf';
{$ENDIF}

   IniFile := TIniFile.Create(confini);

returns  an  error as follows
project raised exception class 'EFopenError' with message:
Unable to open file C:Program FilesMyApp\myfile.ini
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] MSEide+MSEgui version 2.0a

2009-04-12 Thread Martin Schreiber
Hi,

MSEide+MSEgui rev. 2.0a for Free Pascal 2.2.4 has been released.
https://sourceforge.net/project/showfiles.php?group_id=165409
Questions and bug reports please to NNTP:
news://news.grid-sky.com/public.mseide-msegui.talk
There is a new website for MSEide+MSEgui, please participate.
http://www.msegui.org/

Have a lot of fun!

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


Re: [fpc-pascal] httpdefs.pp multipart/form-data

2009-04-12 Thread ABorka
At the moment, it loads the whole content into a stream for processing 
line by line.


It is possible to create a patch to not do processing (exception, error 
message, trigger an event handler, etc.) if the ContentLength exceeds a 
specified size.



Leonardo M. Ramé wrote:

Hi, I'm looking at httpdefs.pp file from FCL-Web and found that it handles 
multipart/form-data. I've been using a 3rd party parser for this kind of data, 
but it lacks of a good method of parsing large file uploads.

My question is: ProcessMultipart method, handles the parsing in chunks of data, 
instead of loading the whole data into memory?.

Thanks in advance,
Leonardo.


  
___

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



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


[fpc-pascal] Re: Return Exit

2009-04-12 Thread Richard Ward


Mattias wrote:


  return x;
  funcname := x;


exit(x); can be used in mode objfpc.


OK.   Thanks.   That will be more portable than return since objpas is  
fairly common.   Return is a bit simpler syntactically but exit  
performs the same way which is more important to having to change or  
not having to change the structure of the code and will be simpler to  
change if needed.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc-2.2.2.i386-win32 on XP: Can't find unit GL used by ... (2)

2009-04-12 Thread leledumbo

Looks like there's an unhandled exception there. Add SysUtils to uses clause
to see what the exception is, combine with -gl to see on which line it
occurs.
-- 
View this message in context: 
http://www.nabble.com/fpc-2.2.2.i386-win32-on-XP%3A-Can%27t-find-unit-GL-used-by-...-%282%29-tp23004654p23017249.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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


[fpc-pascal] Difference between initialization and begin in a unit

2009-04-12 Thread leledumbo

Might be a stupid question, but it's nowhere mentioned in the documentation
though allowed. What are the differences between:

unit A;

interface

implementation

initialization
  initialization code

end.

and:

unit B;

interface

implementation

begin
  initialization code

end.
-- 
View this message in context: 
http://www.nabble.com/Difference-between-initialization-and-begin-in-a-unit-tp23017283p23017283.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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