Hi, when using the chimerax.ui.options.EnumOption, are you supposed to create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it. Regards, Daniel Palma Igor
Hi Daniel, The documentation is kind of sparse there -- I'll try to remedy that soon. Yes, you would make a subclass. If you subclass EnumOption then you only specify "values" not "labels" -- text shown to the user will be the same as the values. If you subclass SymbolicEnumOption, then you would specify both "values" and "labels", and "labels" is what is shown in the user interface.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 24, 2020, at 2:56 PM, Daniel Esteban Palma Igor daniel.palma.i@ug.uchile.cl wrote:
Hi, when using the chimerax.ui.options.EnumOption, are you supposed to create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it. Regards, Daniel Palma Igor _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Ok, thank you for the clarification
On Tue, 24 Nov 2020 at 22:56, Eric Pettersen pett@cgl.ucsf.edu wrote:
Hi Daniel, The documentation is kind of sparse there -- I'll try to remedy that soon. Yes, you would make a subclass. If you subclass EnumOption then you only specify "values" not "labels" -- text shown to the user will be the same as the values. If you subclass SymbolicEnumOption, then you would specify both "values" and "labels", and "labels" is what is shown in the user interface.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 24, 2020, at 2:56 PM, Daniel Esteban Palma Igor <
daniel.palma.i@ug.uchile.cl> wrote:
Hi, when using the chimerax.ui.options.EnumOption, are you supposed to
create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it.
Regards, Daniel Palma Igor _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Hi Daniel, I have committed documentation for those options, which will show up in the next build. I have also made it possible to use them without subclassing, by providing the 'values' keyword to the EnumOption constructor, or both 'values' and 'labels' to the SymbolcEnumOption constructor.
--Eric
On Nov 24, 2020, at 6:16 PM, Daniel Esteban Palma Igor daniel.palma.i@ug.uchile.cl wrote:
Ok, thank you for the clarification
On Tue, 24 Nov 2020 at 22:56, Eric Pettersen <pett@cgl.ucsf.edu mailto:pett@cgl.ucsf.edu> wrote: Hi Daniel, The documentation is kind of sparse there -- I'll try to remedy that soon. Yes, you would make a subclass. If you subclass EnumOption then you only specify "values" not "labels" -- text shown to the user will be the same as the values. If you subclass SymbolicEnumOption, then you would specify both "values" and "labels", and "labels" is what is shown in the user interface.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 24, 2020, at 2:56 PM, Daniel Esteban Palma Igor <daniel.palma.i@ug.uchile.cl mailto:daniel.palma.i@ug.uchile.cl> wrote:
Hi, when using the chimerax.ui.options.EnumOption, are you supposed to create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it. Regards, Daniel Palma Igor _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu mailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Great!, We had the same idea then hahaha
On Wed, Nov 25, 2020, 16:39 Eric Pettersen pett@cgl.ucsf.edu wrote:
Hi Daniel, I have committed documentation for those options, which will show up in the next build. I have also made it possible to use them without subclassing, by providing the 'values' keyword to the EnumOption constructor, or both 'values' and 'labels' to the SymbolcEnumOption constructor.
--Eric
On Nov 24, 2020, at 6:16 PM, Daniel Esteban Palma Igor < daniel.palma.i@ug.uchile.cl> wrote:
Ok, thank you for the clarification
On Tue, 24 Nov 2020 at 22:56, Eric Pettersen pett@cgl.ucsf.edu wrote:
Hi Daniel, The documentation is kind of sparse there -- I'll try to remedy that soon. Yes, you would make a subclass. If you subclass EnumOption then you only specify "values" not "labels" -- text shown to the user will be the same as the values. If you subclass SymbolicEnumOption, then you would specify both "values" and "labels", and "labels" is what is shown in the user interface.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 24, 2020, at 2:56 PM, Daniel Esteban Palma Igor <
daniel.palma.i@ug.uchile.cl> wrote:
Hi, when using the chimerax.ui.options.EnumOption, are you supposed to
create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it.
Regards, Daniel Palma Igor _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (2)
-
Daniel Esteban Palma Igor
-
Eric Pettersen