Search found 1635 matches

by Thomas Linder Puls
8 Nov 2019 14:08
Forum: Visual Prolog Tips & Samples
Topic: ~ CalmoSoft Fifteen Puzzle Game ~
Replies: 14
Views: 18691

Re: ~ CalmoSoft Fifteen Puzzle Game ~

Notice that you already knew it (see a couple of mails above :-)).
by Thomas Linder Puls
8 Nov 2019 9:21
Forum: Visual Prolog Tips & Samples
Topic: ~ CalmoSoft Fifteen Puzzle Game ~
Replies: 14
Views: 18691

Re: ~ CalmoSoft Fifteen Puzzle Game ~

The Personal Edition doesn't contain vpiOldDomains.

When I compile the project with the Commercial Edition I don't get any errors.

Notice that when upgrading to the newer gui structure you will not need vpiOldDomains.
by Thomas Linder Puls
5 Nov 2019 15:07
Forum: Visual Prolog
Topic: ListViewControl Right Click quirk
Replies: 4
Views: 1323

Re: ListViewControl Right Click quirk

I have updated hitTest like this (i.e. the lines after the cut):: clauses hitTest(PNT, ItemId, SubItem) :- LVHITTESTINFO = gui_native::lvhittestinfo(PNT, 0, 0, 0, 0), _ = gui_native::sendMessage(nativeWindow, lvm_subItemHitTest, gui_api::wNull, uncheckedConvert(gui_native::lParam, LVHITTESTINFO)), g...
by Thomas Linder Puls
5 Nov 2019 12:34
Forum: Visual Prolog
Topic: ListViewControl Right Click quirk
Replies: 4
Views: 1323

Re: ListViewControl Right Click quirk

The listView control is a standard Windows control. The hitTest predicates uses the LVM_SUBITEMHITTEST to determine where the point is. For reasons unknown to me this message think that most of the header row belongs to the first data line. The difference in the left and right click happens because ...
by Thomas Linder Puls
4 Nov 2019 10:25
Forum: Visual Prolog
Topic: Rotate a button
Replies: 2
Views: 1098

Re: Rotate a button

You cannot rotate controls (yo my knowledge). You could create one that is high and narrow, but the text on the button would still be horizontal.
by Thomas Linder Puls
31 Oct 2019 9:27
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 4554

Re: Progress Bar status indicator

It is sufficient with one postAction:

Code: Select all

        dealerForm:postAction(             {  :-                 dealerForm:state_ctl:setText(StateStr),                 dealerForm:deck_ctl:setText(DeckStr),                 dealerForm:progress_ctl:progress := DonePct             }),
by Thomas Linder Puls
30 Oct 2019 13:38
Forum: Visual Prolog
Topic: Looking for database + ListBox tutorial
Replies: 2
Views: 1250

Re: Looking for database + ListBox tutorial

There are individual examples concerning listBox and database among the examples that are distributed with the system. The database demos (assuming that you mean SQL/ODBC databases) is only in the Commercial Edition (because the Personal Edition does not support ODBC). We do not have any tutorials a...
by Thomas Linder Puls
30 Oct 2019 12:22
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 4554

Re: Progress Bar status indicator

Working with multiple threads has that kind of synchronization problems that you mention and that is why it is not simple to shift work into separate threads. To enable premature termination of a background task, it is of course necessary to ensure that the termination is carried out is a safe order...
by Thomas Linder Puls
28 Oct 2019 10:52
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 4554

Re: Progress Bar status indicator

I think it looks fine. You should notice that it is not necessary to guard random with a critical section, it is already guarded internally.
by Thomas Linder Puls
28 Oct 2019 10:24
Forum: Visual Prolog
Topic: Compiling error
Replies: 8
Views: 1522

Re: Compiling error

Please read about how to present code in Visual Prolog discussion forum.
by Thomas Linder Puls
24 Oct 2019 15:08
Forum: Visual Prolog
Topic: Reading hexadecimal from utf8 files
Replies: 9
Views: 1616

Re: Reading hexadecimal from utf8 files

The format is not designed to be easy to read. It is designed to be difficult to read.
Well, you seem to have achieved this :-) (sorry I didn't resist it).

Anyways, if you open the file in binary mode then readBytes will read a binary like that.
by Thomas Linder Puls
24 Oct 2019 12:28
Forum: Visual Prolog
Topic: Reading hexadecimal from utf8 files
Replies: 9
Views: 1616

Re: Reading hexadecimal from utf8 files

Last thing first. Sorry, the file is most likely in utf8 as you say, readBytes will read bytes after after conversion to utf16 . I would normally not use readBytes on a file that is opened in text mode. Anyways, the contents of the file is like this: 7EAE5DCFF348C44CD8FB18E48B1A989E And that obvious...
by Thomas Linder Puls
24 Oct 2019 11:39
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 4554

Re: Progress Bar status indicator

I consider the application windows status line and its progress bar as an application-wide status bar. So it should indicate application-wide status (for example in the IDE project load and project build). Your application allows several "dealing" tasks to proceed simultaneously, and as such none of...
by Thomas Linder Puls
23 Oct 2019 21:22
Forum: Visual Prolog
Topic: Reading hexadecimal from utf8 files
Replies: 9
Views: 1616

Re: Reading hexadecimal from utf8 files

The bytes you have read are clearly utf16 characters, so if that are the bytes you have read from the file then the file is in utf16 format. But in any case the problem has nothing to do with the file encoding. inputStream::read can read numbers in these formats: Decimal: -123 Octal: - 0o 123 (= -83...
by Thomas Linder Puls
22 Oct 2019 9:32
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 4554

Re: Progress Bar status indicator

Actually there is no threading problem with the method that updates the progress of a progressBarControl because that method uses SendMessage function which is thread safe. So it it perfectly safe to do like this from any thread: clauses longOperation(...) :- ... % do something theProgressBarControl...