Re: [lazarus] A Thread in DLL

2007-12-14 Thread melchiorre caruso

Hi Al


Actually, I had a closer look at synchronize, and it turns out to be 
dependent on the GUI, which probably means that you need to include 
'Interfaces' in your library uses clause. Can you try this on windows?



  

I add unit interfaces to my library, but
when I compiling the library a fatal error occurs:

Hint: Start of reading config file 
C:\Programmi\FPC\2.2.0\bin\i386-win32\fpc.cfg
Hint: End of reading config file 
C:\Programmi\FPC\2.2.0\bin\i386-win32\fpc.cfg

Warning: You are using the obsolete switch -OG
Warning: You are using the obsolete switch -Or, please use -O2 or -Ooregvar
Warning: You are using the obsolete switch -Ou, please use -Oouncertain
Free Pascal Compiler version 2.2.0 [2007/09/09] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling libthread.dpr
libthread.dpr(4,3) Fatal: Can't find unit Interfaces used by libthread

I add manually  $(LazarusDir)\lcl\interfaces\$(TargetOS) to the paths but
an other error occours:

Fatal: Can't find unit InterfaceBase used by Interfaces

"The dog bites the tail"

I use WinXp Sp2
Lazarus svn
Fcp 2.2.0

Thanks

---
Melchiorre

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Menu icons have disappeared!

2007-12-14 Thread Paul Ishenin

Giuliano Colla wrote:
With last svn update almost all menu icons have suddenly disappeared 
with gtk1. They still show if IDE is compiled for gtk2 or qt.

Platform is Linux, fpc 2.2.0.
A trace back shows that the problem occurred between r. 13325 which 
was ok, and 13328 which wasn't.

problems fixed in r13334

Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] A Thread in DLL

2007-12-14 Thread Al Boldi
melchiorre caruso wrote:
> I found an article that explains why my code does not work on Windows:

Actually, I had a closer look at synchronize, and it turns out to be 
dependent on the GUI, which probably means that you need to include 
'Interfaces' in your library uses clause.  Can you try this on windows?

> http://www.clevercomponents.com/articles/article019/delphi6sync.asp


Thanks!

--
Al

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Help TProcess question

2007-12-14 Thread el stamatakos

Hi All,
 I am having real problems getting my app to run using TProcess. I have a 
procedure that encapsulates process like below

procedure TMainForm.ExecNewProcessNoDir(app,cmd: string; Wait: Boolean);
var
   AProcess: TProcess;
begin
   AProcess := TProcess.Create(nil);
 try
   Aprocess.ShowWindow := swoShowNormal;
if cmd <> '' then
AProcess.CommandLine := app+' '+cmd
 else AProcess.CommandLine := app;
   if wait = True then
   AProcess.Options := AProcess.Options + [poWaitOnExit];
   AProcess.Execute;
 finally
   AProcess.Free;
 end;
end;   

Now I call the procedure as follows using the following arguments
 app:='/cadtools/linux/ecsConverter/source/converter.pl';
cmd:= Dir1+' -pdk '+Dir2+' -def> Conv.log';
  MainForm.ExecNewProcessNoDir(app,cmd,true);

Where Dir1 and Dir2 are directories. If I explicitly write the paths for Dir1 
and Dir2 so I pass
cmd:='/home/lefti/test/rev -pdk /etc/test/rev -defMulti> ecsConverter.log'
this works ok. I recall one user said that cmd does not understand + and all 
that. The question is how do I pass variables since I cannot hard wire
cmd.
All the help is much appreciated. Thanks

Lefti







> Date: Fri, 14 Dec 2007 10:37:18 +
> From: [EMAIL PROTECTED]
> To: lazarus@miraclec.com
> Subject: Re: [lazarus] TProcess question
> 
> On 14/12/2007, el stamatakos  wrote:
>>
>> Hi,
>>  I would like to run a perl script that accepts some arguments and also 
>> outputs info to a log file. I would like to be able to do something like
>>
>> cmd = "cd " + DestinationDirPath +  " ; setenv PATH $PATH{:$LOC} ; 
>> ${LOC}/prog.pl " + DirFiles + " -dk " +  TemplateDirPath + "  -defMulti> 
>> prog.log"
>>
>> How would I do something like this in Lazarus using the TProcess or any 
>> other funtion or method to launch the perl script with the proper inputs.
>>
> 
> this might help: http://wiki.freepascal.org/Executing_External_Programs
> 
>> Thanks
>>
>> Best,
>>
>> Lefti
>>
> 
> henry
> 
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] public variable and gdb

