Sorry for the delay.
I've changed a bit of the code yesterday to fit more what I was trying to do.
What I was saying with "dynamically created buttons" was I created the buttons through the onInit Script of the Midi Processor's Sampler, through a for loop.
But I've changed the code to use Global variables for now, it makes more sens since more samplers are gonna have to be interconnected and I needed arrays to save some information through the app.
Working now! Thanks for the help guys.