Hot Door CORE Forum
string utilities and smart text fields - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Feature requests (http://hotdoorcore.com/forum/forumdisplay.php?fid=7)
+--- Thread: string utilities and smart text fields (/showthread.php?tid=80)



string utilities and smart text fields - Rick Johnson - 06-22-2016

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.