[OGo-Developer] print view for task lists

Sebastian Reitenbach developer@opengroupware.org
Wed, 15 Nov 2006 10:25:09 -0000


Hi Helge,

developer@opengroupware.org wrote: 
> On Nov 14, 2006, at 12:13, Sebastian Reitenbach wrote:
> >> Proper thing to do would be to create a superclass instead of a
> >> subclass to share the code.
> >
> > just to make sure I got it right:
> > ok, so creating a LSWPrintJobs class, which inherits from  
> > LSWContentPage, and
> > LSWJobs will inherit from LSWPrintJobs.
> >
> > then when pushing the print button, the LSWPrintJobs class is  
> > called, and when entering the tasks list from the dock menu,  
> > LSWJobs is called, so it stays as it is.
> 
> Something like this, as mentioned I haven't looked at the code in  
> detail.
> 
> The important thing is that the superclass doesn't do the singleton  
> magic in the -init method so that every invocation gets its own  
> instance.

thanks, that was it, indeed. I created a superclass for LSWJobs, called 
LSWPrintJobs. In LSWPrintJobs everything is defined, and LSWJobs is more or 
less empty. It is working now, but I am not perfectly sure what I did to the 
singleton ;) I'll make a new patch ready in the evening, and will upload the 
new version.

kind regards
Sebastian