Procedures not responding to info("dialogtrigger")


#1

I’ve experienced procedures ignoring buttons pressed from alert dialogs. I set up an alertyesno dialog and the button pressed was ignored. If I use setdialogtrigger, the procedure uses whatever I tell it to be and works perfectly. Earlier today following this behavior, a matrix lost it’s data on all records. Opening and closing, resting the criteria, nothing seemed to make it respond. I had to recover from a previously saved version. At that point, the alert dialog responded to my choice.


#2

There was no response to this post, but it is still happening every time I run procedures with an alertyesno statement. When I first open the file I am working with, it usually responds to a yes or no action. After the first or second time I run a procedure with an alertyesno statement, the response is ignored. I created a test procedure which says:
local linfo
alertyesno "Is it working?"
linfo= info(“dialogtrigger”)
message linfo

There is never a message displayed. If I open a new database and create a new procedure that says:
local linfo
alertyesno "Is it working?"
linfo= info(“dialogtrigger”)
message linfo

a “yes” or “no” is displayed depending on which button I push. If I then go back to the original database, a response will be triggered one or two times, then it stops working again. This makes it really hard to troubleshoot procedures.

Any ideas why this could be happening? Is there anyway to clear out info(“dialogtrigger”) after using it?


#3

I can not duplicate your problem in my testing so I can’t offer any advise in that regard. There is, however, the setdialogtrigger statement that can set the value of the info(“dialogtrigge”) buffer.


#4

Seeing your post from today, I tried out your procedure here:

Jeff Kozuch wrote:

local linfo

alertyesno “Is it working?”

linfo= info(“dialogtrigger”)

message info

There’s a typo–you surely mean message linfo, not message info. When I typed it in with that typo corrected, it seems to work every time; I tried it 5 times and then called it from a button on a form. Each way worked without any problem. Don’t know if that helps…


#5

Thanks Gary. It works every time in a fresh database. I’m trying to figure out what could be causing it to consistently not work in the one I have to work with.


#6

Yep, it’s a typo. And yes, it works every time in a a fresh database.


#7

I think you must have a field named linfo. Or maybe a permanent variable, though that shouldn’t matter. In any case, I would try using a different variable name.

alertyesno "Is it working?"
let alertButton = info("dialogtrigger")
message alertButton

Also, I’ll repeat the tip I just made in another thread about indenting code. If you indent code 4 spaces when pasting it into a forum message, it will highlight as code and your message will be much easier to read.


#8

Thanks for the response but linfo has nothing to do with it. That was just a test to see if it responded to a button click. message info(“dialog trigger”) also returns nothing in this particular file, however, It works every time in a fresh database. I have lots of procedures in this one database that use the alertyesno statement and the statement just needs to respond to a button being clicked which none of them do after any procedure with the statement is used two or three times. I am actually not loading a variable with the result. Mostly, after a button is pressed in the dialog, the next line of code is

if  info("dialogtrigger") contains "yes”  
then do this and that

My point is alertyesno is breaking down in this particular file only.