Re: [Gambas-user] TextBox and CR

2010-04-22 Thread Ron_1st
On Wednesday 21 April 2010, Benoît Minisini wrote: > > 24 character LCD display that need that WAIT. > > > > Why do you need to call WAIT? You should only use it when you want to refresh > your GUI during some heavy processin. Otherwise, if you should use SLEEP. > > Regards, > > -- > Benoît M

Re: [Gambas-user] TextBox and CR

2010-04-21 Thread Ron
If I mis understood the issue please ignore me but... I have seen occasions in my Gambas project where: IF this AND that THEN didn't always do what it was suppose to do. I had to do: IF this AND IF that THEN Most of the times the first one worked ok, but not always... Regards, Ron_2nd. >> t

Re: [Gambas-user] TextBox and CR

2010-04-21 Thread Caveat
> the IF clause will jump out and deliver TRUE Don't think this applies to Gambas. It's quite common in Java for example to use something like if (myvar != null && myvar.equals(somestring)) as we know that java WILL jump out of the evaluation with FALSE as soon as it finds myvar is null (hence av

Re: [Gambas-user] TextBox and CR

2010-04-21 Thread Benoît Minisini
> On Tuesday 20 April 2010, Benoît Minisini wrote: > > > On Tuesday 20 April 2010, Caveat wrote: > > > > Hi Rolf, > > > > I guess you're right. I threw the code together very quickly, just > > > > to make a working example for you. But 100% correct, you don't need > > > > lcode or AS Variant or D

Re: [Gambas-user] TextBox and CR

2010-04-21 Thread Ron_1st
On Tuesday 20 April 2010, Benoît Minisini wrote: > > On Tuesday 20 April 2010, Caveat wrote: > > > Hi Rolf, > > > I guess you're right. I threw the code together very quickly, just to > > > make a working example for you. But 100% correct, you don't need lcode > > > or AS Variant or DIM or lcode

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Rolf-Werner Eilert
Am 20.04.2010 19:30, schrieb Doriano Blengino: > Rolf-Werner Eilert ha scritto: >> No, don't worry :-) >> >> So, this is my code now: >> >> PUBLIC SUB Suche_KeyPress() >> DIM t$ AS String >> >>IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN >> t$ = Trim$(Suche.Text) >>

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Doriano Blengino
Rolf-Werner Eilert ha scritto: > No, don't worry :-) > > So, this is my code now: > > PUBLIC SUB Suche_KeyPress() > DIM t$ AS String > > IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN > t$ = Trim$(Suche.Text) > IF t$<> "" THEN > SucheStarten(t$) > END

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Rolf-Werner Eilert
No, don't worry :-) So, this is my code now: PUBLIC SUB Suche_KeyPress() DIM t$ AS String IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN t$ = Trim$(Suche.Text) IF t$ <> "" THEN SucheStarten(t$) END IF END IF END I introduced t$ (old BASIC manners,

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Benoît Minisini
> On Tuesday 20 April 2010, Caveat wrote: > > Hi Rolf, > > I guess you're right. I threw the code together very quickly, just to > > make a working example for you. But 100% correct, you don't need lcode > > or AS Variant or DIM or lcode = Key.Code... :-) > > In general I should say the same. Bu

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Ron_1st
On Tuesday 20 April 2010, Caveat wrote: > Hi Rolf, > I guess you're right.  I threw the code together very quickly, just to > make a working example for you.  But 100% correct, you don't need lcode > or AS Variant or DIM or lcode = Key.Code... :-) In general I should say the same. But Key.Code is

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Caveat
Hi Rolf, I guess you're right. I threw the code together very quickly, just to make a working example for you. But 100% correct, you don't need lcode or AS Variant or DIM or lcode = Key.Code... :-) Let's just hope this doesn't turn into another marathon "static const?" thread ;-) Regards, Cavea

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Rolf-Werner Eilert
Great, thanks! I just wonder why you load Key.Code into a variable before examining it - isn't Key.Code a "variable" itself? (Or is it a function, and you wanted to avoid calling it more than once?) Rolf Am 20.04.2010 10:58, schrieb Caveat: > Hi Rolf > > You could try this: > PUBLIC SUB TextB

Re: [Gambas-user] TextBox and CR

2010-04-20 Thread Caveat
Hi Rolf You could try this: PUBLIC SUB TextBox1_KeyPress() DIM lcode AS Variant lcode = Key.Code IF NOT IsNull(lcode) THEN IF lcode = Key.Enter OR lcode = Key.Return THEN Message.Info("Go SEARCH buddy!") END IF END IF END Regards, Caveat On Tue, 2010-04-20 at

[Gambas-user] TextBox and CR

2010-04-20 Thread Rolf-Werner Eilert
Good morning everyone! In one of my programs there is a TextBox enabling the user to type in a search word. The TextBox seems to ignore a Return at the end, so I chose a "?" at the end of the string to indicate "go and search". It's a bit roundabout, however, isn't there a way to tell TextBox t