OpenQNX :: The QNX Community Portal

Jul 05, 2008 - 10:55 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 39 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
M.Shanthi
Post subject: PtCalendar usage  PostPosted: Oct 04, 2004 - 10:32 AM
Guest





Hi,

In one of my applications, I 'm trying to change the system date,month &
year using the PtCalendar widget. After any change, the changed date ,
month and year should be set in a text box.For this, I'm writing code in
Pt_CB_CALENDAR_SELECT callback.But, I'm not successful.Can anyone send me
a snippet/ suggest some ideas as how to proceed?

Bye.
 
   
Reply with quote Back to top
bilcar
Post subject: Re: PtCalendar usage  PostPosted: Oct 04, 2004 - 04:46 PM
Senior Member


Joined: Feb 04, 2004
Posts: 573
Location: Crete, IL
M.Shanthi <shanthi@bhelrpt.co.in> wrote:
MS > Hi,

MS > In one of my applications, I 'm trying to change the system date,month &
MS > year using the PtCalendar widget. After any change, the changed date ,
MS > month and year should be set in a text box.For this, I'm writing code in
MS > Pt_CB_CALENDAR_SELECT callback.But, I'm not successful.Can anyone send me
MS > a snippet/ suggest some ideas as how to proceed?

MS > Bye.

I don't think the PtCalendar widget ever attempts to change the actual
system date/time. In your callback you'll need to also call
settimeofday().

Hope that helps.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
M.Shanthi
Post subject: Re: PtCalendar usage  PostPosted: Oct 05, 2004 - 07:44 AM
Guest





Dear Bill Caroselli,

Thanks for the reply.
I shall try with settimeofday();

Regards,
M.Shanthi
 
   
Reply with quote Back to top
Alito
Post subject: RE: Re: PtCalendar usage  PostPosted: Jan 28, 2008 - 02:17 PM
New Member


Joined: Apr 27, 2007
Posts: 2

Hi, I have another problem whit the PtCalendar:
This is the situation: My PtCalendar have a Pt_CB_CALENDAR_SELECT callback, the code in the callback should give me the date of the calendar where I do click but it always return the same value (a constant) of day, month and year; this is the code:

int FindDay(PtWidget *widget, ApInfo *apinfo, PtCallbackInfo *cbinfo)
{
PtCalendarDate_t date;
widget=widget, apinfo=apinfo, cbinfo=cbinfo;

PtGetResource(widget, Pt_ARG_CALENDAR_DATE, &date, sizeof(date));
printf("year: %d - month: %d - day: %d", date.year, date.month+1, date.day+1);
flushall();

return(Pt_CONTINUE);
}

Please help me, thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
Misha Nefedov
Post subject: Re: Re: PtCalendar usage  PostPosted: Jan 28, 2008 - 04:30 PM
Guest





The date should be *date.

"Alito" <alenu_24@hotmail-dot-com.no-spam.invalid> wrote in message
news:fnktut$f7q$1@inn.qnx.com...
Quote:
Hi, I have another problem whit the PtCalendar:
This is the situation: My PtCalendar have a Pt_CB_CALENDAR_SELECT
callback, the code in the callback should give me the date of the
calendar where I do click but it always return the same value (a
constant) of day, month and year; this is the code:

int FindDay(PtWidget *widget, ApInfo *apinfo, PtCallbackInfo *cbinfo)
{
PtCalendarDate_t date;
widget=widget, apinfo=apinfo, cbinfo=cbinfo;

PtGetResource(widget, Pt_ARG_CALENDAR_DATE, &date,
sizeof(date));
printf("year: %d - month: %d - day: %d", date.year,
date.month+1, date.day+1);
flushall();

return(Pt_CONTINUE);
}

Please help me, thanks.
 
   
Reply with quote Back to top
Alito
Post subject: RE: Re: Re: PtCalendar usage  PostPosted: Jan 31, 2008 - 05:00 PM
New Member


Joined: Apr 27, 2007
Posts: 2

Thank you for reply, I do it work using the PtCallbackInfo *cbinfo parameter, I do this:

int FindDay(PtWidget *widget, ApInfo *apinfo, PtCallbackInfo *cbinfo)
{
PtCalendarSelectCallback_t *calendar;
calendar = cbinfo->cbdata;

printf("year: %d - month: %d - day: %d", calendar->date.year, calendar->date.month+1, calendar->date.day+1);
flushall();

return(Pt_CONTINUE);
}

Again thank you for your time.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.