[futurebasic] Re: [FB] Date buttons

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2001 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Mon, 03 Dec 2001 19:39:16 +0100
Pierre SIMON wrote:
> 
> Hi,
> 
> Could anybody explain to me how those date appearance manager
> buttons work ? I just can't manage to get the information from
> them.
> 
> Thanks,
> Pierre SIMON
> 
Pierre,

Perhaps you are confronted to a glitch that was left in a previous
release: the LongDateRec record was declared with the era field
remed out in the header file.
You can have a look at the Appearance folder inside the donations
folder and read the Integrated Appearance doc for the different
kinds of controls.
I believe the info can be retrieved like so (provided the
LongDateRec record is correctly defined):

dim   dateResult as LongDateRec
dim @ actualSize as long
long if fn
GetControlData(CtrlHndl,0,_kControlClockLongDateTag,sizeof(LongDateRec),dateResult,actualSize)
= _noErr
print dateResult.era        
print dateResult.year       
print dateResult.month      
print dateResult.day        
print dateResult.hour       
print dateResult.minute     
print dateResult.second     
print dateResult.dayOfWeek  
print dateResult.dayOfYear  
print dateResult.weekOfYear 
end if
-- 

Cheers

Alain

-----------------------------------------------------
FB^3 in Europe:  http://euro.futurebasic.com/
FB II Pouch:     http://www.pixmix.com/FB/outils.html
-----------------------------------------------------