Re: [fpc-pascal] Graphic LRS creator

2009-01-30 Thread vmars
Please,
is there a .zip version for windows?
Thanks!
 
ô¿ô
 V  e  r  n   

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe, 
wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1   
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
  - Original Message - 
  From: papelhigien...@gmail.com 
  To: FPC-Pascal users discussions 
  Sent: Friday, January 30, 2009 5:11 AM
  Subject: [fpc-pascal] Graphic LRS creator


   Hi all!

  I created a gui tool to build lazarus resouces (lrs). You can add folders and 
files and load/save your resource configuration.
  It's based on LazRes tool from Lazarus.

  Download:

  http://200.215.0.35/LazResGUI.tar.bz2



--


  ___
  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

Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) = 32 Then

2009-01-29 Thread vmars

OK. I finally got there, via much trial and error.

*
ExecuteName := GetEnvironmentVariable('COMSPEC');
{ExecuteName  =   'C:\WINDOWS\system32\cmd.exe'}
ShellExParms := (' /c ' + ExecuteName) ;

   If ShellExecute(0, nil, PChar(ExecuteName), PChar(ShellExParms), nil, 
SW_SHOWNORMAL)  = 32 Then
MessageDlg('Unable to open file: ' + ExecuteName + ' ErrorCode= ' + 
IntToStr(0), mtError,

[mbOk], 0);
*

Thanks all !

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Bart bartjun...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Wednesday, January 28, 2009 4:30 AM
Subject: Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', 
'', 0) = 32 Then




Wild is good, but same results:
Unable to open file: %COMSPEC%/c Del2Pas.bat ErrorCode=0


Did you try invoking notepad.exe from your batchfile?
I never suggested to use %comspec%.
(And as others pointed out you need to evaluate this with something
like: ComspecStr := GetEnvironmentVariable('COMSPEC') (not tested))

My guess was that the process was executed but was not shown on the
desktop, which lead you to conclude it was never executed.

Ok, the last parameter in ShellExecute determines the way the
application is shown.
You specify 0, that is SW_HIDE, so you will not see the app!
If the batchfile requires interaction from the user you will not see
it and the batchtfile will never terminate.

A returnvalue of 0 from ShellExecute means: The operating system is
out of memory or resources.
For batchfiles (and any other executable) you need not specify 'open',
nil will suffice quite nicely in this case.

There is no need for %comspec% (I'm not even sure it exists in NT
based windows).

Here's my testcase:

procedure TForm1.Button1Click(Sender: TObject);
var
 Res: LongWord;
begin
 Res := ShellExecute(0, nil, PChar('test.bat'),nil,nil,SW_SHOWNORMAL);
 DebugLn('Res = ',DbgS(Res));
end;

Here's the output:

F:\LazarusProjectentest
Res = 16806

and a new window appears which shows me the output of my test.bat

If I put 0 instead of SW_SHOWNORMAL then I never get to see the output
of my batchfile, but it does run (I can see that because I let it
write to soem file which I examine later).

Tested with Lazarus 0.9.27 rev. 18450 / fpc 2.2.2

Hope this helps.

Bart
___
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


Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) = 32 Then

2009-01-27 Thread vmars

I tried many combinations of   %COMSPEC% /c Del2Pas.bat
   ExecuteName := ('C:\\WINDOWS\\system32\\cmd.exe ' + AppPathExe 
+ 'Del2Pas.bat');

   ExecuteName := ('%COMSPEC%/c Del2Pas.bat');
   and many more!
but still:

Unable to open file: %COMSPEC%/c Del2Pas.bat ErrorCode=0

Help...

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Vinzent Höfler jellyfish.softw...@gmx.net

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Monday, January 26, 2009 11:53 PM
Subject: Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), 
'','', 0) = 32 Then





 Original-Nachricht 

Datum: Mon, 26 Jan 2009 17:42:23 -0600
Von: vmars vm...@rgv.rr.com
An: fpc-pascal@lists.freepascal.org
Betreff: [fpc-pascal] If ShellExecute(0, \'open\', PChar(ExecuteName), 
\'\', \'\', 0)  = 32 Then



Thanks in advance!

[Any ideas why this works:
  ExecuteName := (AppPathExe + 'Del2Pas.bat.lnk');
  ExecuteShell;   ]


[But this doesn't work:
  ExecuteName := (AppPathExe + 'Del2Pas.bat');
  ExecuteShell;
And doesn't give an error msg.]


Just trying an educated guess here, but I suppose .bat-files can only be 
executed via command.com (cmd.exe). Something like %COMSPEC% /c 
Del2Pas.bat could do the trick.



Vinzent.

--
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger

___
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


Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) = 32 Then

2009-01-27 Thread vmars

Wild is good, but same results:

Unable to open file: %COMSPEC%/c Del2Pas.bat ErrorCode=0

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Bart bartjun...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Tuesday, January 27, 2009 8:00 AM
Subject: Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', 
'', 0) = 32 Then




Is the problem that you don't see output from del2pas.bat? or is it
not executed at all (and how do you know this)?


If the problem is the first, that may be so because in a .lnk you
specify that the file needs a console, and just running the .bat ma
prevent it frome getting a console?
Put in your del2pas.bat a line like starts a GUI program like
notepad.exe and see if it is launched, that would tell you definitely
if the problem is having assigned a console or not.

(Just a wild guess)

Bart
___
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


Re: [fpc-pascal] EFCreateError' Unable to create file

2009-01-26 Thread vmars

Double quotes are ok in windows.
Check your system for any ShortCut aimed at c:\Program Files.
And you'll see double quotes.

But your right about me having too many s.
I fixed that, and all is well.
Thanks All !

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Bart bartjun...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Sunday, January 25, 2009 5:36 AM
Subject: Re: [fpc-pascal] EFCreateError' Unable to create file



 Try
 Memo1.Lines.SaveToFile(ExecuteName);
 Except ShowMessage('Shoots, couldnt SaveToFile!');
 end;
 
  [Project raised exception class 'EFCreateError' with message:
  Unable to create file
  C:lazarusfpc2.2.2bini386-win32Del2PasDel2PasDel2Pas.bat]



You cannot create filenames that have double quotes () in them on
Windows (your ExecuteName has double quotes in it as you stated
yourself), so the EFCreateError is correct.

See for yourself:

...
 Try
   Memo1.SaveToFile(ExecuteName);
 Except
   On E: Exception do
   begin
 ShowMessage('Exception occurred of '+E.ClassName+LineEnding+
   'Attempted to save to:'+LineEnding+'+ExecuteName+'');
   end;

And you will see:

Exception occurred of EFCreateError
Attempted to save to:

C:\lazarus\fpc\2.2.2\bin\i386-win32\Del2Pas\Del2Pas\Del2Pas.bat


And you will see the double quotes in the filename...


I tested your code in Lazarus and in Delphi and both raise the error
with the filename you supplied to SaveTofile (that is with all
backslashes intact), so I cannot reproduce the second part of your
bug.

Bart
___
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


Re: [fpc-pascal] EFCreateError' Unable to create file

2009-01-26 Thread vmars

Ahh.., I see.
Thanks!

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Bart bartjun...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Monday, January 26, 2009 12:58 PM
Subject: Re: [fpc-pascal] EFCreateError' Unable to create file



On 1/26/09, vmars vm...@rgv.rr.com wrote:

Double quotes are ok in windows.
 Check your system for any ShortCut aimed at c:\Program Files.
 And you'll see double quotes.


I know, but that is not what I meant by saying that double quotes are
not allowed in the filename. By that I meant they are not allowed as
part of the filename itself.
The double quotes around the filename are put there and interpreted by
the shell (OS).

If you ask the OS directly for the filename, there will be no double
quotes in it.
Check for yourself

In a DOS box do
C:copy con 1 2 3.txt
test file with spaces in its name
^Z (that is press Ctrl+Z) and press Enter.

Now you create a file with spaces in its name.
The shell (cmd.exe in W2K or higher) handles the double quotes.
(It actually needs these to know if a space is part of the filename,
or it means that the next part of the command is a new parameter)

Now write a program and  with FindFirst retrieve the filname and see:
the double quotes are not there.

Bart
___
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] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) = 32 Then

