[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: Julien Olivier
Subject: RE: [Pyatcron-devel-list] Task list in the main window
Date: Wed, 12 Nov 2003 19:20:42 +0000

> 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.  I
> basically created a class with some of the functions that were in the
> original class and then call those.  This morning I realized that I need
> (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 night).
> So I need to redo the class, but I am going to hold off until we get it
> 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, with
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, so
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 for
> 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 class.
When the Task object is modified, you should simply refresh everything
using the Mainwin class' update functions.

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

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>

Attachment: pyatcron.tgz
Description: application/compressed-tar

reply via email to

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