Question: Maplet Textfield with Integer output

Hello,

Using Maplets Elements I'm trying to program some inputs which I then want to use to solve a differential equation. My Problem is that my inputs are somehow in the wrong data type. I actually don't even know what data type they are, but it's not string and no number as I can't calculate with them.

I do have a little programming experience (php, Java, C++) but it's my 1st maple program which I need for school.

My code so far is:

________________

> restart; with(Maplets[Elements]):

> Gehäuseart := Maplets[Display](Maplet([["Wählen Sie Ihr Gehäuse: ", DropDownBox['DDB1']("Midi Tower", sort(["Mini Tower", "Big Tower", "Benutzerdefiniertes PC-Gewicht und Volumen", "Midi Tower"], lexorder))], [Button("OK", Shutdown(['DDB1']))]]));

> if Gehäuseart = ["Midi Tower"] then V := 0.354e-1; mk := 12 end if;

> if Gehäuseart = ["Mini Tower"] then V := 0.225e-1; mk := 10 end if;

> if Gehäuseart = ["Big Tower"] then V := 0.690e-1; mk := 21 end if;

> if Gehäuseart = ["Benutzerdefiniertes PC-Gewicht und Volumen"] then V := Maplets[Display](Maplet([["Bitte Volumen in m^3 eingeben", TextField['TF1']()], [Button("OK", Shutdown([TF1]))]])); mk := Maplets[Display](Maplet([["Bitte PC-Gewicht in kg eingeben", TextField['TF2']()], [Button("OK", Shutdown([TF2]))]])) end if;

________________

The text is in German but basically it's just about choosing first a preset computer case ("Gehäuseart") or the custom. Choosing the custom it should possible to enter the Volume and the mass of the computer.

"Gehäuseart", V and mk (2 latters resulting from the custom case) are not strings and not numbers I can calculate with. Just printing V for example I get ["12"] if I enter a volume of 12 (with the brackets and the quotation marks).

I appreciate any help. Thank you very much.

 

ABBDVD

 

PS: I upload the .mw file: Spam_DGL_Projekt.mw

Please Wait...