Jerome Laheurte | 16 Aug 09:51
Favicon

Column identity


Hi, Frank. I was implementing the 'Notes column' in the task viewer 
when, after seeing some strange behaviour, I realized that in 
itemctrl.py, columns are actually identified using their header 
instead of name (see for instance Column.__eq__).

Is there a good reason for that ? Obviously, when two columns have the 
same header (say, 'Notes' and 'Attachments' having header ''), strange 
things happen...

Cheers
Jérôme
------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/taskcoach-dev/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/taskcoach-dev/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:taskcoach-dev-digest@... 
    mailto:taskcoach-dev-fullfeatured@...

(Continue reading)

Frank Niessink | 16 Aug 13:00

Re: Column identity

Hi Jérôme,

2008/8/16 Jerome Laheurte <fraca7@...>:
>
> Hi, Frank. I was implementing the 'Notes column' in the task viewer
> when, after seeing some strange behaviour, I realized that in
> itemctrl.py, columns are actually identified using their header
> instead of name (see for instance Column.__eq__).
>
> Is there a good reason for that ? Obviously, when two columns have the
> same header (say, 'Notes' and 'Attachments' having header ''), strange
> things happen...

I have been looking into this as well a couple of days ago. I changed
Column.__eq__ to use column.name() instead of column.header(), but I
kept running in different kinds of problems and didn't commit those
changes. For example, in
_BaseCtrlWithColumns._getColumnIndex(columnHeader) looks up the column
index by using the column header. That won't work either when having
two columns with the same header (''). _CtrlWithHideableColumns
overrides _getColumnIndex, so that one needs to be changed too. So,
it's not a one line change. On the other hand, it doesn't look too
difficult to make _getColumnIndex use column.name() instead of
column.header(), so please go ahead.

Cheers, Frank

------------------------------------

Yahoo! Groups Links
(Continue reading)

Jerome Laheurte | 16 Aug 13:06
Favicon

Re: Column identity

On Sat, 16 Aug 2008, Frank Niessink wrote:

> Hi Jérôme,
>
> 2008/8/16 Jerome Laheurte <fraca7@...>:
>>
>> Hi, Frank. I was implementing the 'Notes column' in the task viewer
>> when, after seeing some strange behaviour, I realized that in
>> itemctrl.py, columns are actually identified using their header
>> instead of name (see for instance Column.__eq__).
>>
>> Is there a good reason for that ? Obviously, when two columns have the
>> same header (say, 'Notes' and 'Attachments' having header ''), strange
>> things happen...
>
> I have been looking into this as well a couple of days ago. I changed
> Column.__eq__ to use column.name() instead of column.header(), but I
> kept running in different kinds of problems and didn't commit those
> changes. For example, in
> _BaseCtrlWithColumns._getColumnIndex(columnHeader) looks up the column
> index by using the column header. That won't work either when having
> two columns with the same header (''). _CtrlWithHideableColumns
> overrides _getColumnIndex, so that one needs to be changed too. So,
> it's not a one line change. On the other hand, it doesn't look too
> difficult to make _getColumnIndex use column.name() instead of
> column.header(), so please go ahead.

Yeah, I saw there were several instances of this. I'll try to 
factorize this (after all, couldn't all methods use the overriden 
__eq__ operator ?).
(Continue reading)

Frank Niessink | 16 Aug 15:15

Re: Column identity

2008/8/16 Jerome Laheurte <fraca7@...>:
> Yeah, I saw there were several instances of this. I'll try to
> factorize this (after all, couldn't all methods use the overriden
> __eq__ operator ?).

Indeed, that was exactly what I was trying to do when I painted myself
in a corner. Probably because I was making too many changes at the
same time.

Cheers, Frank

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/taskcoach-dev/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/taskcoach-dev/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:taskcoach-dev-digest@... 
    mailto:taskcoach-dev-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
(Continue reading)

Jerome Laheurte | 16 Aug 15:33
Favicon

Re: Column identity

On Sat, 16 Aug 2008, Frank Niessink wrote:

> 2008/8/16 Jerome Laheurte <fraca7@...>:

>> Yeah, I saw there were several instances of this. I'll try to
>> factorize this (after all, couldn't all methods use the overriden
>> __eq__ operator ?).
>
> Indeed, that was exactly what I was trying to do when I painted myself
> in a corner. Probably because I was making too many changes at the
> same time.

Okay, I'll give it a try tomorrow, too much to do today :)

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/taskcoach-dev/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/taskcoach-dev/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:taskcoach-dev-digest@... 
(Continue reading)


Gmane