On Saturday, January 24, 2004, at 10:06 AM, Bernie Wylde wrote: > On 24 Jan 2004, at 14:44, Jay Reeve wrote: > >> On Saturday, January 24, 2004, at 04:34 AM, Bernie Wylde wrote: >>> My app lets the user specify control and window constant names. >>> I wonder if there's a way to prevent the user from entering a >>> pre-defined FB^3 constant? >> >> Sure. Check the entry against a list of pre-defined constants and >> throw it out if it matches. If the list is sorted, the search can be >> nearly instantaneous. > > Thanks Jay, > > This would mean I'd have to compile a list of all the current FB > constants and key them in or copy them to my app. Plus I'd have to > update my list as and when FB's constants are changed. I was hoping > for a more automatic method. > > e.g. If I could issue one of the following statements from my app and > trap the error message: > > constVal = _constantName > _constantName = 5 > > Unfortunately this needs to be done from a built app and these errors > are probably only thrown up at compile time. > > Hmmm... I'll abandon any further attempts at incorporating this > feature :-) > > Cheers > Bernie Don't be too hasty to give up. FB comes with a nice constants help file that wouldn't be too hard to transform into a usable format. That should cover any likely instances. Newly-added constants tend to be long and esoteric, so I wouldn't worry about them. That said, one would think there should be a compiler resource you could extract, although it wouldn't surprise me if Andy has most of them hard coded. Either way, it should be doable (which is not to say simple). :-) e-e =J= a y "