INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Request: Remove Deleted Custom Library Fields from column headers list and cols.  (Read 369 times)

markf2748

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 693

I deleted a custom field from the library.  As expected, it no longer appears in Library & Folders > Manage Library Fields... > Show fields..., and it no longer appears in the Tag Tree (Tag Dump, All Fields, etc.).  However the deleted field remains listed in the Content Panel's Bottom List column headers selection list (RMB on Bottom List column header), as well as in any previously defined Bottom List column where the field value was formerly displayed.

While the deleted field may still show up in the Vorbis Comment Block (at least until the block is re-written), its value apparently is not read/retained by MC.  It does not show any value in a Content Panel's Bottom List column.  So let's de-clutter.

Request:  To avoid confusion, please completely remove deleted custom library fields from the Content Panel's Bottom List column header selection list (RMB on column header) and their Bottom List columns if applicable.  This should happen automatically whenever a field is deleted, but may require a "cleanup tool" to remove existing deleted field entries.

Wishful Thinking Note:  I find that undefined fields in expressions are generally "benign" - they just do not get evaluated.  But if MC could identify all expressions with undefined fields (or at least a subset) whenever a field is deleted that would make the expressions easier to find and repair.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41976
  • Shoes gone again!

A deleted field only shows up if that column is showing.  I'll make coming builds simply delete the column instead of show in that case.  Thanks.
Logged
Matt Ashland, JRiver Media Center

markf2748

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 693

Note:  After removing a deleted field column, I found it necessary to restart MC in order for the field to vanish from the header selection list.  So you may have to "refresh" the header selection list to avoid needing a restart.

Windows 11 Pro 64-bit   MC 32.0.12 (in beta)
Logged

markf2748

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 693

On the other hand, doing a full MC restart after deleting a field may be the best recourse for updating all expressions that depend on the deleted field.  Perhaps raise a warning and offer to restart MC.  After all, deleting a field should always be a relatively rare event.

* How to handle expression columns after deleting a contained field? *

(1) Ignore and let stand with the deleted field unevaluated.  There is a danger that the situation may not be recognized by the user for a long time and provide false information.

(2) Delete the column.  If the expression is complicated, the user may lose a valuable expression and have to reconstruct it (the expression may have been written years ago and is now long forgotten).

(3) Do not delete the column but warn user once at time of field deletion:  "View abc, Column N contains invalid field [xyz]".  This gives the user a chance to modify the expression or at least copy out the expression, and then decide to retain or remove the column.

(4) Always (or when tab is opened) check columns for invalid fields and warn user.  Extra awesome:  throw a warning icon on the column header (in the spirit of what Windows Device Manager does when a device is amiss - the dreaded yellow triangle badge).  OK only if there is negligible impact on performance.

Are something like try-catch blocks with warning too ridiculous and burdensome for field evaluations?

I vote for removing the deleted field from the header selection list and (3), or (4) if viable.

1/4/2024 Update (4)
Logged
Pages: [1]   Go Up