[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Pyatcron-devel-list] Task list in the main window

From: Childers, Matthew
Subject: RE: [Pyatcron-devel-list] Task list in the main window
Date: Wed, 12 Nov 2003 14:47:20 -0600

> -----Original Message-----
> From: Julien Olivier [mailto:address@hidden
> Sent: Wednesday, November 12, 2003 1:21 PM
> To: address@hidden
> Subject: RE: [Pyatcron-devel-list] Task list in the main window
> > Lets just say I understood the concept of creating a extensible
> > interface.  After that, it's greek to me.  ;-)
> >
> That's the most important. None of us really know how to implement it
> anyway. We have ideas though.
> > I worked a little on the PyAtCronTask class last night, and got the
> > activate/deactivate and delete working.  However, when I was doing
it I
> > really didn't have a clue what I was doing implementing the class.
> > basically created a class with some of the functions that were in
> > original class and then call those.  This morning I realized that I
> > (I believe) to create a class that is basically a Task Object, that
> > holds the information for each task (I wasn't thinking OO last
> > So I need to redo the class, but I am going to hold off until we get
> > defined like Xavier was talking about this morning.
> >
> Well, sorry for not having explained it better but, yes, what you have
> to do is create a PyAtCronTask which will represent a generic task,
> generic properties. Then, I think we'll have to create su-classes for
> each type of class (the plugins).
> Then, you have to add a property to the PyAtCronMainwindow to hold the
> list of tasks.
> And I agree that it might be better to start working on good basis. So
> it's OK to wait for Xavier's ideas. However, you're free to start
> thinking of the way you'd like to implement it, and send us a draft,
> that we can comment it and make it (maybe) better.
> > I am going to go ahead and attach what I did, just so you can see
how I
> > dealt with the taskList, removing and updating the rows.  But NOT
> > the PyAtCronTask class I created, just ignore that totally.  :)
> >
> Well, as you said, it works, but it's not implemented the right way.
> Basically, what you created is a a TaskList class, not a Task class.
> More over, all the UI stuff should stay out of the Task/TaskList
> When the Task object is modified, you should simply refresh everything
> using the Mainwin class' update functions.

Right.  For a Task class would we have all the information defining the
task.  Last night I kept thinking, I wonder if python has something
similar to a C structure.  Then this morning I realized, oh yeah, all I
need to do is make a class.  :)  Now that I'm thinking on the right
level, these are my thoughts:

First we have a PyAtCronTask class that contains all the Task
attributes, like the following:
        o Task Name
        o Task Type - Separate class 
        o Schedule - Separate class
        o Status - Active/Inactive
        o (any others? This is all I can think of right off hand)

The task type would be a class that I guess will be dynamically loaded.
Is that what we decided?

Then the PyAtCronTaskSchedule class would hold all the minutes, hours,
days, etc that the task would run.

Does this make sense?  Any comments?

> Anyway, at least now you know how to add/remove/activate/inactivate
> tasks. Just a not though: when you activate/deactivate a task, you
> to refresh the status of the toolbar/mainmenu buttons by calling
> updateCurrentTask ().

Oh yeah, I did forget that.

> I attached the latest version of my work. It has a better
> updateCurrentTask (), which keeps the cursor in the same position.
> --
> Julien Olivier <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]