TitleEditor problem?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

TitleEditor problem?

Brennan Williams
Thought I should put this on the enthought-dev mailing list too.

Posisble bug in TitleEditor in Traits 4 with wx.

Two attachments have the error output (a.log) and an example bit of code
(enum_27.py) I thought at first it was Enum or DNDEditor as I thought it
was caused by style='simple' but it turns out it is my use of
TitleEditor. I use TitleEditor in a few views with the following syntax...

Item('blabla',show_label=False,editor=TitleEditor()),

where blabla is a Str() or a Property()

It is imported from traitsui.api

I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.

Regards

Brennan



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

a.log (2K) Download Attachment
enum_27.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Brennan Williams
I took a closer look at the error messages and I found that
traitsui\editors\title_editor.py in Traits 4 is quite different from
traits\ui\editors\title_editor.py in Traits 3.

I don't really have a good understanding of what is happening down at
this level but I changed line 44 from

         SimpleEditor = toolkit_object('title_editor:SimpleEditor')

to

         SimpleEditor = toolkit_object('title_editor:_TitleEditor')

thinking it might just be a typo as the Traits 3 code used something
similar.

Anyway it works.

I tested it on the TitleEditor_demo and that is now working correctly too.

Brennan

On 13/02/2012 2:22 p.m., Brennan Williams wrote:

> Thought I should put this on the enthought-dev mailing list too.
>
> Posisble bug in TitleEditor in Traits 4 with wx.
>
> Two attachments have the error output (a.log) and an example bit of
> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
> thought it was caused by style='simple' but it turns out it is my use
> of TitleEditor. I use TitleEditor in a few views with the following
> syntax...
>
> Item('blabla',show_label=False,editor=TitleEditor()),
>
> where blabla is a Str() or a Property()
>
> It is imported from traitsui.api
>
> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
>
> Regards
>
> Brennan
>
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Jonathan Rocher
Hey Brennan,

Thanks very much for reporting the issue and sorry for getting back to you
with so much delay! Indeed, it seems like the current code works well for
the qt backend but not for the wx. The right fix would be to implement the
simple editor in WX.

As an aside, as you know, we are progressively moving away from WX and
using QT/pyside. Let me mention to you that pyside has made huge progress
in the last year, some of which we are pushing for.

Again thanks for reporting.

Best,
Jonathan

On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams <
[hidden email]> wrote:

> I took a closer look at the error messages and I found that
> traitsui\editors\title_editor.py in Traits 4 is quite different from
> traits\ui\editors\title_editor.py in Traits 3.
>
> I don't really have a good understanding of what is happening down at
> this level but I changed line 44 from
>
>         SimpleEditor = toolkit_object('title_editor:SimpleEditor')
>
> to
>
>         SimpleEditor = toolkit_object('title_editor:_TitleEditor')
>
> thinking it might just be a typo as the Traits 3 code used something
> similar.
>
> Anyway it works.
>
> I tested it on the TitleEditor_demo and that is now working correctly too.
>
> Brennan
>
> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
> > Thought I should put this on the enthought-dev mailing list too.
> >
> > Posisble bug in TitleEditor in Traits 4 with wx.
> >
> > Two attachments have the error output (a.log) and an example bit of
> > code (enum_27.py) I thought at first it was Enum or DNDEditor as I
> > thought it was caused by style='simple' but it turns out it is my use
> > of TitleEditor. I use TitleEditor in a few views with the following
> > syntax...
> >
> > Item('blabla',show_label=False,editor=TitleEditor()),
> >
> > where blabla is a Str() or a Property()
> >
> > It is imported from traitsui.api
> >
> > I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
> >
> > Regards
> >
> > Brennan
> >
> >
> >
> >
> > _______________________________________________
> > Enthought-Dev mailing list
> > [hidden email]
> > https://mail.enthought.com/mailman/listinfo/enthought-dev
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Jonathan Rocher, PhD
Scientific software developer
Enthought, Inc.
[hidden email]
1-512-536-1057
http://www.enthought.com
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Brennan Williams
Jonathon,

Thanks for the reply. If you see my followup posting on Feb 14th
hopefully that is the correct fix to the problem.

I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
issues with it IIRC but I'll have another go and this time document any
issues properly.

Should I be using 'qt4' or something else... 'pyside' perhaps?

Regards

Brennan

On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:

> Hey Brennan,
>
> Thanks very much for reporting the issue and sorry for getting back to you
> with so much delay! Indeed, it seems like the current code works well for
> the qt backend but not for the wx. The right fix would be to implement the
> simple editor in WX.
>
> As an aside, as you know, we are progressively moving away from WX and
> using QT/pyside. Let me mention to you that pyside has made huge progress
> in the last year, some of which we are pushing for.
>
> Again thanks for reporting.
>
> Best,
> Jonathan
>
> On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
> [hidden email]>  wrote:
>
>> I took a closer look at the error messages and I found that
>> traitsui\editors\title_editor.py in Traits 4 is quite different from
>> traits\ui\editors\title_editor.py in Traits 3.
>>
>> I don't really have a good understanding of what is happening down at
>> this level but I changed line 44 from
>>
>>          SimpleEditor = toolkit_object('title_editor:SimpleEditor')
>>
>> to
>>
>>          SimpleEditor = toolkit_object('title_editor:_TitleEditor')
>>
>> thinking it might just be a typo as the Traits 3 code used something
>> similar.
>>
>> Anyway it works.
>>
>> I tested it on the TitleEditor_demo and that is now working correctly too.
>>
>> Brennan
>>
>> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
>>> Thought I should put this on the enthought-dev mailing list too.
>>>
>>> Posisble bug in TitleEditor in Traits 4 with wx.
>>>
>>> Two attachments have the error output (a.log) and an example bit of
>>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
>>> thought it was caused by style='simple' but it turns out it is my use
>>> of TitleEditor. I use TitleEditor in a few views with the following
>>> syntax...
>>>
>>> Item('blabla',show_label=False,editor=TitleEditor()),
>>>
>>> where blabla is a Str() or a Property()
>>>
>>> It is imported from traitsui.api
>>>
>>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
>>>
>>> Regards
>>>
>>> Brennan
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Enthought-Dev mailing list
>>> [hidden email]
>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>
>

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Jonathan March
Hi Brennan,

On Mon, Feb 27, 2012 at 6:14 PM, Brennan Williams <
[hidden email]> wrote:

> Jonathon,
>
> Thanks for the reply. If you see my followup posting on Feb 14th
> hopefully that is the correct fix to the problem.
>

Alas, that fix breaks the TitleEditor with QT, so it would take a bit more
work.

I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
> that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
> issues with it IIRC but I'll have another go and this time document any
> issues properly.
>
> Should I be using 'qt4' or something else... 'pyside' perhaps?
>

Yes, 'qt4' is correct. If you have pyside installed then ETS will default
to using pyside rather than pyqt.

You can install the latest, most stable version of pyside, currently
1.1.0-2, by using EPD's:
    enpkg pyside

hth,
Jonathan M

Regards

>
> Brennan
>
> On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:
> > Hey Brennan,
> >
> > Thanks very much for reporting the issue and sorry for getting back to
> you
> > with so much delay! Indeed, it seems like the current code works well for
> > the qt backend but not for the wx. The right fix would be to implement
> the
> > simple editor in WX.
> >
> > As an aside, as you know, we are progressively moving away from WX and
> > using QT/pyside. Let me mention to you that pyside has made huge progress
> > in the last year, some of which we are pushing for.
> >
> > Again thanks for reporting.
> >
> > Best,
> > Jonathan
> >
> > On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
> > [hidden email]>  wrote:
> >
> >> I took a closer look at the error messages and I found that
> >> traitsui\editors\title_editor.py in Traits 4 is quite different from
> >> traits\ui\editors\title_editor.py in Traits 3.
> >>
> >> I don't really have a good understanding of what is happening down at
> >> this level but I changed line 44 from
> >>
> >>          SimpleEditor = toolkit_object('title_editor:SimpleEditor')
> >>
> >> to
> >>
> >>          SimpleEditor = toolkit_object('title_editor:_TitleEditor')
> >>
> >> thinking it might just be a typo as the Traits 3 code used something
> >> similar.
> >>
> >> Anyway it works.
> >>
> >> I tested it on the TitleEditor_demo and that is now working correctly
> too.
> >>
> >> Brennan
> >>
> >> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
> >>> Thought I should put this on the enthought-dev mailing list too.
> >>>
> >>> Posisble bug in TitleEditor in Traits 4 with wx.
> >>>
> >>> Two attachments have the error output (a.log) and an example bit of
> >>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
> >>> thought it was caused by style='simple' but it turns out it is my use
> >>> of TitleEditor. I use TitleEditor in a few views with the following
> >>> syntax...
> >>>
> >>> Item('blabla',show_label=False,editor=TitleEditor()),
> >>>
> >>> where blabla is a Str() or a Property()
> >>>
> >>> It is imported from traitsui.api
> >>>
> >>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
> >>>
> >>> Regards
> >>>
> >>> Brennan
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Enthought-Dev mailing list
> >>> [hidden email]
> >>> https://mail.enthought.com/mailman/listinfo/enthought-dev
> >> _______________________________________________
> >> Enthought-Dev mailing list
> >> [hidden email]
> >> https://mail.enthought.com/mailman/listinfo/enthought-dev
> >>
> >
> >
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Brennan Williams
On 28/02/2012 1:34 p.m., Jonathan March wrote:

