Page 2 of 3

Posted: 22 Apr 2014 9:01
by Thomas Linder Puls
Which version?

Do you have an imageControl in your form?

Posted: 22 Apr 2014 9:16
by hicham
yes i do have imagecontrol , the problem i have is in setImageFile

Posted: 22 Apr 2014 9:30
by Thomas Linder Puls
Which version of Visual Prolog are you using?

Posted: 22 Apr 2014 9:33
by hicham

Posted: 22 Apr 2014 22:29
by Thomas Linder Puls
The imageControl in 7.4 Commercial Edition does have a setImageFile predicate, so you must be doing something wrong.

Please show us your code (or the relevant part)?

Posted: 23 Apr 2014 9:02
by hicham
i created a form called hicham
i created a control called imageControl in my form

Code: Select all

implement hicham     inherits formWindow     open core, vpiDomains     clauses     display(Parent) = Form :-         Form = new(Parent),         Form:show().   clauses     new(Parent):-         formWindow::new(Parent),         generatedInitialize(),         flipImage(true).             predicates     flipImage : (boolean Image). clauses     flipImage(S) :-         if true=S then             imageControl_ctl:setImageFile(@"..\taskwindow\ProjectIcon.ico")         else             imageControl_ctl:setNoImage()         end if,         delayCall(300, { :- flipImage(boolean::logicalNot(S)) }).
i build the project
ihave this error : undeclared identifier 'setImageFile/1'

Posted: 23 Apr 2014 18:13
by Thomas Linder Puls
How does the declaration of imageControl_ctl look?

Posted: 24 Apr 2014 8:27
by hicham
i dont understand the question .. can u show me how imageControl_ctl look ?

Posted: 24 Apr 2014 9:51
by Thomas Linder Puls
The declaration of my imageControl_ctl looks like this (last line):

Code: Select all

% This code is maintained automatically, do not update it manually. 11:50:14-24.4.2014 facts     ok_ctl : button.     cancel_ctl : button.     help_ctl : button.     imageControl_ctl : imagecontrol.

Posted: 24 Apr 2014 10:44
by hicham
this is what look like mine too

Posted: 25 Apr 2014 19:17
by Thomas Linder Puls

My imageControl.i looks like this:

Code: Select all

/*****************************************************************************                           Copyright (c) Prolog Development Center A/S   @short Image control is the control to draw images of various graphic formats.   @detail The set of supported graphic formats corresponds to the set of formats, supported by GDI+. @end @control ******************************************************************************/   interface imageControl     supports control     open core   predicates from drawControlSupport     getBorder, setBorder   predicates     setImageFile : (string FileName).     % @short Loads the control image from the specified file.     % @detail Note that the specified file is loaded only when the control is show.     % @end   predicates     getImageFile : () -> string FileName.     % @short Returns the #FileName previously set by setImageFile predicate.     % @exception imageControl_exception::imageFileNotSet_exception is raised if no image file is set.     % @end   ...
setImageFile is almost at the top. Does your file look the same?

Posted: 26 Apr 2014 11:05
by hicham
No , do i need to add theses predicates or they already exist? .. because mine is empty

Posted: 26 Apr 2014 14:36
by Thomas Linder Puls
The file exists already and should look like the one I have shown, it is in $(ProDir)\gui\controls\imagecontrol.

(It is only in the Commercial Edition, but you said you have the Commercial Edition).

Posted: 27 Apr 2014 13:07
by hicham
i think i was wrong , sorry .. i dont have commercial edition ... so now what should i do ? add these predicates ???

Posted: 28 Apr 2014 8:11
by Thomas Linder Puls
You would need to add not only such predicates, but also everything else needed to impelment an imageControl.

There are differences between the Commercial and Personal Editions, you have now discovered one of them.