X in subject is Set/Get/Erase.
Some time ago we found that custom properties can be accessed using mentioned object.XProp(CPROPNAME) method. Is there some difference between that and the good old XObjProperty(object, CPROPNAME) from UO module?
I'm asking because I haven't been able to spot one. Yet as far as I can tell this is not documented, so question is, should it be?
If so happens that both ways do the same, is there any reason to keep both or should one be removed from the future cores?
Difference between XObjProperty() and .XProp()
-
mr bubbles
- Grandmaster Poster
- Posts: 120
- Joined: Thu Jan 18, 2007 2:34 am
I don't think you can use the function Get/Set/EraseObjProperty on accounts. As I recall you must use the methods. I could be wrong however. Lord knows I have been mistaken before.
As for removing anything I would rather nothing be removed but I'd vote for methods being removed before the UO.em functions being taken away.
As for removing anything I would rather nothing be removed but I'd vote for methods being removed before the UO.em functions being taken away.
Me for once, it's faster to write obj.GetProp("Prop"), then GetObjProperty(obj, "Prop"), and the method way feels more like the cprop is part of the object.mr bubbles wrote:Who uses this anywhere apart from like data files (guilds/accs) anyway?
If I had to guess, I'd say it's another one of those forgotten features that never made in core-changes. And yeah, this should be added to pol docs under the UObject class. It's working fine and looks much better what the functions do. Just my opinion.