> Hi Brennan,
>
> On Mon, Feb 27, 2012 at 6:14 PM, Brennan Williams<
> [hidden email]>  wrote:
>
>> Jonathon,
>>
>> Thanks for the reply. If you see my followup posting on Feb 14th
>> hopefully that is the correct fix to the problem.
>>
> Alas, that fix breaks the TitleEditor with QT, so it would take a bit more
> work.
So have there been some major changes to the way SimpleEditor works
between Traits 3.x and 4.x? I've just posed about a Chaco problem with
ChacoPlotItem that look slike it might be something to do with a
SimpleEditor problem as well (but I'm not sure about that).

>
> I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
>> that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
>> issues with it IIRC but I'll have another go and this time document any
>> issues properly.
>>
>> Should I be using 'qt4' or something else... 'pyside' perhaps?
>>
> Yes, 'qt4' is correct. If you have pyside installed then ETS will default
> to using pyside rather than pyqt.
Sounds like I might be running into a few wx-specific problems so I will
try pyside today/tomorrow.

Brennan

>
> You can install the latest, most stable version of pyside, currently
> 1.1.0-2, by using EPD's:
>      enpkg pyside
>
> hth,
> Jonathan M
>
> Regards
>> Brennan
>>
>> On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:
>>> Hey Brennan,
>>>
>>> Thanks very much for reporting the issue and sorry for getting back to
>> you
>>> with so much delay! Indeed, it seems like the current code works well for
>>> the qt backend but not for the wx. The right fix would be to implement
>> the
>>> simple editor in WX.
>>>
>>> As an aside, as you know, we are progressively moving away from WX and
>>> using QT/pyside. Let me mention to you that pyside has made huge progress
>>> in the last year, some of which we are pushing for.
>>>
>>> Again thanks for reporting.
>>>
>>> Best,
>>> Jonathan
>>>
>>> On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
>>> [hidden email]>   wrote:
>>>
>>>> I took a closer look at the error messages and I found that
>>>> traitsui\editors\title_editor.py in Traits 4 is quite different from
>>>> traits\ui\editors\title_editor.py in Traits 3.
>>>>
>>>> I don't really have a good understanding of what is happening down at
>>>> this level but I changed line 44 from
>>>>
>>>>           SimpleEditor = toolkit_object('title_editor:SimpleEditor')
>>>>
>>>> to
>>>>
>>>>           SimpleEditor = toolkit_object('title_editor:_TitleEditor')
>>>>
>>>> thinking it might just be a typo as the Traits 3 code used something
>>>> similar.
>>>>
>>>> Anyway it works.
>>>>
>>>> I tested it on the TitleEditor_demo and that is now working correctly
>> too.
>>>> Brennan
>>>>
>>>> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
>>>>> Thought I should put this on the enthought-dev mailing list too.
>>>>>
>>>>> Posisble bug in TitleEditor in Traits 4 with wx.
>>>>>
>>>>> Two attachments have the error output (a.log) and an example bit of
>>>>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
>>>>> thought it was caused by style='simple' but it turns out it is my use
>>>>> of TitleEditor. I use TitleEditor in a few views with the following
>>>>> syntax...
>>>>>
>>>>> Item('blabla',show_label=False,editor=TitleEditor()),
>>>>>
>>>>> where blabla is a Str() or a Property()
>>>>>
>>>>> It is imported from traitsui.api
>>>>>
>>>>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
>>>>>
>>>>> Regards
>>>>>
>>>>> Brennan
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Enthought-Dev mailing list
>>>>> [hidden email]
>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>> _______________________________________________
>>>> Enthought-Dev mailing list
>>>> [hidden email]
>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>
>>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem?

Jonathan Rocher
One additional note: pyqt is still the most stable guy so when we test
things with QT, we test first with pyqt (better error handling and
management), and then if it works, test with pyside. Just in case you don't
know, to use QT, specify ETS_TOOLKIT = 'qt4', and then to choose between
pyqt an pyside if both are installed, the QT_API environment variable is to
be used: QT_API = "pyside" or "pyqt".

Best,
Jonathan R

On Mon, Feb 27, 2012 at 7:15 PM, Brennan Williams <
[hidden email]> wrote:

> On 28/02/2012 1:34 p.m., Jonathan March wrote:
> > Hi Brennan,
> >
> > On Mon, Feb 27, 2012 at 6:14 PM, Brennan Williams<
> > [hidden email]>  wrote:
> >
> >> Jonathon,
> >>
> >> Thanks for the reply. If you see my followup posting on Feb 14th
> >> hopefully that is the correct fix to the problem.
> >>
> > Alas, that fix breaks the TitleEditor with QT, so it would take a bit
> more
> > work.
> So have there been some major changes to the way SimpleEditor works
> between Traits 3.x and 4.x? I've just posed about a Chaco problem with
> ChacoPlotItem that look slike it might be something to do with a
> SimpleEditor problem as well (but I'm not sure about that).
>
> >
> > I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
> >> that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
> >> issues with it IIRC but I'll have another go and this time document any
> >> issues properly.
> >>
> >> Should I be using 'qt4' or something else... 'pyside' perhaps?
> >>
> > Yes, 'qt4' is correct. If you have pyside installed then ETS will default
> > to using pyside rather than pyqt.
> Sounds like I might be running into a few wx-specific problems so I will
> try pyside today/tomorrow.
>
> Brennan
> >
> > You can install the latest, most stable version of pyside, currently
> > 1.1.0-2, by using EPD's:
> >      enpkg pyside
> >
> > hth,
> > Jonathan M
> >
> > Regards
> >> Brennan
> >>
> >> On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:
> >>> Hey Brennan,
> >>>
> >>> Thanks very much for reporting the issue and sorry for getting back to
> >> you
> >>> with so much delay! Indeed, it seems like the current code works well
> for
> >>> the qt backend but not for the wx. The right fix would be to implement
> >> the
> >>> simple editor in WX.
> >>>
> >>> As an aside, as you know, we are progressively moving away from WX and
> >>> using QT/pyside. Let me mention to you that pyside has made huge
> progress
> >>> in the last year, some of which we are pushing for.
> >>>
> >>> Again thanks for reporting.
> >>>
> >>> Best,
> >>> Jonathan
> >>>
> >>> On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
> >>> [hidden email]>   wrote:
> >>>
> >>>> I took a closer look at the error messages and I found that
> >>>> traitsui\editors\title_editor.py in Traits 4 is quite different from
> >>>> traits\ui\editors\title_editor.py in Traits 3.
> >>>>
> >>>> I don't really have a good understanding of what is happening down at
> >>>> this level but I changed line 44 from
> >>>>
> >>>>           SimpleEditor = toolkit_object('title_editor:SimpleEditor')
> >>>>
> >>>> to
> >>>>
> >>>>           SimpleEditor = toolkit_object('title_editor:_TitleEditor')
> >>>>
> >>>> thinking it might just be a typo as the Traits 3 code used something
> >>>> similar.
> >>>>
> >>>> Anyway it works.
> >>>>
> >>>> I tested it on the TitleEditor_demo and that is now working correctly
> >> too.
> >>>> Brennan
> >>>>
> >>>> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
> >>>>> Thought I should put this on the enthought-dev mailing list too.
> >>>>>
> >>>>> Posisble bug in TitleEditor in Traits 4 with wx.
> >>>>>
> >>>>> Two attachments have the error output (a.log) and an example bit of
> >>>>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
> >>>>> thought it was caused by style='simple' but it turns out it is my use
> >>>>> of TitleEditor. I use TitleEditor in a few views with the following
> >>>>> syntax...
> >>>>>
> >>>>> Item('blabla',show_label=False,editor=TitleEditor()),
> >>>>>
> >>>>> where blabla is a Str() or a Property()
> >>>>>
> >>>>> It is imported from traitsui.api
> >>>>>
> >>>>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
> >>>>>
> >>>>> Regards
> >>>>>
> >>>>> Brennan
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Enthought-Dev mailing list
> >>>>> [hidden email]
> >>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
> >>>> _______________________________________________
> >>>> Enthought-Dev mailing list
> >>>> [hidden email]
> >>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
> >>>>
> >>>
> >> _______________________________________________
> >> Enthought-Dev mailing list
> >> [hidden email]
> >> https://mail.enthought.com/mailman/listinfo/enthought-dev
> >>
> > _______________________________________________
> > Enthought-Dev mailing list
> > [hidden email]
> > https://mail.enthought.com/mailman/listinfo/enthought-dev
> >
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Jonathan Rocher, PhD
Scientific software developer
Enthought, Inc.
[hidden email]
1-512-536-1057
http://www.enthought.com
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem? - wx vs Qt

Brennan Williams
On 29/02/2012 4:55 a.m., Jonathan Rocher wrote:
> One additional note: pyqt is still the most stable guy so when we test
> things with QT, we test first with pyqt (better error handling and
> management), and then if it works, test with pyside. Just in case you don't
> know, to use QT, specify ETS_TOOLKIT = 'qt4', and then to choose between
> pyqt an pyside if both are installed, the QT_API environment variable is to
> be used: QT_API = "pyside" or "pyqt".
I'm on Windows 7 so do you mean I should set an environment variable
ETS_TOOLKIT via Control Panel or something else?

Previously I've had something like...

from traits.etsconfig.api import ETSConfig
ETSConfig.toolkit='qt4'
# ETSConfig.toolkit='wx'

in my code but I'm not 100% sure that is working as I'm using a
CustomTreeEditor module (Klaus Zimmerman) which is wx-based and that is
still working so I must still be under wx.

What's the bets way to check what frontend I'm definitely using?

BTW Klaus's CustomTreeEditor is very useful - it is basically TreeEditor
with the ability to check/uncheck nodes in the tree - I'm using it a lot
but have no idea about making it work under Qt.

Brennan

> Best,
> Jonathan R
>
> On Mon, Feb 27, 2012 at 7:15 PM, Brennan Williams<
> [hidden email]>  wrote:
>
>> On 28/02/2012 1:34 p.m., Jonathan March wrote:
>>> Hi Brennan,
>>>
>>> On Mon, Feb 27, 2012 at 6:14 PM, Brennan Williams<
>>> [hidden email]>   wrote:
>>>
>>>> Jonathon,
>>>>
>>>> Thanks for the reply. If you see my followup posting on Feb 14th
>>>> hopefully that is the correct fix to the problem.
>>>>
>>> Alas, that fix breaks the TitleEditor with QT, so it would take a bit
>> more
>>> work.
>> So have there been some major changes to the way SimpleEditor works
>> between Traits 3.x and 4.x? I've just posed about a Chaco problem with
>> ChacoPlotItem that look slike it might be something to do with a
>> SimpleEditor problem as well (but I'm not sure about that).
>>
>>> I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
>>>> that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
>>>> issues with it IIRC but I'll have another go and this time document any
>>>> issues properly.
>>>>
>>>> Should I be using 'qt4' or something else... 'pyside' perhaps?
>>>>
>>> Yes, 'qt4' is correct. If you have pyside installed then ETS will default
>>> to using pyside rather than pyqt.
>> Sounds like I might be running into a few wx-specific problems so I will
>> try pyside today/tomorrow.
>>
>> Brennan
>>> You can install the latest, most stable version of pyside, currently
>>> 1.1.0-2, by using EPD's:
>>>       enpkg pyside
>>>
>>> hth,
>>> Jonathan M
>>>
>>> Regards
>>>> Brennan
>>>>
>>>> On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:
>>>>> Hey Brennan,
>>>>>
>>>>> Thanks very much for reporting the issue and sorry for getting back to
>>>> you
>>>>> with so much delay! Indeed, it seems like the current code works well
>> for
>>>>> the qt backend but not for the wx. The right fix would be to implement
>>>> the
>>>>> simple editor in WX.
>>>>>
>>>>> As an aside, as you know, we are progressively moving away from WX and
>>>>> using QT/pyside. Let me mention to you that pyside has made huge
>> progress
>>>>> in the last year, some of which we are pushing for.
>>>>>
>>>>> Again thanks for reporting.
>>>>>
>>>>> Best,
>>>>> Jonathan
>>>>>
>>>>> On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
>>>>> [hidden email]>    wrote:
>>>>>
>>>>>> I took a closer look at the error messages and I found that
>>>>>> traitsui\editors\title_editor.py in Traits 4 is quite different from
>>>>>> traits\ui\editors\title_editor.py in Traits 3.
>>>>>>
>>>>>> I don't really have a good understanding of what is happening down at
>>>>>> this level but I changed line 44 from
>>>>>>
>>>>>>            SimpleEditor = toolkit_object('title_editor:SimpleEditor')
>>>>>>
>>>>>> to
>>>>>>
>>>>>>            SimpleEditor = toolkit_object('title_editor:_TitleEditor')
>>>>>>
>>>>>> thinking it might just be a typo as the Traits 3 code used something
>>>>>> similar.
>>>>>>
>>>>>> Anyway it works.
>>>>>>
>>>>>> I tested it on the TitleEditor_demo and that is now working correctly
>>>> too.
>>>>>> Brennan
>>>>>>
>>>>>> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
>>>>>>> Thought I should put this on the enthought-dev mailing list too.
>>>>>>>
>>>>>>> Posisble bug in TitleEditor in Traits 4 with wx.
>>>>>>>
>>>>>>> Two attachments have the error output (a.log) and an example bit of
>>>>>>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
>>>>>>> thought it was caused by style='simple' but it turns out it is my use
>>>>>>> of TitleEditor. I use TitleEditor in a few views with the following
>>>>>>> syntax...
>>>>>>>
>>>>>>> Item('blabla',show_label=False,editor=TitleEditor()),
>>>>>>>
>>>>>>> where blabla is a Str() or a Property()
>>>>>>>
>>>>>>> It is imported from traitsui.api
>>>>>>>
>>>>>>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Brennan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Enthought-Dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>>> _______________________________________________
>>>>>> Enthought-Dev mailing list
>>>>>> [hidden email]
>>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>>>
>>>> _______________________________________________
>>>> Enthought-Dev mailing list
>>>> [hidden email]
>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>
>>> _______________________________________________
>>> Enthought-Dev mailing list
>>> [hidden email]
>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>
>

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: TitleEditor problem? - wx vs Qt

Brennan Williams
On 29/02/2012 12:50 p.m., Brennan Williams wrote:

> On 29/02/2012 4:55 a.m., Jonathan Rocher wrote:
>> One additional note: pyqt is still the most stable guy so when we test
>> things with QT, we test first with pyqt (better error handling and
>> management), and then if it works, test with pyside. Just in case you don't
>> know, to use QT, specify ETS_TOOLKIT = 'qt4', and then to choose between
>> pyqt an pyside if both are installed, the QT_API environment variable is to
>> be used: QT_API = "pyside" or "pyqt".
> I'm on Windows 7 so do you mean I should set an environment variable
> ETS_TOOLKIT via Control Panel or something else?
>
> Previously I've had something like...
>
> from traits.etsconfig.api import ETSConfig
> ETSConfig.toolkit='qt4'
> # ETSConfig.toolkit='wx'
>
> in my code but I'm not 100% sure that is working as I'm using a
> CustomTreeEditor module (Klaus Zimmerman) which is wx-based and that is
> still working so I must still be under wx.
OK sorted out my toolkit setting ok. tried -toolkit='qt4' as a command
line option which worked and I'm not sure why but now the
ETSConfig.toolkit='qt4' line in my app is working as well.

So I get an error (as expected) when I try and import CustomTreeEditor
which is wx-based. It looks like the Qt verison of TreeEditor uses
QTreeWidget or QTreeWidgetItem and it looks like that has an optional
checkbox.

Brennan


> What's the bets way to check what frontend I'm definitely using?
>
> BTW Klaus's CustomTreeEditor is very useful - it is basically TreeEditor
> with the ability to check/uncheck nodes in the tree - I'm using it a lot
> but have no idea about making it work under Qt.
>
> Brennan
>
>> Best,
>> Jonathan R
>>
>> On Mon, Feb 27, 2012 at 7:15 PM, Brennan Williams<
>> [hidden email]>   wrote:
>>
>>> On 28/02/2012 1:34 p.m., Jonathan March wrote:
>>>> Hi Brennan,
>>>>
>>>> On Mon, Feb 27, 2012 at 6:14 PM, Brennan Williams<
>>>> [hidden email]>    wrote:
>>>>
>>>>> Jonathon,
>>>>>
>>>>> Thanks for the reply. If you see my followup posting on Feb 14th
>>>>> hopefully that is the correct fix to the problem.
>>>>>
>>>> Alas, that fix breaks the TitleEditor with QT, so it would take a bit
>>> more
>>>> work.
>>> So have there been some major changes to the way SimpleEditor works
>>> between Traits 3.x and 4.x? I've just posed about a Chaco problem with
>>> ChacoPlotItem that look slike it might be something to do with a
>>> SimpleEditor problem as well (but I'm not sure about that).
>>>
>>>> I have tried out the Qt interface using ETSConfig.toolkit='qt4'. Now
>>>>> that I've moved to ETS 4 (via EPD 7.2) I'll try it again. I had a few
>>>>> issues with it IIRC but I'll have another go and this time document any
>>>>> issues properly.
>>>>>
>>>>> Should I be using 'qt4' or something else... 'pyside' perhaps?
>>>>>
>>>> Yes, 'qt4' is correct. If you have pyside installed then ETS will default
>>>> to using pyside rather than pyqt.
>>> Sounds like I might be running into a few wx-specific problems so I will
>>> try pyside today/tomorrow.
>>>
>>> Brennan
>>>> You can install the latest, most stable version of pyside, currently
>>>> 1.1.0-2, by using EPD's:
>>>>        enpkg pyside
>>>>
>>>> hth,
>>>> Jonathan M
>>>>
>>>> Regards
>>>>> Brennan
>>>>>
>>>>> On 28/02/2012 12:53 p.m., Jonathan Rocher wrote:
>>>>>> Hey Brennan,
>>>>>>
>>>>>> Thanks very much for reporting the issue and sorry for getting back to
>>>>> you
>>>>>> with so much delay! Indeed, it seems like the current code works well
>>> for
>>>>>> the qt backend but not for the wx. The right fix would be to implement
>>>>> the
>>>>>> simple editor in WX.
>>>>>>
>>>>>> As an aside, as you know, we are progressively moving away from WX and
>>>>>> using QT/pyside. Let me mention to you that pyside has made huge
>>> progress
>>>>>> in the last year, some of which we are pushing for.
>>>>>>
>>>>>> Again thanks for reporting.
>>>>>>
>>>>>> Best,
>>>>>> Jonathan
>>>>>>
>>>>>> On Mon, Feb 13, 2012 at 7:09 PM, Brennan Williams<
>>>>>> [hidden email]>     wrote:
>>>>>>
>>>>>>> I took a closer look at the error messages and I found that
>>>>>>> traitsui\editors\title_editor.py in Traits 4 is quite different from
>>>>>>> traits\ui\editors\title_editor.py in Traits 3.
>>>>>>>
>>>>>>> I don't really have a good understanding of what is happening down at
>>>>>>> this level but I changed line 44 from
>>>>>>>
>>>>>>>             SimpleEditor = toolkit_object('title_editor:SimpleEditor')
>>>>>>>
>>>>>>> to
>>>>>>>
>>>>>>>             SimpleEditor = toolkit_object('title_editor:_TitleEditor')
>>>>>>>
>>>>>>> thinking it might just be a typo as the Traits 3 code used something
>>>>>>> similar.
>>>>>>>
>>>>>>> Anyway it works.
>>>>>>>
>>>>>>> I tested it on the TitleEditor_demo and that is now working correctly
>>>>> too.
>>>>>>> Brennan
>>>>>>>
>>>>>>> On 13/02/2012 2:22 p.m., Brennan Williams wrote:
>>>>>>>> Thought I should put this on the enthought-dev mailing list too.
>>>>>>>>
>>>>>>>> Posisble bug in TitleEditor in Traits 4 with wx.
>>>>>>>>
>>>>>>>> Two attachments have the error output (a.log) and an example bit of
>>>>>>>> code (enum_27.py) I thought at first it was Enum or DNDEditor as I
>>>>>>>> thought it was caused by style='simple' but it turns out it is my use
>>>>>>>> of TitleEditor. I use TitleEditor in a few views with the following
>>>>>>>> syntax...
>>>>>>>>
>>>>>>>> Item('blabla',show_label=False,editor=TitleEditor()),
>>>>>>>>
>>>>>>>> where blabla is a Str() or a Property()
>>>>>>>>
>>>>>>>> It is imported from traitsui.api
>>>>>>>>
>>>>>>>> I'm on Windows 7 32-bit using EPD 7.2.2 and using wx.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Brennan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Enthought-Dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>>>> _______________________________________________
>>>>>>> Enthought-Dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>>>>
>>>>> _______________________________________________
>>>>> Enthought-Dev mailing list
>>>>> [hidden email]
>>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>>
>>>> _______________________________________________
>>>> Enthought-Dev mailing list
>>>> [hidden email]
>>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>>
>>> _______________________________________________
>>> Enthought-Dev mailing list
>>> [hidden email]
>>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>>
>>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev