Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #2812 > unrolled thread

how execute method just after checkbox click

Started by"Heli-Team.pl Portal" <admin1@heli-team.pl>
First post2012-01-15 11:45 -0800
Last post2012-01-15 21:33 +0100
Articles 8 — 6 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  how execute method just after checkbox click "Heli-Team.pl Portal" <admin1@heli-team.pl> - 2012-01-15 11:45 -0800
    Re: how execute method just after checkbox click "Gerhard Bunzel" <g.bunzel@domonet.de> - 2012-01-15 21:28 +0100
      Re: how execute method just after checkbox click "Paul SISKA" <PaulSISKA NOSPAM@online.fr> - 2012-01-15 21:36 +0100
      Re: how execute method just after checkbox click "Heli-Team.pl Portal" <admin1@heli-team.pl> - 2012-01-15 14:13 -0800
        Re: how execute method just after checkbox click "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-01-16 13:26 +1100
          Re: how execute method just after checkbox click "Jamal" <vodotnet_nospam@yahoo.com> - 2012-01-16 00:01 -0500
            Re: how execute method just after checkbox click "richard.townsendrose" <richard.townsendrose@gmail.com> - 2012-01-16 06:35 -0800
    Re: how execute method just after checkbox click "Paul SISKA" <PaulSISKA NOSPAM@online.fr> - 2012-01-15 21:33 +0100

#2812 — how execute method just after checkbox click

From"Heli-Team.pl Portal" <admin1@heli-team.pl>
Date2012-01-15 11:45 -0800
Subjecthow execute method just after checkbox click
Message-ID<32554f5a-f73a-4658-9ca7-e395e93fb51f@k28g2000yqn.googlegroups.com>
Hi Friends,

I want to use two checkboxes to set filter of bbrowser server. I tried
to use MouseButtonUp but all I can read/get in my MouseButtonUp (both
before and after SUPER:MouseButtonUp) is ACTUAL state of checkboxes -
not resultet from click (opposite). I get what WAS before click and
not what's AFTER.
Is there any simple way to call a method (of control or owner) when
checkbox state changes?

Thanks for any kind of help

PS: I have Petzold's bibel for Win but it doesn't help me much. Is
there another good book (ie. simple and easy) for people like me who
must go a bit deeper without much stress? :)

[toc] | [next] | [standalone]


#2813

From"Gerhard Bunzel" <g.bunzel@domonet.de>
Date2012-01-15 21:28 +0100
Message-ID<jevcti$qpp$1@news.m-online.net>
In reply to#2812
Hi,

have a look at:

METHOD ButtonClick (oEvent) CLASS dlgMyWindow

 SUPER:ButtonClick(oEvent)

 IF oEvent:nameSym == #chkMyCheckBox

 ENDIF

 RETURN NIL



HTH

Gerhard



"Heli-Team.pl Portal" <admin1@heli-team.pl> schrieb im Newsbeitrag 
news:32554f5a-f73a-4658-9ca7-e395e93fb51f@k28g2000yqn.googlegroups.com...
> Hi Friends,
>
> I want to use two checkboxes to set filter of bbrowser server. I tried
> to use MouseButtonUp but all I can read/get in my MouseButtonUp (both
> before and after SUPER:MouseButtonUp) is ACTUAL state of checkboxes -
> not resultet from click (opposite). I get what WAS before click and
> not what's AFTER.
> Is there any simple way to call a method (of control or owner) when
> checkbox state changes?
>
> Thanks for any kind of help
>
> PS: I have Petzold's bibel for Win but it doesn't help me much. Is
> there another good book (ie. simple and easy) for people like me who
> must go a bit deeper without much stress? :)
> 

[toc] | [prev] | [next] | [standalone]


#2815

From"Paul SISKA" <PaulSISKA NOSPAM@online.fr>
Date2012-01-15 21:36 +0100
Message-ID<4f1338da$0$10617$426a74cc@news.free.fr>
In reply to#2813
Hi Gerhard Bunzel !

You just beat me :-)

Paul SISKA
"Gerhard Bunzel" <g.bunzel@domonet.de> a écrit dans le message de news: 
jevcti$qpp$1@news.m-online.net...
> Hi,
>
> have a look at:
>
> METHOD ButtonClick (oEvent) CLASS dlgMyWindow
>
> SUPER:ButtonClick(oEvent)
>
> IF oEvent:nameSym == #chkMyCheckBox
>
> ENDIF
>
> RETURN NIL
>
>
>
> HTH
>
> Gerhard
>
>
>
> "Heli-Team.pl Portal" <admin1@heli-team.pl> schrieb im Newsbeitrag 
> news:32554f5a-f73a-4658-9ca7-e395e93fb51f@k28g2000yqn.googlegroups.com...
>> Hi Friends,
>>
>> I want to use two checkboxes to set filter of bbrowser server. I tried
>> to use MouseButtonUp but all I can read/get in my MouseButtonUp (both
>> before and after SUPER:MouseButtonUp) is ACTUAL state of checkboxes -
>> not resultet from click (opposite). I get what WAS before click and
>> not what's AFTER.
>> Is there any simple way to call a method (of control or owner) when
>> checkbox state changes?
>>
>> Thanks for any kind of help
>>
>> PS: I have Petzold's bibel for Win but it doesn't help me much. Is
>> there another good book (ie. simple and easy) for people like me who
>> must go a bit deeper without much stress? :)
>>
>
> 

[toc] | [prev] | [next] | [standalone]


#2817

From"Heli-Team.pl Portal" <admin1@heli-team.pl>
Date2012-01-15 14:13 -0800
Message-ID<a32b8f93-9670-496c-b17e-bc949a3a1bce@cf6g2000vbb.googlegroups.com>
In reply to#2813
Hi Gyus,
Thank You both very much but Gerhard's simple & neat solution works as
required. I tried to go complicated way when there was a simple
one... :(

However: does Paul solution have any advantages over Gerhard's?

Regards,
Gregory

On 15 Sty, 21:28, "Gerhard Bunzel" <g.bun...@domonet.de> wrote:
> Hi,
>
> have a look at:
>
> METHOD ButtonClick (oEvent) CLASS dlgMyWindow
>
>  SUPER:ButtonClick(oEvent)
>
>  IF oEvent:nameSym == #chkMyCheckBox
>
>  ENDIF
>
>  RETURN NIL
>
> HTH
>
> Gerhard
>
> "Heli-Team.pl Portal" <adm...@heli-team.pl> schrieb im Newsbeitragnews:32554f5a-f73a-4658-9ca7-e395e93fb51f@k28g2000yqn.googlegroups.com...
>
>
>
>
>
>
>
> > Hi Friends,
>
> > I want to use two checkboxes to set filter of bbrowser server. I tried
> > to use MouseButtonUp but all I can read/get in my MouseButtonUp (both
> > before and after SUPER:MouseButtonUp) is ACTUAL state of checkboxes -
> > not resultet from click (opposite). I get what WAS before click and
> > not what's AFTER.
> > Is there any simple way to call a method (of control or owner) when
> > checkbox state changes?
>
> > Thanks for any kind of help
>
> > PS: I have Petzold's bibel for Win but it doesn't help me much. Is
> > there another good book (ie. simple and easy) for people like me who
> > must go a bit deeper without much stress? :)

[toc] | [prev] | [next] | [standalone]


#2819

From"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au>
Date2012-01-16 13:26 +1100
Message-ID<%VLQq.1859$%E2.1669@viwinnwfe01.internal.bigpond.com>
In reply to#2817
> However: does Paul solution have any advantages over Gerhard's?
Yes

If you edit the method in then you'll lose whatever code you've written when 
the method gets re-written by window editor.

That's why this line is there

    //Put your changes here

it's generated when the method is first created
    - if you never expect to change anything on the window then you can 
ignore it<bg>

CYA
Steve

[toc] | [prev] | [next] | [standalone]


#2820

From"Jamal" <vodotnet_nospam@yahoo.com>
Date2012-01-16 00:01 -0500
Message-ID<jf0av2$dr3$1@dont-email.me>
In reply to#2819
Stephen,

This is not true. If the method already exists, it is not touched and your 
modification are preserved.

The only method that gets overwritten as far as I know is the Init( ) 
method, but not PreInit, not PostInit, etc.

Jamal

"Stephen Quinn"  wrote in message 
news:%VLQq.1859$%E2.1669@viwinnwfe01.internal.bigpond.com...


> However: does Paul solution have any advantages over Gerhard's?
Yes

If you edit the method in then you'll lose whatever code you've written when
the method gets re-written by window editor.

That's why this line is there

    //Put your changes here

it's generated when the method is first created
    - if you never expect to change anything on the window then you can
ignore it<bg>

CYA
Steve

[toc] | [prev] | [next] | [standalone]


#2825

From"richard.townsendrose" <richard.townsendrose@gmail.com>
Date2012-01-16 06:35 -0800
Message-ID<5fc2c417-0b98-4b82-8a74-915179ed435e@u32g2000yqe.googlegroups.com>
In reply to#2820
hi

ALWAYS use the button click, because it is window generated

and many many ways to get the name of the checkbox clicked and
unclicked ... also works well for radio button selections

richard

[toc] | [prev] | [next] | [standalone]


#2814

From"Paul SISKA" <PaulSISKA NOSPAM@online.fr>
Date2012-01-15 21:33 +0100
Message-ID<4f13382c$0$678$426a74cc@news.free.fr>
In reply to#2812
Hi ! Gregory  ?

What about using something like the following :

method ButtonClick(oControlEvent) class MyWindow

local oControl as Control

oControl := IIf(oControlEvent == NULL_OBJECT, NULL_OBJECT, 
oControlEvent:Control)

super:ButtonClick(oControlEvent)

//Put your changes here

IF IsInstanceOf(oControl,#CheckBox)

    DO CASE

   CASE oControl:Namesym=#MyFirstCheckButton

             IF SELF:oDCMyFirstCheckButton:Checked

            SELF:doMyFirstMethod()

          ENDIF

   CASE oControl:Namesym=#MySecondCheckButton

         IF SELF:oDCMySecondCheckButton:Checked

            SELF:doMySecondMethod()

        ENDIF


      ENDCASE

ENDIF

RETURN NIL


HTH !
Paul SISKA


"Heli-Team.pl Portal" <admin1@heli-team.pl> a écrit dans le message de news: 
32554f5a-f73a-4658-9ca7-e395e93fb51f@k28g2000yqn.googlegroups.com...
> Hi Friends,
>
> I want to use two checkboxes to set filter of bbrowser server. I tried
> to use MouseButtonUp but all I can read/get in my MouseButtonUp (both
> before and after SUPER:MouseButtonUp) is ACTUAL state of checkboxes -
> not resultet from click (opposite). I get what WAS before click and
> not what's AFTER.
> Is there any simple way to call a method (of control or owner) when
> checkbox state changes?
>
> Thanks for any kind of help
>
> PS: I have Petzold's bibel for Win but it doesn't help me much. Is
> there another good book (ie. simple and easy) for people like me who
> must go a bit deeper without much stress? :)
> 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web