Search found 695 matches

by Steve Lympany
25 Nov 2011 18:01
Forum: Visual Prolog
Topic: What is wrong with Vpicommondialogs::note
Replies: 10
Views: 2374

Hi,
In your debug/trace, is vpi::init called after the taskwindow onshow?
regards
Steve
by Steve Lympany
24 Nov 2011 16:50
Forum: Visual Prolog
Topic: What is wrong with Vpicommondialogs::note
Replies: 10
Views: 2374

Hi, the problem starts immediately as soon as project is Executed , Before Taskwindow and its menus emerges You must create your form AFTER the taskwindow onshow(). Without studying, I think there is no vpi window attached to the taskwindow (or any other) until the onshow is called. I think. You can...
by Steve Lympany
24 Nov 2011 14:48
Forum: Visual Prolog
Topic: What is wrong with Vpicommondialogs::note
Replies: 10
Views: 2374

Hi,
Step backwards. Have you tried calling note::
a) before you call the form
b) after the taskwindow is shown?

Do they show correctly?

regards
Steve
by Steve Lympany
24 Nov 2011 9:50
Forum: Visual Prolog
Topic: Reg - Properties Implementation..
Replies: 13
Views: 2529

Hi, Kindly let me know.. does it possible without fact section for set the value to the property..??? No. "property" is more like an interface for setting facts. But you can be more obscure - your could make the setting of a property just draw something on the screen, without storing any data, for e...
by Steve Lympany
23 Nov 2011 16:29
Forum: Visual Prolog
Topic: Reg - Properties Implementation..
Replies: 13
Views: 2529

Hi,
Well, you can do this:

Code: Select all

properties        p_joe : integer (o).     clauses      p_joe()=local_calculate().     clauses      local_calculate()=X:-        X=some_calc...
cheers
S
by Steve Lympany
23 Nov 2011 15:45
Forum: Visual Prolog
Topic: Reg - Properties Implementation..
Replies: 13
Views: 2529

Hi, 1) I understand the real time scenario's which you explained, but the same thing we could do it in the class fact + predicate implementation.. right.. ?? Yes. I am not sure why you keep saying "class" fact - it also applies to object facts. 2) Could you please tell me the advantages of implement...
by Steve Lympany
23 Nov 2011 10:37
Forum: Visual Prolog
Topic: Reg - Properties Implementation..
Replies: 13
Views: 2529

Hi because, the same thing we could do by using the class fact and predicate definition.. True! But I think that you should ask "is this fact a property of the class?" So if you think a property of a "car" is "colour" you should probably implement it as a property. In contrast, I don't think "speed"...
by Steve Lympany
23 Nov 2011 8:53
Forum: Visual Prolog
Topic: Reg - Properties Implementation..
Replies: 13
Views: 2529

Hi, Properties are implemented using facts. You can think of a property as a way of directly modifying a fact from another class or object, rather than writing a class/object predicate to do it. So it's a shortcut to doing this. "class" is not directly relevant i.e. it means the same as usual. You c...
by Steve Lympany
17 Nov 2011 9:57
Forum: Visual Prolog
Topic: How to Kill ( destroy ) form1 while working on anather form2 .
Replies: 16
Views: 4874

Hi

Hi,
Here it is.
cheers
Steve
by Steve Lympany
16 Nov 2011 19:28
Forum: Visual Prolog
Topic: Help with predicates and variables
Replies: 6
Views: 1978

Hi, I think you should program in an oo way, not just "partially". Your car class should contain its position, colour, score, parent etc. Things would be more concise. You can then use Pos=Car:center(), Parent=Car:getParent(), Var=Parent:getVar(), % etc btw, rather than your if-then-else... predicat...
by Steve Lympany
16 Nov 2011 16:02
Forum: Visual Prolog
Topic: How to Kill ( destroy ) form1 while working on anather form2 .
Replies: 16
Views: 4874

Hi, In one of my apps, I have a class (that doesn't create objects) called "form_manager", because I have many forms. Some forms are only allowed to exist once (at any one time), and some forms can be displayed more than once. Also, I have rules that destroy one form when another is destroyed (for e...
by Steve Lympany
16 Nov 2011 10:13
Forum: Visual Prolog
Topic: Reg -How to Get the correct predicate name when exception arise ??
Replies: 9
Views: 1931

Hi, Well, looking through http://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates#predicate_fullname there is nothing with "package" in, so I suppose not. Why do you want it? If you have the class name and predicate name, that is sufficient...? Have a look at na...
by Steve Lympany
15 Nov 2011 21:41
Forum: Visual Prolog
Topic: How to Kill ( destroy ) form1 while working on anather form2 .
Replies: 16
Views: 4874

Hi, onFile_1(Source,_MenuTag):- Form2 = new(Source, Form1), % transfer the form1 to the constructor Form2:show(). You call (or try to!) call new() with object Form1, which you haven't created yet. onFile_1(Source,_MenuTag):- Form1 = form1::display(This), % I assume This is your taskwindow object...?...
by Steve Lympany
14 Nov 2011 15:45
Forum: Visual Prolog
Topic: Reg -How to Get the correct predicate name when exception arise ??
Replies: 9
Views: 1931

Hi,

Code: Select all

divByZer(_X, 0):-!,     common_exception::raise_error(classinfo,predicate_name(),"Y is zero "). divByZer(X, Y):-      hasDomain(integer, Z),      Z = X div Y.
But check through the pfc for other ideas (just do a project search on "exception")

cheers
steve
by Steve Lympany
10 Nov 2011 21:48
Forum: Visual Prolog
Topic: how to move an object with arrow keys?
Replies: 9
Views: 1981

Hi, If you have onKeyUp(_Source, Key, _ShiftControlAlt) = drawWindow::defaultKeyUpHandling:- stdio:write("key - ", Key), fail. %---do you have this? then you will get the warning, because it is not used. So just replace the unused variable with an underscore onKeyUp(_Source, Key, _ShiftControlAlt) =...