Question: Input integer via Textbox



I want to create a Textbox which will be opened in the beginning of a Maple code. In this Textbox I want to write an integer, which will be used for a following calculation.

I already found this code:


> restart; with(Maplets[Elements]);
print(`output redirected...`); # input placeholder
> maplet := Maplet([["Insert Text", BoxCell(TextBox['IB1'](1 .. 10))], [Button("OK", Shutdown(['IB1'])), Button("Cancel", Shutdown())]]);
print(`output redirected...`); # input placeholder
> result := Maplets[Display](maplet);


But then you get a string (result), not an integer. How can I change this? I want to take this "input" for following calculation, thats important. It would be great if you coul help me!

Thank you!

Please Wait...