2007-12-14 Thread Lee Jenkins

Wanderlan Santos dos Anjos wrote:

Hello,

try Self^.VarName




I've had the same problem, but with object properties...hovering mouse cursor 
always shows that message.  I hope this gets fixed as it makes debugging moe 
difficult.


--
Warm Regards,

Lee

"If I don't see you around here, I'll see you around, hear?"

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] public variable and gdb

2007-12-14 Thread Wanderlan Santos dos Anjos
Hello,

try Self^.VarName


-- 
Att,

Wanderlan Santos dos Anjos


On Dec 14, 2007 7:26 PM, ik <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I'm not sure if this is the right malling list, or not...
> Anyway I'm using FPC 2.2.0 and Lazarus 0.9.24 on Linux.
>
> I have a public variable (that is accessed by several methods on
> specific events), but when I try to debug my code, gdb gives me
> (inside Lazarus) the following error:
>
> No symbol "..." in current context.
>
> A POC can look like that:
>
> TFormName = class (TForm)
> ...
> public
>   VarName : Type;
> ...
> endl
>
> ...
> procedure TFormName.FormCreate ...
> begin
>   VarName := Value;
>
>   Something.SomethingElse := VarName + AnothetThing; //Breakpoint on
> the variable
> end;
> ...
>
> And so does any other method will always return the above message.
>
> Am I missing something or the variable name is not accessible by gdb
> (maybe FPC changed the symbol name) ?
>
> Ido
> --
> http://ik.homelinux.org/
>
> _
> To unsubscribe: mail [EMAIL PROTECTED] with
>"unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>


[lazarus] Menu icons have disappeared!

2007-12-14 Thread Giuliano Colla
With last svn update almost all menu icons have suddenly disappeared 
with gtk1. They still show if IDE is compiled for gtk2 or qt.

Platform is Linux, fpc 2.2.0.
A trace back shows that the problem occurred between r. 13325 which was 
ok, and 13328 which wasn't.


Regards

Giuliano


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] public variable and gdb

2007-12-14 Thread ik
Hello,

I'm not sure if this is the right malling list, or not...
Anyway I'm using FPC 2.2.0 and Lazarus 0.9.24 on Linux.

I have a public variable (that is accessed by several methods on
specific events), but when I try to debug my code, gdb gives me
(inside Lazarus) the following error:

No symbol "..." in current context.

A POC can look like that:

TFormName = class (TForm)
...
public
   VarName : Type;
...
endl

...
procedure TFormName.FormCreate ...
begin
   VarName := Value;

   Something.SomethingElse := VarName + AnothetThing; //Breakpoint on
the variable
end;
...

And so does any other method will always return the above message.

Am I missing something or the variable name is not accessible by gdb
(maybe FPC changed the symbol name) ?

Ido
-- 
http://ik.homelinux.org/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Andrew Haines
el stamatakos wrote:
> Hi All,
>  I created a form. I placed a TTimer on this form and a label. The code is 
> like this
> 
> procedure TMainForm.ShowNotification(Msg:String; time:Cardinal);
> var
> MessageForm:TMessageChildForm;
> begin
> MessageForm:=TMessageChildForm.Create(Self);
> MessageForm.Show;
> MessageForm.Visible:=True;
> MessageForm.Label1.Caption:=Msg;
> MessageForm.Timer1.Interval:=time;
> MessageForm.Close;
> end;  
> 
> and the call is
> ShowNotification('Creating directories',5000);
> 
> I assume this is 5 seconds but when I run the app it goes faster then that 
> like not even 1 sec. Anything worng with the code above
> 

You are Closing the form yourself. "MessageForm.Close;"


You need to set the OnTimer Event of Timer1 and in that procedure is
where you call MessageForm.Close;

Also disable the timer when it runs and reenable it when you call
ShowNotification


Happy Coding,

Andrew

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread el stamatakos

Hi All,
 I created a form. I placed a TTimer on this form and a label. The code is like 
this

procedure TMainForm.ShowNotification(Msg:String; time:Cardinal);
var
MessageForm:TMessageChildForm;
begin
MessageForm:=TMessageChildForm.Create(Self);
MessageForm.Show;
MessageForm.Visible:=True;
MessageForm.Label1.Caption:=Msg;
MessageForm.Timer1.Interval:=time;
MessageForm.Close;
end;  

and the call is
ShowNotification('Creating directories',5000);

I assume this is 5 seconds but when I run the app it goes faster then that like 
not even 1 sec. Anything worng with the code above

Thanks
Lefti

> Date: Fri, 14 Dec 2007 18:00:33 +0200
> From: [EMAIL PROTECTED]
> To: lazarus@miraclec.com
> Subject: Re: [lazarus] showmessage or similar that closes without a prompt
> 
> On 14/12/2007, Lee Jenkins  wrote:
> 
>>ShowWaitMessage(sMsg, true);
>>// ... do some work
>>ShowWaitMessage('', false);
> 
> 
> I was going to add that to tiOPF, but I see it already has something
> like that.  :-)  Amazing, after 5 years I still find new things in
> tiOPF.
> 
> [tiDialogs.pas]
> 
>   procedure tiProcessing(const AMessage : String);
>   procedure tiEndProcessing;
> 
> 
> 
> Regards,
>   - Graeme -
> 
> 
> ___
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> 
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] A Thread in DLL

2007-12-14 Thread melchiorre caruso

I found an article that explains why my code does not work on Windows:

http://www.clevercomponents.com/articles/article019/delphi6sync.asp

Now it works.

unit threadx;

interface

uses
  Windows,
  Classes;

type
  TThreadSynchronizer = class
  private
FMethod: TThreadMethod;
FSynchronizeException: TObject;
FSyncBaseThreadID: LongWord;
  public
constructor Create;
destructor Destroy; override;
procedure Synchronize(Method: TThreadMethod);
property SyncBaseThreadID: LongWord read FSyncBaseThreadID;
  end;

  TThreadEx = class(TThread)
  private
FSynchronizer: TThreadSynchronizer;
procedure HandleTerminate;
  protected
procedure DoTerminate; override;
  public
constructor Create(CreateSuspended: Boolean);
destructor Destroy; override;
procedure Wait;
property Synchronizer: TThreadSynchronizer read FSynchronizer;
  end;
  
implementation

const
  CM_EXECPROC = $8FFD;
  CM_DESTROYWINDOW = $8FFC;

type
  TSyncInfo = class
FSyncBaseThreadID: LongWord;
FThreadWindow: HWND;
FThreadCount: Integer;
  end;

  TSynchronizerManager = class
  private
FThreadLock: TRTLCriticalSection;
FList: TList;
procedure FreeSyncInfo(AInfo: TSyncInfo);
procedure DoDestroyWindow(AInfo: TSyncInfo);
function InfoBySync(ASyncBaseThreadID: LongWord): TSyncInfo;
function FindSyncInfo(ASyncBaseThreadID: LongWord): TSyncInfo;
  public
class function Instance: TSynchronizerManager;
constructor Create();
destructor Destroy; override;
procedure AddThread(ASynchronizer: TThreadSynchronizer);
procedure RemoveThread(ASynchronizer: TThreadSynchronizer);
procedure Synchronize(ASynchronizer: TThreadSynchronizer);
  end;

var
  SynchronizerManager: TSynchronizerManager;

function ThreadWndProc(Window: HWND; Message, wParam, lParam: Longint): 
Longint; stdcall;
begin
  case Message of
CM_EXECPROC:
  with TThreadSynchronizer(lParam) do
  begin
Result := 0;
try
  FSynchronizeException := nil;
  FMethod();
except
  FSynchronizeException := AcquireExceptionObject();
end;
  end;
CM_DESTROYWINDOW:
  begin
TSynchronizerManager.Instance().DoDestroyWindow(TSyncInfo(lParam));
Result := 0;
  end;
  else
Result := DefWindowProc(Window, Message, wParam, lParam);
  end;
end;

var
  ThreadWindowClass: TWndClass = (
style: 0;
lpfnWndProc: @ThreadWndProc;
cbClsExtra: 0;
cbWndExtra: 0;
hInstance: 0;
hIcon: 0;
hCursor: 0;
hbrBackground: 0;
lpszMenuName: nil;
lpszClassName: 'TThreadSynchronizerWindow');

{ TSynchronizerManager }

constructor TSynchronizerManager.Create;
begin
  inherited Create();
  InitializeCriticalSection(FThreadLock);
  FList := TList.Create();
end;

destructor TSynchronizerManager.Destroy;
var
  i: Integer;
