- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I'm writing a program that uses dialog boxes. The dialog box contain edit boxes where the user has to write a number, after the input the program saves those number in an array. if I enter a positive number it's all ok but if I write a negative number when I write " - " give me an error. Another error it gives me it's when I write a number and I delete it after (I write 1 and I push the backspace button twice)
here is the program "masse prova", in the menu press on Disegna>Rettangolo and after insert the number, the minus.....
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is that you are reading in the input as soon as it is entered and you are reading it directly into a real. "-" is not a valid number. I would suggest not reading the data until the user presses ok, and to read it in as string then convert to the expected type. This will allow you to add more graceful error processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thank you problem solve! I have another question about a notice the program give me. When I try to draw a rectangle with the coordinates I input in the dialog box the program tell me:
The data type of the actual argument does not match the definition. [RETT]
I suppose that problems are the coordinates of the two points of the rectangle that are REAL numbers and not INTEGER(2), isn't it?
how can I modify those?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page