* added trySetPattern function which will popup dialog to user and return false if there are any syntax errors in pattern
* before popup show matches and choose matches dialogies attempt to compile pattern. if it fails, inform user and don't popup anything.
* todo: tabbing out of pattern edit field must be handled properly (try and set pattern)