Mike Kerner wrote:

> Well, that would be a nice thing to have in a field widget, but I run
> into formatting issues with databases, as well, especially when
> sorting.

The DB issue may be best handled through an accessor library. Many other error-correction and conveniences could be added to that as well.

But with fields, a formatting enhancement need not be a Widget per se. That would require first reproducing the entire field object, and then adding the small bits we're discussing here. Daunting.

Simpler would be a behavior script, with a custom properties called something like "rawText" and "displayText", with formatting determined by "displayFormat", e.g.:

set the displayFormat of fld 1 to "$0.00"
set the rawText of fld 1 to 5 -- shows "$5.00"
get the displayText of fld 1 -- returns "$5.00"
get the rawText of fld 1 -- return "5"

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to