Hello, Martin!

I need to use external library with components in it. I try with timer and tfilechangenotifyer. Components are created successfully but there events "ontimer" and "onfilechanged" (and others) not work. How to be?

Yours,
Alexandre Minoshi


code of library with timer (only strings needed for question):

==================================================
librarysomelib;
...
type
ttyp=class(tmsecomponent)
private
  ttimer1 : ttimer;
procedureon_timer(constsender: tobject);
public
constructorcreate;
end;//class

varsp : ttyp;

constructorttyp.create;
begin
ttimer1 := ttimer.create(application);
ttimer1.ontimer := @on_timer;
ttimer1.interval :=100;
ttimer1.enabled := true;
inherited;
end;

procedurettyp.on_timer(constsender: tobject);
begin
writeln('timer work!'); // <-- here not work!!! Nothing in terminal
end;

procedureinitlib(constapp : tguiapplication);
begin
sp := ttyp.create;

withspdo
begin
ifttimer1.enabled
thenwriteln('timer active') // <--- this string in terminal. Timer created and enabled = TRUE
elsewriteln('timer  not active');
end;

end;

exports
   initlib;

begin
end.
==================================================


code of program:
==================================================
programsomeprog;

procedureinitlib(constapp : tguiapplication);external'libsomelib.so';

begin
initlib(application);
application.run;
end.
==================================================

------------------------------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to