[r74] array for each + layout switch

Bugs will be moved here once resolved.

Post » Mon Jan 09, 2012 10:07 am

Repro:
- create an array and change the default width in the object properties
- do a for each X loop
- loop does as many iterations as the array is wide (as expected)
- switch layout
- switch back to original layout
- do a for each X loop
- loop does 10 iterations (bug!)

Didn't test if it's the same with height & depth.

Demo: http://dl.dropbox.com/u/46072108/arraybug.capx

What makes the bug annoying is that you can't simply work around it by resetting the size on layout switch because it appears to get ignored as well. Would appreciate resolution in next release. wgfunstorm2012-01-09 10:10:46
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Mon Jan 09, 2012 10:15 am

Also just noticed that if you log Array.CurX while looping through it, CurX will be 0 for all iterations past the width you set in the object properties.

Eg 0 1 2 3 4 0 0 0 0 0
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Mon Jan 09, 2012 3:52 pm

Oops, a typo in the source means the non-global Array object isn't destroyed at the end of the layout - so when you come back, there are 2 instances of the Array object! Fixed for next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Mon Jan 09, 2012 4:21 pm

Super, thanks!!!
B
22
S
9
G
5
Posts: 122
Reputation: 5,386


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest