Support only certain fields for certain filetypes

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Support only certain fields for certain filetypes

Post by *Lefteous »

I finally made some progress in my Summary plug-in which is currently in beta state. The available file properties are based on the filetype.. For example WMV videos the fields title and comments but not subject and category. For the get function I could return no such field or field empty. For the set function returning an error could be quite irritating for the user. Any idea how I could solve this?
Last edited by Lefteous on 2007-04-17, 18:58 UTC, edited 1 time in total.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

What's the problem to return an empty string where needed?
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I just found out that "no such field" actually can be used to show that a certain file doesn't support a field _without_ showing an error message.
I hope this is the way intended by the author :?: as the field index is not really invalid...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, the meaning of "no such field" is that a specific file does NOT contain that field.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Thanks for clarification :-)
Post Reply