Chet,
I visually created a little test form with two objects on it: a command
button and the caldatepicker class, not the calendar object, from
Craig's vfpcalendar class. I added a form property to hold the value of
the date picker object. In the lostfocus of the datepicker object, I do
this:
thisform.dReturnDate=this.Value
When the form unloads, I do this:
WAIT WINDOW TRANSFORM(this.dReturnDate)
It works as expected by showing me the date I selected via the picker in
a wait window.
Then I tried binding to a cursor. First I set the form bindcontrols to
.f. In the form load I created a cursor with a single date column. I
append a blank record, replace the date column with the current date. I
set the controlsource of the datepicker object to my the date column in
my test cursor. In the form init, I set bindcontrols to .t. When the
form unloads, it echoes the date selected to a wait window as expected.
Chet Gardiner wrote:
oCalendar.show() DID NOT WORK...
Chet Gardiner wrote:
It's because "READ EVENTS" has already been issued by the App that
calls my code (that I have no control over)..
Any additional read events is ignored...
Here's the offending code from the object, when clicking on the
little calendar graphic to open the calendar:
LOCAL dHoldDate
Public dSelectedDate, oCalendar
dSelectedDate = this.Parent.txtDate.value
oCalendar = CREATEOBJECT("calCalendar", dSelectedDate)
this.Parent.PositionCalendar(oCalendar)
oCalendar.visible = .t.
BINDEVENT(thisform, "moved", this.Parent, "PositionCalendar")
READ EVENTS && <---- IGNORED BY MY PROGRAM....
UNBINDEVENTS(thisform, "moved", this.Parent, "PositionCalendar")
WITH this.parent
dHoldDate = .txtDate.Value
.txtDate.Value = dSelectedDate
.txtDate.refresh()
IF dHoldDate != dSelectedDate
this.parent.interactiveChange()
ENDIF
ENDWITH
oCalendar = NULL
RELEASE dSelectedDate, oCalendar
--------------------------------------------------------
Is there some other way to get the calendar displayed other than a
READ EVENTS????
would "oCalendar.show() work???
Chet Gardiner wrote:
Here's the deal, there's a "READ EVENTS" imbedded in the class
object that ISN'T being recognized. No calendar display alas,
therefore no picker.
Bummer, it's a cute little object, too bad I can't use it...
Pablo Rivera Sr wrote:
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Malcolm Greene
Sent: Monday, July 10, 2006 10:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Have a Calendar object?
Chet,
Check Craig Boyd's www.sweetpotatosoftware.com blog - there's a
great date
picker.
Malcolm
Hi Chet.
If you cant find it there, try this link: http://tinyurl.com/pvxje. ;)
Be well
================
PabloSr
In a learning adventure
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.