Does the script debugger work with popovers in FileMaker 17? FM 16 ignores them, and they don’t pop up.
Can you please provide some more detail abouth what you expect to happen and what actually happens?
Based on your description, I don’t recognize such an issue in FileMaker.
As is obvious from the name, the script debugger debugs scripts, not layout objects, and also not single actions attached to buttons.
You may also want to check whether you have toggled script triggers off in the script debugger (in case you want to debug a script that runs on a trigger when you interact with the popover).
This is the file showing the popover, and the script that brings it up, plus part of the script that creates the new record (Comment. But when I run the Script Debugger, that popover never pops up. That popover requires an entry and a button selection, so I did it with two scripts.
Also, I have figured out a trick so that I can have multiple popovers appear in the same spot on the same layout, where I can just duplicate one and change the popover name, and popover buttons. This way I don't need to play with the the padding each time I want a new one to appear in the same position . The actual popover buttons have been reduced in size, with only one pixel of each in a layout part. I have found that the popovers will work, with existing text, even if they are not in a layout part at all. But if they require data entry, as some of mine do, they must have at least one pixel in a layout part.
Difficult to identify the issue with only parts of the script. Are you able to upload a copy of the file that reproduces the issue, with any sensitive data/logic removed?
Do you get an error code in the debugger after the Go to object that fails to open the popover?
If you want to hide the actual popover buttons, you can also set a hide condition 1 (True) on them.
I'll try to create a demo that does the same thing, but the script debugger does not stop. if goes through the step, but the popover never pops up, though it works fine when I am not using the script debugger, which tells me that there must be some conflict with the debugger and something I am doing it does not like.
Try stepping through the debugger one stepst a time, and/or activate the option to Pause on error.
I almost always do the debugger steps one at a time, though I have found that there are usually better ways to do the debugging than using the debugger I typically put and pauses throughout the script, and turn the steps off and on.
I also just learned something stupid that I have been doing. I have been using two scripts when I need to make an entry into the popover. One to clear data, and make the popover show, and the other one to do the basic function. A better way is to use the same script for both. Make the script clear the data, set an activity flag, and bring up the popover. Then have the button selections in the popover run the same script again, have the first part of the script disabled by the activity flag, and at end of the script clear the activity flag. Sometimes I feel like such a dummy. It has always amazed me that there is never an end to the learning. I often look at FM files that I created decades ago, and ask myself "What the heck was I thinking back then"
.... comments and pauses....
I am having something really weird going on that has me stumped. I have used popovers to replace all of my Show Message steps that work fine, but I have one really weird one in a script. It has a popover step that works fine near the beginning which is closed when it’s button is selected. Then later down the script there is another selection using a different popover, but it only pops up if I am using the script debugger. If I am not using the script debugger it only pops up is if I put short pause after it, and as soon as the pause times out it goes away without me selecting any of the buttons. I thought that when a popover opens, it stays there until you do something?
Not necessarily. What does your script do after opening the popover?
The section that is highlighted is the popover that won't stop unless I use a pause after it. But as soon as the pause times out, the popover closes. I have checked everything compared to the 20 or so other popovers in the file, and everything looks correct. I was looking for maybe a feature where you could turn off or on to allow it to close by itself, vs wait for you to click a button. I always name my popover using the names of the buttons like "Cancel/Yes/No/Entry Popover" The "Entry" means that it has a field in it that needs something entered into it. That way I can use the same ones over any over without changing much. I also use 2 global fields for the function, called "Popover Message" and "Popover Selection", and I use them over and over for all of the popovers. The first one sets the message that I want to send to the user, and the other one gets the name of the button I click on. Then I use If statements after that, which make more sense than using 1,2,3..... , and I don't need to open anything too see what is going on.
First, popovers are not the dialog boxes that you are replacing with popovers, opening a custom dialog automatically pauses the script until the user clicks a button in the dialog. This is not the case for a popover.
Second, the very next line in your script is "close popover" and that will close the popover opened by the line just ahead of it.
If you want to pause this process for user interaction immediately after opening the popover, you could use an indefinite pause with buttons in your popover that continue the paused script, but I find it usually simpler to just break the script in two parts. Part one ends with the go to object step that opens the popover, part two, the lines after that point are then a separate script performed by buttons or triggers that are part of the popover. (You'll need to use the onObjectExit trigger to handle cases where the user clicks elsewhere in the window--closing the popover.)
You may find that a card window is a better option than a popover.
I understand what you are saying, but most of my scripts are pretty much the same, and they work. I even removed the Close Popover command, and it still doesn't work. Here is one that is pretty much the same, and it works.
I looked at a few YouTube videos about Card Windows, but they seem to be a lot more elaborate and take a lot more work. What I am doing is pretty simple. Just allowing the user to decide if he wants to search and highlight only the active record, or the every record in the found set.
But your scripts all rely on a selection being made in the popover right? Well the script would run before you get to select anything so I can't see how it ever worked.
The script should go up until you open the popover and then finish, and then a different script should run upon selection.
Also you may want to blur out your data in the screenshots
You have to make the script either stop or pause for user input after opening the popover. Show custom dialog does that for you opening a popover does not.
A card window is modal and that can be helpful when setting up dialogs for user input. They really aren't that much more complex than a popover. The main advantage to a popover is that it's easy to control where the popover appears relative to other objects on your layout. That isn't always easy to do with a card window. You'd still have to stop or pause the script after opening the card window.
Thanks. After reading the comments and doing some experiments I realize that your comments were correct. Seems like a dumb design though. They should give the the developers the option to have it stop for a selection, or continue. But it's no problem either way. It just requires more work splitting a script into multiple scripts for each conditional If selection.
You can make it pause if you want. The step after your script can pause indefinitely. Buttons in your popover can resume the paused script.
But then you have to figure out what to do if the user simply clicks the layout background and closes the popover—which might leave the user with no popover but a paused script.
Thus, I find it simpler to use two or more scripts.
That seems not to be the case. Yes there is a one shot resume selection in the popover, but the point of more than one button in a popover is to make a selection by setting conditions. You can't say resume and set a condition at the same time, and there is no regular script command that resumes a paused script. There is a Pause/Resume script command that is obviously misnamed, because there is no selection to have it resume a paused script. The only way I can see to do this is to have a complete new script for each button, and end each script with a popover to set up the next condition. Both no script command to resume a script, and not having an option to stop a script when the popover is activated is a lame way to do something.
I do like that the popovers allow me to keep my chosen color and make buttons and entry fields s as long as I want, unlike the Show Message selection. I guess I can check into this card feature, but from watching some YouTube videos it seems like an over kill for what I am doing and might not even give me what I want.
Another thing is that the Script debugger gives you a false assumption of how a script with a popover is going to work, because it pauses after the popover and allows any If script option after it to work, which does not happen when the script is running without the debugger.
Well the debugger pauses after every step, not just those that open a popover.
A card window really isn’t all that much more complex and easily out performs custom dialogs when comes to setting up a modal dialog for user data entry. It’s well worth taking a few minutes to figure out how to work with them.
You didn't look at the button options, one of which is to continue a paused script. So a button can process the button click, then resume a paused script.
but this still creates an issue for popovers should the user click outside the popover and thus close it--something that is not an issue with card windows, and something that is more easily handled with a split script.
DennyHayes wrote:They should give the the developers the option to have it stop for a selection, or continue.
They should give the the developers the option to have it stop for a selection, or continue.
"They" do. It's called Pause/Resume [ indefinitely ].
Retrieving data ...