I create the component dynamically (I do not drop the component onto the form) but if I put the unit "lNetComponents" in the uses I get the run-time error: Project raised exception class 'External: SIGSEGV'.
Why? This is my code: { KOL MCK } // Do not remove this line! {$DEFINE KOL_MCK} {$ifdef FPC} {$mode delphi} {$endif} unit Unit2; interface uses Windows, Messages, KOL, lNetComponents {place your units here->} {$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics; {$ELSE} ; {$ENDIF} type { TForm2 } {$I MCKfakeClasses.inc} {$IFDEF KOLCLASSES} TForm2 = class; PForm2 = TForm2; {$ELSE OBJECTS} PForm2 = ^TForm2; {$ENDIF CLASSES/OBJECTS} TForm2 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF}) Button1: TKOLButton; Form: PControl; KOLForm1: TKOLForm; procedure Button1Click(Sender: PObj); private { private declarations } LTCPComponent1: TLTCPComponent; public { public declarations } end; var Form2 {$IFDEF KOL_MCK} : PForm2 {$ELSE} : TForm2 {$ENDIF} ; 2008/11/11 Kutlay Ozger <[EMAIL PROTECTED]> > You must create components dynamically. > It works like this. > > procedure TForm1.FormCreate(Sender: TObject); > begin > LTCPComponent1:=TLTCPComponent.Create(nil); > end; > > Do not add component on form. > > > 2008/11/11 Usuario Anónimo <[EMAIL PROTECTED]> > >> If I put the unit lNetComponents in the uses onto KOL-CE application I get >> the run-time error: Project raised exception class 'External: SIGSEGV'. >> >> Why? >> >> >> >> This is my code: >> >> { KOL MCK } // Do not remove this line! >> {$DEFINE KOL_MCK} >> {$ifdef FPC} {$mode delphi} {$endif} >> unit Unit2; >> >> interface >> >> uses Windows, Messages, KOL, lNetComponents {place your units here->} >> {$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, >> Graphics; >> {$ELSE} ; {$ENDIF} >> >> type >> >> { TForm2 } >> >> {$I MCKfakeClasses.inc} >> {$IFDEF KOLCLASSES} TForm2 = class; PForm2 = TForm2; {$ELSE OBJECTS} >> PForm2 = ^TForm2; {$ENDIF CLASSES/OBJECTS} >> TForm2 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF >> LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF}) >> Button1: TKOLButton; >> Form: PControl; >> KOLForm1: TKOLForm; >> procedure Button1Click(Sender: PObj); >> private >> { private declarations } >> LTCPComponent1: TLTCPComponent; >> public >> { public declarations } >> end; >> >> var >> Form2 {$IFDEF KOL_MCK} : PForm2 {$ELSE} : TForm2 {$ENDIF} ; >> >> Thank you very much, best regards. >> >> 2008/11/11 Aleš Katona <[EMAIL PROTECTED]> >> >>> lNet non-visual can indeed be used anywhere BUT you need to understand >>> the concept of .CallAction (see docs at >>> http://members.chello.sk/ales/docs and homepage at >>> http://lnet.wordpress.com) and that you'll need to integrate it into the >>> main loop somehow (either directly, or if you're using some sort of >>> widgetset then it might be possible to use that, but that's a bit more >>> complicated). >>> >>> -- >>> Aleš Katona <[EMAIL PROTECTED]> >>> >>> _______________________________________________ >>> Lazarus mailing list >>> Lazarus@lazarus.freepascal.org >>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> >> >> _______________________________________________ >> Lazarus mailing list >> Lazarus@lazarus.freepascal.org >> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> > > > -- > Kutlay Özger > > _______________________________________________ > Lazarus mailing list > Lazarus@lazarus.freepascal.org > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > >
_______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus