propertynames

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: propertynames

Post by mwieder » Sat Jun 15, 2013 8:51 pm

Sudden thought: if we're going to have "the revAvailableHandlers of <object>", how about "the revAvailableProperties of <object>", implemented as a function?

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: propertynames

Post by DarScott » Sat Jun 15, 2013 10:12 pm

I like the idea of looking at this in general and seeing how there can be uniform and encompassing functions.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: propertynames

Post by mwieder » Sat Jun 15, 2013 11:45 pm

I think it makes sense to have a naming convention that makes sense.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: propertynames

Post by LCMark » Sun Jun 16, 2013 12:12 pm

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.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: propertynames

Post by mwieder » Sun Jun 16, 2013 6:57 pm

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.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: propertynames

Post by LCMark » Mon Jun 17, 2013 8:50 am

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.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: propertynames

Post by mwieder » Wed Jun 19, 2013 5:56 am

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.

Locked

Return to “Engine Contributors”