It is currently Fri Nov 21, 2008 12:50 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Difference between XObjProperty() and .XProp()
PostPosted: Mon Aug 13, 2007 11:44 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 5:35 pm 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
haha, i can imagine my script changes is getobjproperty is removed :P I think it should be left as is, or get rid of the .xprop method. Who uses this anywhere apart from like data files (guilds/accs) anyway?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 10:11 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
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.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 30, 2007 6:40 pm 
Offline
User avatar

Joined: Thu Feb 09, 2006 11:48 pm
Posts: 35
Location: Finland
mr bubbles wrote:
Who uses this anywhere apart from like data files (guilds/accs) anyway?

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.

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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 8:57 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 794
Location: Chicago, IL USA
I thought it was GetObjProperty that replaced UObject.GetProp....


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 1:00 am 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
I think you are right CWO. I assume that the methods were left in place for compatibility reasons. I have never tested GetObjProperty on accounts. I have never seen it used on account references even. Most always the method is used in those cases.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl