Page 1 of 1

Tutorial 2 problem

Posted: Sun Mar 27, 2016 1:11 am
by Edson2016
Hi everybody. I'm studying the Tutorial 2 ("Hello World"). I'm using ZGE 4.0b in Windows 8.1.
I included the component RenderText to the OnRender node and modified the Text property (to "HELLO WORLD"); I saved the project, run it with F9. Everything was fine. I modified the name of RenderText to "MyText", but when I added the MyAnimator, I was able to modify its properties the way that Tutorial2 says to do, with one exception: the "Target" property. The cursor is inside the property box, but I'm not able to modify the text - I tried letters, numbers, symbols. I tried to copy and paste the text "MyText.Y", but it does not work. It just ignores what I type, the cursor blinks as if I had not touched the keyboard anything. Right clicking on it, the "Paste" item is disabled. Can you help with this? I tried to quit ZGE and start it again, but the problem is still there.
:| I know, maybe it's a newbie thing, but I'm really stuck.
Thanks for your attention

Re: Tutorial 2 problem

Posted: Sun Mar 27, 2016 9:46 am
by Kjell
Hi Edson2016,

The Target property of the AnimatorSimple component has been changed from a String to a ZExpression ( allowing for more flexibility ). This means that when you select the Target property ( or simply the AnimatorSimple component ) a Code editor appears that corresponds to the Target property.

Image

I can understand your confusion though, it doesn't make a lot of sense that you can't edit the property directly in the Properties panel .. nor does the Code editor label indicate which property it corresponds to. Hopefully this can & will be improved.

K

Re: Tutorial 2 problem

Posted: Sun Mar 27, 2016 10:59 am
by Edson2016
Thanks for your answer Kjell, but in your picture, I can see that you're using version 3.1b, and there are 2 buttons: "OK" and "Help". I suppose that I should type "MyText.Y" and then click "OK", right? But here (with version 4.0b) I see 3 buttons: Detach, Compile and Help. I typed "MyText.Y" but the text does not goes to the Target property. I'm reading the help file, in the keyboard shortcuts it says that ALT+O activates the OK button, but it didn't. I tried ALT+zero, too...
Finally, I found a (kind of) solution... I opened the zgeproj file with a text editor, and added the Target property.
Now it is:

<AnimatorSimple Name="MyAnimator" Comment="Primeiro teste" Duration="2" Target="MyText.Y" AutoStart="255" AutoReverse="255" RepeatCount="100" ToValue="0.5" Smooth="255"/>

And it works! :D However, I still can't edit the property in ZGE, only in the text editor... :|

Re: Tutorial 2 problem

Posted: Sun Mar 27, 2016 11:27 am
by Kjell
Hi,
Edson2016 wrote:I can see that you're using version 3.1b, and there are 2 buttons: "OK" and "Help". I suppose that I should type "MyText.Y" and then click "OK", right? But here (with version 4.0b) I see 3 buttons: Detach, Compile and Help.
Ah, right .. the "OK" button got renamed to "Compile" ( and moved to another location ) in 4.0 :x So yes, first write "MyText.Y" in the Code editor and then press Compile.

K

Re: Tutorial 2 problem

Posted: Sun Mar 27, 2016 12:08 pm
by Edson2016
Thank you very much. I had already tried the Compile button, but the value in target field was empty, so I thought it was not accepted. I'm a beginner in ZGE (but old VB6 programmer) so it seemed visually confusing - now I understand how it works: despite of the "target" field being empty, the real value is in the Code editor. Just to be sure it's ok, I modified the property to MyText.X, and it worked the way I supposed it would.
Sorry for any problem with my English knowledge, and (again) thank you very very much for the quick help.

Re: Tutorial 2 problem

Posted: Sun Mar 27, 2016 12:59 pm
by VilleK
Hi,

These tutorials were initially written nine years ago and I guess we haven't tested them again properly in the latest 4.0 beta. Sorry for the inconvenience caused by this. And we did change the OK button to Compile but kept the same shortcut-key (Alt + O).

Indeed like you say "the real value is in the code editor". The value in the edit-field should be updated too but it hasn't since we added detachable property editors, hope to fix this later.

Re: Tutorial 2 problem

Posted: Mon Mar 28, 2016 6:12 pm
by Rado1
Edson2016, all,

I recommend you to use tutorials from ZGE Help file (Help/Contents menu or F1), not form obsolete Web page. I tested them (more or less) and I'm continuously updating the content of help file. For instance, next version of Beta 4.0b will contain also better descriptions of expression-based properties referring to the Code editor; including AnimatorSimple.Target.

Rado1.