MessageDialog retains values between calls to ShowModal? (REALbasic network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] Radical Breeze releases RB Dev Pack 4.1
Next thread: applicationSupportFolder


Re: Audience / Separation of users?   -   Rubber Chicken Software Co.
  MessageDialog retains values between calls to ShowModal?   -   Tim Jones
   Re: MessageDialog retains values between calls to ShowModal?   -   Tim Jones
   Re: MessageDialog retains values between calls to ShowModal?   -   Norman Palardy
   Re: MessageDialog retains values between calls to ShowModal?   -   Charles Yeomans

MessageDialog retains values between calls to ShowModal?
Date: 01.03.10 21:25 (Mon, 1 Mar 2010 13:25:57 -0700)
From: Tim Jones
Hi All,

Normal operation or Bug?

In a method, add a Dim for a messagedialog:

Dim md As New MessageDialog

When the md is displayed, it retains the pushbutton clicked value so that if you click on the ActionButton the first time the md is displayed, that value is returned any further time the md is displayed with that method.

This means that the next time the md is displayed, the check for the returned value will always still be the button clicked in the first displayed instance.

I've found the fix is to not New the md in the Dim statement, but rather just before you call it in each instance.

Should that be required? Is the dialog not being closed after you click a button and is instead simply hidden - therefore retaining the values between displayed instances?

Does that make sense to anyone else?

Thanks,
Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MessageDialog retains values between calls to ShowModal?
Date: 01.03.10 22:48 (Mon, 1 Mar 2010 14:48:07 -0700)
From: Tim Jones
On Mar 1, 2010, at 2:41 PM, Norman Palardy wrote:

> On 1-Mar-10, at 1:25 PM, Tim Jones wrote:
>
>> I've found the fix is to not New the md in the Dim statement, but rather just before you call it in each instance.
>
> Yes
> Create a new one each time

I've converted the necessary elements to use that method.

> Expected ? I'd think so as it's just an object that retains whatever property values it has.
> Could it be altered so it throws away the old choice when you call to Show the dialog ? Quite possibly. Sounds like a feature request

Hmmm, since I seem to be the first test subject, I'll leave well enough alone :-).

Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MessageDialog retains values between calls to ShowModal?
Date: 01.03.10 22:41 (Mon, 1 Mar 2010 14:41:08 -0700)
From: Norman Palardy

On 1-Mar-10, at 1:25 PM, Tim Jones wrote:

> Hi All,
>
> Normal operation or Bug?
>
> In a method, add a Dim for a messagedialog:
>
> Dim md As New MessageDialog
>
> When the md is displayed, it retains the pushbutton clicked value so
> that if you click on the ActionButton the first time the md is
> displayed, that value is returned any further time the md is
> displayed with that method.
>
> This means that the next time the md is displayed, the check for the
> returned value will always still be the button clicked in the first
> displayed instance.
>
> I've found the fix is to not New the md in the Dim statement, but
> rather just before you call it in each instance.
>
> Should that be required? Is the dialog not being closed after you
> click a button and is instead simply hidden - therefore retaining
> the values between displayed instances?
>
> Does that make sense to anyone else?

Yes
Create a new one each time

Expected ? I'd think so as it's just an object that retains whatever
property values it has.
Could it be altered so it throws away the old choice when you call to
Show the dialog ? Quite possibly. Sounds like a feature request

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MessageDialog retains values between calls to ShowModal?
Date: 01.03.10 22:05 (Mon, 1 Mar 2010 16:05:15 -0500)
From: Charles Yeomans

On Mar 1, 2010, at 3:25 PM, Tim Jones wrote:

> Hi All,
>
> Normal operation or Bug?
>
> In a method, add a Dim for a messagedialog:
>
> Dim md As New MessageDialog
>
> When the md is displayed, it retains the pushbutton clicked value so
> that if you click on the ActionButton the first time the md is
> displayed, that value is returned any further time the md is
> displayed with that method.
>
> This means that the next time the md is displayed, the check for the
> returned value will always still be the button clicked in the first
> displayed instance.
>
> I've found the fix is to not New the md in the Dim statement, but
> rather just before you call it in each instance.
>
> Should that be required? Is the dialog not being closed after you
> click a button and is instead simply hidden - therefore retaining
> the values between displayed instances?
>
> Does that make sense to anyone else?
>

I'm not sure -- I wrote the following test code based on your
description.

dim m as new MessageDialog
m.CancelButton.Visible grue
dim b as MessageDialogButton .ShowModal
dim b1 as MessageDialogButton 3.ShowModal
dim buttonsEqual as Boolean Ob ;1)

buttonsEqual was set to false, but you were claiming that it would be
true. Is this what you have in mind?

Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>





Links
MBS Filemaker Plugins - Pfarrgemeinde Messdiener Nickenich