Hi all,
I am currently using Lazarus 1.2.4 with FPC 2.6.4 on Win7 / 64bit on my notebook with Intel CPU.
What I would like to do is indicate progress to the user when processing a test pattern file. I thought that using the PopupNotifier is an easy way to do this. However I struggle a lot with this component - very probably due to my so far limited experience with object oriented programming.
I looked up the PopupNotifier demo and tried to follow it - that is I included the PopupNotifier in my form and tried to initialize and use it like follows
TLongCalc = class(TForm)
MainMenu1: TMainMenu;
...
WorkNote: TPopupNotifier;
...
procedure TestAllClick(Sender: TObject);
procedure TLongCalc.TestAllClick(Sender: TObject);
var
TestPatternName: string;
fTestPattern: TEXT;
fResult: TEXT;
TestDialog: TOpenDialog;
begin
TestDialog := TOpenDialog.Create( Self );
TestDialog.Title := 'Select test pattern file ...';
TestDialog.Filter := 'Text file|*.txt|All files|*.*';
if( TestDialog.Execute ) then
begin
TestPatternName := TestDialog.FileName;
WorkNote.ShowAtPos( 100, 100 );
ShowMessage( TestPatternName );
end else begin
ShowMessage( 'No file selected ...' );
end;
TestDialog.Destroy;
end;
This however generates SIGSEGV - and I can't find out what I am missing. The PopupNotifier demo contains a pre-compiled init that I can't decipher and probably contains the parts I am missing. What I did see however when looking through the PopupNotifier unit is that it seems to be related to a TComponent and not a TForm ...
Any help would be highly appreciated.
Kind regards,
Jens