Textbox filter style and data types

Started by Jim Short, August 09, 2016, 06:31:30 AM

Previous topic - Next topic

Jim Short

text box with 3 filter style (numerical units)
From description, I assume numerical looking string characters allowed
   ;;dcl error invalid argument type
   (dcl-control-setText uMill/Outline/DatumRapidPlaneElev 1.2)
   ;;allowed
   (dcl-control-setText uMill/Outline/DatumRapidPlaneElev "1.2")
   ;;allowed
   (dcl-control-setText uMill/Outline/DatumRapidPlaneElev "12")
   ;;blocked by filter
   (dcl-control-setText uMill/Outline/DatumRapidPlaneElev "ab")
   ;;allowed
   (dcl-control-setText uMill/Outline/DatumRapidPlaneElev 11)

Why accept integer but not real number?
Jim Short

owenwengerd

This might be a legacy thing, where original ObjectDCL code accepted integers for string arguments. I know there are numerous such oddities throughout the code that were left in case old code relied on the behavior.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Hm, interesting. I was using ObjectDCL from 2002 until 2007 and I've never known that integers were possible to use.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]