[Developers] type checking?

John Giannandrea jg at metaweb.com
Sun Dec 2 03:36:30 UTC 2007


Arthur van Hoff wrote:
> When adding a genre to an podcast I accidentally picked National  
> Public Radio from the popup list. The expected type for the was / 
> user/cotton/default_domain/broadcast_genre, and NPR was not of that  
> type. Why does the site allow me to pick a topics that is not of the  
> correct type? Can’t it restrict the list to just the valid type for  
> that property?

The current UI does this because not everything is typed yet, and it  
could well be that the genre exists as a topic but has not been typed  
as a genre.

The intention is that the autocomplete UI will show you matching types  
first, and then if there are more matching topics, those too.   You  
are right that as more stuff is correctly typed, this feature risks  
generating more errors than additions.

If you are sure that all the available broadcast_genre's are mostly  
complete, then you could make the type an 'enumeration'.  That would  
prevent one from making any new genres from the dropdown.  An example  
of an enumeration is /people/gender

-jg




More information about the Developers mailing list