Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Stack Overflow Exception #3253

Open
markknol opened this issue May 18, 2021 · 0 comments
Open

Possible Stack Overflow Exception #3253

markknol opened this issue May 18, 2021 · 0 comments

Comments

@markknol
Copy link
Contributor

markknol commented May 18, 2021

Debug information:

Possible Stack Overflow Exception in C:\xxxxxxxx\application\com\game\Game.hx
Please contact the developers via https://github.com/fdorg/flashdevelop/issues/new
Debug information:
CodeComplete.InferType({20:			var marginX = 10;})

The code:

package com.game;

import com.ui.buttons.PrimaryButton;
import flambe.Entity;
import flambe.util.Value;
import temple.components.display.ValueTextComponent;
import temple.components.pointer.PointerTap;

/**
 * @author Mark Knol
 */
class Game extends AbstractGame {
	private var _data:Array<Value<Int>>;
	
	function createUI() {
		_data = [for (idx in 0...4) {
			var value = new Value(0);
			
			var marginY = 200;
			var marginX = 10;
			var size = 75;
			var distance = 125;
			containers.ui.add(new Entity().add([
				new PrimaryButton("<", size, size)
					.setXY(marginX, marginY + idx * distance),
				new PointerTap(e -> value._ --),
			]));
			containers.ui.add(new Entity().add([
				new PrimaryButton("<", size, size)
					.setXY(marginX, marginY + idx * distance),
				new PointerTap(e -> value._ --),
			]));
			containers.ui.add(new Entity().add([
				new ValueTextComponent(value)
					.setXY(marginX + size + marginX, marginY + idx * distance),
			]));
			
			value;
		}];
	}
}

I'm using HaxeDevelop from this build http://www.github.com/fdorg/flashdevelop/commit/0592402cd4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants