Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Currently selected date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Currently selected date

 Post Reply Post Reply
Author
Message
TracyP View Drop Down
Groupie
Groupie


Joined: 16 February 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote TracyP Quote  Post ReplyReply Direct Link To This Post Topic: Currently selected date
    Posted: 20 February 2006 at 9:54am
Due to the language I'm using, passing a Date variable to the ActiveView.GetSelection() returns an error.
See link for more details: PRB: ActiveX Controls Passing Variant* Back to VFP Cause Error

Is there another way to get the currently selected date. I've attempted to use the DatePicker attached to the Calendar, however, it does not correctly update when the calendar updates.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2006 at 6:25am
Hi Tracy,

In the declaration of ActiveView.GetSelection(ByRef Date, ByRef Date, ByRef Boolean) there are no "ByRef Variant" parameters. Could you please clarify whether you're providing all 3 parameters of corresponding types?

--
WBR,
Serge
Back to Top
TracyP View Drop Down
Groupie
Groupie


Joined: 16 February 2006
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote TracyP Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2006 at 8:37am
VFP does not have StrictTyping. However, I do set the variables accordingly.

ltStart = datetime() && function which returns a datetime value
ltEnd = datetime()  && function which returns a datetime value
llAllDay = .T.  && true
*-- The @ before the variables are informing VFP to pass by Reference
oleCalendar.ActiveView.GetSelection(@ltStart, @ltEnd, @llAllDay)

Today it works. Looking at the old code tests I have been doing, I passed the llAllDay as .T. not a variable. This was apparently causing my error.

I am very pleased with the functionality and ease of use this control has.

Thanks
Tracy

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2006 at 9:35am
Thank you, nice to see that this is not an issue .

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.