Search found 30 matches

by Gukalov
20 Jan 2017 2:01
Forum: Visual Prolog
Topic: Problem reading large VIP 5.2 database file as text strings
Replies: 7
Views: 3027

Hi.

flush may be...

Code: Select all

foreach     IS:repeatToEndOfStream(),     S = IS:readLine(),     frontToken(S,_Tok,_) do             OS:write(S,"\n"),     OS:flush() end foreach,
by Gukalov
1 Aug 2016 12:52
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 6403

Re: The contradicting arguments, display and working of the frame decoration

Ferenc Nagy wrote: 3) They inactivate the helpButton.
If helpResponer is set key "F1" works both with and without helpButton on titleBar. And without titleBar at all "F1" works.
It's almost good, it's good enough ;)
by Gukalov
29 Jul 2016 20:20
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 6403

Re: Minimize and maximize buttons do not allow to appear the help button

Ferenc Nagy wrote:Hi Gukalov,
Try to add to the setDecoration call these Buttons.
...
:-) The Help button will disappear.
Of course I tried))) And tried some years ago already)))
Why is it like that ask Thomas)))
by Gukalov
28 Jul 2016 11:22
Forum: Visual Prolog
Topic: Using of the help button of the titlebar
Replies: 10
Views: 6403

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: 6403

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: 6403

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: 4007

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: 6033

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: 4048

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: 4048

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: 1555

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: 4419

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: 5315

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: 5315

Code: Select all

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