tags:

views:

62

answers:

1

I need a function that checks the namespace of the argument, and returns the class type

for example:

checkType(id)
   if id starts with "p:"
   return <Class Type>
end

I do not have an instance to use when checking the type of the id

A: 

It's kind of a lame, hackish approach, but if you know what the IDs are that you're looking for, and there's not too many, you could create a hash mapping of ID to ClassType.

Jesse J