What way is best way to associate an address of data (specifically, character data, but extensible to others) with a control?
I ask this because I have different handlers doing the exact same task, but pointing to different data items. Yes, I could have separate callbacks, then invoke a common data handler using the specific data item in the call, but this kind of defeats the purpose of making the handler totally independent of the location of the data item itself.
I have two handlers to deal with similar data types. I want the user to enter numeric data into a single control as numeric fields separated by spaces. I want to attach a callback to see if all the data in the field is either a space or a digit. But only if I can access the character data field actually being modified. Luckily for me, the handler would only deal with character strings of identical length (i.e. if the control is 32 characters, it will always be 32 characters, regardless of where it might appear).
I can envision a very complex set of winio@() setup code to create a control and save the control window and LOC() of the data as the window is being built, but this is a complex solution to what might be a simple problem.
I've been through the documentation, searching for potential solutions, but don't see anything that looks good (except some of the vc() routines but they require a control ID number along with the window handle). If none exists, then so be it.