Recent

Author Topic: setting properties at runtime  (Read 8775 times)

frederic

  • Full Member
  • ***
  • Posts: 226
Re: setting properties at runtime
« Reply #15 on: December 23, 2014, 02:29:39 pm »
wp ,thanks for your extensive answer

attached you will find the requested files of the project which couldn't compile.

note that i have reinstalled latest version lazarus and followed the construction path you described.

result ,however,remains the same : no compilation.
I also followed your trick  again:no compilation.


frederic

wp

  • Hero Member
  • *****
  • Posts: 8107
Re: setting properties at runtime
« Reply #16 on: December 23, 2014, 03:22:15 pm »
I see your issue also. But the solution is simple: lsVertical and IsVertical are not the same - the "l" in the former one is a lowercase "L", the "I" is the latter one is an upper case "i". Your code contains the "IsVertical" (with the upper case "I") which is defined nowhere. The correct word is "lsVertical" (with the lower case L - or upper case, it does not matter, it must be an "L" at least) which is defined in unit TASeries which you do have in the uses clause. So: replace the "I" by an "l" and everything will be fine.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

frederic

  • Full Member
  • ***
  • Posts: 226
Re: setting properties at runtime
« Reply #17 on: December 23, 2014, 03:39:52 pm »
oops, this is indeed very confusing

I interpreted "LSVertical"as  "is_ vertical"  which sounds logical

so  i have to use capitals always to avoid this issue also in comparable property settings;

thank you wp!!

wp

  • Hero Member
  • *****
  • Posts: 8107
Re: setting properties at runtime
« Reply #18 on: December 23, 2014, 05:05:33 pm »
Quote
I interpreted "LSVertical"as  "is_ vertical"  which sounds logical
No. It is an unspoken convention that the elements of an enumeration are prefixed by letters identifying the type. In case of "TLineStyle" the letters are "L" and "S". Since the word "Vertical" may be used in other context this helps in avoiding massive confusion.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

frederic

  • Full Member
  • ***
  • Posts: 226
Re: setting properties at runtime
« Reply #19 on: December 24, 2014, 01:57:26 pm »
wp ,
now i understand
good eplanation! thank you
frederic

 

TinyPortal © 2005-2018