Page 2 of 2

Re: propertynames

Posted: Sat Jun 15, 2013 8:51 pm
by mwieder
Sudden thought: if we're going to have "the revAvailableHandlers of <object>", how about "the revAvailableProperties of <object>", implemented as a function?

Re: propertynames

Posted: Sat Jun 15, 2013 10:12 pm
by DarScott
I like the idea of looking at this in general and seeing how there can be uniform and encompassing functions.

Re: propertynames

Posted: Sat Jun 15, 2013 11:45 pm
by mwieder
I think it makes sense to have a naming convention that makes sense.

Re: propertynames

Posted: Sun Jun 16, 2013 12:12 pm
by LCMark
Something like the revAvailableHandlers might well be sufficient. That property was added to help with 'Go To Definition' and the handler list in the script editor - and for that purpose it is fine, but it has never been turned into a 'proper' feature, mainly because it works, and the output it currently has isn't really structured in an 'x-talky' type way.

This is why knowing what information is needed and where it is to be used is important.

It would be quite easy to do something similar 'revAvailableProperties' that returns information about the properties an object provides (although, it would require that information to be encoded in the engine explicitly at the moment - the type a property is, its relation to others and its type is all implicit in the code currently - less so on the refactored branch).

If the need is really to be able to ask the engine what properties are available for use in a property type browser, then just knowing the names is not enough... You need to know the type, whether it's derived, whether it's read-only and (if it is a synonym) what it is a synonym of.

Re: propertynames

Posted: Sun Jun 16, 2013 6:57 pm
by mwieder
it would require that information to be encoded in the engine explicitly at the moment
Isn't that information already in the engine? If I try to set a built-in property on an object that doesn't support it (set the height of card x) something throws an error.

Re: propertynames

Posted: Mon Jun 17, 2013 8:50 am
by LCMark
Yes - but it's implicit in the code rather than in a table that could be massaged into a format for return from a property.

Re: propertynames

Posted: Wed Jun 19, 2013 5:56 am
by mwieder
If the need is really to be able to ask the engine what properties are available for use in a property type browser
I'm guessing that's what Pete's got in mind, but I'm not going to make assumptions for him.