Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Jeff Hoogland
That does the trick. Good suggestion.

On Mon, Dec 5, 2016 at 12:58 PM, Stephen Houston 
wrote:

> Why not use the selected callback ?
>
> On Mon, Dec 5, 2016, 10:34 AM Jeff Hoogland 
> wrote:
>
> > Anything I can do to help pin this down? As I mentioned this worked as
> > expected with EFL 1.15
> >
> > On Dec 5, 2016 9:26 AM, "Kai Huuhko"  wrote:
> >
> > > I'm guessing the "selected" function inside toolbar code is being
> > > called **after** the "clicked" callback is processed, so what you get
> > > is the item being still unselected when your callback is called and
> > > therefore setting it unselected does nothing. But this needs
> > > verification.
> > >
> > > 2016-12-05 16:40 GMT+02:00 Jeff Hoogland :
> > > > That change makes item appear as a proper toolbar item object (and
> gets
> > > rid
> > > > of the error message) but item.selected_set(False) is still failing
> to
> > > > unselect the item that is clicked on.
> > > >
> > > > On Mon, Dec 5, 2016 at 2:21 AM, Kai Huuhko 
> > wrote:
> > > >
> > > >> This looks like an issue in EFL, possibly fallout from moving to
> > > >> Eo/EFL events. The callback is being processed before selected item
> is
> > > >> changed, so you get None (NULL in C) when
> > > >> elm_toolbar_item_selected_get() is called within the callback.
> > > >>
> > > >> The item object should be passed to clicked callback as an argument,
> > > >> can you check if that's None as well? Change line 1174 to
> > > >>
> > > >> def itemClicked(self, obj, item):
> > > >>
> > > >> and remove line 1175.
> > > >>
> > > >>
> > > >> 2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
> > > >> > Source code: https://github.com/JeffHoogland/ePad/blob/master/
> > > epad#L1176
> > > >> >
> > > >> > Under EFL 1.15 this code worked fine. It essentially toggled of a
> > > toolbar
> > > >> > button after it was clicked so long as it was not a dropdown menu.
> > > >> >
> > > >> > Under EFL 1.18 however the item_selected_get function keeps
> > returning
> > > a
> > > >> > none type:
> > > >> >
> > > >> > jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
> > > >> > Traceback (most recent call last):
> > > >> >   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
> > > >> > efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
> > > >> >   File "./epad", line 1176, in itemClicked
> > > >> > if item.menu_get() is None and item.selected_get():
> > > >> > AttributeError: 'NoneType' object has no attribute 'menu_get'
> > > >> >
> > > >> > Any ideas why this is? What can I do to get this code block to
> work
> > as
> > > >> > intended under EFL 1.18? Using the EFL 1.18.3 release with python
> > EFL
> > > >> > 1.18.0 release tar.
> > > >> >
> > > >> > Thanks!
> > > >> > --
> > > >> > ~Jeff Hoogland 
> > > >> > My Projects on GitHub 
> > > >> > 
> > > >> --
> > > >> > ___
> > > >> > enlightenment-devel mailing list
> > > >> > enlightenment-devel@lists.sourceforge.net
> > > >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >>
> > > >> 
> > > >> --
> > > >> ___
> > > >> enlightenment-devel mailing list
> > > >> enlightenment-devel@lists.sourceforge.net
> > > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > ~Jeff Hoogland 
> > > > My Projects on GitHub 
> > > > 
> > > --
> > > > ___
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> > > 
> > > --
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
> >
> > 
> --
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> 

Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Stephen Houston
Why not use the selected callback ?

On Mon, Dec 5, 2016, 10:34 AM Jeff Hoogland  wrote:

