Search found 27 matches

by Gukalov
28 Jul 2016 11:22
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 4921

Re: F1 and focus

Ferenc Nagy wrote:Hi,
This makes easier to define separate help topics for certain controls within the dialog, by checking the active control of the dialog.
Yes. Definitely. Very impotant in case of 99... fields to fill in :)
by Gukalov
28 Jul 2016 10:36
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 4921

Clicking help button moves focus on this button - it nerves sometimes. Clicking titlebar button does not. If use helpResponder, then pressing "F1" on keyboard works automatically. Set contextHelpId for children and parent helpResponder will get "help events" from children with contextHelpId-S you set.
by Gukalov
27 Jul 2016 14:34
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 4921

Hi. implement main clauses run() :- _ = fignyaDLG::new(). end implement main goal main::run(). implement fignyaDLG inherits dialog clauses new() :- dialog::new(window::getActiveWindow()), setDecoration(titlebar([helpButton, closeButton])), helpResponder := { (_, _) = true :- _ = shell_native::shellE...
by Gukalov
13 May 2016 10:53
Forum: Visual Prolog
Topic: Is there any example of timer Control?
Replies: 2
Views: 3503

tickAction/2 with counter: implement main clauses run() :- _ = fignyaDLG::new(). end implement main goal main::run(). implement fignyaDLG inherits dialog clauses new() :- dialog::new(window::getActiveWindow()), addShowListener({ :- Timer = tickAction(1000, timerAct), addMouseDownListener({ :- timerK...
by Gukalov
13 Jan 2016 11:03
Forum: Visual Prolog
Topic: coordonates of point
Replies: 10
Views: 5115

The stripes of the Russian flag are horizontal and have equal heights. Stupid way may be, but works - just make 3 imaleControls (for 3 colors). And forget about coordinates - click happens on certain control with certain color. P.S. setUnit(pixelUnit) - you can aplay it in dialog constructor and av...
by Gukalov
14 Apr 2015 16:47
Forum: Visual Prolog
Topic: Folder Deleting
Replies: 5
Views: 3436

Bonjour. It lacks subFolders deleting, looks like... I use something like this: class predicates deleteFolder : (string Folder) -> setM{string FileName} Undeleted. clauses deleteFolder(Folder) = Set :- Set = setM_redBlack::new(), deleteFolder(Folder, Set). class predicates deleteFolder : (string Fol...
by Gukalov
13 Apr 2015 12:08
Forum: Visual Prolog
Topic: Folder Deleting
Replies: 5
Views: 3436

Hi. Just remove subfolder by subfolder, file by file. class predicates deleteFolder : (string Folder). clauses deleteFolder(Folder) :- foreach SubFolder = directory::getSubDirectories_nd(Folder) do deleteFolder(SubFolder) end foreach, directory::forAllFiles(Folder, {(File) :- % file::setAttributes(F...
by Gukalov
4 Dec 2011 10:27
Forum: Visual Prolog
Topic: IF and else conditions
Replies: 1
Views: 1290

Code: Select all

... if (Color = color_Olive or Color = color_YellowGreen), ! then ...
by Gukalov
25 Oct 2011 12:01
Forum: Visual Prolog
Topic: HOW CAN I CACULATE THE SUM OF HUGE LIST OF REALS WITHOUT STACK OVERFLOW .
Replies: 13
Views: 3375

Another way: list::forAll() is the same foreach...getMember_nd loop.

Code: Select all

clauses     list_sum(L) = Sum:value :-         Sum = varM::new(0),         list::forAll(L,{(V):- Sum:value := Sum:value+V}).
by Gukalov
5 Oct 2011 18:06
Forum: Visual Prolog
Topic: how to exit a foreach loop in advance
Replies: 9
Views: 4288

Code: Select all

if I=20 then ! end if
instead of

Code: Select all

(  I=20, !;  succeed()  )
by Gukalov
5 Oct 2011 15:29
Forum: Visual Prolog
Topic: how to exit a foreach loop in advance
Replies: 9
Views: 4288

Code: Select all

predicates     test:(). clauses     test():-          foreach             I = std::fromTo(1,1000),              (  I=20, !;  succeed()  )          do             %...whatever          end foreach.