begin
  for i := FList.Count - 1 downto 0 do
  begin
FreeSyncInfo(TSyncInfo(FList[i]));
  end;
  FList.Free();
  DeleteCriticalSection(FThreadLock);
  inherited Destroy();
end;

class function TSynchronizerManager.Instance: TSynchronizerManager;
begin
  if (SynchronizerManager = nil) then
  begin
SynchronizerManager := TSynchronizerManager.Create();
  end;
  Result := SynchronizerManager;
end;

procedure TSynchronizerManager.AddThread(ASynchronizer: TThreadSynchronizer);

  function AllocateWindow: HWND;
  var
TempClass: TWndClass;
ClassRegistered: Boolean;
  begin
ThreadWindowClass.hInstance := HInstance;
ClassRegistered := GetClassInfo(HInstance, ThreadWindowClass.lpszClassName,
  TempClass);
if not ClassRegistered or (@TempClass.lpfnWndProc <> @ThreadWndProc) then
begin
  if ClassRegistered then
Windows.UnregisterClass(ThreadWindowClass.lpszClassName, HInstance);
  Windows.RegisterClass(ThreadWindowClass);
end;

Result := CreateWindow(ThreadWindowClass.lpszClassName, '', 0,
  0, 0, 0, 0, 0, 0, HInstance, nil);
  end;

var
  info: TSyncInfo;
begin
  EnterCriticalSection(FThreadLock);
  try
info := FindSyncInfo(ASynchronizer.SyncBaseThreadID);
if (info = nil) then
begin
  info := TSyncInfo.Create();
  info.FSyncBaseThreadID := ASynchronizer.SyncBaseThreadID;
  FList.Add(info);
end;
if (info.FThreadCount = 0) then
begin
  info.FThreadWindow := AllocateWindow();
end;
Inc(info.FThreadCount);
  finally
LeaveCriticalSection(FThreadLock);
  end;
end;

procedure TSynchronizerManager.RemoveThread(ASynchronizer: TThreadSynchronizer);
var
  info: TSyncInfo;
begin
  EnterCriticalSection(FThreadLock);
  try
info := InfoBySync(ASynchronizer.SyncBaseThreadID);
PostMessage(info.FThreadWindow, CM_DESTROYWINDOW, 0, Longint(info));
  finally
LeaveCriticalSection(FThreadLock);
  end;
end;

procedure TSynchronizerManager.DoDestroyWindow(AInfo: TSyncInfo);
begin
  EnterCriticalSection(FThreadLock);
  try
Dec(AInfo.FThreadCount);
if AInfo.FThreadCount = 0 then
begin
  

Re: [lazarus] Strange docked form

2007-12-14 Thread Marius

Never mind, both are known problems.

http://www.freepascal.org/mantis/view.php?id=10420
http://www.freepascal.org/mantis/view.php?id=1052

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Need way to substitute images on LCL's buttons

2007-12-14 Thread Andrey Gusev
* Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> [Fri, 
14 Dec 2007 17:23:00 +0100]:

On Dec 14, 2007 2:49 PM, Andrey Gusev <[EMAIL PROTECTED]> wrote:
> But what to do with TDBNavigator ?
If I were you I would simply use many TBitBtn's together to form my
own DBNavigator.


My invention is better (IMHO).
Walk through compoments tree, and changhe all glyph images to
predefined by special list. To invent that list format is remained.
I think about that:
---
Form1.Panel2.dbNavigator1.FirstBtn=art/buttons/dbnav/first.png
---
or more generalized
---
TDBNavigator.FirstBtn=art/buttons/dbnav/first.png
---
So, i woildn't lose TDBNavigator functionality and configurability.
My idea is simple to implement (20-50 lines of source, presumable),
and may be implementated reusable - as component.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Strange docked form

2007-12-14 Thread Marius
I can now drag and dock a form onto another. There is however some 
strage sideeffects "docking" it. There are two problems in this demo 
code (see picture):


1) There's a problem with the clientwidth/clientheight, non client area 
is calculated as width/height.
2) The three forms behave like forms while they should not. They behave 
like 3 controls floating *anchored* on top of the parent. If i set 
tabstop to true i can tab between them, i can close each of them with 
Alt-F4 and i can also resize them.


I'm lost on the first one and i have no idea where to start looking, 
does anybody have a hint for me or have a quick solution?


Greetings,
Marius

