Working with categories is a mess if one has more then a handful of it.
Why do I have to change dialogs before assigning a missing category to a task?
Why musst a category be managed before using it at all?
Why not making categories as simple as email addresses? See the mockup example:
Thus, categories could be assigned without ever defining them before.
Categories that have been defined can be selected as known from email addresses.
Just think about the idea.
And by the way: If you really want to keep it a MUSST that categories have to be defined (in the categories table under Extras > Categories) before usage, then instead auto-define a category once it is typed in and saved in an item (task, calender item, contact) AND auto-delete it or ask for deletion once the last usage of a category has been removed.