[Lazarus] KOL socketclient object
Usuario Anónimo
usuarioanonimomysql at gmail.com
Tue Nov 11 17:45:34 CET 2008
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 <kutlayozger at gmail.com>
> 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 <usuarioanonimomysql at gmail.com>
>
>> 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 <almindor at gmail.com>
>>
>>> 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 <almindor at gmail.com>
>>>
>>> _______________________________________________
>>> Lazarus mailing list
>>> Lazarus at lazarus.freepascal.org
>>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>>>
>>
>>
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lazarus.freepascal.org
>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
>>
>
>
> --
> Kutlay Özger
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081111/0ea4f586/attachment-0007.html>
More information about the Lazarus
mailing list