procedure TForm1.Button1Click(Sender: TObject);
var AForm: TForm;
begin
  AForm := TForm.Create(Self);
  AForm.Parent := TWinControl(Self);
  AForm.Align := alTop;
  AForm.Color := clGreen;
  AForm.Visible := true;
  AForm.Visible := true;

  AForm := TForm.Create(Self);
  AForm.Parent := TWinControl(Self);
  AForm.Align := alBottom;
  AForm.Color := clRed;
  AForm.Visible := true;
  AForm.Visible := true;

  AForm := TForm.Create(Self);
  AForm.Parent := TWinControl(Self);
  AForm.Align := alClient;
  AForm.Color := clGreen;
  AForm.Visible := true;
  AForm.Visible := true;
end;
<>

Re: [lazarus] No more NumGlyphs in buttons

2007-12-14 Thread Giuliano Colla

Paul Ishenin ha scritto:

Giuliano Colla wrote:
BitBtn is supposed to support showing different glyphs for different 
states, the same as SpeedButton (NumGlyph property etc.). The only 
difference is that it doesn't have a bsExclusive state, which can be 
therefore ignored.
I'll let you have some screenshots of what it was showing up to some 
time ago, together with a minimal example to test it, as soon as I 
get rid of current emergencies.



Here I am.
This:

http://www.copeca.it/colla/Glyphs1.png

is a screenshot showing the glyph provided to BitBtn and a BitBtn 
displayed both in enabled an disabled state.In the disabled state it 
shows the correct glyph, but grayed, which isn't correct.  This is as 
of r. 12476.


Currently it shows the same glyph bot in the enabled and disabled 
state, and doesn't show the bsDown glyph when pressed.

see: http://www.copeca.it/colla/Glyphs2.png

For comparison there are also four SpeedButtons, which have the same 
glyph, and which behave correctly.


Here's the small app used to peoduce the screenshots:

http://www.copeca.it/colla/buttonglyph.zip

Ah, you are about gtk. As I know bitbtn states never worked under gtk.
Just for the record it did work in 0.9.24. It was implemented in LCL, so 
it was good for all platforms. I know because I did it :-)
The FMultiGlyph bitmap you deleted because currently unused, was the 
last remnant of the NumGlyph implementation for BitBtn in LCL.


I implemented them, please check r13331.


It woks fine, just as before. Thanks a lot.
Best regards,

Giuliano

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] QT interface and commercial license

2007-12-14 Thread Felipe Monteiro de Carvalho
Ah  I thougth that Trolltech had finally added a FAQ about Lazarus
on their site like they promissed...

-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] QT interface and commercial license

2007-12-14 Thread Den Jean
On Friday 14 December 2007 09:03:02 am Felipe Monteiro de Carvalho wrote:
> I did some googling but I couldn't find anything.

http://article.gmane.org/gmane.comp.ide.lazarus.general/16610

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TCheckBox shaded on Windows

2007-12-14 Thread Lee Jenkins


Is it the normal behavior of TCheckBox to display as a slightly different shade 
than the hosting form?  I have both set to clBtnFace, but the background of the 
label portion of the TCheckBox shows as a slightly lighter shade than the form 
it is sited on.


Not a big deal, but I think it looks nice when the label portion is clear or the 
same color.


--
Warm Regards,

Lee

"If I don't see you around here, I'll see you around, hear?"

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Graeme Geldenhuys
On 14/12/2007, Alexsander Rosa <[EMAIL PROTECTED]> wrote:
> Why not use a TMemo? You could show several messages, like a progress log.

It uses valuable screen space. The popup window is temporary.

> Alternatively, you could show the information in the status bar.

It's not visible (eye catching) enough.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Alexsander Rosa
Why not use a TMemo? You could show several messages, like a progress log.
Alternatively, you could show the information in the status bar.

2007/12/13, el stamatakos <[EMAIL PROTECTED]>:
>
>  Hi,
>  I would like to display a message but not wait for the user to hit ok. I
> would like to display it for 1 second and then close it. The reason is I
> will have a process that will do different things and I would like to
> dispaly what is being done.
>
> Thanks
> Lefti
>



-- 
Atenciosamente,

Alexsander da Rosa
Linux User #113925


Re: [lazarus] No more NumGlyphs in buttons

2007-12-14 Thread Paul Ishenin

Giuliano Colla wrote:
BitBtn is supposed to support showing different glyphs for different 
states, the same as SpeedButton (NumGlyph property etc.). The only 
difference is that it doesn't have a bsExclusive state, which can be 
therefore ignored.
I'll let you have some screenshots of what it was showing up to some 
time ago, together with a minimal example to test it, as soon as I 
get rid of current emergencies.



Here I am.
This:

http://www.copeca.it/colla/Glyphs1.png

is a screenshot showing the glyph provided to BitBtn and a BitBtn 
displayed both in enabled an disabled state.In the disabled state it 
shows the correct glyph, but grayed, which isn't correct.  This is as 
of r. 12476.


Currently it shows the same glyph bot in the enabled and disabled 
state, and doesn't show the bsDown glyph when pressed.

see: http://www.copeca.it/colla/Glyphs2.png

For comparison there are also four SpeedButtons, which have the same 
glyph, and which behave correctly.


Here's the small app used to peoduce the screenshots:

http://www.copeca.it/colla/buttonglyph.zip

Ah, you are about gtk. As I know bitbtn states never worked under gtk.
I implemented them, please check r13331.

Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] QT interface and commercial license

2007-12-14 Thread Fabio Dell'Aria
I don0t remember.

Try to search on:
http://osdir.com/ml/search.html

2007/12/14, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]>:
>
> On Dec 13, 2007 9:43 AM, Fabio Dell'Aria <[EMAIL PROTECTED]> wrote:
> > I have just read the Trolltech messages about the authorization to use
> its
> > commercial license with Lazarus.
>
> Ah, by the way, where did you read it?
>
> I did some googling but I couldn't find anything.
>
> thanks,
> --
> Felipe Monteiro de Carvalho
>
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives
>



-- 
Best regards...

Fabio Dell'Aria.


[lazarus] Obtain Form (screen related) coordinates

2007-12-14 Thread Fabio Dell'Aria
How I can obtain the Form (screen related) coordinates?


In Delphi I use Left/Top and (Left + Width)/(Top + Height),

but in Lazarus Width=ClientWidth and Height=ClientHeight

so I cannot use the same method.

-- 
Best regards...

Fabio Dell'Aria.


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Lee Jenkins

Graeme Geldenhuys wrote:

On 14/12/2007, Lee Jenkins <[EMAIL PROTECTED]> wrote:


   ShowWaitMessage(sMsg, true);
   // ... do some work
   ShowWaitMessage('', false);



I was going to add that to tiOPF, but I see it already has something
like that.  :-)  Amazing, after 5 years I still find new things in
tiOPF.

[tiDialogs.pas]

  procedure tiProcessing(const AMessage : String);
  procedure tiEndProcessing;




Nice.  I would have missed it too.  Actually I've run across several little 
nuggets hidden in tiOPF...



--
Warm Regards,

Lee

"If I don't see you around here, I'll see you around, hear?"

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Need way to substitute images on LCL's buttons

2007-12-14 Thread Felipe Monteiro de Carvalho
On Dec 14, 2007 2:49 PM, Andrey Gusev <[EMAIL PROTECTED]> wrote:
> But what to do with TDBNavigator ?

If I were you I would simply use many TBitBtn's together to form my
own DBNavigator.

Each button of DBNavigator does 1 single trivial dataset operation.
The code on the post button for example would be:

MyDataset.Post;

and similarly for

MyDataset.Next; MyDataset.First; etc etc

However, I've often found that I could get a better behavior (by
adding more code to the button) if I used my own buttons instead the
default DBNavigator because it's too simple and some times isn't very
user-friendly due to it's simplicly. I would really only use it to
very quickly get something done (in which case I wouldn't care about
the glyphs anyway).

-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Graeme Geldenhuys
On 14/12/2007, Lee Jenkins <[EMAIL PROTECTED]> wrote:

>ShowWaitMessage(sMsg, true);
>// ... do some work
>ShowWaitMessage('', false);


I was going to add that to tiOPF, but I see it already has something
like that.  :-)  Amazing, after 5 years I still find new things in
tiOPF.

[tiDialogs.pas]

  procedure tiProcessing(const AMessage : String);
  procedure tiEndProcessing;



Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Graeme Geldenhuys
On 14/12/2007, Lee Jenkins <[EMAIL PROTECTED]> wrote:

>ShowWaitMessage(sMsg, true);
>// ... do some work
>ShowWaitMessage('', false);


I like that idea. Nice one!


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Sample for new syn icons

2007-12-14 Thread wile64
Here is an example for new icons components Tsyn

regards

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
<><>

Re: [lazarus] showmessage or similar that closes without a prompt

2007-12-14 Thread Lee Jenkins

Graeme Geldenhuys wrote:

On 13/12/2007, el stamatakos <[EMAIL PROTECTED]> wrote:

 Hi,
  I would like to display a message but not wait for the user to hit ok. I
would like to display it for 1 second and then close it. The reason is I
will have a process that will do different things and I would like to
dispaly what is being done.



Yeah, a form with a Timer should do the trick.  Same principle as a
splash screen.  I've done something similar in my projects and created
a helper function to create and show the form, so I don't need to do
that every time.  The form also has a 3D look with now title bars or
borders.

eg:
   ShowNotification('your message goes here', displaytime);

displaytime is optional and defaults to 2 seconds in my case.


or even:

ShowWaitMessage(AMessage: string; ToShow: boolean);

var
 sMsg: string;
begin
  sMsg := 'Hold up, wait a minute, put a little pimpin in it';
  ShowWaitMessage(sMsg, true);
  // ... do some work
  ShowWaitMessage('', false);
end;


--
Warm Regards,

Lee

"If I don't see you around here, I'll see you around, hear?"

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] A Lazarus IDE challenge

2007-12-14 Thread Lee Jenkins

A.J. Venter wrote:

Mmmm,
Sorry there - made a mistake - I saw 'tabbed' and read 'label'.
TRibbon is a glorified label with a christmas ribbon look - what is in
your screenshot is those newfangled vista-style-tabs...

Mmmm

None of the natives include this (except maybe win32 and even then
only in vista) - so it would mean a pretty much grounds up component
with a lot of code in the paint handler.



The TMS Software one that I linked to above is pretty decent, though 
proprietary.  I used in this project fairly well and people seem to like it 
because it gives the software a "modern" look and feel.


http://www.datatrakpos.com/pos/datatalk/Default.aspx

I would definitely use one if someone else were to write one for 
lazarus/freepascal ;)


--
Warm Regards,

Lee

"If I don't see you around here, I'll see you around, hear?"

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] No more NumGlyphs in buttons

2007-12-14 Thread Giuliano Colla

Giuliano Colla ha scritto:

Paul Ishenin ha scritto:

Giuliano Colla wrote:

Please check r13286 for bsExclusive.



Now SpeedButton is ok. Thanks a lot.

The only feature missing now is showing proper glyphs in BitBtn.


Sorry, maybe I dont know something. What's wrong with BitBtn? Any 
example to reproduce is highly appriciated :)




BitBtn is supposed to support showing different glyphs for different 
states, the same as SpeedButton (NumGlyph property etc.). The only 
difference is that it doesn't have a bsExclusive state, which can be 
therefore ignored.
I'll let you have some screenshots of what it was showing up to some 
time ago, together with a minimal example to test it, as soon as I get 
rid of current emergencies.



Here I am.
This:

http://www.copeca.it/colla/Glyphs1.png

is a screenshot showing the glyph provided to BitBtn and a BitBtn 
displayed both in enabled an disabled state.In the disabled state it 
shows the correct glyph, but grayed, which isn't correct.  This is as of 
r. 12476.


Currently it shows the same glyph bot in the enabled and disabled state, 
and doesn't show the bsDown glyph when pressed.

see: http://www.copeca.it/colla/Glyphs2.png

For comparison there are also four SpeedButtons, which have the same 
glyph, and which behave correctly.


Here's the small app used to peoduce the screenshots:

http://www.copeca.it/colla/buttonglyph.zip

Kind regards,

Giuliano




--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Need way to substitute images on LCL's buttons

2007-12-14 Thread Andrey Gusev

No problems with TBitBtn - Glyph is accesible.
But what to do with TDBNavigator ?
Current button's imageset isn't suitable to my production application 
(by colour primarily).


Would be fine have feature to substitute all default LCL images 
together, from custom imageset,

somwvhat like skins.

Have anybody ideas about how it may be implemented ?

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New bitmap :-)

2007-12-14 Thread wile64
last.

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
<>

Re: [lazarus] No more NumGlyphs in buttons

2007-12-14 Thread Giuliano Colla

Paul Ishenin ha scritto:

Giuliano Colla wrote:

Please check r13286 for bsExclusive.



Now SpeedButton is ok. Thanks a lot.

