Discussions related to Visual Prolog
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Problem using Calendar

Unread post by Tonton Luc »

Hi,

I try to use Calendar in a VP 7.3 project from Calendar sample.
What does this first column mean ? or is it a bug... how to solve it ?
Attachments
calendar.jpg
calendar.jpg (35.89 KiB) Viewed 7009 times
User avatar
Thomas Linder Puls
VIP Member
Posts: 1399
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Which calendar sample do you mean?

Perhaps you can show some code?
Regards Thomas Linder Puls
PDC
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc »

From this sample => http://www.visual-prolog.com/vip/exampl ... lendar.htm

If you add a note() in this following clause in DayCell.pro, you can see "@obj_proc(0041453C,00329F68)" :

Code: Select all

    get_CellStr(1,0) =toString( xCALENDAR:get_weekNo1) :- vpiCommonDialogs::note(toString(xCALENDAR:get_weekNo1)), !.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1399
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Yes and that is the problem, you don't want to write the predicate, you want to write the result of calling the predicate. So you have to write get_weekNo1() instead of get_weekNo1:

Code: Select all

    %-- Week Number Column     get_CellStr(1, 0) = toString(xCALENDAR:get_weekNo1()) :-         !.       get_CellStr(2, 0) = toString(xCALENDAR:get_weekNo2()) :-         !.       get_CellStr(3, 0) = toString(xCALENDAR:get_weekNo3()) :-         !.       get_CellStr(4, 0) = toString(xCALENDAR:get_weekNo4()) :-         !.       get_CellStr(5, 0) = toString(xCALENDAR:get_weekNo5()) :-         !.       get_CellStr(6, 0) = toString(xCALENDAR:get_weekNo6()) :-         !.
Regards Thomas Linder Puls
PDC
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc »

Hi,

Ok, the first column values are displayed correctly now.
Thanks for your help.
:-)
...I rectify in all DayCell.pro in my machine.
Post Reply