getObjectStringForObject

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

getObjectStringForObject

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:07 pm

by John Munro >> Tue, 17 Apr 2007 19:03:54 GMT

I've just noticed the method Object::getObjectStringForObject and its corresponding String::asObject

I don't understand when (and why) you would use these instead of Object::getOidStringForObject and String::asOid

Anyone have any ideas?

Thanks,

John

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: getObjectStringForObject

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:07 pm

by BeeJay >> Tue, 17 Apr 2007 22:05:57 GMT

One example of when to use asObject rather than asOid is when you're working in a system with a very large number of classes. If the number of classes in the system is such that the system utilises class numbers in the extended range of user class numbers, then the asOid method will not work correctly for instances of those classes.

ie: To ensure my code will always work as intended, regardless of usage of extended class numbers in a given system, I now ALWAYS use asObject rather than the older asOid method.

Cheers,
BeeJay.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests