royale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] hcsuk commented on issue #341: Adding listener for when a bindable style has changed
Date Sun, 11 Nov 2018 06:47:14 GMT
hcsuk commented on issue #341: Adding listener for when a bindable style has changed
   Okay thanks; so I've looked into more what's happening in various places with this... I'd
wondered whether there would be value in defining a base class for the various Style objects
that we have, which would implement the IStyleObject; this would then be an object that some
of the client code (e.g. in mx.controls.VRule) could use plus the `parseStyles` functions
in SimpleCSSValuesImpl/AllCSSValuesImpl, which are currently just returning an untyped object.
So this then ensures we have a style object of known type, and can set it's "host object";
in the Bindable versions, this is what we then cache in order to apply the styles to the host
object when one of our styles is changed.
   The other thing I would propose is to shift AllCSSValuesImpl so that it derives from SimpleCSSValuesImpl.
They're pretty much identical apart from the lists of style categories that are used within
`applyStyles`, and it looks like there has been some maintenance/bugfixing done on one and
not the other, so it could be a maintenance problem. I'd actually wondered whether to shift
the `parseStyles` into one of the Style objects (i.e. we have an implementation `SimpleCSSStyles.parseFromString()`
and an `AllCSSStyles.parseFromString()`) but there still needs to be a way for the user to
define the list of styles that are supported and the ValuesImpl object is a global way of
doing that.
   I'll translate the above comments into code and push them here so you can see what I mean...

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message