intermediate object pass implementation

This commit is contained in:
61616
2022-05-05 17:48:25 -04:00
parent ada2473089
commit 24a4ff043e
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ class Button{
highlight = color(100); highlight = color(100);
mouseOver = false; mouseOver = false;
ch.addl(new LiveMethodRelay(this, "clicked", float.class, float.class)); ch.addl(new LiveMethodRelay(this, "clicked", float.class, float.class));
data = new Object[0]; data = null;
} }
Button(ClickHandler _ch, PVector _pos, PVector _dim){ Button(ClickHandler _ch, PVector _pos, PVector _dim){
this(_ch, _pos, _dim, 0); this(_ch, _pos, _dim, 0);

View File

@@ -47,7 +47,7 @@ class B12Button extends Button{
B12Button(ClickHandler _ch, PVector _pos, PVector _dim, float _radius, B12Digit _digit){ B12Button(ClickHandler _ch, PVector _pos, PVector _dim, float _radius, B12Digit _digit){
super(_ch,_pos,_dim,_radius); super(_ch,_pos,_dim,_radius);
data = (Object[])append(data, _digit); data = new Object[]{_digit}; //(Object[])append(data, _digit); commented version deprecated. required initializing array in Button
digit = _digit; digit = _digit;
} }
B12Button(ClickHandler _ch, PVector _pos, PVector _dim, B12Digit _digit){ B12Button(ClickHandler _ch, PVector _pos, PVector _dim, B12Digit _digit){