Skip to content
Discussion options

You must be logged in to vote

I managed to trace the error back to the for loop:

for tile[idx] in (size*size): Tile{
    width: button_width;
    height: button_height;
    x: pad_width + mod(idx, size) * (self.width + pad_width);
    y: pad_height + floor(idx / size) * (self.height + pad_height);
    notify_clicked => { parent.notify_clicked(mod(idx,size), floor(idx / size)) }
}

Changing the expression (size*size) to a precomputed property private property <int> N: size*size; does not panic and works as expected.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@tronical
Comment options

@Tastaturtaste
Comment options

@Tastaturtaste
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Tastaturtaste
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants