Use the new PageStyle
datatype instead of page style string literals
#805
rvanbekkum
started this conversation in
New Rule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If runtime 14.0 or newer is used (BC25.0 or newer), then check for any occurences of string literals
'Unfavorable'
,'Favorable'
, ... (and all other supported page styles).Raise a diagnostic on the string literal and suggest to use the new
PageStyle
datatype instead (e.g.,PageStyle::Unfavorable
).Also raise the diagnostic for
Label
variables likeLabel 'Unfavorable', Locked = true
Adopting the use of the new
PageStyle
datatype allows to more easily get the supported pagestyles via IntelliSense and avoids incorrect behaviour when a typo is made in hardcoded strings or label variables.Unfortunately the
StyleExpr
property on page controls still only accepts strings (or booleans), so a conversion to a string will still be needed, e.g.,Format(MyPageStyleVariable)
Content of this idea might also be good for alguidelines.dev
Beta Was this translation helpful? Give feedback.
All reactions