> Anything I can do to help pin this down? As I mentioned this worked as
> expected with EFL 1.15
>
> On Dec 5, 2016 9:26 AM, "Kai Huuhko"  wrote:
>
> > I'm guessing the "selected" function inside toolbar code is being
> > called **after** the "clicked" callback is processed, so what you get
> > is the item being still unselected when your callback is called and
> > therefore setting it unselected does nothing. But this needs
> > verification.
> >
> > 2016-12-05 16:40 GMT+02:00 Jeff Hoogland :
> > > That change makes item appear as a proper toolbar item object (and gets
> > rid
> > > of the error message) but item.selected_set(False) is still failing to
> > > unselect the item that is clicked on.
> > >
> > > On Mon, Dec 5, 2016 at 2:21 AM, Kai Huuhko 
> wrote:
> > >
> > >> This looks like an issue in EFL, possibly fallout from moving to
> > >> Eo/EFL events. The callback is being processed before selected item is
> > >> changed, so you get None (NULL in C) when
> > >> elm_toolbar_item_selected_get() is called within the callback.
> > >>
> > >> The item object should be passed to clicked callback as an argument,
> > >> can you check if that's None as well? Change line 1174 to
> > >>
> > >> def itemClicked(self, obj, item):
> > >>
> > >> and remove line 1175.
> > >>
> > >>
> > >> 2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
> > >> > Source code: https://github.com/JeffHoogland/ePad/blob/master/
> > epad#L1176
> > >> >
> > >> > Under EFL 1.15 this code worked fine. It essentially toggled of a
> > toolbar
> > >> > button after it was clicked so long as it was not a dropdown menu.
> > >> >
> > >> > Under EFL 1.18 however the item_selected_get function keeps
> returning
> > a
> > >> > none type:
> > >> >
> > >> > jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
> > >> > Traceback (most recent call last):
> > >> >   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
> > >> > efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
> > >> >   File "./epad", line 1176, in itemClicked
> > >> > if item.menu_get() is None and item.selected_get():
> > >> > AttributeError: 'NoneType' object has no attribute 'menu_get'
> > >> >
> > >> > Any ideas why this is? What can I do to get this code block to work
> as
> > >> > intended under EFL 1.18? Using the EFL 1.18.3 release with python
> EFL
> > >> > 1.18.0 release tar.
> > >> >
> > >> > Thanks!
> > >> > --
> > >> > ~Jeff Hoogland 
> > >> > My Projects on GitHub 
> > >> > 
> > >> --
> > >> > ___
> > >> > enlightenment-devel mailing list
> > >> > enlightenment-devel@lists.sourceforge.net
> > >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >>
> > >> 
> > >> --
> > >> ___
> > >> enlightenment-devel mailing list
> > >> enlightenment-devel@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >>
> > >
> > >
> > >
> > > --
> > > ~Jeff Hoogland 
> > > My Projects on GitHub 
> > > 
> > --
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> > 
> > --
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Jeff Hoogland
Anything I can do to help pin this down? As I mentioned this worked as
expected with EFL 1.15

On Dec 5, 2016 9:26 AM, "Kai Huuhko"  wrote:

> I'm guessing the "selected" function inside toolbar code is being
> called **after** the "clicked" callback is processed, so what you get
> is the item being still unselected when your callback is called and
> therefore setting it unselected does nothing. But this needs
> verification.
>
> 2016-12-05 16:40 GMT+02:00 Jeff Hoogland :
> > That change makes item appear as a proper toolbar item object (and gets
> rid
> > of the error message) but item.selected_set(False) is still failing to
> > unselect the item that is clicked on.
> >
> > On Mon, Dec 5, 2016 at 2:21 AM, Kai Huuhko  wrote:
> >
> >> This looks like an issue in EFL, possibly fallout from moving to
> >> Eo/EFL events. The callback is being processed before selected item is
> >> changed, so you get None (NULL in C) when
> >> elm_toolbar_item_selected_get() is called within the callback.
> >>
> >> The item object should be passed to clicked callback as an argument,
> >> can you check if that's None as well? Change line 1174 to
> >>
> >> def itemClicked(self, obj, item):
> >>
> >> and remove line 1175.
> >>
> >>
> >> 2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
> >> > Source code: https://github.com/JeffHoogland/ePad/blob/master/
> epad#L1176
> >> >
> >> > Under EFL 1.15 this code worked fine. It essentially toggled of a
> toolbar
> >> > button after it was clicked so long as it was not a dropdown menu.
> >> >
> >> > Under EFL 1.18 however the item_selected_get function keeps returning
> a
> >> > none type:
> >> >
> >> > jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
> >> > Traceback (most recent call last):
> >> >   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
> >> > efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
> >> >   File "./epad", line 1176, in itemClicked
> >> > if item.menu_get() is None and item.selected_get():
> >> > AttributeError: 'NoneType' object has no attribute 'menu_get'
> >> >
> >> > Any ideas why this is? What can I do to get this code block to work as
> >> > intended under EFL 1.18? Using the EFL 1.18.3 release with python EFL
> >> > 1.18.0 release tar.
> >> >
> >> > Thanks!
> >> > --
> >> > ~Jeff Hoogland 
> >> > My Projects on GitHub 
> >> > 
> >> --
> >> > ___
> >> > enlightenment-devel mailing list
> >> > enlightenment-devel@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >> 
> >> --
> >> ___
> >> enlightenment-devel mailing list
> >> enlightenment-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> >
> >
> > --
> > ~Jeff Hoogland 
> > My Projects on GitHub 
> > 
> --
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
> 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Kai Huuhko
I'm guessing the "selected" function inside toolbar code is being
called **after** the "clicked" callback is processed, so what you get
is the item being still unselected when your callback is called and
therefore setting it unselected does nothing. But this needs
verification.

2016-12-05 16:40 GMT+02:00 Jeff Hoogland :
> That change makes item appear as a proper toolbar item object (and gets rid
> of the error message) but item.selected_set(False) is still failing to
> unselect the item that is clicked on.
>
> On Mon, Dec 5, 2016 at 2:21 AM, Kai Huuhko  wrote:
>
>> This looks like an issue in EFL, possibly fallout from moving to
>> Eo/EFL events. The callback is being processed before selected item is
>> changed, so you get None (NULL in C) when
>> elm_toolbar_item_selected_get() is called within the callback.
>>
>> The item object should be passed to clicked callback as an argument,
>> can you check if that's None as well? Change line 1174 to
>>
>> def itemClicked(self, obj, item):
>>
>> and remove line 1175.
>>
>>
>> 2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
>> > Source code: https://github.com/JeffHoogland/ePad/blob/master/epad#L1176
>> >
>> > Under EFL 1.15 this code worked fine. It essentially toggled of a toolbar
>> > button after it was clicked so long as it was not a dropdown menu.
>> >
>> > Under EFL 1.18 however the item_selected_get function keeps returning a
>> > none type:
>> >
>> > jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
>> > Traceback (most recent call last):
>> >   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
>> > efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
>> >   File "./epad", line 1176, in itemClicked
>> > if item.menu_get() is None and item.selected_get():
>> > AttributeError: 'NoneType' object has no attribute 'menu_get'
>> >
>> > Any ideas why this is? What can I do to get this code block to work as
>> > intended under EFL 1.18? Using the EFL 1.18.3 release with python EFL
>> > 1.18.0 release tar.
>> >
>> > Thanks!
>> > --
>> > ~Jeff Hoogland 
>> > My Projects on GitHub 
>> > 
>> --
>> > ___
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>> 
>> --
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
> --
> ~Jeff Hoogland 
> My Projects on GitHub 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Jeff Hoogland
That change makes item appear as a proper toolbar item object (and gets rid
of the error message) but item.selected_set(False) is still failing to
unselect the item that is clicked on.

On Mon, Dec 5, 2016 at 2:21 AM, Kai Huuhko  wrote:

