Thread: Hiding Schedules/Step tabs while creating a new pgAgent job
Hi,
When creating a new job, if one directly clicks on the Schedules tab and tries to add one, then the date picker does not work. I was trying to see why this is so for quite a while. Then I realized that adding a schedule or a step before the job has been actually created does not make sense.
However the confusion arises from the fact that when we want to create a new job, the other tabs are clickable and one can get confused because of this. A way to fix this would to hide or freeze the other tabs while creating the job for the first time.
In dlgJob::Go, I do see some code which tries to do this when the job is being created:
btnChangeStep->Hide();
btnChangeSchedule->Hide();
However the above does not seem to be working :(
Any idea what could be the reason?
Regards,
Nikhils
When creating a new job, if one directly clicks on the Schedules tab and tries to add one, then the date picker does not work. I was trying to see why this is so for quite a while. Then I realized that adding a schedule or a step before the job has been actually created does not make sense.
However the confusion arises from the fact that when we want to create a new job, the other tabs are clickable and one can get confused because of this. A way to fix this would to hide or freeze the other tabs while creating the job for the first time.
In dlgJob::Go, I do see some code which tries to do this when the job is being created:
btnChangeStep->Hide();
btnChangeSchedule->Hide();
However the above does not seem to be working :(
Any idea what could be the reason?
Regards,
Nikhils
On Sun, Feb 6, 2011 at 11:31 AM, Nikhil S <nixmisc@gmail.com> wrote: > Hi, > > When creating a new job, if one directly clicks on the Schedules tab and > tries to add one, then the date picker does not work. I was trying to see > why this is so for quite a while. Then I realized that adding a schedule or > a step before the job has been actually created does not make sense. Yes it does - the dialogue will create the job and all the steps and schedules in one go, when you hit OK on the job dialogue. > However the confusion arises from the fact that when we want to create a new > job, the other tabs are clickable and one can get confused because of this. > A way to fix this would to hide or freeze the other tabs while creating the > job for the first time. > > In dlgJob::Go, I do see some code which tries to do this when the job is > being created: > > btnChangeStep->Hide(); > btnChangeSchedule->Hide(); > > However the above does not seem to be working :( > Any idea what could be the reason? Can you see the *Change* button? When you're creating the job, you can only add or remove new schedules/steps. You can only change ones on pre-existing jobs. In new job mode, only the Add and Remove buttons are shown. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
>
Oh, then there is a major issue with schedules in git head. The dlgJob::OnAddSchedule passes a NULL pgaSchedule node to schedules being newly created. Because of this the calendar that is being used for the date picker remains frozen. Looks like the dlgSchedule::Go function needs to do much more for the creation call in terms of setting things up for the date picker. But I am no wxCalendar expert...
> When creating a new job, if one directly clicks on the Schedules tab andYes it does - the dialogue will create the job and all the steps and
> tries to add one, then the date picker does not work. I was trying to see
> why this is so for quite a while. Then I realized that adding a schedule or
> a step before the job has been actually created does not make sense.
schedules in one go, when you hit OK on the job dialogue.
Oh, then there is a major issue with schedules in git head. The dlgJob::OnAddSchedule passes a NULL pgaSchedule node to schedules being newly created. Because of this the calendar that is being used for the date picker remains frozen. Looks like the dlgSchedule::Go function needs to do much more for the creation call in terms of setting things up for the date picker. But I am no wxCalendar expert...
>Can you see the *Change* button? When you're creating the job, you can
> In dlgJob::Go, I do see some code which tries to do this when the job is
> being created:
>
> btnChangeStep->Hide();
> btnChangeSchedule->Hide();
>
> However the above does not seem to be working :(
> Any idea what could be the reason?
only add or remove new schedules/steps. You can only change ones on
pre-existing jobs. In new job mode, only the Add and Remove buttons
are shown.
Oh ok. These are "Change" buttons. So no, I do not seem them for new jobs.
Regards,
Nikhils
Regards,
Nikhils
On Mon, Feb 7, 2011 at 7:45 AM, Nikhil S <nixmisc@gmail.com> wrote: >> >> >> > When creating a new job, if one directly clicks on the Schedules tab and >> > tries to add one, then the date picker does not work. I was trying to >> > see >> > why this is so for quite a while. Then I realized that adding a schedule >> > or >> > a step before the job has been actually created does not make sense. >> >> Yes it does - the dialogue will create the job and all the steps and >> schedules in one go, when you hit OK on the job dialogue. >> > > Oh, then there is a major issue with schedules in git head. The > dlgJob::OnAddSchedule passes a NULL pgaSchedule node to schedules being > newly created. Because of this the calendar that is being used for the date > picker remains frozen. Looks like the dlgSchedule::Go function needs to do > much more for the creation call in terms of setting things up for the date > picker. But I am no wxCalendar expert... I guess it's only a problem on some Linux versions - It's fine for me on Mac, and was working when I last looked at this reported issue on Linux. Should be an easy fix though - just set the values to something acceptable in Go() (noting that "no value" should be an option. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company