2009-01-26 Thread vmars

Thanks in advance!

[Any ideas why this works:
 ExecuteName := (AppPathExe + 'Del2Pas.bat.lnk');
 ExecuteShell;   ]


[But this doesn't work:
 ExecuteName := (AppPathExe + 'Del2Pas.bat');
 ExecuteShell;
And doesn't give an error msg.]


procedure TForm1.ExecuteShell;
begin
//ShowMessage('ExecuteShell = ' + ExecuteName);
   If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0)  = 32 Then
MessageDlg('Unable to open file: ' + ExecuteName + ' ErrorCode= ' + 
IntToStr(0), mtError,

[mbOk], 0);
end; // procedure TForm1.ExecuteShell




ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry) 


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


[fpc-pascal] Is there a way to search this pascal group

2009-01-26 Thread vmars
I know that I can chug thru http://lists.freepascal.org/lists/fpc-pascal/ by 
month/thread etc., but:
Is there a way to search this pascal group: 
http://lists.freepascal.org/lists/fpc-pascal/


Maybe something similar to Delphi's http://www.tamaracka.com/search.htm



Thanks!

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry) 


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


Re: [fpc-pascal] n-tier development with Free Pascal

2009-01-24 Thread vmars

fpGui very cool !

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Graeme Geldenhuys graemeg.li...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Saturday, January 24, 2009 1:54 AM
Subject: [fpc-pascal] n-tier development with Free Pascal



I haven't dabbled into the DB components in FPC and Lazarus much. Does
Free Pascal have a TClientDataset?  Has anybody done any 3-tier
development with Free Pascal?

The last time I did 3-tier development with Delphi 7 was some 5 years
ago. I found this link which is a drop in replacement for the Delphi
midas.dll. And the source code is available and for free.

Is this useful for Free Pascal?

http://www.vglib.com/link-4.html


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
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] EFCreateError' Unable to create file

2009-01-24 Thread vmars

(Lazarus-0.9.26-fpc-2.2.2-win32.exe) winXP sp2
I am trying to SaveToFile a Memo1 to disk.
But can't seem to get it to work.
Is there a known bug?

   Try
   Memo1.Lines.SaveToFile(ExecuteName);
   Except ShowMessage('Shoots, couldnt SaveToFile!');
   end;

[Project raised exception class 'EFCreateError' with message:
Unable to create file 
C:lazarusfpc2.2.2bini386-win32Del2PasDel2PasDel2Pas.bat]


I'm wondering 'How come ExecuteName got all the \s taken out?'.
'F7' shows that :
'ExecuteName' = 
C:\lazarus\fpc\2.2.2\bin\i386-win32\Del2Pas\Del2Pas\Del2Pas.bat


ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry) 


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


Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-23 Thread vmars

'JcfStringUtils.pas' very strange looking code.
Please, what format is the file in?
Thanks!

ô¿ô
V  e  r  n

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,

wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)
- Original Message - 
From: Graeme Geldenhuys graemeg.li...@gmail.com

To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org
Sent: Friday, January 23, 2009 2:02 AM
Subject: Re: [fpc-pascal] cross platform version of IsCharAlpha()



On Mon, Jan 12, 2009 at 3:39 PM, Paul Ishenin webpi...@mail.ru wrote:


Here in
http://svn.freepascal.org/svn/lazarus/trunk/components/jcf2/Utils/JcfStringUtils.pas
I used the same code :)


Thanks Paul, I feel better already!  I'm not alone.  :-)


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
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] Is there a way to search this fpc-pascal@lists.freepascal.org list for info on CheckListBox ?

2009-01-21 Thread vmars
Is there a way to search this fpc-pascal@lists.freepascal.org list for info 
on CheckListBox ?
Thanks! 


ô¿ô
 V  e  r  n   

WinXp sp2 ,  Delphi5, WebDwarf, Trellian WebPage, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe, 
wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1   
http://www.flickr.com/photos/vmars956/

Wanted: Dwarf Hibiscus (Orange/Rasberry)___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal