Re: [Gambas-user] set of questions
for all those who assumed i hijacked the thread and subject the subject of the whole was posted by Dima (My regards to her ) about set of questions and not specific to USB ! she asked a set of questions including USB startup and also including the gridview which is of my interest at the moment and instead of u mumbling about Hijacking and bla bla bla u could have pointed to the solution if u know it or either directed to the documentation . Doriano ... Could you please point to a good documentation about GridView utilisation and/or TableView, besides your english is good just other people need to follow threads from the beginning. Regards... and please stay on track of events before u rush into mumbling bla bla stuff On Thu, Oct 22, 2009 at 5:43 PM, Doriano Blengino doriano.bleng...@fastwebnet.it wrote: Ron_1st ha scritto: On Thursday 22 October 2009, Doriano Blengino wrote: Ron_1st ha scritto: I don't see the connection with gambas from usb stick. Can you enligth me? The first message of the thread, set of questions, contained a question about launching a gambas app in a host system not having the gambas runtime installed. Or so I think - I have already deleted the relevant messages and now I can not check. May be I was confused... sorry. Regards, Doriano It was for this message On Wednesday 21 October 2009, Faysal Banna wrote: what is the way to get modifying a cell inside a grid view like u click on a cell and start writing inside it then when u click away its already modified ? regards He is mumbling about a gridview in this thread and is not related to it and as reply to something total different. We call that hijacking the thread. :) See the signature. Funny signature. Really, I didn't know what hijacking was, and even now I don't understand why one would desire to hijack (in other words, where is the advantage in hijacking?). Provided that there is no advantage, so nobody wants to do it, if I did it I did it without awareness. The start of the thread, posted by user Dima, where I replied is (citation): I want to run my gambas2-application from USB-FLASH-DISK on the computers, that do not have gambas2 installed. followed by a numbered list of other questions. I replied to a few. The most important was about the Data event. Then someone else, Faysal Banna, asked about what I replied to Dima, without specifying more. I assumed he was talking about usb flash disk, because the other argument is already explained in the docs. Banna replied no no, it was about editing cells. But what he really wrote is (citation): no no sir i was asking about the Grid View u were explaining to Dima ... besides i care to know a bit more about in place editing of cells inside Now, for my poor english, I suppose the adjective besides acts as a junction between two predicates. So he wanted to know about gridview, and *besides*, something about editing of cells. Is it clear to you? For me, just not enough... :-) I did the best I could do about the Data event: I posted the good source provided by another user on the same thread. And I simply ignored the phrase following that besides. I write this full explanation (sorry) because I feel a little flamed. If you can, and if you want, go to see the whole thread on gambas-user. It started with a set of question, and just now Benoit is replying you should have been make a thread for each question to the poster. Then someone else (Banna) wrote something not clear to me, and even changed topic. Lastly, you teach to me that I am hijacking! :-) Better for me to take some course about computers... I like them but I don't understand them; and while I'm at it, an english course too... :-) Regards, Doriano -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Faysal Banna Meteorological Services Rafic Harriri International Airport Beirut - Lebanon Mob: +961-3-258043 = -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now
Re: [Gambas-user] set of questions
Doriano... do you have a sample src package of what you have just explained ? can u share a simple running example with source files and forms ? much regards On Wed, Oct 21, 2009 at 11:11 AM, Doriano Blengino doriano.bleng...@fastwebnet.it wrote: Dima Malkov ha scritto: Using Gambas 2.7, Debian Lenny 32 -- Hello! Main question. I want to run my gambas2-application from USB-FLASH-DISK on the computers, that do not have gambas2 installed. There is a folder on my USB-FLASH-DISK with my application and subfolders: 1) bin, includes files gba2, gbc2, gbi2, gbx2, soft links; 2) lib, includes files *.so.0.0.0, *.component, *.gambas, soft links; 3) share, includes icons/*.png, info/* (strange files), mime/*.xml. It also includes bash-script for copying all above to system folders /usr/bin/, /usr/lib/ and /usr/share. Can I run my application with just some command, without copying? Copying is a very bad idea - there is the risk of messing up the host system. In theory it is possible to do what you want, at a variable degree of difficulty. The only problem can arise if gambas searches its components using absolute paths without querying environment variables. You can refer, in your script, to relative paths for executables, and use the environment variable LD_LIBRARY_PATH for shared libraries. About /usr/lib and /usr/share, I am not sure about what gambas does. 2) I have the GridView in my program, that displays 4 thousands of rows. When it updates the data (4-10 seconds), program do not reflexes. There is a string in the documentation: You should use the last method if you have thousands of rows to display.. I'm sorry, I do not understand this at all. Could anybody explain this on a simple example? The second method refers to the Data event, and works like this: you don't load all the data in the GridView; instead, you wait for Gridview to ask for the data through the Data event. In the event handler, you load the requested data. This method if far faster because Gridview asks for data only when needed (ie, when they are visible). You put a Gridview in a form, and setup the Data event. When the form shows up, there will be, say, 10 rows visible; Gridview will raise the event 10 times, asking for data of each visible row. If you scroll the Gridview, as more rows will become visible, more data will be requested by mean of Data event. Sorry for the missing answers - I told you the few things I knew. Regards, Doriano -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Faysal Banna Meteorological Services Rafic Harriri International Airport Beirut - Lebanon Mob: +961-3-258043 = -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] set of questions
no no sir i was asking about the Grid View u were explaining to Dima ... besides i care to know a bit more about in place editing of cells inside the Grid View just click on the cell change the value.. much regards On Wed, Oct 21, 2009 at 2:38 PM, Doriano Blengino doriano.bleng...@fastwebnet.it wrote: Faysal Banna ha scritto: Doriano... do you have a sample src package of what you have just explained ? can u share a simple running example with source files and forms ? About what? I suppose about running a gambas app out of a usb stick? Never tried but, if this is your request, I can try. I played a bit, but it does not work. The path lib/gambasX seems to be hardcoded in the gbx executable. I discovered that there are two environment variables, LD_PRELOAD and GAMBAS_PRELOAD. The first is well known - it forces to preload the indicated libraries, and it works; but then gambas crashes. The second one does not seem to do anything; I peeked in the sources, but I didn't understand what's the trick - copy GAMBAS_PRELOAD to LD_PRELOAD, then copy it back again and unset the other... May be I am missing something, but for what I have seen, there is no way to load the required library from a path different than the one compiled-in. Regards, Doriano -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Faysal Banna Meteorological Services Rafic Harriri International Airport Beirut - Lebanon Mob: +961-3-258043 = -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] set of questions
what is the way to get modifying a cell inside a grid view like u click on a cell and start writing inside it then when u click away its already modified ? regards On Wed, Oct 21, 2009 at 4:47 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: 1) May I create proprietary (not open-scource) gambas2-applications and components for gambas2? Yes, but Qt3 is not free for proprietary use. 3) When I hide persistent Form, how to display it again? FromName.Show works with me..? 5) Can I easily convert my big project from the gambas2-project to the gambas3-project? With my project it was easy. Tools menu -- Update forms. Then possibly some minor changes to code. Example Write and Read, see documentation for details. 6) My project uses gb.qt3, gb.qt3.ext, gb.kde, gb.kde.html components. Can I easily switch them to gb.qt4 and other components, when my favour Linux-distr Debian will be updated? I think gb.qt4 is not completely ready yet. But in future you can, if I have understand correctly. Qt3 -- GTK+ works well. Jussi On Wed, Oct 21, 2009 at 15:15, Doriano Blengino doriano.bleng...@fastwebnet.it wrote: Faysal Banna ha scritto: no no sir i was asking about the Grid View u were explaining to Dima ... besides i care to know a bit more about in place editing of cells inside the Grid View just click on the cell change the value.. Uhm... I never used a Gridview in that way, I simply worked out with my words something that already is in the docs (in a very unixish fashion). I tried to explain better what the idea behind Data event is. But after that I have seen, in this thread, a complete example: I cut and paste: Hopefully this answers question 2. It is a distillation of the database example that comes with Gambas: You just need a gridview, a button called btnRun and a preferably large database with lots of columns so that you can scroll around with ease ' ' Gambas class file PUBLIC $hConnLocl AS NEW Connection PUBLIC $resData AS Result ' PUBLIC SUB Form_Open() DIM sql AS String 'open the database WITH $hConnLocl .type = mysql .host = localhost .Name = stock .login = charles .password=dog END WITH $hConnLocl.Open() 'create a result sql = SELECT * FROM grnLine $resData = $hConnLocl.Exec(sql) END '- PUBLIC SUB btnRun_Click() DIM hForm AS FRequest DIM hField AS ResultField DIM iInd AS Integer GridView1.Rows.count = 0 'set the required number of columns GridView1.Columns.count = $resData.Fields.Count 'define the column headers and width FOR EACH hField IN $resData.Fields WITH hField GridView1.Columns[iInd].text = .Name GridView1.Columns[iInd].width = 60 END WITH INC iInd NEXT 'create the empty rows. Each empty and visible cell created calls GridView1_data GridView1.Rows.Count = $resData.Count END '- PUBLIC SUB GridView1_Data(Row AS Integer, Column AS Integer) 'move to the required result row $resData.MoveTo(row) 'set the data for the cell in the GridView from the column in the selected row of the result GridView1.Data.text = Str($resData[GridView1.Columns[column].text]) 'lets you see how _data is being called as you scroll around the GridView PRINT row : column : Str($resData[GridView1.Columns[column].text]) END '-- Hope this is what you need. Thanks for your nice appellation, sir :-), and regards. Doriano Blengino -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https