Page 2 of 2

Re: Can a widget automatically set its size?

Posted: Sun Oct 18, 2015 13:48
by YaronCT
But what's the advantage of user strings over properties? Couldn't we, just as well, add it as properties in branch "v0-8" without adding it as fields? (and add it as fields in branch "v0")

Re: Can a widget automatically set its size?

Posted: Sun Oct 18, 2015 14:01
by Ident
And how would you store it "as property"?

Re: Can a widget automatically set its size?

Posted: Sun Oct 18, 2015 15:06
by YaronCT
Oh, for some reason I was sure the properties are stored as a whole in some map... So I understand this is not the case, they use getters and setters to store their values... Sorry, now everything is clear, I'll use user strings then, thanx!

Re: Can a widget automatically set its size?

Posted: Sun Oct 18, 2015 15:37
by Ident
No problem! Yes, you can just use them in v0-8.

having getters and setters to access the stored values allows us to store them wherever we want and how we want, which clearly has benefits and also allows to prevent type->string and string->type casting where it is not necessary. The "user string" functionality is poorly named in my opinion, since LNF definitions are not exactly "users" and those most of all depend on this functionality. We should probably rename this in default for the future...