Forum > Ported from Delphi/Kylix

Porting TChessBrd from Delphi

<< < (4/8) > >>

BigChimp:
Some random guesses:
1. Buffering
Perhaps the output to houdini is buffered and you need to explicitly clear the buffer?
see
http://www.open-aurec.com/wbforum/WinBoard/engine-intf.html#6

2. Hmmm, you're using direct win API calls it seems. Perhaps you'll have more success with TProcess?
http://wiki.lazarus.freepascal.org/Executing_External_Programs

3. You start with a go command - perhaps you need to set up houdini first (e.g. choose a side, perhaps type of game (timed, normal etc) and start the game, e.g using the new command)
http://www.open-aurec.com/wbforum/WinBoard/engine-intf.html#8

Leledumbo:

--- Quote ---I didn't post it, because my code is no use, it doesn't work.
--- End quote ---
Then how we do know what's wrong and what to fix?

Timewarp:
Thanks for suggestions.

1. I don't think code uses buffering. Command appears to console.
2. Changed to use TProcess, but same problem remains.
3. I have tried other commands. "go" should work, because it works when typed manually.

Timewarp:
Attached working one, if anyone interrested. (atleast seems to work in WinXP)

Now when send/receive works, it's possible to merge..

Timewarp:

--- Quote from: typo on July 19, 2013, 04:53:26 pm ---The board itself works very well.

--- End quote ---
Do you have any plans to improve component?

It seems DragObject is leaked every move

DragObject := TChessDragObject.Create(Self, Bmp);

Quick check, something like this stops it (heaptrc)

if assigned(MyDragObject) then MyDragObject.Free;
MyDragObject := TChessDragObject.Create(Self, Bmp);
DragObject := MyDragObject;

But it's still leaked once. Ideas how to fix it properly? (Free MyDragObject on exit crashes)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version