Inserting calls to form/dialog creation

Discussions related to Visual Prolog
Post Reply
Vitaly Markov
Active Member
Posts: 67
Joined: 30 Nov 2003 0:01

Unread post by Vitaly Markov » 27 Oct 2010 11:39

Hi, Thomas
It is the good video.
However, the insert of predicatecall of the demoForm it was made easier in the Visual Prolog 5.

If many forms are created in the Visual Prolog 7 then it is necessary to remember all names of forms at time of insert, or manually to copy them from some place of the VIP7-program to handler.
The reason of it is manual write of a predicatecall of the demoForm in handler.

If to add such feature in Visual Prolog 7 it would be wonderful !!!!!!!!!!
Attachments
handler.JPG
Predicatecall of the demoForm in handler
handler.JPG (10.35 KiB) Viewed 3223 times
menu2.JPG
Choice of name of form from ListBox
menu2.JPG (29.89 KiB) Viewed 3223 times
menu1.JPG
Selection of menu item for insert of predicatecall
menu1.JPG (55.74 KiB) Viewed 3223 times

User avatar
Thomas Linder Puls
VIP Member
Posts: 2367
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 27 Oct 2010 22:04

This mail thread has been spawned from the mail thread: Form Demonstrationvideo tutorial.

And the mail relates to the form demo video on the Visual Prolog YouTube channel, which can also be seen on our own site: Form Demo - Visual Prolog video tutorial.
Regards Thomas Linder Puls
PDC

User avatar
Thomas Linder Puls
VIP Member
Posts: 2367
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 28 Oct 2010 23:50

Hi, Markov.

In my mind it is important to assist the programmer both when it comes to memory and typing. The feature you mention has however been removed deliberately; not by accident.

Reasons:
  • Most people didn't find it
  • The menu structure is rather complex, because it is of course not only interesting to insert those predicates that opens dialogs; the 99% other predicates are also useful.
  • It is a convention that xxx::display opens xxx. But it is only a convention, not a law. We are a little reluctant with making IDE features that depends strongly on some convention. Because programs that live long often contains code from several convention-generations. And therefore the features may not fit to much of the code anyway.
But I am considering extending IntelliSpeed with some means for inserting a complete call template, e.g. having typed:

Code: Select all

environment::getOSVer
it could be possible to complete to this:

Code: Select all

environment::getOSVersion(Major, Minor, IsNTFamily, AddInfo)
Where the variable names are taken from the declaration:

Code: Select all

predicates     getOSVersion : (unsigned Major, unsigned Minor, boolean IsNTFamily, string AddInfo) procedure (o,o,o,o).
Finally, a little tip. If you have actually forgot the name of your form-class then (recalling the "display" convention) you can use Insert Qualification ... to refresh your memory like this:
  • type display
  • while the caret "touches" display, press Shift-Ctrl-S
This will bring-up a dialog with all the classes that declares "display". When you choose one it is inserted in front of "diaplay" as a qualification, as you can see in the attached video clip.
Attachments
insertQualification.mp4
Insert Qualification ...
(387.72 KiB) Downloaded 2529 times
Regards Thomas Linder Puls
PDC

Vitaly Markov
Active Member
Posts: 67
Joined: 30 Nov 2003 0:01

Unread post by Vitaly Markov » 29 Oct 2010 5:57

Hi, Thomas.
{Type "display" and Ctrl_Shift+S} removes my question from the agenda. I did not know about this feature.
Thank for advice.
Best regards,
Vitaly.

User avatar
Thomas Linder Puls
VIP Member
Posts: 2367
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 29 Oct 2010 20:38

Excellent.

But it illustrates a big problem: Often features exists, but are just not discovered.
Regards Thomas Linder Puls
PDC

Steve Lympany
VIP Member
Posts: 695
Joined: 31 Mar 2001 23:01

Unread post by Steve Lympany » 30 Oct 2010 16:06

Hi,
Sorry, please delete this.
cheers
Steve

Post Reply