Doesn't just doing this with $foobar = %ctrl.add("text", 1); and then using $foobar.delete(); work?
Maybe you could clear all elements with %ctrl.clear(); and re-add ones you want to keep?