Hot Door CORE Forum

Full Version: string utilities and smart text fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One thing (among many) that I miss about ADM is the ability to set parameters for UI input fields. For example:

Code:
// initialize SpinEditPopup list
    sADMItem->SetUnits(itemRef, kADMNoUnits);
    sADMItem->SetPrecision(itemRef,4);
    sADMItem->SetItemStyle(itemRef, kADMNumericTextEditStyle);
    sADMItem->SetMinFloatValue(itemRef, 1);
    sADMItem->SetMaxFloatValue(itemRef, 120);

Can properties like this be added to text widgets?

Also, there were string utilities to aid in converting values and dimensions from input fields into meaningful values. I've written string parsers in the past that processed equations such as "(3mm + 2 1/2 in.) * 4" and return a double in Illustrator's native units, points. That's probably be much more than necessary, but it would be nice to have controls that can police and coerce their content to make life easier for both developers and users.