Re: [Gambas-user] serial port
Hello, I'm very happy with the serial port communication, just I have some more question. When I start the application, I don't know what ports will be used and how many. So I have an object array where I add new serial ports depending on the hardware configuration. From this object array, I'm able to send and receive data. I just don't know how to access to the serial port events (read). Can someone help me in this matter? Thanks, Robi yuhej wrote: Useful info, I'll do like that. Thanks, Robi 2009/9/19 nando nand...@nothingsimple.com In my Linux serial port experience, serial port devices are named: /dev/ttyS0..9 and upwards /dev/ttyUSB0..9 and upwards depending on what is plugged in USB. I have done a lot of serial port stuff with Gambas. I know that trying to open then with the serial port control will fail is non-exising port. This error can be detected. It can be possible to open a port as a test to see if it exists, but you may be changing parameters and stealing chars from an existing connection. I've had this happen tooreally messes things up. -Fernando -- Original Message --- From: yuhej robert1juh...@gmail.com To: gambas-user@lists.sourceforge.net Sent: Fri, 18 Sep 2009 21:08:04 -0700 (PDT) Subject: [Gambas-user] serial port Hello, I can see that Gambas can handle the serial ports which is a very good news for me. Can someone tell me how can I get the list of the serial ports of my computer? I wish to make an autodetect function and only allow to select from the working serial ports. Robi -- View this message in context: http://www.nabble.com/serial-port-tp25518421p25518421.html Sent from the gambas-user mailing list archive at Nabble.com. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user --- End of Original Message --- -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/serial-port-tp25518421p26708752.html Sent from the gambas-user mailing list archive at Nabble.com. -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Serial port data being changed ????
Benoît Minisini wrote: I'm not a serial port user at all, and I find that behaviour a bit strange. Would it be useful to make a property for that? Or maybe it does already exist in the SerialPort class, and I didn't see it. Nothing strange really. Its been like that as long as I can remember. It is not possible to tranfer binary data correctly without setting the icrnl and ocrnl flags off. Its been a long time since I was near C, but I'm fairly sure they are included in termios.h, and are the c_iflag and c_oflag. (sent this twice. mail is bouncing back) -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Buttons again not working
2009/12/10 Kadaitcha Man nospam.nospam.nos...@gmail.com: Look at the attached code, and take note of the form design. Scratch that. You may have found a bug, either inadvertently or advertantly ;- With MyTextBox declared as public, xMyTextBox_Change isn't firing: MyTextBox = NEW TextBox(HBox1) AS xMyTextBox I'll start to research it in about 14-16hrs time. In the meantime, hope for a better response. -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Buttons again not working
I don't understand why is the handling of dynamically created forms so complicated! I've barely managed to shut a modal dialog, I'm encountering a new problem: when I invoke the procedure Messenger: PUBLIC SUB Messenger(tekst AS String, slika AS String) DIM imge AS PictureBox DIM conti AS TextLabel DIM butty AS Button DIM i AS Integer keret = NEW Form keret.Width = 500 keret.Height = 300 keret.Border = FALSE imge = NEW PictureBox(keret) imge.x = 10 imge.y = 10 imge.Width = 280 imge.Height = 280 imge.Border = TRUE imge.Picture = Picture[slika] conti = NEW TextLabel(keret) conti.x = 300 conti.y = 20 conti.Width = 190 conti.Height = 230 conti.Text = tekst butty = NEW Button(keret) butty.x = 340 butty.y = 250 butty.Width = 120 butty.Height = 25 butty.Text = OK keret.Center Object.Attach(butty, ME, Ops) You should write: butty = NEW Button(keret) AS Ops to have the same effect. You should use the Move() method instead of setting the X, Y, Width and Height properties individually. keret.ShowModal() END PUBLIC SUB Ops_Click() keret.Close() END from within the PUBLIC SUB _new() ... Messenger(blabla.txt,blabla.jpg) ... END procedure, I cannot communicate with the button butty. What do you mean exactly by communicate? Can you provide the full source code in a project, we will better understand what you want to do. Beware that an object is locked during its _new() so it cannot receive events. Regards, -- Benoît Minisini -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Buttons again not working
What do you mean exactly by communicate? Can you provide the full source code in a project, we will better understand what you want to do. Beware that an object is locked during its _new() so it cannot receive events. Regards, -- Benoît Minisini I mean, the procedure Ops_Click() is simply never invoked. A window shows up, with an image, a text and a button - butty. I intend to to use this button for closing the window. The first occurance of the subroutine Messenger is in the _new() procedure, which is intended to set the initial settings for the program. At the time when this happens, no other forms are already created. The code is pretty long ( 7000 lines, the *GamCat* project on sourceforge, but I'm sending you the first part of it, the _new() procedure: PUBLIC SUB _new() '# Initial settings ## DIM q1, q2, xenon, path, nfile AS String DIM place, node, temptxt, querry, prime, liner, x, mounter, onefound AS String DIM tarto, gomb, nexus, tremor, mark, mounthits, secondary AS String[] DIM i, knor, l, m AS Integer DIM fstab, config AS File a1 = NEW String[] a2 = NEW String[] a3 = NEW String[] a4 = NEW Float[] a5 = NEW String[] valvolume = NEW String[] DVDPanel.Value = FALSE 'At start the Virtual Compilation is empty and features are disabled tippi.Add(tippiData.Text) tippi.Add(tippiAudio.Text) rating.Add(-) ratingPic.Picture = Picture[unrated.png] year1.Value = Year(Now) month1.Value = Month(Now) day1.value = Day(Now) year2.MinValue = year1.Value mtype.Add(700 MB) mtype.Add(4.4 GB) mtype.Add(8.0 GB) mediaImg.Picture = Picture[CD.png] Saver.compilatSi = 700 IF Exist(User.Home /.GamCat) = FALSE THEN MKDIR User.Home /.GamCat 'First run screen for the devices mark = NEW String[] config = OPEN User.Home /.GamCat/config.txt FOR CREATE CLOSE (config) *Messenger(firstrun.Text, cat1.png)* config = OPEN User.Home /.GamCat/config.txt FOR WRITE fstab = OPEN /etc/mtab FOR INPUT WHILE NOT Eof(fstab) LINE INPUT #fstab, place mounthits = Split(place, ) IF (InStr(mounthits[1], /media/) 0 AND InStr(mounthits[2], vfat) = 0) THEN node = InputBox(dev1.Text mounthits[0], dev2.Text, ) PRINT #config, mounthits[0] mark.Add(node) ENDIF WEND CLOSE (fstab) CLOSE (config) IF mark.Count = 0 THEN Message(Fatal.Text) node = rm -rf Chr$(34) User.Home /.GamCat Chr$(34) SHELL node WAIT QUIT ENDIF IF mark.Count = 1 THEN mark.Add(second) ENDIF 'Database creation DBconX.Type = sqlite DBconX.Host = User.Home /.GamCat TRY DBconX.Open() IF ERROR THEN Message(SetupError.Text) node = rm -rf Chr$(34) User.Home /.GamCat Chr$(34) SHELL node WAIT QUIT ELSE IF NOT DBconX.Databases.Exist(GamCat) THEN DBconX.Databases.Add(GamCat) WAIT 0.5 'apperently this is needed for an SQLite database ' Close the server connection DBconX.Close() ENDIF ENDIF DBconX.Name = GamCat DBconX.Type = sqlite DBconX.Host = User.Home /.GamCat TRY DBconX.Open() prime = CREATE TABLE zzz(content VARCHAR(30),size REAL,files INTEGER,folders INTEGER,timing TEXT,media TEXT) DBconX.Exec(prime) WAIT 0.1 prime = CREATE TABLE infos(size REAL,files INTEGER,folders INTEGER,nn TEXT,first TEXT,second TEXT,delay TEXT); DBconX.Exec(prime) q1 = Chr$(34) 0 Chr$(34) q2 = Chr$(34) 1 Chr$(34) prime = INSERT INTO infos VALUES(0,0,0 , q2 ,' mark[0] ',' mark[1] ','20'); DBconX.Exec(prime) prime = CREATE TABLE ZIP(Name TEXT,Volume TEXT,Parent TEXT); DBconX.Exec(prime) prime = CREATE TABLE TAR(Name TEXT,Volume TEXT,Parent TEXT); DBconX.Exec(prime) prime = CREATE TABLE RAR(Name TEXT,Volume TEXT,Parent TEXT); DBconX.Exec(prime) prime = CREATE TABLE ARJ(Name TEXT,Volume TEXT,Parent TEXT); DBconX.Exec(prime) prime = CREATE TABLE ACE(Name TEXT,Volume TEXT,Parent TEXT); DBconX.Exec(prime) prime = CREATE TABLE AVAILABLEMYDISKLIST(Volume VARCHAR(30),Rating TEXT,Genre TEXT); DBconX.Exec(prime) prime = CREATE TABLE LENTMYDISKROMLIST(Volume VARCHAR(30),Used TEXT,Rating TEXT,Genre TEXT,Time TEXT); DBconX.Exec(prime) prime = CREATE TABLE AVAILABLEMYDVDLIST(Volume VARCHAR(30),Rating TEXT,Genre TEXT); DBconX.Exec(prime) prime = CREATE TABLE LENTMYDISKDVDLIST(Volume VARCHAR(30),Used TEXT,Rating TEXT,Genre TEXT,Time TEXT); DBconX.Exec(prime) prime = CREATE TABLE LISTOFMYCUSTOMERS(Name TEXT); DBconX.Exec(prime) prime = CREATE TABLE LISTOFMYALLGENRES(Name TEXT); DBconX.Exec(prime) prime = CREATE TABLE TEMPORALBASKETOFELEMENTS(Name TEXT,Origin TEXT,Rating TEXT,Genre TEXT); DBconX.Exec(prime) prime = CREATE TABLE LISTOFBANNEDFILES(Name TEXT); DBconX.Exec(prime) prime = CREATE TABLE CHANGEDFILENAMECATALOG(Old Text(30),Volume Text(30),Path Text(30),NEW Text(30)); DBconX.Exec(prime) prime = CREATE TABLE VOLUMENOTESFORALL(Volume Text(30),Notes Text(300)); DBconX.Exec(prime) WAIT 0.5 DBconX.Close() i = Message.Question(MessageImport.Text, MessageYes.Text, MessageNo.Text) IF i = 1 THEN Dialog.Path = User.Home Dialog.Filter = [*.zip, Zip Archive] IF Dialog.OpenFile(TRUE) THEN RETURN FOR EACH nfile
Re: [Gambas-user] Buttons again not working
So how to stop the rest of the process, while the Messenger( , ) is being executed? I've tried to experimenting with WAIT, but no help. This is the most annoying thing in Gambas. You never know exactly what to do in order to make things work. Is there a possibility, to make the process handling unified? ( What's the difference between Object.Attach (something, parent, function name) and your proposal ?) Anyway, butty = NEW Button(keret) AS Ops doesn't work. Please again provide an archive of your full project, otherwise I can't help you. I have downloaded your source from sourceforge, but I didn't see anything related to your problem. If the source project is greater then 256K, it won't go on the mailing-list. So send it me directly. Regards, -- Benoît Minisini -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Buttons again not working
2009/12/10 Benoît Minisini gam...@users.sourceforge.net: You should write: butty = NEW Button(keret) AS Ops to have the same effect. That's what I thought, but when I tried a similar thing with a TextBox, it appeared that the TextBox events were not firing. I'll take another look at it later this afternoon just in case I made a mistake. If it's a problem I'll post the code. -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] qt4 slowness of drawing complex screens
I've noticed qt4 is much slower rendering the controls than qt3 and wondered if it is possible to 'hide' this process till the rendering is complete. Users with small numbers of controls on a form probably wouldn't notice this. Regards Richard -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] qt4 slowness of drawing complex screens
i've not noticed that on the ide ... it have many controls too... 2009/12/9 richard terry rte...@pacific.net.au: I've noticed qt4 is much slower rendering the controls than qt3 and wondered if it is possible to 'hide' this process till the rendering is complete. Users with small numbers of controls on a form probably wouldn't notice this. Regards Richard -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] qt4 slowness of drawing complex screens
i've not noticed that on the ide ... it have many controls too... 2009/12/9 richard terry rte...@pacific.net.au: I've noticed qt4 is much slower rendering the controls than qt3 and wondered if it is possible to 'hide' this process till the rendering is complete. Users with small numbers of controls on a form probably wouldn't notice this. Regards Richard Qt 4 is a lot slower in drawing widgets than Qt 3. Not as slow as GTK+, but this is noticeable in the IDE. The really slow thing is splitters and SidePanel control. Do you use them? If not, I can't tell you more without having more details. Regards, -- Benoît Minisini -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] qt4 Font question
more questions about qt4. Font sizes seem different to qt3, this may be KDE and nothing to do with qt4, but dosn't happen like this in qt3. When I use a font dialog Arial size 9 is too small for my app. If I go to 10, then it is too large. Under QT3 this dosn't seem to be the same. I enclose a picture - same font/point size the first is from the font dialog in qt3 and the second in qt4 The difference seems only to be 1 pixel but this seems to have a big effect on the overall screen - at 9 hard to read, at 10 looks too large. regards Richard attachment: combined_Arial10_qt3_4.png-- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] qt4 slowness of drawing complex screens
On Thursday 10 December 2009 08:59:57 Benoît Minisini wrote: i've not noticed that on the ide ... it have many controls too... 2009/12/9 richard terry rte...@pacific.net.au: I've noticed qt4 is much slower rendering the controls than qt3 and wondered if it is possible to 'hide' this process till the rendering is complete. Users with small numbers of controls on a form probably wouldn't notice this. Regards Richard Qt 4 is a lot slower in drawing widgets than Qt 3. Not as slow as GTK+, but this is noticeable in the IDE. The really slow thing is splitters and SidePanel control. Do you use them? If not, I can't tell you more without having more details. Regards, extensive use of spitters, some side-panels. Can one somehow visually lock the form whilst it is rendering and then unlock to show the resultant gui? Regards Richard -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Buttons again not working
2009/12/10 Kadaitcha Man nospam.nospam.nos...@gmail.com: 2009/12/10 Benoît Minisini gam...@users.sourceforge.net: You should write: butty = NEW Button(keret) AS Ops to have the same effect. That's what I thought, but when I tried a similar thing with a TextBox, it appeared that the TextBox events were not firing. I'll take another look at it later this afternoon just in case I made a mistake. If it's a problem I'll post the code. Yep. I made a mistake. I was editing the wrong TextBox. Sheesh. -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user