New feature : User Defined Fields
Posted: 2004-05-27 13:44:52
Hi. I think this would be a great addition to AMC, adding the possibility for the user to define his(her) own fields. I think this could be done very easily in new version 4, since I see you are going for a XML approach for the new file format. You could add a new node to the movie definition, such as:
Well, you got the picture . I don't know if it's necessary to add a type to the fields, they could all be treatied as text, or string.
As for displaying them to the user, you could use a simple grid ( field | value), add editing capabilities to the second column (value), and that's it.
The fields (name & type) could be kept as some sort of "meta"s in the XML file, and thus they could be per-catalog, and not global. When an user adds a new field, the whole XML is parsed, and a new node for the field is added to each movie's <userDefined> node.
Scripting support for these user defined nodes could be added by a general function, such as SetField(fieldUserDefined, "myOwnField", Value);
Hmm... just an idea I've got... don't know really if it's as simple to implement as it sounds.
Code: Select all
<movie>
....
<userDefined>
<field name="MyOwnField" type="text"> ...some value here... </field>
<field name="MyOwnImage" type="image"> ...some value here... </field>
<field name="HasMyGirlfriendSeenIt" type="boolean"> ... some value here ... </field>
</userDefined>
</movie>
As for displaying them to the user, you could use a simple grid ( field | value), add editing capabilities to the second column (value), and that's it.
The fields (name & type) could be kept as some sort of "meta"s in the XML file, and thus they could be per-catalog, and not global. When an user adds a new field, the whole XML is parsed, and a new node for the field is added to each movie's <userDefined> node.
Scripting support for these user defined nodes could be added by a general function, such as SetField(fieldUserDefined, "myOwnField", Value);
Hmm... just an idea I've got... don't know really if it's as simple to implement as it sounds.