Retired entity 'vpiDomains::controlHandler'

Discussions related to Visual Prolog
User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

Retired entity 'vpiDomains::controlHandler'

Unread post by CalmoSoft » 26 Mar 2014 17:12

Thomas,

I have code:

Code: Select all

    predicates         onControlcell1 : vpiDomains::controlHandler.     clauses         onControlcell1(_CtrlID, _CtrlType, _CtrlWin, _CtrlInfo) = handled(0):-             cell_click(1).
I got error message:

Retired entity 'vpiDomains::controlHandler': Retired use the one from vpiOldDomains instead

What can I do?

Regards,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

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

Unread post by Thomas Linder Puls » 26 Mar 2014 22:43

You can use the one from vpiOldDomains instead (Or rewrite the code to new style).

The/an old vpi event handling strategy has been moved to the class vpiOldDomains to make room for a newer strategy in vpiDomains.
Regards Thomas Linder Puls
PDC

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

Unread post by CalmoSoft » 27 Mar 2014 1:40

Thanks very much but I don't know which vpiOldDomains domain I need use.

Regards,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

User avatar
George
VIP Member
Posts: 313
Joined: 19 Sep 2011 8:54

Unread post by George » 27 Mar 2014 6:25

:idea: :roll:

Code: Select all

predicates         onControlcell1 : vpiOldDomains::controlHandler.     clauses         onControlcell1(_CtrlID, _CtrlType, _CtrlWin, _CtrlInfo) = vpiOldDomains::handled(uncheckedConvert(gui_native::lResult,0)):-             cell_click(1).
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

Unread post by CalmoSoft » 27 Mar 2014 7:15

George,

Thanks very much but it doesn't work.

Regards,
Gal Zsolt
(~ CalmoSoft ~)
Attachments
CalmoSoft_Puzzle.zip
CalmoSoft Puzzle Game
(32.75 KiB) Downloaded 189 times
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

User avatar
George
VIP Member
Posts: 313
Joined: 19 Sep 2011 8:54

Unread post by George » 27 Mar 2014 8:06

I think, you are trying to convert old version Prolog VIP 6.x to latest version 7.x ..

I looked into your project - I got too many errors - I addressed most of the errors but, at the end I was not able to run your project - I'm not sure about my fix - I just tried to make the project to run..

Got into following error,
Type Description Filename f2506 Fatal error 2506: Cannot open file 'C:\Program Files (x86)\Visual Prolog 7.4\Lib\unicows.lib', errno=2 unicows.lib
Basically, VIP 7.4 doesn't able to create a Lib file for the old version project

My advice is - Please create a fresh project in VIP 7.4 and play with that(create a form and use the controls) .. And try to solve the issue instead of addressing the issue with old version of it..
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

CalmoSoft Puzzle Game

Unread post by CalmoSoft » 27 Mar 2014 11:33

George,

CalmoSoft Puzzle Game runs in Visual Prolog 7.1


Image

Regards,
Gal Zsolt
(~ CalmoSoft ~)
Attachments
CalmoSoft_Puzzle.zip
CalmoSoft Puzzle Game
(32.75 KiB) Downloaded 184 times
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

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

Unread post by Thomas Linder Puls » 27 Mar 2014 11:53

I have made a quick update of the project, but I will strongly suggest that you recreate the project from scratch. Because it uses a really old gui strategy.
Attachments
CalmoSoft_Puzzle.zip
CalmoSoft Puzzle old style for Vip7.4
(31.44 KiB) Downloaded 163 times
Regards Thomas Linder Puls
PDC

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

CalmoSoft Puzzle Game

Unread post by CalmoSoft » 27 Mar 2014 12:03

Thomas,

Thanks very much.
I got error message:

e100 The file 'pfc\vpi\vpiOldDomains\vpiOldDomains.ph' is not found in PlayWindow.pack
e100 The file 'pfc\vpi\vpiOldDomains\vpiOldDomains.ph' is not found in TaskWindow.pack

Regards,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

User avatar
George
VIP Member
Posts: 313
Joined: 19 Sep 2011 8:54

Unread post by George » 27 Mar 2014 12:39

Its working perfect to me..

Try to rebuildAll

If not working -
Give the following entry on the "PlayWindow.pack" and "TaskWindow.pack" file

#include @"pfc\vpi\vpiOldDomains\vpiOldDomains.ph"

Rebuild all
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

CalmoSoft Puzzle Game

Unread post by CalmoSoft » 27 Mar 2014 12:48

George,

It still doesn't work.
There is no "pfc\vpi\vpiOldDomains\vpiOldDomains.ph" in my Visual Prolog 7.4
I have Personal Edition Visual Prolog 7.4

Regards,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

User avatar
George
VIP Member
Posts: 313
Joined: 19 Sep 2011 8:54

Unread post by George » 27 Mar 2014 12:55

The following is the vpiOldDomains module - have all the domain in your project and use that ...

Code: Select all

/*****************************************************************************                           Copyright (c) Prolog Development Center A/S   ******************************************************************************/ class vpiOldDomains     open core, vpiDomains   domains     handledFlag =         defaultHandling;         handled(gui_native::lResult Result).     % @short Domain is used to specify response from event handling responders.     % @detail <b>defaultHandling</b> means that event should be processed     % with the default VPI handling. <br>     % <b>handled</b>(#Result) means that the event is processed in the event handling responder     % and VPI does not need to process it.<br>     % #Result is returned value, which can be used by the code which calls the event handling     % responder.     % @end   constants     handledFlagNull : handledFlag = handled(gui_api::rNull).   domains     createHandler = (gui_native::lParam CreationData) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Create</a> </b> events.     % @end   domains     destroyHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Destroy</a> </b> events.     % @end   domains     getFocusHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_GetFocus</a> </b> events.     % @end   domains     loseFocusHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_LoseFocus</a> </b> events.     % @end   domains     sizeHandler = (integer Width, integer Height) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Size</a> </b> events.     % @end   domains     moveHandler = (integer X,integer Y) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Move</a> </b> events.     % @end   domains     updateHandler = (rct Rectangle) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Update</a> </b> events.     % @end   domains     eraseBackgroundHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_EraseBackground</a> </b> events.     % @end   domains     closeRequestHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_CloseRequest</a> </b> events.     % @end   domains     mouseDownHandler = (pnt Point, keyModifier ShiftControlAlt, integer Button) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_MouseDown</a> </b> events.     % @end   domains     mouseUpHandler = (pnt Point, keyModifier ShiftControlAlt, integer Button) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_MouseUp</a> </b> events.     % @end   domains     mouseDblHandler = (pnt Point, keyModifier ShiftControlAlt, integer Button) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_MouseDb</a> </b> events.     % @end   domains     mouseMoveHandler = (pnt Point, keyModifier ShiftControlAlt, integer* Buttons) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_MouseMove</a> </b> events.     % @end   domains     charHandler = (integer Char, keyModifier ShiftControlAlt) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Char</a> </b> events.     % @end   domains     keyDownHandler = (integer Char, keyModifier ShiftControlAlt) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_KeyDow</a> </b> events.     % @end   domains     keyUpHandler = (integer Char, keyModifier ShiftControlAlt) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_KeyUp</a> </b> events.     % @end   domains     vScrollHandler = (scrollCode SCROLLCODE, integer Pos) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_VScroll</a> </b> events.     % @end   domains     hScrollHandler = (scrollCode SCROLLCODE, integer Pos) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b><ae_HScroll></a> </b> events.     % @end   domains     menuItemHandler = (menuTag Menu_TAG) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Menu</a> </b> events.     % @end   domains     initMenuHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_InitMenu</a> </b> events.     % @end   domains     controlHandler = (ctlid Ctlid, wintype Wintype, windowHandle Window, controlInfo CONTROL_INFo) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Control</a> </b> events.     % @end   domains     timerHandler = (timerId TimerId) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Time</a> </b> events.     % @end   domains     timerId = handle.   domains     ownerMeasureItemHandler = (unsigned CtlType, ctlid Ctlid, unsigned ItemId, integer Data) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_OwnerMeasureItem</a> </b> events.     % @end   domains     ownerDrawHandler =         (unsigned Ctltype, ctlid CtlId, unsigned ItemID, vpiOwnerDraw::itemaction ItemAction, vpiOwnerDraw::itemstate ItemState, windowHandle Window,                 rct RectItem, integer ItemData) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_OwnerDra</a> </b> events.     % @end   domains     ddeHandler = (ddeconv Conv, ddeevent Event) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_DDE</a> </b> events.     % @end   domains     endSessionHandler = (booleanInt AbortPosible) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_EndSession</a> </b> events.     % @end   domains     nativeHandler = (unsigned Message, unsigned WParam, integer LParam) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Native</a> </b> events.     % @end   domains     eventUserHandler = (integer Id, integer Ptr) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_User</a> </b> events.     % @end   domains     endApplicationHandler = (pointer Id) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_EndApplication</a> </b> events.     % @end   domains     stateHandler = (stateInfo STATE_INFo) -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_State</a> </b> events.     % @end   domains     activateHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Activate</a> </b> events.     % @end   domains     deactivateHandler = () -> handledFlag.     % @short The predicate domain for declaration of event handling responder predicates,     % which handling the <b> <a>e_Deactivate</a> </b> events.     % @end   end class vpiOldDomains
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

Unread post by CalmoSoft » 27 Mar 2014 13:04

George,

Thanks very much.
Where am I copy to it?

Regards,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

User avatar
George
VIP Member
Posts: 313
Joined: 19 Sep 2011 8:54

Unread post by George » 27 Mar 2014 13:44

Create a separate class file and put all of them in the ".cl" file..

and make use of it..
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282

User avatar
CalmoSoft
VIP Member
Posts: 52
Joined: 17 Oct 2006 5:49

CalmoSoft Puzzle Game

Unread post by CalmoSoft » 27 Mar 2014 14:14

Thomas, George,

It works now!
Thanks very much.

CalmoSoft Puzzle Game in Visual Prolog 7.4

If you have Visual Prolog Personal Edition please copy the attached "vpiOldDomains" to "pfc\vpi\vpiOldDomains".

CalmoSoft Puzzle Game Demo

Image

Regards,
Gal Zsolt
(~ CalmoSoft ~)
Attachments
vpiOldDomains.zip
vpiOldDomains
(2.21 KiB) Downloaded 140 times
CalmoSoft_Puzzle_20140327.zip
CalmoSoft Puzzle Game in Visual Prolog 7.4
(38.28 KiB) Downloaded 132 times
Last edited by CalmoSoft on 7 Aug 2014 13:49, edited 8 times in total.
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
(~ CalmoSoft ~)
calmosoft@gmail.com

Post Reply