Search found 101 matches

by B.Hooijenga
17 Oct 2019 13:59
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 23
Views: 266

Re: Progress Bar status indicator

hello Loffy,

please try: vpi::processEvents immediate after write command
like:

Code: Select all

        msg:write("Busy with backup ...\n"),         _ = vpi::processEvents(),         ...         rest of code
I had no troubles so far.

regards
Ben
by B.Hooijenga
14 Sep 2019 8:48
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 480

Re: convert unsigned 64

Tick = time::getTickCount(), %unsigned64
bit::getUnsigned64bytes(Tick, Low, _High),
stdio::write(Low, "\n").

Kind regards
Ben
by B.Hooijenga
5 Sep 2019 14:14
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 661

Re: integer or string to binary

Loffy, The type unsigned uses 32 bits and an unsigned8 uses 8 bits Both types are just a sequence of bits. There is no principal difference. Visual Prolog uses the bitsize to define them. Visual Prolog has a class for bit-operations. The class uses unsigned. But I think you can use them for whatever...
by B.Hooijenga
3 Sep 2019 15:45
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 661

Re: integer or string to binary

Hello Loffy, Strings in Visual Prolog use unicode. These strings must be converted to unsigned8. Here is an example. I use it for communicating with a robot. Binary = unicodestring_to_bin("hallo "), stdio::write(Binary). predicates unicodestring_to_bin : (string) -> binary. clauses unicodestring_to_...
by B.Hooijenga
26 Aug 2019 11:44
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 663

Re: Convert integer to hexadecimal

Hello Lofty Here are two possibilities. Use the helpfile for information about class binary. predicates testing : (). clauses testing() :- % For manipulating bytes (in hexadecimal form) you need class binary Binary1 = binary::createAtomic(1), binary::setIndexed_unsigned8(Binary1, 0, 255), stdio::wri...
by B.Hooijenga
1 May 2019 10:00
Forum: Visual Prolog
Topic: onKeyDown and window::defaultKeyDownHandling
Replies: 6
Views: 1302

Re: onKeyDown and window::defaultKeyDownHandling

Hello Dave,

I had the same problem.
I found this solution: I made a customControl in an formwindow.
In this customControl you can make an KeyDownResponder.
The customControl must have focus.
And then the KeydownResponder will work perfectly.

Ben
by B.Hooijenga
30 May 2018 10:08
Forum: Visual Prolog
Topic: logging
Replies: 2
Views: 5358

Re: logging

Thank you Thomas,

I will study it further.

Kind regards

Ben
by B.Hooijenga
28 May 2018 12:38
Forum: Visual Prolog
Topic: logging
Replies: 2
Views: 5358

logging

Hello, I am trying to use the log/package. In the logdemo program there is the following xml file. <LogConfigurations> <LogConfig name="ConfigName0"> <Appenders> </Appenders> </LogConfig> <LogConfig name="ConfigNameMC"> <Appenders> <Appender name="AppenderName2"> <LogLevel>all</LogLevel> <Type>filea...
by B.Hooijenga
5 Sep 2016 11:55
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

Thomas Because I am using a timerevent in my robotprogram I was a little bit confused about the delaycall. This is the solution I eventually use. The trick is to stop the timer in case of an systemerror. It seems to work well. I did not see the term unknownexception anymore by driving the robot. fac...
by B.Hooijenga
29 Aug 2016 13:19
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

Thomas, I tried your suggestion, again with forcing an unknown exception with 400 milliseconds time duration instead of 700. But no result: it does not work: my program hangs, the robot goes wild and bluetooth is not happy either. No harm done. Then I tried this: predicates onShow : window::showList...
by B.Hooijenga
26 Aug 2016 15:50
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

Thomas, ....but in our current version May I conclude that in the next VIP-version, the closing problem does not exist anymore? Still it doesn't have any thing to do with the unknown exception, the problem is that it happens on a timer event You are absolutely right, but it was the closing problem t...
by B.Hooijenga
25 Aug 2016 15:25
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

Thomas, Thank you. If you run the program you will also notice that it does not terminate after you press copy. I regret to say, but I do not follow you here. Your suggestion terminates as well. I made the program and included the zip-file. If you would be so kind and have a look at it In taskwindow...
by B.Hooijenga
24 Aug 2016 15:15
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

Thomas, I will try to be more specific. Let us suppose that there is an exception and VIP can handle it. Then I get an exception dialog. After I have pressed the copy-button I get a copy. Then the exception dialog is closed but not the application . That is important because I keep in control of the...
by B.Hooijenga
23 Aug 2016 13:51
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 4461

closing the program after an unknown exception?

Thomas, Between my robot and laptop I use a bluetooth connection. In general it is working very nicely. Sometimes during test-drives I get an unknown exception. Mostly because my program can not deal with a real world situation.. My problem is that VIP always closes the application. I can not see th...
by B.Hooijenga
9 Aug 2016 15:16
Forum: Visual Prolog
Topic: Changing text of groupBox in runtime
Replies: 3
Views: 2872

Thank you, Thomas, A small adaptation was needed to make the internal controls in the groupBox visible. But now it works fine. predicates onChangeTextButtonClick : button::clickResponder. clauses onChangeTextButtonClick(_Source) = button::defaultAction :- groupBox_ctl:setText("Changed"), _ = gui_nat...