Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Converters and Value problem
Re: Converters and Value problem [message #27565 is a reply to message #27552] Fri, 23 July 2010 12:11 Go to previous messageGo to previous message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Mirek,
yes, I know what you answer, but the problem is: Value don't allow char and short type, so, in fact, I am not able to recognize then from Value:

Value.GetType() == CHAR_V // does not exist
Value.GetType() == SHORT_V // does not exist

I work around PLC and small microcontrollers, where CHAR and SHORT are daily normal work.

If I develop an U++ application for comunicate with this kind of device, char and short are basically need.

Example:
char i;

i limits are: -128, +127 in decimal
i limits are: 0x80, 0x7f in exadecimal
etc...

If I use the converter, with minval and maxval, for show and edit one byte in exadecimal, (note that upp only allow integers), typing: FE result in a positive value, the editor complain about the max limit.

Second: Formatting -1 in exadecimal, for U++ result in "FFFFFFFFFFFF...", where, for char, must be only "FF".

So, again, for now I have, for every format, 4 different converter of type: char, short, int, and int64 (last one I really don't need), only for adjust the format result string, and for verify as well the typed value limits.

Hope this explain help you to undertand the my point of view.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: DONE: ColumnList with Ctrl's
Next Topic: Persistent "tips"
Goto Forum:
  


Current Time: Wed May 08 17:53:49 CEST 2024

Total time taken to generate the page: 0.02645 seconds