Re: [Gambas-user] Smooth Scrolling (not happening)
I guess he meant sort of embedded. A quick and dirty way around this issue. An embedder on the host form that runs a separate gambas binary which is designed to scroll and scroll only. This is what I've done here for my application, but it's not exactly the way I'd rather do it. -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TextArea scrolling
Thanks! This solution works in my case: TextArea1.Text = Something gb.NewLine TextArea1.Pos = TextArea1.Length TextArea1.EnsureVisible() Jussi 2009/5/25 Benoît Minisini gam...@users.sourceforge.net: When adding line to textarea: TextArea1.Text = Something gb.NewLine Cursor jumps to columnline zero. Normal, you are assigning the Text property. Use the Insert() method instead. Ok... I did it vb6 way... But there is still problem. Mouse click on the textarea mess up the cursor position, and next insert ruins output. Even if ReadOnly property is True. And also I use Mid$() to edit content of the textarea. Like this; Mid$(.Text, (Len(.Text) - iLastMessageLen), Len(.Text)) = (sTellMe gb.NewLine) It is meant to correct the output afterwards if needed. But maybe there is other way to erase last message and replace it with new one... this is quickly converted from vb6 code. Is there way to determine cursors last column and last line? At this point I'm not sure how to do this... Jussi Use The Pos property to set the position of the cursor. To solve your problem, just set the cursor to the end of the text before calling Insert: MyTextArea.Pos = MyTextArea.Length MyTextArea.Insert(text) Moreover, you must use UTF-8 String methods to deal with the contents of any GUI Text property. I suggest you read the documentation of the TextArea widget carefully! Regards, -- Benoît -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TextArea scrolling
Thanks! This solution works in my case: TextArea1.Text = Something gb.NewLine TextArea1.Pos = TextArea1.Length TextArea1.EnsureVisible() Jussi Using TextArea1.Insert() is better and faster. Regards, -- Benoît -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] WAIT ... is it an (un) necessary evil for my app?
So, the next version of my vinstall-ng app is really shaping up nicely, but I'm running into a weird dilemma here. This is a linux installer, so there is a lot of decompression going on in the background as packages are being installed using via the gambas EXEC method. Here is the problem I'm having though. I have string arrays of package names to install one at a time. I have a sub that reads these arrays and processes each package at a time I have a function that simply installs the package and checks to make sure the process didn't return an error. Allow me to demonstrate PUBLIC INSTALL_FROM_ARRAY(sList as string[]) DIM sPkg as string DIM i, iRet as Integer FOR i = 0 to sList.Max IF INSTALL_THIS_PACKAGE(trim(sList[i])) 0 then RETURN pbprog.value = i / sList.count NEXT END PUBLIC FUNCTION INSTALL_THIS_PACKAGE(sPkgPath as String) as Integer dim $hproc as Process $hproc = EXEC [/sbin/installpkg,-q,-R, ClsGlobal.sTargetPath, sPkgPath] WAIT IF $hproc.value 0 then RETURN $hproc.Value ELSE RETURN 0 END IF END My problem is that the progressbar does not update as every package installs. I need to add a wait of at least 0.25 before each package gets installed to give the progressbar time to update. The background processes do run without the wait instance, but the GUI seems stuck. On the other hand, if I want the progressbar, I have to sacrifice performance. Can anyone think of a way around this? Using gambas2.2.12 app uses gb.gtk Any help is welcome. Thanks -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] WAIT ... is it an (un) necessary evil for my app?
Don't wait, remove this part of the code: IF $hproc.value 0 then RETURN $hproc.Value ELSE RETURN 0 END IF Then create an event handler for the kill event which is raised once the program is finished 2009/5/26 M0E Lnx m0e@gmail.com So, the next version of my vinstall-ng app is really shaping up nicely, but I'm running into a weird dilemma here. This is a linux installer, so there is a lot of decompression going on in the background as packages are being installed using via the gambas EXEC method. Here is the problem I'm having though. I have string arrays of package names to install one at a time. I have a sub that reads these arrays and processes each package at a time I have a function that simply installs the package and checks to make sure the process didn't return an error. Allow me to demonstrate PUBLIC INSTALL_FROM_ARRAY(sList as string[]) DIM sPkg as string DIM i, iRet as Integer FOR i = 0 to sList.Max IF INSTALL_THIS_PACKAGE(trim(sList[i])) 0 then RETURN pbprog.value = i / sList.count NEXT END PUBLIC FUNCTION INSTALL_THIS_PACKAGE(sPkgPath as String) as Integer dim $hproc as Process $hproc = EXEC [/sbin/installpkg,-q,-R, ClsGlobal.sTargetPath, sPkgPath] WAIT IF $hproc.value 0 then RETURN $hproc.Value ELSE RETURN 0 END IF END My problem is that the progressbar does not update as every package installs. I need to add a wait of at least 0.25 before each package gets installed to give the progressbar time to update. The background processes do run without the wait instance, but the GUI seems stuck. On the other hand, if I want the progressbar, I have to sacrifice performance. Can anyone think of a way around this? Using gambas2.2.12 app uses gb.gtk Any help is welcome. Thanks -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user