Implement Wizard.Refresh()

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Implement Wizard.Refresh()

Tobias Boege-2
Hi Benoit,

in my current project, I use a (two-step) Wizard where one step contains a
CheckBox that determines if the next step is enabled or not (an optional
preview). The Wizard does not draw itself new (e.g. the "Next" button should
become an "OK" button if the current step suddenly is the last one) auto-
matically if I change the value of Wizard[Index].Enabled.

The attached patch simply puts the (not yet implemented) Wizard.Refresh()
method in charge. The user is expected to call it after making a change to
the enabledness of steps. If you say this is OK, I will commit the changes
myself.

Regards,
Tobi

--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------

_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Wizard-Refresh.patch (357 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Implement Wizard.Refresh()

Benoît Minisini
Le 04/10/2015 21:21, Tobias Boege a écrit :

> Hi Benoit,
>
> in my current project, I use a (two-step) Wizard where one step contains a
> CheckBox that determines if the next step is enabled or not (an optional
> preview). The Wizard does not draw itself new (e.g. the "Next" button should
> become an "OK" button if the current step suddenly is the last one) auto-
> matically if I change the value of Wizard[Index].Enabled.
>
> The attached patch simply puts the (not yet implemented) Wizard.Refresh()
> method in charge. The user is expected to call it after making a change to
> the enabledness of steps. If you say this is OK, I will commit the changes
> myself.
>
> Regards,
> Tobi
>

Refresh is already a method of the inherited Control class, you
shouldn't use that name...

--
Benoît Minisini

------------------------------------------------------------------------------
_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel
Reply | Threaded
Open this post in threaded view
|

Re: Implement Wizard.Refresh()

Tobias Boege-2
On Sun, 04 Oct 2015, Beno??t Minisini wrote:

> Le 04/10/2015 21:21, Tobias Boege a ?crit :
> > Hi Benoit,
> >
> > in my current project, I use a (two-step) Wizard where one step contains a
> > CheckBox that determines if the next step is enabled or not (an optional
> > preview). The Wizard does not draw itself new (e.g. the "Next" button should
> > become an "OK" button if the current step suddenly is the last one) auto-
> > matically if I change the value of Wizard[Index].Enabled.
> >
> > The attached patch simply puts the (not yet implemented) Wizard.Refresh()
> > method in charge. The user is expected to call it after making a change to
> > the enabledness of steps. If you say this is OK, I will commit the changes
> > myself.
> >
> > Regards,
> > Tobi
> >
>
> Refresh is already a method of the inherited Control class, you
> shouldn't use that name...
>

... or call Super.Refresh() in the custom Wizard.Refresh() method? If that
is also not good, please propose an alternate name. Your names are usually
better than mine.

--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel
Reply | Threaded
Open this post in threaded view
|

Re: Implement Wizard.Refresh()

Benoît Minisini
Le 04/10/2015 22:05, Tobias Boege a écrit :

> On Sun, 04 Oct 2015, Beno??t Minisini wrote:
>> Le 04/10/2015 21:21, Tobias Boege a ?crit :
>>> Hi Benoit,
>>>
>>> in my current project, I use a (two-step) Wizard where one step contains a
>>> CheckBox that determines if the next step is enabled or not (an optional
>>> preview). The Wizard does not draw itself new (e.g. the "Next" button should
>>> become an "OK" button if the current step suddenly is the last one) auto-
>>> matically if I change the value of Wizard[Index].Enabled.
>>>
>>> The attached patch simply puts the (not yet implemented) Wizard.Refresh()
>>> method in charge. The user is expected to call it after making a change to
>>> the enabledness of steps. If you say this is OK, I will commit the changes
>>> myself.
>>>
>>> Regards,
>>> Tobi
>>>
>>
>> Refresh is already a method of the inherited Control class, you
>> shouldn't use that name...
>>
>
> ... or call Super.Refresh() in the custom Wizard.Refresh() method? If that
> is also not good, please propose an alternate name. Your names are usually
> better than mine.
>

Let's call it "Update" then... Even if Control.Refresh() is useless for
compound controls, it's not a good idea to override it with something
not related at all.

Regards,

--
Benoît Minisini

------------------------------------------------------------------------------
_______________________________________________
Gambas-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-devel