[toolbar] how can i get a toolbar's buttons itemId list?

i create dinamically a toolbar. i don’t know how many and which buttons will be created.

how can i get a complete list of their ID?

thanks a lot.

You can use code similar to next

for (var id in toolbar.items )