Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a converter for tuple to values #26

Conversation

KRLango
Copy link

@KRLango KRLango commented Jul 24, 2024

Added a converter from tuples to the value at a specified index in the tuple. This is for the Collection Index Section in nion-software/nionswift#1093

@cmeyer
Copy link
Collaborator

cmeyer commented Jul 24, 2024

The TupleToValueConverter doesn't seem like a good general converter since it doesn't convert a value to another value - instead it accesses a property of a secondary object. I'll propose a different technique for this, but it might take a few days. In the interim, you can add these classes directly to Inspector.py so that they're isolated there.

Also the TupleOfIntegersToStringValueConverter is too specific to go into nionutils. If anything, we could introduce some type of CompositeConverter which would chain together a series of converters to make a single converter.

@cmeyer cmeyer closed this Jul 24, 2024
@KRLango KRLango deleted the 1093-CollectionIndexInspectorSection branch July 31, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants