Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Open Discussions #19

Closed
galou opened this issue Mar 7, 2025 · 0 comments
Closed

Open Discussions #19

galou opened this issue Mar 7, 2025 · 0 comments

Comments

@galou
Copy link
Contributor

galou commented Mar 7, 2025

@mnesarco Don't you think it'd good to allow the Discussions tab on Github?

I'd like to ask how to deal with an enumeration property with a dynamic list of potential values.

  • PropertyOptions allows a one-time dynamic list but

    • Property.options doesn't take any argument. I think, it should take the FreeCAD object as argument. Other properties may not be initialized but they may not be needed and this can be checked for
    • there's no way to update the list after the object is created (Property.update treats the self.enum case but not the self.options)
  • PropertyEnumeration should work with a custom class for enum thanks to duck-typing but a check if isinstance(value, Enum) in Property.update() should be added to allow to update the list of potential values.

I tried both options (with modifications in fpo) but didn't succeed so far. Anyway, how would you do it?

Repository owner locked and limited conversation to collaborators Mar 7, 2025
@mnesarco mnesarco converted this issue into discussion #21 Mar 7, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant