Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

OnConnect lNet event under WinCE

22 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

User

Hi, I drop a visual lNet component (TLTCPComponent) onto a form and I try connect to a server. For example I put this into the OnClick button event: LTCPComponent1.Connect('192.168.1.34',67);

Under WinCE always is fired the OnConnect event although the addres and the port are wrong (under Win32 the message 'Error on connect: connection refused' is shown if the addres and the port are wrong and the OnConnect event is not fired).

Why??

My code:

unit Unit1;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,

  lNetComponents, StdCtrls, lNet;
type
  { TForm1 }
  TForm1 = class(TForm)
  Button1: TButton;
  LTCPComponent1: TLTCPComponent;
  procedure Button1Click(Sender: TObject);
  procedure LTCPComponent1Accept(aSocket: TLSocket);
  procedure LTCPComponent1Connect(aSocket: TLSocket);
  procedure LTCPComponent1Disconnect(aSocket: TLSocket);
  procedure LTCPComponent1Error(const msg: string; aSocket: TLSocket);
  procedure LTCPComponent1Receive(aSocket: TLSocket);
  private
  { private declarations }
  public
  { public declarations }
  end;
var
  Form1: TForm1;
implementation

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  LTCPComponent1.Connect('192.168.1.34',67);
end;
procedure TForm1.LTCPComponent1Accept(aSocket: TLSocket);
begin
end;
procedure TForm1.LTCPComponent1Connect(aSocket: TLSocket);
begin
  ShowMessage('conectado');
end;
procedure TForm1.LTCPComponent1Disconnect(aSocket: TLSocket);
begin
end;
procedure TForm1.LTCPComponent1Error(const msg: string; aSocket: TLSocket);
begin
  ShowMessage(msg);
end;
procedure TForm1.LTCPComponent1Receive(aSocket: TLSocket);
begin
end;
initialization
  {$I unit1.lrs}

end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081215/ae7a31ea/attachment.html

Reply by email

Aleš Katona
to User

Hello,

it's difficult to say why OnConnect doesn't fail properly on WinCE. I'll do some testing in the emulator next I have a free moment, but it can be something specific to you setup as well.

Is the device connected to something? If so can you try to do it while it's disconnected? If there's a way to get some packet capture, that'd be best tho (I doubt it's possible on WinCE easily tho).

Ales

Reply by email

User
to Aleš Katona

Hello, if the device is not connected to the computer then the OnConnect event is not fired, is fired the OnError event.

2008/12/15 Ale? Katona

Show quoted text 16 lines
Hello, it's difficult to say why OnConnect doesn't fail properly on WinCE. I'll do some testing in the emulator next I have a free moment, but it can be something specific to you setup as well. Is the device connected to something? If so can you try to do it while it's disconnected? If there's a way to get some packet capture, that'd be best tho (I doubt it's possible on WinCE easily tho). Ales _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081215/56218d97/attachment.html

Reply by email

Aleš Katona
to User

Can you get wireshark set up on the computer and capture all packets from the interface on which the WinCE device is connected please?

Send it to this mail as attachment and I'll analyze it.

Thanks,

Ales

Reply by email

Héctor Fiandor Rosario
to Aleš Katona

Dear coleagues:

I use the FCIcon in my first forms programs. this is an static icon.

I catch an icon of a chetahh (or other animal) animated as a gif and I want to use in my forms.

I will appreciate any help.

yours,

Ing. H?ctor F. Fiandor

---------------------------------------
Red Telematica de Salud - Cuba
CNICM - Infomed

Reply by email

Graeme Geldenhuys
to Héctor Fiandor Rosario
H?ctor Fiandor Rosario wrote
I catch an icon of a chetahh (or other animal) animated as a gif and I want to use in my forms.

For fpGUI I created a simple Animation component. I reads in a composite bitmap (images forming the animation in a horizontal large [single] image). I can then set a few properties like timing, looping etc... I simply read the image, split in into separate "frames" and display them one after the other. Very simply, but it works very nice for some animation on a form. It should be very simple to port to LCL.

Regards,
- Graeme -

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

Reply by email

wile64
to Héctor Fiandor Rosario: Dear coleagues: I use the FCIcon in my first forms programs. this is an static icon. I…

2008/12/16 H?ctor Fiandor Rosario

Show quoted text 12 lines
Dear coleagues: I use the FCIcon in my first forms programs. this is an static icon. I catch an icon of a chetahh (or other animal) animated as a gif and I want to use in my forms. I will appreciate any help. yours,

See GifAnim component here
http://wile64.neuf.fr/en/composants/Composants.html

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081220/6342cd37/attachment.html

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: On Tue, Dec 16, 2008 at 2:47 PM, H?ctor Fiandor Rosario For fpGUI I created a simple…
Show quoted text 12 lines
On Tue, Dec 16, 2008 at 2:47 PM, H?ctor Fiandor Rosario wrote: > > I catch an icon of a chetahh (or other animal) animated as a gif > and I want to use in my forms. For fpGUI I created a simple Animation component. I reads in a composite bitmap (images forming the animation in a horizontal large [single] image). I can then set a few properties like timing, looping etc... I simply read the image, split in into separate "frames" and display them one after the other. Very simply, but it works very nice for some animation on a form. It should be very simple to port to LCL.

Do you have a fpimage reader for gif?

Mattias

Reply by email

Héctor Fiandor Rosario
to Mattias Gaertner

Dear Mattias:

thanks for your answer.

I have not tried your suggestion, if you can sent to me, I will try it.

I dont have a fpimage reader for gif.

yours,

Ing. H?ctor F. Fiandor

Earlier message 37 lines
----- Original Message ----- From: "Mattias Gaertner" To: Sent: Saturday, December 20, 2008 9:07 AM Subject: Re: [Lazarus] about gif images > On Sat, 20 Dec 2008 13:13:34 +0200 > "Graeme Geldenhuys" wrote: > >> On Tue, Dec 16, 2008 at 2:47 PM, H?ctor Fiandor Rosario >> wrote: >> > >> > I catch an icon of a chetahh (or other animal) animated as a gif >> > and I want to use in my forms. >> >> For fpGUI I created a simple Animation component. I reads in a >> composite bitmap (images forming the animation in a horizontal large >> [single] image). I can then set a few properties like timing, looping >> etc... I simply read the image, split in into separate "frames" and >> display them one after the other. Very simply, but it works very nice >> for some animation on a form. It should be very simple to port to LCL. > > Do you have a fpimage reader for gif? > > Mattias > > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > --------------------------------------- Red Telematica de Salud - Cuba CNICM - Infomed

Reply by email

Héctor Fiandor Rosario
to wile64: 2008/12/16 H?ctor Fiandor Rosario See GifAnim component here…

Dear wile64:

thanks for your answer. I will see GifAnim component.

yours,

Ing. H?ctor F. Fiandor

Earlier message 41 lines
----- Original Message ----- From: wile64 To: General mailing list Sent: Saturday, December 20, 2008 9:06 AM Subject: Re: [Lazarus] about gif images 2008/12/16 H?ctor Fiandor Rosario Dear coleagues: I use the FCIcon in my first forms programs. this is an static icon. I catch an icon of a chetahh (or other animal) animated as a gif and I want to use in my forms. I will appreciate any help. yours, See GifAnim component here http://wile64.neuf.fr/en/composants/Composants.html -- Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php ------------------------------------------------------------------------------

Reply by email

Héctor Fiandor Rosario
to Graeme Geldenhuys: On Tue, Dec 16, 2008 at 2:47 PM, H?ctor Fiandor Rosario For fpGUI I created a simple…

Dear Mr. Graeme:

thanks for your answer.

if you can sent me your solution, I will try it.

yours

Ing. H?ctor F. Fiandor

Earlier message 40 lines
----- Original Message ----- From: "Graeme Geldenhuys" To: "General mailing list" Sent: Saturday, December 20, 2008 6:13 AM Subject: Re: [Lazarus] about gif images > On Tue, Dec 16, 2008 at 2:47 PM, H?ctor Fiandor Rosario > wrote: >> >> I catch an icon of a chetahh (or other animal) animated as a gif and I >> want >> to use in my forms. > > For fpGUI I created a simple Animation component. I reads in a > composite bitmap (images forming the animation in a horizontal large > [single] image). I can then set a few properties like timing, looping > etc... I simply read the image, split in into separate "frames" and > display them one after the other. Very simply, but it works very nice > for some animation on a form. It should be very simple to port to LCL. > > > Regards, > - Graeme - > > > _______________________________________________ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://opensoft.homeip.net/fpgui/ > > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > --------------------------------------- Red Telematica de Salud - Cuba CNICM - Infomed

Reply by email

C Western
to Mattias Gaertner: On Sat, 20 Dec 2008 13:13:34 +0200 Do you have a fpimage reader for gif? Mattias
Mattias Gaertner wrote 5 lines
Do you have a fpimage reader for gif? Mattias

I put together a GIF reader based on fpimage a little while ago. I hadn't offered it for lazarus as it was based rather heavily on a unit in the RXLibrary, and I wasn't sure of the copyright. I note though that the relevant RXGif unit is in turn based on a freeware C library. Can anyone advise?

Colin

Reply by email

Michael Van Canneyt
to C Western
C Western wrote 11 lines
Mattias Gaertner wrote: > Do you have a fpimage reader for gif? > > Mattias > > I put together a GIF reader based on fpimage a little while ago. I hadn't offered it for lazarus as it was based rather heavily on a unit in the RXLibrary, and I wasn't sure of the copyright. I note though that the relevant RXGif unit is in turn based on a freeware C library. Can anyone advise?

I suspect that the fpimage reading code is sufficiently different ?

Maybe you can put it under modified LGPL, but say that it is based on ideas/code found in the RXGif unit ?

Michael.

Reply by email

wile64
to Michael Van Canneyt

2008/12/21 Michael Van Canneyt

Show quoted text 10 lines
On Sun, 21 Dec 2008, C Western wrote: > Mattias Gaertner wrote: > > Do you have a fpimage reader for gif? > > > > Mattias

In GifAnim conponent, GifLoader is FPC Reader style, see and convert it (easy) !

regards

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081222/353a681d/attachment.html

Reply by email

wile64
to wile64

2008/12/22 wile64

Show quoted text 20 lines
2008/12/21 Michael Van Canneyt > > > On Sun, 21 Dec 2008, C Western wrote: > > > Mattias Gaertner wrote: > > > Do you have a fpimage reader for gif? > > > > > > Mattias > > In GifAnim conponent, GifLoader is FPC Reader style, see and convert it (easy) ! regards

I have make this too (old version now, Lazarus changed reader).

Reader PACK for PSD, GIF, TGA, MAC, PCX, PBM, IFF, HALO, PIC...

They can be inserted into Lazarus/FPC if someone takes the time to do so ...

Regard,

Laurent. "If debugging is the art of removing bugs, then programming must be the art of creating!" My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081222/49503c0c/attachment.html

Reply by email

wile64
to wile64

2008/12/22 wile64

Show quoted text 35 lines
2008/12/22 wile64 > > > 2008/12/21 Michael Van Canneyt > >> >> >> On Sun, 21 Dec 2008, C Western wrote: >> >> > Mattias Gaertner wrote: >> > > Do you have a fpimage reader for gif? >> > > >> > > Mattias >> >> > In GifAnim conponent, GifLoader is FPC Reader style, see and convert it > (easy) ! > > regards > > I have make this too (old version now, Lazarus changed reader). Reader PACK for PSD, GIF, TGA, MAC, PCX, PBM, IFF, HALO, PIC... They can be inserted into Lazarus/FPC if someone takes the time to do so ... Regard,

Too big download here http://wile64.neuf.fr/download/lazimage.zip

Laurent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081222/ce120fd4/attachment-0001.html

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Sat, 20 Dec 2008 13:13:34 +0200 Do you have a fpimage reader for gif? Mattias
Mattias Gaertner wrote
Do you have a fpimage reader for gif?

No, fpGUI Toolkit only supports a limited BMP format at the moment. I'll start work on fpimage support in the new year.

My animation component reads a "composite" BMP as follows:

--------------------------------------
| frame1 | frame2 | frame3 | frame4 |
--------------------------------------

Similar to the swimming/fortune telling "Fish" program you can add to a Gnome Panel. :-)

Regards,
- Graeme -

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

Reply by email

Graeme Geldenhuys
to Héctor Fiandor Rosario: Dear Mr. Graeme: thanks for your answer. if you can sent me your solution, I will try it.…
H?ctor Fiandor Rosario wrote
if you can sent me your solution, I will try it.

You can view the fpGUI unit here...

http://fpgui.svn.sourceforge.net/viewvc/fpgui/trunk/src/gui/fpg_animation.pas?view=markup

Regards,
- Graeme -

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

Reply by email

Lord Satan
to Mattias Gärtner
I just sent a gif reader based on Laurent's to Michael VC. It needs to be extended to read multiple images and the animation attributes.

This goes into the fpc source and can be used with fpimage, right?

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

wile64
to Mattias Gärtner: An embedded and charset-unspecified text was scrubbed... Name: not available Url:…

2008/12/23 Mattias G?rtner

Show quoted text 15 lines
Zitat von Graeme Geldenhuys : > On Sat, Dec 20, 2008 at 4:07 PM, Mattias Gaertner > wrote: > > > > Do you have a fpimage reader for gif? > > No, fpGUI Toolkit only supports a limited BMP format at the moment. > I'll start work on fpimage support in the new year. I just sent a gif reader based on Laurent's to Michael VC. It needs to be extended to read multiple images and the animation attributes.

Just for info, only first image is complet, all others is partials (only part of change in animation).
For draw correctly all images, it's necesary to make with the first !!!

regards

Laurent. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081223/b1dc349e/attachment.html

Reply by email