generalize textresource argument type