Question about Variable.*Value properties

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Question about Variable.*Value properties

Post by Rado1 »

Does anybody of you use Variable component's Value, IntValue, ModelValue or ByteValue properties? Do you think it is useful to still have them? If so, then StringValue is missing.

I could see some usage in debugging the previewed application, but in practice, I rather use trace() function instead.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Question about Variable.*Value properties

Post by Kjell »

Hi Rado1,
Rado1 wrote:Does anybody of you use Variable component's Value, IntValue, ModelValue or ByteValue properties? Do you think it is useful to still have them? If so, then StringValue is missing.
I occasionally look up the value of a integer or byte by glancing at the component properties, so to me it's still useful. But i understand where that question is coming from, the component is a bit of a mess ( editor-wise ) in general ( imo ) .. not only string is missing, vec2/3/4 and mat4 are as well, and more importantly you can only edit the value of a float variable. It's not consistent nor intuitive.

Suggested this back in 2013:

Image

Depending on the type you select a corresponding edit control is shown for the value.

K
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Question about Variable.*Value properties

Post by VilleK »

I consider these properties as an internal requirement by the runtime. They could be hidden. The only use I see is for debugging (clicking on the variable in the project tree and check the current value).

As why some datatypes are missing, it is because they are represented internally in different ways. Byte/float/int are simple primitive types and have their own properties. The others are garbage collected (a.k.a. "managed") types so they share a property called ManagedValue (which is hidden already).
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Question about Variable.*Value properties

Post by Kjell »

Hej Ville,
VilleK wrote:I consider these properties as an internal requirement by the runtime. They could be hidden. The only use I see is for debugging (clicking on the variable in the project tree and check the current value).
Don't forget you can click on the Value property and edit the ( float ) value in the property editor or using the slider :wink:

K
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Question about Variable.*Value properties

Post by Rado1 »

I just would be glad if the implementation is consistent, in any way. BTW even if float Value can be edited, it cannot be saved and it is still in disable look, I think that's a mistake of implementation.

BTW there is another hidden property Timer.CurrentRelativeTime which should be shown in property editor because it is used in expressions much more than Variable.Value.
Post Reply