by gpswaney » Sat Oct 27, 2012 4:37 am
I have written a script which creates an additional properties sheet, based on the example shown on the MM wiki for using the SDB.UI.AddPropertiesSheet method. The framework of the script is:
Sub SetupPDFsheet
Dim i
i = SDB.UI.AddPropertiesSheet("PDF File", Script.ScriptPath, "InitPDFsheet", "TrackChange",_
"SavePDFsheet", 5)
End Sub
Sub InitPDFsheet(Sheet)
...
End Sub
Sub TrackChange( Object, ObjectType)
...
End Sub
Sub SavePDFsheet(Sheet, Object, ObjectType)
...
End Sub
PROBLEM 1:
Clicking the "OK" button results in a call to "SavePDFsheet," as expected. The problem is, clicking the "Cancel" button also causes a call to "SavePDFsheet," which makes no sense to me. Is there a reason for this? I don't see how the code inside the routines could cause this problem, so I think it's a bug. The "Cancel" button should only cause a call to an (internal) routine to destroy the sheet, which is not among the routines I can access through this interface, is it?
PROBLEM 2:
My sheet has an edit box. I have noticed that if the edit box has the focus, clicking the "OK" button triggers the OnExit event for the edit box (as expected), but does not proceed to save the sheet and close the dialog. This requires a second click of the "OK" button. If the edit box does not have the focus, one click of the "OK" button does it. It's as though the edit box swallows the first click and prevents the "OK" button from getting it. Any ideas? Are these two problems related?
I have written a script which creates an additional properties sheet, based on the example shown on the MM wiki for using the SDB.UI.AddPropertiesSheet method. The framework of the script is:
Sub SetupPDFsheet
Dim i
i = SDB.UI.AddPropertiesSheet("PDF File", Script.ScriptPath, "InitPDFsheet", "TrackChange",_
"SavePDFsheet", 5)
End Sub
Sub InitPDFsheet(Sheet)
...
End Sub
Sub TrackChange( Object, ObjectType)
...
End Sub
Sub SavePDFsheet(Sheet, Object, ObjectType)
...
End Sub
PROBLEM 1:
Clicking the "OK" button results in a call to "SavePDFsheet," as expected. The problem is, clicking the "Cancel" button also causes a call to "SavePDFsheet," which makes no sense to me. Is there a reason for this? I don't see how the code inside the routines could cause this problem, so I think it's a bug. The "Cancel" button should only cause a call to an (internal) routine to destroy the sheet, which is not among the routines I can access through this interface, is it?
PROBLEM 2:
My sheet has an edit box. I have noticed that if the edit box has the focus, clicking the "OK" button triggers the OnExit event for the edit box (as expected), but does not proceed to save the sheet and close the dialog. This requires a second click of the "OK" button. If the edit box does not have the focus, one click of the "OK" button does it. It's as though the edit box swallows the first click and prevents the "OK" button from getting it. Any ideas? Are these two problems related?