> This looks like an issue in EFL, possibly fallout from moving to
> Eo/EFL events. The callback is being processed before selected item is
> changed, so you get None (NULL in C) when
> elm_toolbar_item_selected_get() is called within the callback.
>
> The item object should be passed to clicked callback as an argument,
> can you check if that's None as well? Change line 1174 to
>
> def itemClicked(self, obj, item):
>
> and remove line 1175.
>
>
> 2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
> > Source code: https://github.com/JeffHoogland/ePad/blob/master/epad#L1176
> >
> > Under EFL 1.15 this code worked fine. It essentially toggled of a toolbar
> > button after it was clicked so long as it was not a dropdown menu.
> >
> > Under EFL 1.18 however the item_selected_get function keeps returning a
> > none type:
> >
> > jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
> > Traceback (most recent call last):
> >   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
> > efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
> >   File "./epad", line 1176, in itemClicked
> > if item.menu_get() is None and item.selected_get():
> > AttributeError: 'NoneType' object has no attribute 'menu_get'
> >
> > Any ideas why this is? What can I do to get this code block to work as
> > intended under EFL 1.18? Using the EFL 1.18.3 release with python EFL
> > 1.18.0 release tar.
> >
> > Thanks!
> > --
> > ~Jeff Hoogland 
> > My Projects on GitHub 
> > 
> --
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
> 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
~Jeff Hoogland 
My Projects on GitHub 
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-05 Thread Kai Huuhko
This looks like an issue in EFL, possibly fallout from moving to
Eo/EFL events. The callback is being processed before selected item is
changed, so you get None (NULL in C) when
elm_toolbar_item_selected_get() is called within the callback.

The item object should be passed to clicked callback as an argument,
can you check if that's None as well? Change line 1174 to

def itemClicked(self, obj, item):

and remove line 1175.


2016-12-05 3:25 GMT+02:00 Jeff Hoogland :
> Source code: https://github.com/JeffHoogland/ePad/blob/master/epad#L1176
>
> Under EFL 1.15 this code worked fine. It essentially toggled of a toolbar
> button after it was clicked so long as it was not a dropdown menu.
>
> Under EFL 1.18 however the item_selected_get function keeps returning a
> none type:
>
> jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
> Traceback (most recent call last):
>   File "efl/evas/efl.evas_object_smart.pxi", line 446, in
> efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
>   File "./epad", line 1176, in itemClicked
> if item.menu_get() is None and item.selected_get():
> AttributeError: 'NoneType' object has no attribute 'menu_get'
>
> Any ideas why this is? What can I do to get this code block to work as
> intended under EFL 1.18? Using the EFL 1.18.3 release with python EFL
> 1.18.0 release tar.
>
> Thanks!
> --
> ~Jeff Hoogland 
> My Projects on GitHub 
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] PYTHON: Trouble with toolbar.selected_item_get

2016-12-04 Thread Jeff Hoogland
Source code: https://github.com/JeffHoogland/ePad/blob/master/epad#L1176

Under EFL 1.15 this code worked fine. It essentially toggled of a toolbar
button after it was clicked so long as it was not a dropdown menu.

Under EFL 1.18 however the item_selected_get function keeps returning a
none type:

jeff@hoogland-W740SU:~/Storage/GitHub/ePad$ ./epad
Traceback (most recent call last):
  File "efl/evas/efl.evas_object_smart.pxi", line 446, in
efl.evas._smart_callback (efl/evas/efl.evas.c:78724)
  File "./epad", line 1176, in itemClicked
if item.menu_get() is None and item.selected_get():
AttributeError: 'NoneType' object has no attribute 'menu_get'

Any ideas why this is? What can I do to get this code block to work as
intended under EFL 1.18? Using the EFL 1.18.3 release with python EFL
1.18.0 release tar.

Thanks!
-- 
~Jeff Hoogland 
My Projects on GitHub 
--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel