Page 1 of 2
Retired entity 'vpiDomains::controlHandler'
Posted: 26 Mar 2014 17:12
by CalmoSoft
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 ~)
Posted: 26 Mar 2014 22:43
by Thomas Linder Puls
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.
Posted: 27 Mar 2014 1:40
by CalmoSoft
Thanks very much but I don't know which vpiOldDomains domain I need use.
Regards,
Gal Zsolt
(~ CalmoSoft ~)
Posted: 27 Mar 2014 6:25
by George
Code: Select all
predicates
onControlcell1 : vpiOldDomains::controlHandler.
clauses
onControlcell1(_CtrlID, _CtrlType, _CtrlWin, _CtrlInfo) = vpiOldDomains::handled(uncheckedConvert(gui_native::lResult,0)):-
cell_click(1).
Posted: 27 Mar 2014 7:15
by CalmoSoft
George,
Thanks very much but it doesn't work.
Regards,
Gal Zsolt
(~ CalmoSoft ~)
Posted: 27 Mar 2014 8:06
by George
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..
CalmoSoft Puzzle Game
Posted: 27 Mar 2014 11:33
by CalmoSoft
George,
CalmoSoft Puzzle Game runs in Visual Prolog 7.1
Regards,
Gal Zsolt
(~ CalmoSoft ~)
Posted: 27 Mar 2014 11:53
by Thomas Linder Puls
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.
CalmoSoft Puzzle Game
Posted: 27 Mar 2014 12:03
by CalmoSoft
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 ~)
Posted: 27 Mar 2014 12:39
by George
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
CalmoSoft Puzzle Game
Posted: 27 Mar 2014 12:48
by CalmoSoft
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 ~)
Posted: 27 Mar 2014 12:55
by George
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
Posted: 27 Mar 2014 13:04
by CalmoSoft
George,
Thanks very much.
Where am I copy to it?
Regards,
Gal Zsolt
(~ CalmoSoft ~)
Posted: 27 Mar 2014 13:44
by George
Create a separate class file and put all of them in the ".cl" file..
and make use of it..
CalmoSoft Puzzle Game
Posted: 27 Mar 2014 14:14
by CalmoSoft
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
Regards,
Gal Zsolt
(~ CalmoSoft ~)