View previous topic :: View next topic |
Author |
Message |
VDSuser Contributor
Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Wed May 14, 2003 5:25 pm Post subject: CALENDAR problem |
|
|
I'm using the CALENDAR dialog element in a program. I've taken the integer portion of @datetime() and assigned it to %n. I've created buttons to increase and decrease %n by 1. The calendar is updated with the command dialog set,CALENDAR1,@datetime(mm/dd/yyyy,%n).
Moving within the calendar is fine. The increase/decrease buttons move the highlighted date properly.
Moving to an earlier calendar works fine. Decreasing the date from the first of the month changes the calendar to the previous month and highlights the last date of that month. (Decreasing 1 May, for example, moves to 30 April.)
Moving to a later calendar ... kaboom! I get error code 23, "Dialog element name not valid." (When attempting to move from 31 May to 1 June, for example.)
Anyone know what causes this and how to fix it? When changing to a later month, I'm simply adding 1 to %n. I'm stumped! |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed May 14, 2003 6:52 pm Post subject: |
|
|
If possible, it might help to post an example of the possible bug/error. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
VDSuser Contributor
Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Wed May 14, 2003 8:38 pm Post subject: |
|
|
This code illustrates my problem. It crashes when using Date Up to go to June but not when using Date Down to go to April. Any ideas?
Code: | DIALOG CREATE,CalTest,-1,0,193,192
DIALOG ADD,TEXT,TEXT1,4,4,,,Month Year
DIALOG ADD,BUTTON,DOWN,136,4,90,24,Date &Down
DIALOG ADD,BUTTON,UP,136,100,90,24,Date &Up
DIALOG ADD,BUTTON,RESET,164,4,90,24,&Today
DIALOG ADD,BUTTON,EXIT,164,100,90,24,E&xit
DIALOG ADD,CALENDAR,CALENDAR1,22,4,185,108,14/05/2103
DIALOG SHOW
rem === Get Date Integer ===
:Today
%d = @datetime()
%x = @pred(@pos(".",%d))
%n = @substr(%d,1,%x)
:Evloop
dialog set,TEXT1,@datetime(mmmm yyyy,%n)
dialog set,calendar1,@datetime(mm/dd/yyyy,%n)
wait event
%e = @event()
goto %e
:UPButton
%n = @succ(%n)
goto evloop
:DownButton
%n = @pred(%n)
goto evloop
:ResetButton
goto Today
:ExitButton
:Close
exit
|
|
|
Back to top |
|
|
Hortalonus Valued Contributor
Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed May 14, 2003 9:03 pm Post subject: |
|
|
Definitely seems like a bug to me... maybe this thread should be moved to the Bug Reports section. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed May 14, 2003 10:00 pm Post subject: |
|
|
Quote: | Definitely seems like a bug to me... maybe this thread should be moved to the Bug Reports section. |
Done.
Looks like a bug to me too. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|