Private Variables not working or I am doing something wrong?

For questions about using Classic.

Post » Tue Jun 22, 2010 10:51 am

I have came across something strange while making a test script for scaling boxes. I was trying for a couple of hours to get a box to scale in height. However, it was not working at all and I was trying it for hours. I then decided to switch to a global variable and behold, it worked! I do not know why it isn't working with the private variable.

So, I have the .cap for you all. I probably did something stupidly wrong (If it is on the wiki I will facepalm).

The funny thing is, the debug shows the private variable working, but the text is not picking it up for a reason I can't explain. The Private variable seems to work, but it doesn't get passed to the text object (which I don't get).

Anyway, here's the cap. Anyone have an explanation for this?
http://www.mediafire.com/?zwjtalggjjt
B
2
G
3
Posts: 13
Reputation: 876

Post » Tue Jun 22, 2010 3:05 pm

It's a known bug of Panel object, you can't reference it's private variables properly. Go kick David to fix it.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Tue Jun 22, 2010 5:52 pm

Pretty sure I read it's fixed in at least an unstable release, but what always worked for me was that instead of writing Panel('whatever') or just 'whatever', I wrote Panel.Variable('whatever').
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Tue Jun 22, 2010 9:05 pm

[quote="konjak":3e07g8rx]Pretty sure I read it's fixed in at least an unstable release, but what always worked for me was that instead of writing Panel('whatever') or just 'whatever', I wrote Panel.Variable('whatever').[/quote:3e07g8rx]
Looks like this is indeed the case, the private variables for Panel work perfectly for me in 0.99.85. 'value', Panel('value') or Panel.Value('value') all work just fine. (Sadly, Light's private variables are still broken)
B
16
S
8
G
4
Posts: 136
Reputation: 3,144


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests