[Gambas-user] Control event

Steven Lobbezoo steven at ...1652...
Sun Apr 1 08:10:40 CEST 2007


Hi Frenando,

Thats exactly what I did.
Thanks
Steven

Le dimanche 1 avril 2007 08:09, nando a écrit :
> I understand and I think it's a good idea because I have met that
> same problem in the VB days...and it really is annoying because
> a easy programming solution has a nasty rotten result.
>
> What I did back then was this type of workaround.
> I would use Stxt.Tag as a flag to just exit if it was something.
> For example..
>
> PUBLIC SUB Stxt_Change() 			'simple text changes, no check required
> DIM tmp AS String[]
>
> IF LEN(Stxt.Tag) > 0 THEN RETURN  '<< - - - added to exit and do nothing.
>
> IF Dbu = 0 THEN ' where not updating from program
>    IF rsD THEN
>      IF rsD.available THEN
>        rsD[LAST.Name] = LAST.Text
>      END IF
>    END IF
> END IF
> END
>
>
> So, the code before needs to do
> Stxt.Tag="Something"  'so then _Change event next time will really do
> nothing. ..
>  Do the stuff you want to do
> ..
> and after do
> Stxt.Tag=""
>
> This way it is possible to control what happens inside _Change
>
> I hope the idea may help.
> -Fernando
>
> ---------- Original Message -----------
> From: Steven Lobbezoo <steven at ...1652...>
> To: nando_f at ...951..., mailing list for gambas users
> <gambas-user at lists.sourceforge.net>
> Sent: Sun, 1 Apr 2007 06:38:49 +0200
> Subject: Re: [Gambas-user] Control event
>
> > Yes, but thats NOT wat I want.
> > I would like gambas to make a difference when the
> > control is set by program or by the user.
> > Steven
> >
> > Le dimanche 1 avril 2007 03:51, nando a écrit :
> > > Yes! When you do Stxt.Text = "Hello", you will trigger Stxt_Change.
> > > If LAST.Text is Stxt.Text, then it will generate the same event again.
> > > -Fernando
> > >
> > >
> > >
> > > ---------- Original Message -----------
> > > From: Steven Lobbezoo <steven at ...1652...>
> > > To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> > > Sent: Sat, 31 Mar 2007 21:15:33 +0200
> > > Subject: Re: [Gambas-user] Control event
> > >
> > > > PUBLIC SUB Stxt_Change() 			'simple text changes, no check required
> > > > DIM tmp AS String[]
> > > >
> > > > IF Dbu = 0 THEN ' where not updating from program
> > > >   IF rsD THEN
> > > >     IF rsD.available THEN
> > > >       rsD[LAST.Name] = LAST.Text
> > > >     END IF
> > > >   END IF
> > > > END IF
> > > > END
> > > >
> > > > As you can see, i've build my own check (Dbu) variable, that I set to
> > > > 1 during reading / filling the text control from the database. After
> > > > filling all, I set it to 0, so that, when the above event is fired
> > > > (now the user has changed the text in the control), it transfers the
> > > > .text part to the database field.
> > > > The problem was, that this event allso got fired, when I fill the
> > > > text of the control from the database.
> > > >
> > > > Steven
> > > >
> > > > Le samedi 31 mars 2007 22:03, Benoit Minisini a écrit :
> > > > > On samedi 31 mars 2007, Steven Lobbezoo wrote:
> > > > > > HI all,
> > > > > >
> > > > > > I found out that the change event is raised, vene if the control
> > > > > > is update from program.
> > > > > > Would it not be a good idea to seperate events :
> > > > > > 1. Change : changed by the user
> > > > > > 2. Updates (or whatever : Changed by the program
> > > > > >
> > > > > > I could try to do this in the trunk source (it's a long time ago
> > > > > > that I programmed in C, but I suppose i couild try) , but what's
> > > > > > the procedure, how can i submit changes to it, how do you
> > > > > > dispatch tasks in the gambas project (if you do that) ;-))
> > > > > >
> > > > > > Steven
> > > > >
> > > > > What are you talking about?
> > > >
> > > > ---------------------------------------------------------------------
> > > >---- Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> > > > share your opinions on IT & business topics through brief surveys-and
> > > > earn cash
> > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DE
> > > >VDEV _______________________________________________
> > > > Gambas-user mailing list
> > > > Gambas-user at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > > ------- End of Original Message -------
> > >
> > >
> > > -----------------------------------------------------------------------
> > >-- Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > > your opinions on IT & business topics through brief surveys-and earn
> > > cash
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
> > >EV _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> ------- End of Original Message -------
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list