Jump to content
Server Maintenance This Week. ×

No exit of field


This topic is 4389 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have the uneasy feeling that you guys are going to embarrass me by pointing a simple and obvious solution to my problem.

Long sigh..........here goes:

I have a layout with a single field on it. The UI is set up to open a new window and go to this layout upon clicking a button. The script opens the window and goes to that field. I don't want the user to be able to exit the field by clicking into the background so I thought I would use an OnObjectExit script trigger to run a script that simply goes to that field using the Go To Field or Go To Object script step.

I found that I need either an Exit Script[0] or Halt Script step following the Go To Field step as the script runs before the object is actually exited and when the script finishes, without an Exit Script or Halt Script, the user action is performed, ie the click into the background happens, and the field is exited.

Putting an Exit Script[0] or Halt Script in the script creates other issues. Such as being unable to enter Layout Mode if the cursor is in the field. Attempting to go into Layout exits the field which fires off the OnObjectExit script which stops FM from going into layout mode.

I have to move on to other things, so I am turning to you to offer some ideas. I am not married to Script Triggers, so if you have a technique that doesn't use script triggers, I'm completely open to it.

Link to comment
Share on other sites

pop the layout in a modal window, then don't allow close unless the field is not empty. however, this could be a problem "trapping the user."

How about describing the requirement in more detail and then let us suggestion which technique or interface would be best?

Link to comment
Share on other sites

I have a layout with a single field on it. I don't want the user to be able to exit the field by clicking into the background ...

Maybe make the field the size of the layout (set alignment center-center). Cursor lands in the middle and they will have nowhere else to go.

Link to comment
Share on other sites

Script trigger is not a bad way to go. Check for full access privileges in your script and branch accordingly, or turn on your debugger when you want to edit the layout.

Link to comment
Share on other sites

Hahahahaha. As I said, simple and obvious. Thank you all for the responses. They certainly all gave me different ideas of things to try.

Vaughan's idea did the trick, though I believe bcooney meant this very thing when he mentioned modal window. It just didn't click for me at that point. I saw modal and thought he was talking about FM12's new modal window option and I am not going to FM12 just yet. They have some things to work out.

Thank you to ALL! This forum continues to serve as a good place to throw questions out to fellow developers and it's appreciated.

Link to comment
Share on other sites

This topic is 4389 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.