Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Has anyone noticed that if you have a custom dialog in windows and you press the escape key, the dialog is dismissed but the script acts as though your pressed the default button just like if you hit return. If you actually click the cancel button, the Get(LastMessageChoice) works as expected. This doesn't happen on the Mac side as the escape key doesn't dismiss the dialog.

Is this a recent bug, because I could swear I've used the escape key before w/o a problem. My script is pasted below.


Show Custom Dialog [ Title: "Enter the Chembiz Sale ID"; Buttons: “OK”, “Cancel”; Input #1: sample::gt_tempSaleID, "Sale ID" ] 

If [ Get ( LastMessageChoice )=1 ] 

   Commit Records/Requests [ Skip data entry validation; No dialog ] 

   Enter Browse Mode 

   Replace Field Contents [ sample::s_saleId; Replace with calculation: sample::gt_tempSaleID ] [ No dialog ] 

   Replace Field Contents [ sample::s_billed; Replace with calculation: 1 ] [ No dialog ] 

   Replace Field Contents [ sample::s_billedDT; Replace with calculation: Get ( CurrentTimeStamp ) ] [ No dialog ] 

   Set Field [ sample::gt_tempSaleID; "" ] 

   Commit Records/Requests [ Skip data entry validation; No dialog ] 

Else 

   Set Field [ sample::gt_tempSaleID; "" ] 

   Commit Records/Requests [ Skip data entry validation; No dialog ] 

   Enter Browse Mode 

   Halt Script 

End If 

Posted

No bug, I believe this behaviour is consistent with earlier versions.

Posted

On the Mac, Cmd Period acts a lot like the Escape Key does on Windows, have you tried the Cmd Period on the Mac to see if it does the same thing?

Posted

Nope, Cmd-period does not dismiss a custom dialog on the Mac. Only clicking the buttons or hitting return will do it, and return performs the default action as you would expect.

Whether or not the escape key behavior is a bug in the windows version or not, it is not how a dialog should act, and is not how they act in other applications, like FMP itself for instance...

  • 2 weeks later...
Posted

Another little detail I noticed on this... If you press the Esc key and release quickly, the script treats it as though you hit the default button (even if there is no default button defined). But if you hold the Esc button down, it acts as though you aborted the script, and does not do the default action first. You can make the behavior more consistent, by turning off allow user abort. Then it acts like the default button no matter how long you hold the key.

Strangely, command-period on the mac does not abort the script when a dialog is present.

Posted

The esc behavior has been like this since the custom dialog was introduced. That way around is to make the "cancel" action your default button. That also means user's can't just hit enter to trigger the "go ahead" action.

When you hold down the esc key you're actually sending a multitude of esc commands to FM and FM will queue them up and act on them when it has time, meaning past the action of the custom dialog. If you have "allow user abort [off]" in your script then it should normally have no effect.

Posted

The problem with making the cancel action the default button is that this doesn't work well with input fields... Oh well, I guess I'll just have to make my own dialogs with layouts and windows.

Posted (edited)

This (and other things) make the custom dialog function unusable. You better make your dialogs with a plugin.

Troi Dialog Plugin also has an issue with the escape or Cmd-period keys.

The best is the 24U SimpleDialog plugin.

The only 'Show custom dialog' script step in all my solutions is to display: "The dialog plug-in is missing" and close the file.

Edited by Guest

This topic is 6839 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.