You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the requirement to delete a category. Is this somehow possible? How would I additionally check whether a category exists, without creating new PreferencesFX object?
The text was updated successfully, but these errors were encountered:
It doesn't look like there's any easy way to remove a category dynamically. The PreferencesFx class uses a PreferencesFxModel instance that's populated with the Category objects. The model has getCategories, which could be used to check whether a category exists. However, the model is inaccessible through any public API.
Keeping a handle to the list of categories used at construction-time is the only practical option to checking whether a category exists. Recreating the PreferencesFx object also looks like the only choice to adding or removing categories.
If it helps, here's how I organize the preferences in my app:
Keeping a reference to Category instances would allow the application to add and remove items. Using an ObservableList instead of an array would allow triggering recreation of the PreferencesFx based on an event mechanism.
I have the requirement to delete a category. Is this somehow possible? How would I additionally check whether a category exists, without creating new PreferencesFX object?
The text was updated successfully, but these errors were encountered: