Search found 32 matches

by Gukalov
1 May 2021 10:52
Forum: Visual Prolog
Topic: fail() predicate behavior
Replies: 4
Views: 310

Re: fail() predicate behavior

Hi. I think that no matter VIP 7.5 or VIP 9. Generally this is not good idea to play with retract( someFact ) & assert( someFact ) inside backTrack construction wich is based on iteration of this someFact . p1() :- L = [ Id || token(Id, _, _) ], foreach Lj in L do if token(Lj, T, _) and p10(T) t...
by Gukalov
10 Apr 2021 20:54
Forum: Visual Prolog
Topic: how to implement properties using facts
Replies: 4
Views: 457

Re: how to implement properties using facts

So why you put the propertie declaration in the CLASS?!)))
Put it in the INTERFACE...
by Gukalov
10 Apr 2021 17:46
Forum: Visual Prolog
Topic: how to implement properties using facts
Replies: 4
Views: 457

Re: how to implement properties using facts

Unfortunately, up to now I have learnt only first 263 errors. I have not learnt yet the error number 264 - I'm very sorry. But: 1. The properties is in the class , so the corresponding fact must be in class facts section. 2. Will be not bad to set any init value. class facts preConditions : setM{con...
by Gukalov
3 Apr 2021 18:40
Forum: Visual Prolog
Topic: How to approach fuzzy match
Replies: 3
Views: 353

Re: How to approach fuzzy match

implement main open core domains myDomain = good; bad; ok. clauses run() :- L1 = [ good, good , bad, ok ], L2 = [ bad, bad , good, ok ], L3 = list::intersection(L1, L2), console::write("Intersection12 = ", L3, "\n"), L4 = list::intersection(L2, L1), console::write("Intersec...
by Gukalov
25 Mar 2021 19:27
Forum: Visual Prolog
Topic: From string to integer
Replies: 8
Views: 706

Re: From string to integer

Good evening. Martin, integer can be negative. clauses run() :- if string::frontToken("-10+5", Token, Rest) then console::writef("Token = '%s'; Rest = '%s'", Token, Rest) end if, console::write("\n....................."), _ = console::readLine(). % Token = '-'; Rest = '...
by Gukalov
12 Mar 2021 21:17
Forum: Visual Prolog
Topic: Example for removeAllBy
Replies: 5
Views: 657

Re: Example for removeAllBy

class predicates somecomparItor : core::comparator{PofigChyo}. % define your own domain here instead of "PofigChyo" clauses somecomparItor(A, B) = less :- A < B, !. % define your own "less" here instead of "A < B,". somecomparItor(A, B) = greater :- A > B, !. % define ...
by Gukalov
10 Mar 2021 20:18
Forum: Visual Prolog
Topic: Example for removeAllBy
Replies: 5
Views: 657

Re: Example for removeAllBy

implement main open core clauses run() :- X = "abc", List = [ "ABC", "aBc", "cba", "abc", "AbC", "abC" ], L = list::removeAllBy(string::compareIgnoreCase, List, X), % L = list::removeAllEq({(A, B) :- equal = string::compareIgnore...
by Gukalov
12 Jul 2020 20:42
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 4275

Re: Loading a bmp and jpg to a dialog

Don't forget: class bitmap : bitmap class image : image You can create a bitmap (image) from a file and from any other... From everything you need to create))) And edit it as you want to edit... Good luck))) P.S. imageControl, by the way, works perferctly with VPI picture (without all "onPaint&...
by Gukalov
10 Jul 2020 18:53
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 4275

Re: Loading a bmp and jpg to a dialog

Open dialog constructor. In window "Controls" click key symbol. Click in the dialog area. In appeared list choose "imageControl". O'k button. "imageControl_ctl" will appear - rename as you want, replace as you want, resize as you want......... (all needed packages added...
by Gukalov
9 Jul 2020 12:41
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 4275

Re: Loading a bmp and jpg to a dialog

Hi.
Just to draw a picture from a file?
Using ImageControl is the simplest way, I guess.

Code: Select all

    setImageFile : (string FileName).     % @short Loads the control image from the specified file.
by Gukalov
26 Apr 2019 15:23
Forum: Visual Prolog
Topic: Color background of standard control
Replies: 3
Views: 2992

Re: Color background of standard control

Hi everybody.
In the similar situation I stupidly used imageControl (instead of staticTextControl)
with the set of image files to change the colors and inscriptions (ImageControl:setImageFile(FileName)).
by Gukalov
5 Jan 2019 9:44
Forum: Visual Prolog
Topic: Send to Background-Bring to Top
Replies: 17
Views: 11478

Re: Send to Background-Bring to Top

Look at "window.i": predicates setActive : (). predicates bringToTop : (). predicates forceToTop : (). For working with vpi there are: predicates tryGetVpiWindow : () -> vpiDomains::windowHandle VpiWindowHandle determ. predicates getVpiWindow : () -> vpiDomains::windowHandle VpiWindowHandl...
by Gukalov
16 Aug 2018 12:34
Forum: Visual Prolog
Topic: ListviewControl compilation 32bit vs 64 bit, VP8
Replies: 7
Views: 8006

Re: ListviewControl compilation 32bit vs 64 bit, VP8

I would try withou varM... clauses sssToItemList(SSS, StartingIndex) = ItemList :- % CurrX = varM::new(StartingIndex), ItemList = [ Item || list::memberIndex_nd(SS, Index, SSS), ItemID = uncheckedConvert(listViewControl::itemID, Index + StartingIndex /*+0*/), % <== e504 error here on 64bit compilati...
by Gukalov
26 Jul 2018 13:11
Forum: Visual Prolog
Topic: Edit pdf document
Replies: 5
Views: 7642

Re: Edit pdf document

Harrison Pratt wrote: 26 Jul 2018 12:57 Do you mean add text from a VIP application?
- Yes, exactly. It need to sign a lot of scans, and I'm too lazy to do it manually)))
by Gukalov
26 Jul 2018 12:16
Forum: Visual Prolog
Topic: Edit pdf document
Replies: 5
Views: 7642

Edit pdf document

Hi)))
How to add simple text label to pdf document?