On 7/2/11 11:43 AM, Pete wrote:

Here's the code I used to get round the problem.

You're doing way too much work. Name your buttons:

%M 1
%m 2
%d 1
%D 2

Store the full button name in your prefs so that you'll have the correct name of the button to hilite when you need to set them. You won't need to process anything, just use "repeat for each line L in tPrefs" and set the hilite of each button. There will be no ambiguity.

The only time you need to do any parsing at all is when you actually want to format a date for display. In that case:

 put word 1 of the short name of btn x into tFormat

Then work with that.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.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