[Gambas-user] Valuebox_Enter strange behaviour
I use a valuebox for numbers and want to select to existing content upon entering the valuebox. I use the following code Public Sub vBoxQty_Enter() Desktop.SendKeys({[Shift_L][End]}) End When entering the valuebox using the tab-key, the content is selected. When entering the valuebox with a mouseclick - what most people do - nothing happens. The cursor just blinks in the valuebox but the content is not selected. But move the mouse away from the valuebox and then back over the valuebox (without clicking) and the content automagically gets selected. By design or a bug? A.J. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Valuebox_Enter strange behaviour
On Sat, 01 Nov 2014, Alain Baudrez wrote: I use a valuebox for numbers and want to select to existing content upon entering the valuebox. I use the following code Public Sub vBoxQty_Enter() Desktop.SendKeys({[Shift_L][End]}) End When entering the valuebox using the tab-key, the content is selected. When entering the valuebox with a mouseclick - what most people do - nothing happens. The cursor just blinks in the valuebox but the content is not selected. But move the mouse away from the valuebox and then back over the valuebox (without clicking) and the content automagically gets selected. By design or a bug? By design and by documentation. The Enter event is raised when the mouse enters the control, in the sense of hovering it. GotFocus is just the right event for you here. The behaviour when Tab-ing your way to the control is likely the toolkit's internal one. Regards, Tobi -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Valuebox_Enter strange behaviour
Tobi, switched to GotFocus event and everything works fine now. Txs A.J. *Alain J. Baudrez* Nikolaas Gombertstraat 20 8000 Brugge a.baud...@gmail.com Tel: +32(0)486485080 *Personal Homepage:* http://baudrez.be - Twitter http://twitter.com/abaudrez - Google Plus http://plus.google.com/+alainbaudrez Webmaster cibliga.be - dierenartsrogiest.be Linux User: http://linuxmintusers.be 2014-11-01 12:18 GMT+01:00 Tobias Boege tabo...@gmail.com: On Sat, 01 Nov 2014, Alain Baudrez wrote: I use a valuebox for numbers and want to select to existing content upon entering the valuebox. I use the following code Public Sub vBoxQty_Enter() Desktop.SendKeys({[Shift_L][End]}) End When entering the valuebox using the tab-key, the content is selected. When entering the valuebox with a mouseclick - what most people do - nothing happens. The cursor just blinks in the valuebox but the content is not selected. But move the mouse away from the valuebox and then back over the valuebox (without clicking) and the content automagically gets selected. By design or a bug? By design and by documentation. The Enter event is raised when the mouse enters the control, in the sense of hovering it. GotFocus is just the right event for you here. The behaviour when Tab-ing your way to the control is likely the toolkit's internal one. Regards, Tobi -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Extending classes in existing components
Hi, periodically we find ourselves in the position that we want to add some specific functionality to classes in existing components, mainly in gb.form. More often than not this is a trivial thing like being able to add an Observer for one child in a compound control or change a font or some other little thing that is there but not exposed through the compound control's interface. We could: - Get the new property/event into official Gambas: most of the time not an option because of application-specific-ness and we actually don't want to tell our readers to wait for the next stable release to be able to test our projects; - Copy the class from gb.form into our projects and change them as we want: possible but not very clean and especially unsatisfying if you consider that the Gambas interpreter allows you to override classes; or - Use CompoundControl.Children and the Control.Name attribute to walk recursively through the children to get the right control, like with my last resort routine: Private Sub Discover(h As Container) Dim g As Control For Each g In h Print g If g Is Container Then Discover(g) Next End I'd also like to avoid this one. If I'm not mistaken C++ has a way around this called protected. The gb.form writer could make all the child controls protected so we can inherit/override the compound control and immediately have everything presented to us. @Benoit: IIRC you don't want Gambas' object orientation to be as convoluted as in C++. This protected thing doesn't sound as it would have too far- reaching consequences, though. Thoughts? Regards, Tobi -- There's an old saying: Don't change anything... ever! -- Mr. Monk -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] JIT bug with complex string substitutions
Yes, it works! Thanks! Jussi On Fri, Oct 31, 2014 at 11:59 PM, Emil Lenngren emil.lenng...@gmail.com wrote: Hi. There was a problem with the IIf function. If you had two strings as the last two arguments, but one of them was a string constant, but not the other, it failed. I fixed this in the latest revision. /Emil 2014-10-12 21:11 GMT+02:00 Emil Lenngren emil.lenng...@gmail.com: Hi. I'll check. /Emil Den 12 okt 2014 21:09 skrev Jussi Lahtinen jussi.lahti...@gmail.com: Thanks to unnecessary complexness of Finnish language and my lack of ideas, I have written some monster lines with nested Substs. JIT doesn't seem to like them. I isolated the problem to simplest possible (unusable) case. See attachment. Jussi -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Release of Gambas 3.6.1
Hi, Gambas 3.6.1 has been released. It tries to fix (almost) all the nasty bugs reported after the 3.6.0 release. The list of bug fixes in the ChangeLog at http://gambaswiki.org/wiki/doc/release/3.6.1. Enjoy it! -- Benoît Minisini -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Cannot uncheck text decorations in IDE theme preferences
Hello, In trying to figure out how to change the font color of the line numbers in the IDE, I discovered what seems to be a strange behavior. In Tools-Preferences-Theme-Define (buttons), any text decoration checkboxes (bold, italic, underline) that are checked, either by default or manually, are not uncheckable. This is not intentional, is it? The definitions can easily be reverted to default by switching to a different color theme and then back again. And while we're here, is there a way to change just the font color of the line numbers? I really prefer the Gambas color theme, but the line numbers are too light. And, I have not been able to determine what definition controls that. -- Lee __ Artificial Intelligence is no match for natural stupidity. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Cannot uncheck text decorations in IDE theme preferences
On 11/01/2014 03:01 PM, T Lee Davidson wrote: Hello, In trying to figure out how to change the font color of the line numbers in the IDE, I discovered what seems to be a strange behavior. In Tools-Preferences-Theme-Define (buttons), any text decoration checkboxes (bold, italic, underline) that are checked, either by default or manually, are not uncheckable. This is not intentional, is it? The definitions can easily be reverted to default by switching to a different color theme and then back again. And while we're here, is there a way to change just the font color of the line numbers? I really prefer the Gambas color theme, but the line numbers are too light. And, I have not been able to determine what definition controls that. Oops, forgot this may help: [System] Gambas=3.6.0 OperatingSystem=Linux Kernel=3.10.54-desktop-2.mga3 Architecture=x86 Distribution=Mageia 3 Desktop=KDE4 Theme=Oxygen Language=en_US.UTF-8 Memory=1005M [Libraries] Cairo=libcairo.so.2.11200.12 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.7.2 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.5.0 GTK+3=libgtk-3.so.0.600.4 GTK+=libgtk-x11-2.0.so.0.2400.17 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.34.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 -- Lee __ Artificial Intelligence is no match for natural stupidity. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Question on Class.Load
Class.Load allows you to create a reference to a named class. Dim TempClass as Class TmpClass = Class.Load(myclass) This works and I can get the names of the public instances of variables and procedures For each TmpString in TmpClass.Symbols Message(TmpString) Next Is there a way to call a Procedure or Function from the named class and pass it any parameters that it requires? ie: if I have a procedure in a valid class I have created called Public Sub DoSomething(InStr as string) can I call this function from TmpClass somehow (or is this just a 'read only' reference to the loaded class?) I tried Object.Call(TmpClass, NameOfProcedure, TmpAry) with TmpAry[] containing the name of a single string parameter I wish to pass. This returns the error: Can't find {NameOfProcedure} in Class 'Class' Context: In each of my projects created classes, I have a standard Procedure to save the applicable database table records to a binary file called CreateBinaryFile(InPath as String) This is the process I am trying to call for each class that I have created. Cheers, Ian Roper. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Official release of Gambas 3.6
Hi Sebastian, I will have the stable PPA updated tonight with armhf builds included ;) Do you plan to add stable builds also for armel? /CJ -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user