The only feature missing now is showing proper glyphs in BitBtn.


Sorry, maybe I dont know something. What's wrong with BitBtn? Any 
example to reproduce is highly appriciated :)




BitBtn is supposed to support showing different glyphs for different 
states, the same as SpeedButton (NumGlyph property etc.). The only 
difference is that it doesn't have a bsExclusive state, which can be 
therefore ignored.
I'll let you have some screenshots of what it was showing up to some 
time ago, together with a minimal example to test it, as soon as I get 
rid of current emergencies.


Kind regards,

Giuliano

--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TProcess question

2007-12-14 Thread Henry Vermaak
On 14/12/2007, el stamatakos <[EMAIL PROTECTED]> wrote:
>
> Hi,
>  I would like to run a perl script that accepts some arguments and also 
> outputs info to a log file. I would like to be able to do something like
>
> cmd = "cd " + DestinationDirPath +  " ; setenv PATH $PATH{:$LOC} ; 
> ${LOC}/prog.pl " + DirFiles + " -dk " +  TemplateDirPath + "  -defMulti> 
> prog.log"
>
> How would I do something like this in Lazarus using the TProcess or any other 
> funtion or method to launch the perl script with the proper inputs.
>

this might help: http://wiki.freepascal.org/Executing_External_Programs

> Thanks
>
> Best,
>
> Lefti
>

henry

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SqlDB component madness

2007-12-14 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 20:50 uur [tijdzone +0100], schreef Michael
Van Canneyt:
> 
> On Wed, 12 Dec 2007, Michael Van Canneyt wrote:
> 
> > 
> > 
> > On Wed, 12 Dec 2007, Graeme Geldenhuys wrote:
> > 
> > > On 12/12/2007, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> > > >
> > > > If all works as I want it, this should be reduced to 4 steps for the 
> > > > default cases,
> > > 
> > > 
> > > That is what I expected and what I was used to in Delphi.  I gather
> > > the change you are talking about would work from code as well, and not
> > > just some Lazarus Object Inspector magic?
> > 
> > Yes, of course it would work in code as well.
> > I'll see about doing this tonight.
> 
> Done and committed. Sent test program to Joost.

Well, more important is: did you run the db-testsuite in fcl-db/tests
and compared the results with
http://menora.cnoc.nl/intern/testsuite.cgi?

;)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New bitmap :-)

2007-12-14 Thread Paul Ishenin

Graeme Geldenhuys пишет:

On 14/12/2007, Paul Ishenin <[EMAIL PROTECTED]> wrote:

I warry about TSynxxx :) Synedit is a separate project on sourceforge
which have their own developers (which are not in this mail list). Their
developers probably have their own opinion about component images. I
think we will not redraw icons for all possible component sets for lazarus.



Synedit components are always available in Lazarus, aren't they?
Anyway, I think seeing that we ship it with Lazarus, we can customize
the look to fit Lazarus better.  Borland did it with the Indy
components they shipped with Delphi.  So we can do it with SynEdit.


I didnot know about Borland and Delphi. But anyway I think we should 
suggest new icons to synedit project.


Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] QT interface and commercial license

2007-12-14 Thread Felipe Monteiro de Carvalho
On Dec 13, 2007 9:43 AM, Fabio Dell'Aria <[EMAIL PROTECTED]> wrote:
> I have just read the Trolltech messages about the authorization to use its
> commercial license with Lazarus.

Ah, by the way, where did you read it?

I did some googling but I couldn't find anything.

thanks,
-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] QT interface and commercial license

2007-12-14 Thread Felipe Monteiro de Carvalho
Hallo,

You can of course ask trolltech for that, but I think that their Qt
Desktop Light offer should be about what you are looking for. It
offers very little except QtCore and QtGUI.

The Qt Designer is included on the GPL version AFAIK, so one would
have it anyway.

Qt 3 backwards compatibility and Visual Studio integration would be
the only things to take away, but are minor parts.

thanks,
-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New bitmap :-)

2007-12-14 Thread wile64
2007/12/14, Bee <[EMAIL PROTECTED]>:
>
> Laurent,
>
> If you don't mind, please make the "skeleton" images for TSynxxx and
> TRTTIxxx icons. Then let me do the rest. It's gonna be weekend, I'll
> have plenty of time to play with these icons. :-D
>
>
for RTTI, I propose default.png (cube) for base !

regards

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php