From fernandojosecabral at ...626... Sat Jul 1 05:18:42 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 1 Jul 2017 00:18:42 -0300 Subject: [Gambas-user] I need a hint on how to deleted duplicate items in a array In-Reply-To: References: <20170627142416.M9094@...951...> <20170627155344.M57287@...951...> <20170630130524.GA568@...3600...> <20170630152148.GB568@...3600...> Message-ID: I thank you guys for the hints on counting and eliminating duplicates. In the end, I resorted to something that is very simple and does the trick in three steps. In the first step I sort the array. In the second step I count the number of occurrences and prepend it to the word itself (with a separator). In the third step I sort the array again, so now I have it sorted by the number of occurrences from the largest to the smallest. That is all I need. Nevertheless, I am concerned with the performance. For 69,725 words, from which 8,987 were unique, it took 28 seconds for the code below to execute. I will survive this 28 seconds, if I have to. But I still would like to find a faster solution. On the other hand, I think I am close to the fastest possible solution. Basically, the array will be traversed once only, no matter how many terms and how many repetitions it may have. (What do you think about this efficiency, Tobi?) *MatchedWords.Sort(gb.ascent + gb.language + gb.IgnoreCase) For i = 0 To MatchedWords.Max n = 1 For j = i + 1 To MatchedWords.Max If (Comp(MatchedWords[i], MatchedWords[j], gb.language + gb.ignorecase) = 0) Then n += 1 Else Break Endif Next UniqWords.Push(Format(n, "0###") & "#" & MatchedWords[i]) i += (n - 1) NextUniqWords.Sort(gb.descent + gb.language + gb.ignorecase)For i = 0 To UniqWords.Max Print UniqWords[i]Next* 2017-06-30 15:10 GMT-03:00 Gianluigi : > Just for curiosity, on my computer, my function (double) processes 10 > million strings (first and last name) in about 3 seconds. > Very naif measurement using Timers and a limited number of names and > surnames eg Willy Weber has come up 11051 times > > To demonstrate the goodness of Tobias' arguments, about 1 million 3 cents a > second I really understood (I hope) what he wanted to say. > > Sorry my response times but today my modem works worse than my brain. > > Regards > Gianluigi > > 2017-06-30 17:58 GMT+02:00 Gianluigi : > > > Sorry Tobias, > > other explanations are not necessary. > > I would not be able to understand :-( > > I accept what you already explained to me as a dogma and I will try to > put > > it into practice by copying your code :-). > > > > Thanks again. > > > > Gianluigi > > > > 2017-06-30 17:44 GMT+02:00 Gianluigi : > > > >> > >> 2017-06-30 17:21 GMT+02:00 Tobias Boege : > >> > >>> > >>> I wouldn't say there is anything *wrong* with it, but it also has > >>> quadratic > >>> worst-case running time. You use String[].Push() which is just another > >>> name > >>> for String[].Add(). Adding an element to an array (the straightforward > >>> way) > >>> is done by extending the space of that array by one further element and > >>> storing the value there. But extending the space of an array could > >>> potentially > >>> require you to copy the whole array somewhere else (where you have > enough > >>> free memory at the end of the array to enlarge it). Doing worst-case > >>> analysis, > >>> we have to assume that this bad case always occurs. > >>> > >>> If you fill an array with n values, e.g. > >>> > >>> Dim a As New Integer[] > >>> For i = 1 To n > >>> a.Add(i) > >>> Next > >>> > >>> then you loop n times and in the i-th iteration there will be already > >>> i-many elements in your array. Adding one further element to it will, > >>> in the worst case, require i copy operations to be performed. > 9-year-old > >>> C.F. Gauss will tell you that the amount of store operations is about > >>> n^2. > >>> > >>> > >> Tobias you are always kind and thank you very much. > >> Is possible for you to explain this more elementarily, for me (a poorly > >> educated boy :-) ) > >> > >> > >> > >>> And your function does two jobs simultaneously but only returns the > >>> result > >>> of one of the jobs. The output you get is only worth half the time you > >>> spent. > >>> > >>> > >> I did two functions in one, just to save space, this is a simple > example. > >> :-) > >> > >> Regards > >> Gianluigi > >> > > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From adamnt42 at ...626... Sat Jul 1 09:36:21 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Sat, 1 Jul 2017 17:06:21 +0930 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: <20170630173954.137fab15d2a48bebfc62cced@...626...> Message-ID: <20170701170621.2a0fc734eba9cd3c8769ec9a@...626...> On Fri, 30 Jun 2017 08:41:49 -0400 PICCORO McKAY Lenz wrote: > i get more than 30 minutes, due i must parse to a low end machine, not to > your 4 cores, 16Gb ram super power machine.. i'm taking about a 1G ram and > single core 1,6GHz atom cpu > > i need to convert from Result/cursor to other due the problem of the odbc > lack of cursor/count .. > > i thinking about use a sqlite memory structure, how can i force it? > documentation said "If Name is null, then a memory database is opened." for > sqlite.. > > so if i used a memory structure can be a good idea? *tested yesterday took > about 10 minutes but i dont know if i have a problem in my gambas > installation!* > > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-06-30 4:09 GMT-04:00 adamnt42 at ...626... : (SNIP) > > Here's the timing output. > > > > 17:05:59:706 Connecting to DB > > 17:06:00:202 Loading Data <---- so 406 mSec to establish the db > > connection > > 17:06:31:417 556502 rows <---- so 31,215 mSec to execute the query > > and return the result > > 17:06:31:417 Unmarshalling result started > > 17:06:44:758 Unmarshalling completed 556502 rows processed <--- so 13,341 mSec to unmarshall the result into an array of structs > > > > So, it took roughly 31 seconds to execute the query and return the result > > of half a million rows. > > To unmarshall that result into the array took just over 13 seconds. The > > unmarshalling is fairly well a straight field by field copy. > > (Also I must add, I ran this on a local db copy on my old steam driven > > laptop, 32 bits and about 1G of memory.) > > (CORRECTED) > > That's about 42 rows per mSec unmarshalling time or about 0.024 mSec per row. >> Well, 30 minutes does sound very excessive. Are you certain that it's the "unmarshalling" that is taking the time and not the execution of the query itself? That is why I separated the timings in my figures above. Regarding your machine capability, my laptop is very similar to what you described (Single core, 1GB memory). The only real difference I can see is a 1.7GHtz maximum clock speed. So I don't think that's the cause of the difference. If I imagine your query on this PC I would expect about 200000 * 0.024 mSec to unmarshall it, say about 5 seconds. Regarding using the memory based SQLite database approach, I wouldn't think that it would help. I don't know the actual "size" of the data returned by your query, but I would expect that you would get a major memory hit and a lot of paging by going that way. I have used the memory SQLite database several times for manipulating several hundred or so records and it is quite fast but wouldn't even consider it for a dataset that large (and I guess it would be just adding another layer of processing to handle your query Result). By the way, where is your source database? Is it on your machine or on a networked machine? I had one of the lads in our office try the same thing that I did, but using the master database on our LAN. It took a bit longer, 38 seconds to execute the query rather than 31 so as I expected, network access to the database plays a fairly large part. ~20% for a query returning a set that large. Query optimisation? We tend to use the Connection.Exec approach here for large queries as it let's us optimise both the database and the SQL for maximum benefit rather than rely on the Gambas driver generated queries. (That's not a criticism by the way, its just that when dealing with large datasets our results have been better.) For example, in the query I have been talking about and using the timing, we create a temporary index on a boolean column that is one of the WHERE clause criteria, with the NULLS FIRST option set on the index. Since we are looking to select all the rows from that table where a flag (the "reconciled" column) has not been set, they are all at the front of that index. As soon as the back end query engine hits an index entry for a row that has been reconciled it "knows" that it has finished. At the end of the query we just delete that index again. Before I did that the query execution time was several minutes and now we are down to about 5 seconds (for the "real" query on the "real" database which returns up to 10000 rows). So again, I would looking for other causes of that massive time if I were you. rgrds b -- B Bruen From mckaygerhard at ...626... Sat Jul 1 11:30:27 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 05:00:27 -0430 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: <20170701170621.2a0fc734eba9cd3c8769ec9a@...626...> References: <20170630173954.137fab15d2a48bebfc62cced@...626...> <20170701170621.2a0fc734eba9cd3c8769ec9a@...626...> Message-ID: thanks in advance adamnt42, i need to convert the result due missing odbc important features... 2017-07-01 3:06 GMT-04:30 adamnt42 at ...626... : > Well, 30 minutes does sound very excessive. Are you certain that it's the > "unmarshalling" that is taking the time and not the execution of the query > itself? That is why I separated the timings in my figures above. > yes, its not the query.. i hit pause and the data its yet in client side.. Regarding using the memory based SQLite database approach, I wouldn't think > that it would help. I don't know the actual "size" of the data returned by > your query, but I would expect that you would get a major memory hit and a > lot of paging by going that way. I have used the memory SQLite database > several times for manipulating several hundred or so records and it is > quite fast but wouldn't even consider it for a dataset that large (and I > guess it would be just adding another layer of processing to handle your > query Result). > i made the test and in part you have right, get mayor memory hit, the only benefice i got was now i have a valid cursor due odbc does nto offer me By the way, where is your source database? Is it on your machine or on a > networked machine? I had one of the lads in our office try the same thing > that I did, but using the master database on our LAN. It took a bit longer, > 38 seconds to execute the query rather than 31 so as I expected, network > access to the database plays a fairly large part. ~20% for a query > returning a set that large. > all of those question are not relevant, the real problem its the lack of gambas to handle many DB features due the ODBC connection.. the cursor are forward only so i cannot fill a gridview faster or play with it like others DBMS > So again, I would looking for other causes of that massive time if I were > you. > the only cause of my problems, its some ODBC missing features (module driver part) and innability of gambas to connect natively to many DBMS > > rgrds > b > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Sat Jul 1 11:33:03 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 05:03:03 -0430 Subject: [Gambas-user] how to determine if array its empty Message-ID: i have Dim ar As New Variant[] so how can i determine if the array its empty, i mean does not added any element.. due that piece of code fails: If value.dim > 0 Then If value.count > 0 Then with a index out of bound exception Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From chrisml at ...3340... Sat Jul 1 12:02:19 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sat, 1 Jul 2017 12:02:19 +0200 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: Message-ID: Am 30.06.2017 um 00:57 schrieb PICCORO McKAY Lenz: > i'm taking about 200.000 rows in a result... the problem its that the odbc > db object support only cursor with forward only.. Show us your query. For what do you need 200.000 rows? That's way too much if you want to visialize anything. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From bagonergi at ...626... Sat Jul 1 12:09:16 2017 From: bagonergi at ...626... (Gianluigi) Date: Sat, 1 Jul 2017 12:09:16 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Dim myArray As String[] If IsNull(myArray) Then Print "Empty" Regards Gianluigi 2017-07-01 11:33 GMT+02:00 PICCORO McKAY Lenz : > i have > > Dim ar As New Variant[] > > so how can i determine if the array its empty, i mean does not added any > element.. due that piece of code fails: > > If value.dim > 0 Then > > If value.count > 0 Then > > with a index out of bound exception > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Sat Jul 1 12:13:15 2017 From: bagonergi at ...626... (Gianluigi) Date: Sat, 1 Jul 2017 12:13:15 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: or If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" Regards Gianluigi 2017-07-01 12:09 GMT+02:00 Gianluigi : > Dim myArray As String[] > > If IsNull(myArray) Then Print "Empty" > > Regards > Gianluigi > > 2017-07-01 11:33 GMT+02:00 PICCORO McKAY Lenz : > >> i have >> >> Dim ar As New Variant[] >> >> so how can i determine if the array its empty, i mean does not added any >> element.. due that piece of code fails: >> >> If value.dim > 0 Then >> >> If value.count > 0 Then >> >> with a index out of bound exception >> >> Lenz McKAY Gerardo (PICCORO) >> http://qgqlochekone.blogspot.com >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From mckaygerhard at ...626... Sat Jul 1 12:35:43 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 06:05:43 -0430 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: Message-ID: hi cristof, the query its just "select * from table" but where "table" its a "cube" of the datawarehouse.. so i want to made a something similar to BussinesObject.. so get 200.000 rows its not a surprise in desktop.. the other problem to force me to get so many rows its the lack of features/connectivity to large scalar DBMS such like DB2, ASE sybase or Oracle.. so i must et all the rows firts to later operate in the client side, this in any case its better due avoit goin to db on each "change" of filters... in any case, seems the better approach its usage of in-memory sqlite db.. and for the 30 minutes in my case seems its something on the gambas installation.. but debug and thenn report a bug its quite complicated for me right now.. im focused in odbc+handle data for now Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-01 5:32 GMT-04:30 Christof Thalhofer : > Am 30.06.2017 um 00:57 schrieb PICCORO McKAY Lenz: > > > i'm taking about 200.000 rows in a result... the problem its that the > odbc > > db object support only cursor with forward only.. > > Show us your query. For what do you need 200.000 rows? That's way too > much if you want to visialize anything. > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From fernandojosecabral at ...626... Sat Jul 1 13:08:04 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 1 Jul 2017 08:08:04 -0300 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: <20170630173954.137fab15d2a48bebfc62cced@...626...> <20170701170621.2a0fc734eba9cd3c8769ec9a@...626...> Message-ID: 2017-07-01 6:30 GMT-03:00 PICCORO McKAY Lenz : > all of those question are not relevant, the real problem its the lack of > gambas to handle many DB features due the ODBC connection.. > I think you should be more specific. Instead of saying "the real problem is the lack of gambas to handle many DB features", let us know which those [lacking] features are. I am sure if you do so the master professionals in this list will be able to tell you if those features are really missing; if there are good workarounds; or perhaps if you should forget gambas and try something different. If gambas can not do what you have to do, then I see no point in insisting. But, if you want to get some help in clarifying this issue, then you' be better be more specific. Regards - fernando > > > > > rgrds > > b > > > > -- > > B Bruen > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Sat Jul 1 13:12:17 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 06:42:17 -0430 Subject: [Gambas-user] SELECT CASE can evaluate multiple "CASE"? at same time Message-ID: SELECT CASE can evaluate multiple "CASE"? i mean *Select* *Case* w *Case* *1 or 2* print "evaluatin multiple cases at same time" *Case* *Else* *Print* "This is impossible!" *End* *Select* Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From mckaygerhard at ...626... Sat Jul 1 13:43:07 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 07:13:07 -0430 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: <20170630173954.137fab15d2a48bebfc62cced@...626...> <20170701170621.2a0fc734eba9cd3c8769ec9a@...626...> Message-ID: 2017-07-01 6:38 GMT-04:30 Fernando Cabral : > I think you should be more specific. Instead of saying "the real problem is > the lack of > gambas to handle many DB features", let us know which those [lacking] > features are. > yet explainet and bug filet to gambasbugtraker .. you read the mail without the hole behaviour > From criguada at ...626... Sat Jul 1 14:08:25 2017 From: criguada at ...626... (Cristiano Guadagnino) Date: Sat, 1 Jul 2017 14:08:25 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Hi Gianluigi! On Sat, Jul 1, 2017 at 12:13 PM, Gianluigi wrote: > or > If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" > I have not tried, but I don't think this will work. In an "or" expression you have to evaluate both members, so if myArray is null the "myArray.Count = 0" part will generate an out of bounds error. Cris From fernandojosecabral at ...626... Sat Jul 1 14:26:47 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 1 Jul 2017 09:26:47 -0300 Subject: [Gambas-user] Eliminating duplicates real fast... but adding text do textarea works in a snail pace Message-ID: I want to share with you what seems to be my final solution for the problem concerning breaking a text into words, counting them all and eliminating duplicates. I was in for a surprise. Maybe you are too. First, to eliminate duplicates and count occurrences. Here is the code. Very simple, very time efficient: only 40 MILLISECONDS to sort 68,626 words, find and copy 8,984 unique words, prepending a count number and then sorting again: * MatchedWords.Sort(gb.ascent + gb.language + gb.IgnoreCase) For i = 0 To MatchedWords.Max n = 1 For j = i + 1 To MatchedWords.Max If (Comp(MatchedWords[i], MatchedWords[j], gb.language + gb.ignorecase) = 0) Then n += 1 Else Break Endif Next UniqWords.Push(Format(n, "0###") & "#" & MatchedWords[i]) i += (n - 1) Next UniqWords.Sort(gb.descent + gb.language + gb.ignorecase)* So, sorting, comparing, copying and sorting again was not the issue. Preparing to display was. So much so that the following function took me 30+ seconds to add those 8984 words to the TextArea to be displayed: *Public Sub AppendText(Text As String) TextArea1.text &= TextEnd* But, I was able to reduce that to 32 MILLISECONDS merely by concatenating the words into a single string before calling AppendText() just once: *str = "" For i = 0 To UniqWords.Max str &= UniqWords[i] & "\n" Next FMain.AppendText(str)* So, concatenating here is two orders of magnitude faster than concatenating a TextArea. Even thou both were just string concatenation. In the end, what was taking 30+ do execute came down to 135 MILLISECONDS! That's a 222 times reduction. The lesson I have re-learned one more time: measure, don't guess. What seems the culprit might not be. And a innocent-looking function might be the killer. Thank you guys for your help. I've learned a lot about Gambas as well as about algorithms. Regards - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bagonergi at ...626... Sat Jul 1 14:46:47 2017 From: bagonergi at ...626... (Gianluigi) Date: Sat, 1 Jul 2017 14:46:47 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Hi Cristiano, Or If is only evaluated if *not* IsNull. Regards Gianluigi 2017-07-01 14:08 GMT+02:00 Cristiano Guadagnino : > Hi Gianluigi! > > On Sat, Jul 1, 2017 at 12:13 PM, Gianluigi wrote: > > > or > > If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" > > > > I have not tried, but I don't think this will work. In an "or" expression > you have to evaluate both members, so if myArray is null the "myArray.Count > = 0" part will generate an out of bounds error. > > Cris > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Sat Jul 1 15:05:10 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 09:05:10 -0400 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: 2017-07-01 8:08 GMT-04:00 Cristiano Guadagnino : > Hi Gianluigi! > > On Sat, Jul 1, 2017 at 12:13 PM, Gianluigi wrote: > > > or > > If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" > > > > I have not tried, but I don't think this will work. In an "or" expression > you have to evaluate both members, so if myArray is null the "myArray.Count > = 0" part will generate an out of bounds error. > ahhh! that's the trick! thanks! > > Cris > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From hans at ...3219... Sat Jul 1 15:08:33 2017 From: hans at ...3219... (Hans Lehmann) Date: Sat, 1 Jul 2017 15:08:33 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: <63f52c15-384f-0a0b-ad76-0356324d169a@...3219...> Hallo, my idea: Dim myArray As New String[] ' Existiert das Array und ist die Anzahl der Elemente gleich Null, dann ist das Array leer If Not IsNull(myArray) And If myArray.Count = 0 Then Print "Array is empty" Hans From jussi.lahtinen at ...626... Sat Jul 1 15:23:40 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 1 Jul 2017 16:23:40 +0300 Subject: [Gambas-user] SELECT CASE can evaluate multiple "CASE"? at same time In-Reply-To: References: Message-ID: "Case 1, 2" will do the job. Jussi On Sat, Jul 1, 2017 at 2:12 PM, PICCORO McKAY Lenz wrote: > SELECT CASE can evaluate multiple "CASE"? i mean > > *Select* *Case* w *Case* *1 or 2* > print "evaluatin multiple cases at same time" *Case* *Else* *Print* "This > is impossible!" *End* *Select* > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Jul 1 15:28:44 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 1 Jul 2017 16:28:44 +0300 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: If you add the extra "if", then Gambas will do short-circuit evaluation. https://en.wikipedia.org/wiki/Short-circuit_evaluation Jussi On Sat, Jul 1, 2017 at 3:08 PM, Cristiano Guadagnino wrote: > Hi Gianluigi! > > On Sat, Jul 1, 2017 at 12:13 PM, Gianluigi wrote: > > > or > > If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" > > > > I have not tried, but I don't think this will work. In an "or" expression > you have to evaluate both members, so if myArray is null the "myArray.Count > = 0" part will generate an out of bounds error. > > Cris > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Jul 1 15:32:42 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 1 Jul 2017 16:32:42 +0300 Subject: [Gambas-user] Eliminating duplicates real fast... but adding text do textarea works in a snail pace In-Reply-To: References: Message-ID: Gambas have built in profiler. You might want to get familiar with it. Jussi On Sat, Jul 1, 2017 at 3:26 PM, Fernando Cabral < fernandojosecabral at ...626...> wrote: > I want to share with you what seems to be my final solution for the problem > concerning breaking a text into words, counting them all and eliminating > duplicates. I was in for a surprise. Maybe you are too. > > First, to eliminate duplicates and count occurrences. Here is the code. > Very simple, very time efficient: only 40 MILLISECONDS to sort 68,626 > words, find and copy 8,984 unique words, prepending a count number and then > sorting again: > > > > > > > > > > > > > > > > * MatchedWords.Sort(gb.ascent + gb.language + gb.IgnoreCase) For i = 0 To > MatchedWords.Max n = 1 For j = i + 1 To MatchedWords.Max If > (Comp(MatchedWords[i], MatchedWords[j], gb.language + gb.ignorecase) = 0) > Then n += 1 Else Break Endif Next > UniqWords.Push(Format(n, "0###") & "#" & MatchedWords[i]) i += (n - 1) > Next UniqWords.Sort(gb.descent + gb.language + gb.ignorecase)* > So, sorting, comparing, copying and sorting again was not the issue. > Preparing to display was. So much so that the following function took me > 30+ seconds to add those 8984 words to the TextArea to be displayed: > > > > *Public Sub AppendText(Text As String) TextArea1.text &= TextEnd* > > But, I was able to reduce that to 32 MILLISECONDS merely by concatenating > the words into a single string before calling AppendText() just once: > > > > > > > *str = "" For i = 0 To UniqWords.Max str &= UniqWords[i] & > "\n" Next FMain.AppendText(str)* > So, concatenating here is two orders of magnitude faster than concatenating > a TextArea. Even thou both were just string concatenation. > > In the end, what was taking 30+ do execute came down to 135 MILLISECONDS! > That's a 222 times reduction. > > The lesson I have re-learned one more time: measure, don't guess. What > seems the culprit might not be. And a innocent-looking function might be > the killer. > > Thank you guys for your help. I've learned a lot about Gambas as well as > about algorithms. > > Regards > > - fernando > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail : fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From hans at ...3219... Sat Jul 1 15:36:21 2017 From: hans at ...3219... (Hans Lehmann) Date: Sat, 1 Jul 2017 15:36:21 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Correct? If (Not IsNull(myArray) And myArray.Count = 0) Then Print "Array is empty" Hans From bagonergi at ...626... Sat Jul 1 15:48:06 2017 From: bagonergi at ...626... (Gianluigi) Date: Sat, 1 Jul 2017 15:48:06 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Hi Hans, If the array is not instantiated or does not work (first example) or does error. Regards Gianluigi 2017-07-01 15:36 GMT+02:00 Hans Lehmann : > Correct? > > If (Not IsNull(myArray) And myArray.Count = 0) Then Print "Array is empty" > > Hans > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From hans at ...3219... Sat Jul 1 16:15:24 2017 From: hans at ...3219... (Hans Lehmann) Date: Sat, 1 Jul 2017 16:15:24 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: <9c50c5b3-a587-3004-eb8c-331365780d78@...3219...> Case 1: Dim myArray As String[] --> Array not exist. Case 2: Dim myArray As New String[] --> Array ist empty. Case 3: Dim myArray As New String[] --> Array is not empty! myArray.Add("Value") If Not IsNull(myArray) Then If myArray.Count = 0 Then Print "Array ist empty." Else Print "Array is not empty!" Endif Else Print "Array not exist." Endif Hans From bagonergi at ...626... Sat Jul 1 17:15:10 2017 From: bagonergi at ...626... (Gianluigi) Date: Sat, 1 Jul 2017 17:15:10 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: <9c50c5b3-a587-3004-eb8c-331365780d78@...3219...> References: <9c50c5b3-a587-3004-eb8c-331365780d78@...3219...> Message-ID: Ok, very precise, depends on what you need. I think at work, if you have to read the array, an: If IsNull (myArray) Or If myArray.Count = 0 Then Return It is more practice Gianluigi 2017-07-01 16:15 GMT+02:00 Hans Lehmann : > > Case 1: > Dim myArray As String[] --> Array not exist. > > Case 2: > Dim myArray As New String[] --> Array ist empty. > > Case 3: > Dim myArray As New String[] --> Array is not empty! > myArray.Add("Value") > > If Not IsNull(myArray) Then > If myArray.Count = 0 Then > Print "Array ist empty." > Else > Print "Array is not empty!" > Endif > Else > Print "Array not exist." > Endif > > Hans > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From chrisml at ...3340... Sat Jul 1 17:29:16 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sat, 1 Jul 2017 17:29:16 +0200 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: Message-ID: <74dd81e7-939f-452b-9ae9-5bb4347bf056@...3340...> Am 01.07.2017 um 12:35 schrieb PICCORO McKAY Lenz: > hi cristof, the query its just "select * from table" but where > "table" its a "cube" of the datawarehouse.. so i want to made a > something similar to BussinesObject.. so get 200.000 rows its not a > surprise in desktop.. For a datawarehouse 200.000 rows are not very much. But in a datawarehouse normally those jobs are running at night. Next day you look at the results and you get them fast, because these are just a handful of tuples(records) or there is nothing to be extracted. > the other problem to force me to get so many rows its the lack of > features/connectivity to large scalar DBMS such like DB2, ASE sybase > or Oracle.. so i must et all the rows firts to later operate in the > client side, this in any case its better due avoit goin to db on each > "change" of filters... From fernandojosecabral at ...626... Sat Jul 1 19:01:33 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 1 Jul 2017 14:01:33 -0300 Subject: [Gambas-user] Problem to be examined by those who must use UTF8 with Gambas Message-ID: I've been testing my new toy with every large and small text I can put my hands on. The fact is, I have had surprise after surprise. I've just found that when I read a text that contains "?" (that's an A with a grave accent (`A) -- or a backward acute accent for those who are not familiar with diacritics). Well, I can't display it if I load it into a TextArea.text. Nothing shows. I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase (? or `a) it will show up (in lowercase) with the rest of the text. So, "`A" (coded as "\xC3\x80") will prevent the displaying of any string. Nevertheless, if I just try to display "Some text plus ? and some text more" it will work. Now, if I take the original text and do: * RawText = RegExp.Replace(RawText, "?", "?")* yep! it does work. But if I translate it back with * RawText = RegExp.Replace(RawText, "?", "?")* It does not work anymore. But if I do *RawText = RawText & "?"* And RawText did not contain "?" before, then it will be displayed. Amazing. Any ideas about why this happens? Regards - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From criguada at ...626... Sat Jul 1 19:46:31 2017 From: criguada at ...626... (Cristiano Guadagnino) Date: Sat, 1 Jul 2017 19:46:31 +0200 Subject: [Gambas-user] how to determine if array its empty In-Reply-To: References: Message-ID: Thank you Jussi, that's a nice trick I didn't know of! Actually, I didn't even notice there was an extra "if" in Gianluigi's example. Cris On Sat, Jul 1, 2017 at 3:28 PM, Jussi Lahtinen wrote: > If you add the extra "if", then Gambas will do short-circuit evaluation. > https://en.wikipedia.org/wiki/Short-circuit_evaluation > > > Jussi > > > > On Sat, Jul 1, 2017 at 3:08 PM, Cristiano Guadagnino > wrote: > > > Hi Gianluigi! > > > > On Sat, Jul 1, 2017 at 12:13 PM, Gianluigi wrote: > > > > > or > > > If IsNull(myArray) Or If myArray.Count = 0 Then Print "Empty" > > > > > > > I have not tried, but I don't think this will work. In an "or" expression > > you have to evaluate both members, so if myArray is null the > "myArray.Count > > = 0" part will generate an out of bounds error. > > > > Cris > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Jul 1 21:15:45 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 1 Jul 2017 22:15:45 +0300 Subject: [Gambas-user] Problem to be examined by those who must use UTF8 with Gambas In-Reply-To: References: Message-ID: I don't quite get your description of the problem. It seems self contradictory. I mean this part: *'So, "`A" (coded as "\xC3\x80") will prevent the displaying of any string. Nevertheless, if I just try to display "Some text plus ? and some text more" it will work.'* So, what exactly does not work then? Are you using ascii functions for UTF-8 at some point? I think we need to see your code to understand the issue. Jussi On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral < fernandojosecabral at ...626...> wrote: > I've been testing my new toy with every large and small text I can put my > hands on. The fact is, I have had surprise after surprise. I've just found > that when I read a text that contains "?" (that's an A with a grave accent > (`A) -- or a backward acute accent for those who are not familiar with > diacritics). > > Well, I can't display it if I load it into a TextArea.text. Nothing shows. > I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase > (? or `a) it will show up (in lowercase) with the rest of the text. > > So, "`A" (coded as "\xC3\x80") will prevent the displaying of any string. > Nevertheless, if I just try to display "Some text plus ? and some text > more" it will work. > > Now, if I take the original text and do: > > * RawText = RegExp.Replace(RawText, "?", "?")* > > yep! it does work. > But if I translate it back with > > * RawText = RegExp.Replace(RawText, "?", "?")* > > It does not work anymore. > > But if I do > > *RawText = RawText & "?"* > > And RawText did not contain "?" before, then it will be displayed. > > Amazing. > > Any ideas about why this happens? > > Regards > > - fernando > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sun Jul 2 00:59:53 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 2 Jul 2017 01:59:53 +0300 Subject: [Gambas-user] Fwd: Problem to be examined by those who must use UTF8 with Gambas In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Beno?t Minisini Date: Sun, Jul 2, 2017 at 1:14 AM Subject: Re: [Gambas-user] Problem to be examined by those who must use UTF8 with Gambas To: Jussi Lahtinen , fernando at ...3654... Please send that to the mailing-list. Regards, Le 02/07/2017 ? 00:10, Jussi Lahtinen a ?crit : > OK, this seems to be bug in GTK+ component! > Go to; Project --> Properties --> Components, and change gb.gui to > gb.gui.qt, then everything will work as expected. Or you need to wait for > fix. > > > Jussi > > > > On Sat, Jul 1, 2017 at 11:34 PM, Fernando Cabral < > fernandojosecabral at ...626... > wrote: > > 2017-07-01 16:15 GMT-03:00 Jussi Lahtinen >: > > I don't quite get your description of the problem. It seems self > contradictory. I mean this part: > / > / > > Perhaps It should sound contradictory. That's because if I write > directly to a TextArea.text from > inside the program, it will show "?" correctly. Nevertheless, if I > read the same string from a file read into a variable and then try > to display it... it does not work. > > > Are you using ascii functions for UTF-8 at some point? > > I only use ascii functions where there are no UTF-8 functions. For > instance, split(). > > > I think we need to see your code to understand the issue. > > I have attached a text file (ODT) as well as the code itself. Note > that, in order to run the code you will have to have unoconv installed. > > If you comment the two lines bellow, the code will not work. > > * RawText = RegExp.Replace(RawText, "?", "?") > RawText = RegExp.Replace(RawText, "?", "?") > * > > This happens because for some mysterious reason, the QT library > seems to get confused > with *?* and *?*. But not always!* > * > > Jussi > > > > On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral > > > > wrote: > > I've been testing my new toy with every large and small text I > can put my > hands on. The fact is, I have had surprise after surprise. I've > just found > that when I read a text that contains "?" (that's an A with a > grave accent > (`A) -- or a backward acute accent for those who are not > familiar with > diacritics). > > Well, I can't display it if I load it into a TextArea.text. > Nothing shows. > I mean, NOTHING. That is, I have a blank screen. If I bring it > to lowercase > (? or `a) it will show up (in lowercase) with the rest of the text. > > So, "`A" (coded as "\xC3\x80") will prevent the displaying of > any string. > Nevertheless, if I just try to display "Some text plus ? and > some text > more" it will work. > > Now, if I take the original text and do: > > * RawText = RegExp.Replace(RawText, "?", "?")* > > yep! it does work. > But if I translate it back with > > * RawText = RegExp.Replace(RawText, "?", "?")* > > It does not work anymore. > > But if I do > > *RawText = RawText & "?"* > > And RawText did not contain "?" before, then it will be displayed. > > Amazing. > > Any ideas about why this happens? > > Regards > > - fernando > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail : > fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 183> > Telefone celular: +55 (37) 99988-8868 > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > -- Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > > -- Beno?t Minisini From fernandojosecabral at ...626... Sun Jul 2 01:12:24 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 1 Jul 2017 20:12:24 -0300 Subject: [Gambas-user] Fwd: Problem to be examined by those who must use UTF8 with Gambas In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Fernando Cabral Date: 2017-07-01 17:34 GMT-03:00 Subject: Re: [Gambas-user] Problem to be examined by those who must use UTF8 with Gambas To: Jussi Lahtinen 2017-07-01 16:15 GMT-03:00 Jussi Lahtinen : > I don't quite get your description of the problem. It seems self > contradictory. I mean this part: > > Perhaps It should sound contradictory. That's because if I write directly to a TextArea.text from inside the program, it will show "?" correctly. Nevertheless, if I read the same string from a file read into a variable and then try to display it... it does not work. > Are you using ascii functions for UTF-8 at some point? I only use ascii functions where there are no UTF-8 functions. For instance, split(). > I think we need to see your code to understand the issue. I have attached a text file (ODT) as well as the code itself. Note that, in order to run the code you will have to have unoconv installed. If you comment the two lines bellow, the code will not work. * RawText = RegExp.Replace(RawText, "?", "?") RawText = RegExp.Replace(RawText, "?", "?")* This happens because for some mysterious reason, the QT library seems to get confused with *?* and *?*. But not always! Jussi On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral < fernandojosecabral at ...626...> wrote: > I've been testing my new toy with every large and small text I can put my > hands on. The fact is, I have had surprise after surprise. I've just found > that when I read a text that contains "?" (that's an A with a grave accent > (`A) -- or a backward acute accent for those who are not familiar with > diacritics). > > Well, I can't display it if I load it into a TextArea.text. Nothing shows. > I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase > (? or `a) it will show up (in lowercase) with the rest of the text. > > So, "`A" (coded as "\xC3\x80") will prevent the displaying of any string. > Nevertheless, if I just try to display "Some text plus ? and some text > more" it will work. > > Now, if I take the original text and do: > > * RawText = RegExp.Replace(RawText, "?", "?")* > > yep! it does work. > But if I translate it back with > > * RawText = RegExp.Replace(RawText, "?", "?")* > > It does not work anymore. > > But if I do > > *RawText = RawText & "?"* > > And RawText did not contain "?" before, then it will be displayed. > > Amazing. > > Any ideas about why this happens? > > Regards > > - fernando > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail : fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.odt Type: application/vnd.oasis.opendocument.text Size: 9963 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TamPalavras-0.0.1033.tar.gz Type: application/x-gzip Size: 13417 bytes Desc: not available URL: From nando_f at ...951... Sun Jul 2 01:24:56 2017 From: nando_f at ...951... (nando_f at ...951...) Date: Sat, 1 Jul 2017 19:24:56 -0400 Subject: [Gambas-user] I need a hint on how to deleted duplicate items in a array In-Reply-To: References: <20170627142416.M9094@...951...> <20170627155344.M57287@...951...> <20170630130524.GA568@...3600...> <20170630152148.GB568@...3600...> Message-ID: <20170701232044.M78612@...951...> there are much faster ways...just a little more intricate. Nando -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Fernando Cabral To: mailing list for gambas users Sent: Sat, 1 Jul 2017 00:18:42 -0300 Subject: Re: [Gambas-user] I need a hint on how to deleted duplicate items in a array > I thank you guys for the hints on counting and eliminating duplicates. In > the end, I resorted to something that is very simple and does the trick in > three steps. In the first step I sort the array. > In the second step I count the number of occurrences and prepend it to the > word itself (with a separator). In the third step I sort the array again, > so now I have it sorted by the number of occurrences from the largest to > the smallest. > > That is all I need. > > Nevertheless, I am concerned with the performance. For 69,725 words, from > which 8,987 were unique, it took 28 seconds for the code below to execute. > I will survive this 28 seconds, if I have to. But I still would like to > find a faster solution. > > On the other hand, I think I am close to the fastest possible solution. > Basically, the array will be traversed once only, no matter how many terms > and how many repetitions it may have. > > (What do you think about this efficiency, Tobi?) > > *MatchedWords.Sort(gb.ascent + gb.language + gb.IgnoreCase) For i = 0 To > MatchedWords.Max n = 1 For j = i + 1 To MatchedWords.Max If > (Comp(MatchedWords[i], MatchedWords[j], gb.language + gb.ignorecase) = 0) > Then n += 1 Else Break Endif Next > UniqWords.Push(Format(n, "0###") & "#" & MatchedWords[i]) i += (n - 1) > NextUniqWords.Sort(gb.descent + gb.language + gb.ignorecase)For i = 0 To > UniqWords.Max Print UniqWords[i]Next* > > 2017-06-30 15:10 GMT-03:00 Gianluigi : > > > Just for curiosity, on my computer, my function (double) processes 10 > > million strings (first and last name) in about 3 seconds. > > Very naif measurement using Timers and a limited number of names and > > surnames eg Willy Weber has come up 11051 times > > > > To demonstrate the goodness of Tobias' arguments, about 1 million 3 cents a > > second I really understood (I hope) what he wanted to say. > > > > Sorry my response times but today my modem works worse than my brain. > > > > Regards > > Gianluigi > > > > 2017-06-30 17:58 GMT+02:00 Gianluigi : > > > > > Sorry Tobias, > > > other explanations are not necessary. > > > I would not be able to understand :-( > > > I accept what you already explained to me as a dogma and I will try to > > put > > > it into practice by copying your code :-). > > > > > > Thanks again. > > > > > > Gianluigi > > > > > > 2017-06-30 17:44 GMT+02:00 Gianluigi : > > > > > >> > > >> 2017-06-30 17:21 GMT+02:00 Tobias Boege : > > >> > > >>> > > >>> I wouldn't say there is anything *wrong* with it, but it also has > > >>> quadratic > > >>> worst-case running time. You use String[].Push() which is just another > > >>> name > > >>> for String[].Add(). Adding an element to an array (the straightforward > > >>> way) > > >>> is done by extending the space of that array by one further element and > > >>> storing the value there. But extending the space of an array could > > >>> potentially > > >>> require you to copy the whole array somewhere else (where you have > > enough > > >>> free memory at the end of the array to enlarge it). Doing worst-case > > >>> analysis, > > >>> we have to assume that this bad case always occurs. > > >>> > > >>> If you fill an array with n values, e.g. > > >>> > > >>> Dim a As New Integer[] > > >>> For i = 1 To n > > >>> a.Add(i) > > >>> Next > > >>> > > >>> then you loop n times and in the i-th iteration there will be already > > >>> i-many elements in your array. Adding one further element to it will, > > >>> in the worst case, require i copy operations to be performed. > > 9-year-old > > >>> C.F. Gauss will tell you that the amount of store operations is about > > >>> n^2. > > >>> > > >>> > > >> Tobias you are always kind and thank you very much. > > >> Is possible for you to explain this more elementarily, for me (a poorly > > >> educated boy :-) ) > > >> > > >> > > >> > > >>> And your function does two jobs simultaneously but only returns the > > >>> result > > >>> of one of the jobs. The output you get is only worth half the time you > > >>> spent. > > >>> > > >>> > > >> I did two functions in one, just to save space, this is a simple > > example. > > >> :-) > > >> > > >> Regards > > >> Gianluigi > > >> > > > > > > > > ------------------------------------------------ ------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas- user > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > -------------------------------------------------- ---------------------------- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas- user ------- End of Original Message ------- From mckaygerhard at ...626... Sun Jul 2 02:16:16 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 1 Jul 2017 19:46:16 -0430 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: <74dd81e7-939f-452b-9ae9-5bb4347bf056@...3340...> References: <74dd81e7-939f-452b-9ae9-5bb4347bf056@...3340...> Message-ID: 2017-07-01 10:59 GMT-04:30 Christof Thalhofer : > From what database do you query "select * from table" with ODBC? > sybase and Oracle, a propietary odbc module does all the job very good, but i need to use open source,, and freetds have in combination with gambas lack of a good cursor.. the cursor are foward only, and some things like record counts from select does not are.. in the oracle way its more complicated > > If you query such a lot of tuples into Sqlite you won't make it better, > I think. Also a collection seems to be not very fast. > tested, very slower... you have right.. sqlite memory more faster but still slow process passed to sqlite from remote db > > Why not use a mature DB like Postgresql? You could try > so madure, so good, but not so enterprise, mayor vendors and software bussines works only with SAP sybase and BI oracle so if the couple of software to implement does not connect to these database, then not exits. > https://wiki.postgresql.org/wiki/Foreign_data_wrappers > > If the rows are in Postgres, you can do anything you want. > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From chrisml at ...3340... Sun Jul 2 09:42:14 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sun, 2 Jul 2017 09:42:14 +0200 Subject: [Gambas-user] any way to convert Result to Collection more faster than copy? In-Reply-To: References: <74dd81e7-939f-452b-9ae9-5bb4347bf056@...3340...> Message-ID: Am 02.07.2017 um 02:16 schrieb PICCORO McKAY Lenz: >> If you query such a lot of tuples into Sqlite you won't make it >> better, I think. Also a collection seems to be not very fast. >> > tested, very slower... you have right.. sqlite memory more faster > butstill slow process passed to sqlite from remote db>> >> Why not use a mature DB like Postgresql? You could try >> > so madure, so good, but not so enterprise, mayor vendors and > software bussines works only with SAP sybase and BI oracle What? But Sqlite is "enterprise"? If you dont describe in a clear way, what you want to do, nobody can help you. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From mckaygerhard at ...626... Sun Jul 2 13:37:19 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 07:07:19 -0430 Subject: [Gambas-user] Fwd: Problem to be examined by those who must use UTF8 with Gambas In-Reply-To: References: Message-ID: 2017-07-01 18:29 GMT-04:30 Jussi Lahtinen : > Please send that to the mailing-list. > in a forum its easy to the users, only click to the "reoly" button.. but due gambas-users its a mail list, its a comp?ication, need to edit the subject, the Remitent, etc.. so this king of errors/mistakes its a common... and its bed indexed by google so find a solution in the web without have a subscription to the mail list its a pain.. > > Regards, > > Le 02/07/2017 ? 00:10, Jussi Lahtinen a ?crit : > > > OK, this seems to be bug in GTK+ component! > > Go to; Project --> Properties --> Components, and change gb.gui to > > gb.gui.qt, then everything will work as expected. Or you need to wait for > > fix. > > > > > > Jussi > > > > > > > > On Sat, Jul 1, 2017 at 11:34 PM, Fernando Cabral < > > fernandojosecabral at ...626... > > wrote: > > > > 2017-07-01 16:15 GMT-03:00 Jussi Lahtinen > >: > > > > I don't quite get your description of the problem. It seems self > > contradictory. I mean this part: > > / > > / > > > > Perhaps It should sound contradictory. That's because if I write > > directly to a TextArea.text from > > inside the program, it will show "?" correctly. Nevertheless, if I > > read the same string from a file read into a variable and then try > > to display it... it does not work. > > > > > Are you using ascii functions for UTF-8 at some point? > > > > I only use ascii functions where there are no UTF-8 functions. For > > instance, split(). > > > > > I think we need to see your code to understand the issue. > > > > I have attached a text file (ODT) as well as the code itself. Note > > that, in order to run the code you will have to have unoconv > installed. > > > > If you comment the two lines bellow, the code will not work. > > > > * RawText = RegExp.Replace(RawText, "?", "?") > > RawText = RegExp.Replace(RawText, "?", "?") > > * > > > > This happens because for some mysterious reason, the QT library > > seems to get confused > > with *?* and *?*. But not always!* > > * > > > > Jussi > > > > > > > > On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral > > > > > > > wrote: > > > > I've been testing my new toy with every large and small text I > > can put my > > hands on. The fact is, I have had surprise after surprise. I've > > just found > > that when I read a text that contains "?" (that's an A with a > > grave accent > > (`A) -- or a backward acute accent for those who are not > > familiar with > > diacritics). > > > > Well, I can't display it if I load it into a TextArea.text. > > Nothing shows. > > I mean, NOTHING. That is, I have a blank screen. If I bring it > > to lowercase > > (? or `a) it will show up (in lowercase) with the rest of the > text. > > > > So, "`A" (coded as "\xC3\x80") will prevent the displaying of > > any string. > > Nevertheless, if I just try to display "Some text plus ? and > > some text > > more" it will work. > > > > Now, if I take the original text and do: > > > > * RawText = RegExp.Replace(RawText, "?", "?")* > > > > yep! it does work. > > But if I translate it back with > > > > * RawText = RegExp.Replace(RawText, "?", "?")* > > > > It does not work anymore. > > > > But if I do > > > > *RawText = RawText & "?"* > > > > And RawText did not contain "?" before, then it will be > displayed. > > > > Amazing. > > > > Any ideas about why this happens? > > > > Regards > > > > - fernando > > > > > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail : > > fernandojosecabral at ...626... gmail.com> > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 8868> > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 8868> > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > 183> > > Telefone celular: +55 (37) 99988-8868 > > > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > > -- Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > > > > > > > -- > Beno?t Minisini > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Sun Jul 2 14:01:15 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 2 Jul 2017 09:01:15 -0300 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? Message-ID: I've browsed the documentation but did not find what I am looking for: a way do read a html (or rtf) file and display it using some built in method. Say, something simple like this: *Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile = Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText FMain.LoadText(RtfFile) *' Here is the rub! * FMain.ShowmodalEnd* Regards - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Sun Jul 2 15:07:28 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 08:37:28 -0430 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: hi fernando,, u must read as stream.. see it: here a example minimal: http://gambaswiki.org/wiki/lang/lineinput but i think that what do you want its "understand" the file format! right? due i guess rtf files have some "rich"text inside.. something in some binary/specific non ascii/plain text ... Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-02 7:31 GMT-04:30 Fernando Cabral : > I've browsed the documentation but did not find what I am looking for: a > way do read a html (or rtf) file and display it using some built in method. > Say, something simple like this: > > > > > > > > > *Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile = > Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText > FMain.LoadText(RtfFile) *' Here is the rub! > > * FMain.ShowmodalEnd* > > Regards > > - fernando > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Sun Jul 2 15:24:18 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 2 Jul 2017 10:24:18 -0300 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: No, Lenz, reading the file is not te issue. This is easy and can be done with several different methods. What I am looking for is a way to render the html file (or rtf file). So, I want to read the file and display its contents. Displaying (rendering the html) is the issue. To make it more concrete. Imagine there is a help file in html. When the user clicks on the proper button, I'll read it and display it so the user can see the document. I want a method to display it rendered as it would be rendered in a browser. The editor might be able to do it. But then, I can't find instructions on how to create it, load and display de text. I have also found two lines of code that hint on the way to do it, but I can not learn enough from them. Says the guy: Then in Gambas2 I have a form with Textedit1 and I add: textedit1.text=file.load("filename.html") in my form_open sub I would guess textedit1.text is in a form that, when displayed, will render the file correctly. But then again, I can't find the rest of the code. Thank you. - fernando 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : > hi fernando,, u must read as stream.. see it: > > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput > > but i think that what do you want its "understand" the file format! right? > > due i guess rtf files have some "rich"text inside.. something in some > binary/specific non ascii/plain text ... > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-02 7:31 GMT-04:30 Fernando Cabral : > >> I've browsed the documentation but did not find what I am looking for: a >> way do read a html (or rtf) file and display it using some built in >> method. >> Say, something simple like this: >> >> >> >> >> >> >> >> >> *Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile >> = >> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >> FMain.LoadText(RtfFile) *' Here is the rub! >> >> * FMain.ShowmodalEnd* >> >> Regards >> >> - fernando >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail : fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Sun Jul 2 15:36:16 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 09:06:16 -0430 Subject: [Gambas-user] internal call in a function from external call Message-ID: i have two modules, exSysInfo and exSysNet in the exSysNet i have: Public Function getIpdef(Optional defIf As String = getIfdef()) As String commandshelltmp = "ifconfig " & defIf & " | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'" End note in the definition i have a call to other function in the parameter.. MY QUESTION ARE: i in the other module, i made: sIPs = exModSysNet.getIpdef() how can the gambas determine the default value if ate a call to internal, due the context was external.. so i must put the function as : Public Function getIpdef(Optional defIf As String = THIS.getIfdef()) As String of i must put the function as : Public Function getIpdef(Optional defIf As String = ME.getIfdef()) As String or how? or i must called internally in the function the getifdef() ? event in the parameter? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From bagonergi at ...626... Sun Jul 2 15:43:41 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 2 Jul 2017 15:43:41 +0200 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: You can use WebView (gb.gui.qt.webkit) Gianluigi 2017-07-02 15:24 GMT+02:00 Fernando Cabral : > No, Lenz, reading the file is not te issue. This is easy and can be done > with several different methods. > What I am looking for is a way to render the html file (or rtf file). So, I > want to read the file and display its contents. > Displaying (rendering the html) is the issue. > > To make it more concrete. Imagine there is a help file in html. When the > user clicks on the proper button, I'll read it > and display it so the user can see the document. I want a method to display > it rendered as it would be rendered in a browser. > > The editor might be able to do it. But then, I can't find instructions on > how to create it, load and display de text. > > I have also found two lines of code that hint on the way to do it, but I > can not learn enough from them. Says the guy: > > Then in Gambas2 I have a form with Textedit1 and I add: > textedit1.text=file.load("filename.html") in my form_open sub > > I would guess textedit1.text is in a form that, when displayed, will render > the file correctly. > But then again, I can't find the rest of the code. > > Thank you. > > - fernando > > > 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : > > > hi fernando,, u must read as stream.. see it: > > > > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput > > > > but i think that what do you want its "understand" the file format! > right? > > > > due i guess rtf files have some "rich"text inside.. something in some > > binary/specific non ascii/plain text ... > > > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > > > 2017-07-02 7:31 GMT-04:30 Fernando Cabral > : > > > >> I've browsed the documentation but did not find what I am looking for: a > >> way do read a html (or rtf) file and display it using some built in > >> method. > >> Say, something simple like this: > >> > >> > >> > >> > >> > >> > >> > >> > >> *Public Sub Main() Dim TextFile As File Dim RtfText As String > TextFile > >> = > >> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText > >> FMain.LoadText(RtfFile) *' Here is the rub! > >> > >> * FMain.ShowmodalEnd* > >> > >> Regards > >> > >> - fernando > >> -- > >> Fernando Cabral > >> Blogue: http://fernandocabral.org > >> Twitter: http://twitter.com/fjcabral > >> e-mail : > fernandojosecabral at ...626... > >> Facebook: f at ...3654... > >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> > >> Wickr ID: fernandocabral > >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> > >> Skype: fernandojosecabral > >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> > >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> > >> > >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> nenhum pol?tico ou cientista poder? se gabar de nada. > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Sun Jul 2 15:52:07 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 2 Jul 2017 10:52:07 -0300 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: Thank you Gianluigi. It seems there more than one way to skin this cat. I believe the problem has to do with my ignorance concerning Gambas. I have just found a DocumentView that will probably work too. Since I have a full example of this usage, I'll probably try it first. Thank you. - fernando 2017-07-02 10:43 GMT-03:00 Gianluigi : > You can use WebView (gb.gui.qt.webkit) > > > Gianluigi > > 2017-07-02 15:24 GMT+02:00 Fernando Cabral : > >> No, Lenz, reading the file is not te issue. This is easy and can be done >> with several different methods. >> What I am looking for is a way to render the html file (or rtf file). So, >> I >> want to read the file and display its contents. >> Displaying (rendering the html) is the issue. >> >> To make it more concrete. Imagine there is a help file in html. When the >> user clicks on the proper button, I'll read it >> and display it so the user can see the document. I want a method to >> display >> it rendered as it would be rendered in a browser. >> >> The editor might be able to do it. But then, I can't find instructions on >> how to create it, load and display de text. >> >> I have also found two lines of code that hint on the way to do it, but I >> can not learn enough from them. Says the guy: >> >> Then in Gambas2 I have a form with Textedit1 and I add: >> textedit1.text=file.load("filename.html") in my form_open sub >> >> I would guess textedit1.text is in a form that, when displayed, will >> render >> the file correctly. >> But then again, I can't find the rest of the code. >> >> Thank you. >> >> - fernando >> >> >> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : >> >> > hi fernando,, u must read as stream.. see it: >> > >> > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >> > >> > but i think that what do you want its "understand" the file format! >> right? >> > >> > due i guess rtf files have some "rich"text inside.. something in some >> > binary/specific non ascii/plain text ... >> > >> > Lenz McKAY Gerardo (PICCORO) >> > http://qgqlochekone.blogspot.com >> > >> > 2017-07-02 7:31 GMT-04:30 Fernando Cabral > >: >> > >> >> I've browsed the documentation but did not find what I am looking for: >> a >> >> way do read a html (or rtf) file and display it using some built in >> >> method. >> >> Say, something simple like this: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Public Sub Main() Dim TextFile As File Dim RtfText As String >> TextFile >> >> = >> >> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >> >> FMain.LoadText(RtfFile) *' Here is the rub! >> >> >> >> * FMain.ShowmodalEnd* >> >> >> >> Regards >> >> >> >> - fernando >> >> -- >> >> Fernando Cabral >> >> Blogue: http://fernandocabral.org >> >> Twitter: http://twitter.com/fjcabral >> >> e-mail : >> fernandojosecabral at ...626... >> >> Facebook: f at ...3654... >> >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Wickr ID: fernandocabral >> >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Skype: fernandojosecabral >> >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >> <(37)%2099988-8868> >> >> >> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> >> nenhum pol?tico ou cientista poder? se gabar de nada. >> >> ------------------------------------------------------------ >> >> ------------------ >> >> Check out the vibrant tech community on one of the world's most >> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> _______________________________________________ >> >> Gambas-user mailing list >> >> Gambas-user at lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> > >> > >> >> >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail : fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 >> Telefone celular: +55 (37) 99988-8868 >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Sun Jul 2 16:26:54 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 09:56:54 -0430 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: 2017-07-02 8:54 GMT-04:30 Fernando Cabral : > No, Lenz, reading the file is not te issue. This is easy and can be done > with several different methods. > What I am looking for is a way to render the html file (or rtf file). So, > I want to read the file and display its contents. > Displaying (rendering the html) is the issue. > as i suspect.. in hole truh, really you have only two ways... no many ways as do you think.. ... one using external interpreter (i mean a embebed http program such like http://www.acme.com/software/mini_httpd ) and embebing in the gambas program with embed control ... the other its by your own interpreting either using gb.qt.webkit or parsing and analizing by your own... i prefer the firs due all the hard work to interprete the html markup are "let to expert".. and not hadle by own.. due will be a extra work.. > > To make it more concrete. Imagine there is a help file in html. When the > user clicks on the proper button, I'll read it > and display it so the user can see the document. I want a method to > display it rendered as it would be rendered in a browser. > > The editor might be able to do it. But then, I can't find instructions on > how to create it, load and display de text. > > I have also found two lines of code that hint on the way to do it, but I > can not learn enough from them. Says the guy: > > Then in Gambas2 I have a form with Textedit1 and I add: > textedit1.text=file.load("filename.html") in my form_open sub > > I would guess textedit1.text is in a form that, when displayed, will > render the file correctly. > But then again, I can't find the rest of the code. > > Thank you. > > - fernando > > > 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : > >> hi fernando,, u must read as stream.. see it: >> >> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >> >> but i think that what do you want its "understand" the file format! >> right? >> >> due i guess rtf files have some "rich"text inside.. something in some >> binary/specific non ascii/plain text ... >> >> Lenz McKAY Gerardo (PICCORO) >> http://qgqlochekone.blogspot.com >> >> 2017-07-02 7:31 GMT-04:30 Fernando Cabral : >> >>> I've browsed the documentation but did not find what I am looking for: a >>> way do read a html (or rtf) file and display it using some built in >>> method. >>> Say, something simple like this: >>> >>> >>> >>> >>> >>> >>> >>> >>> *Public Sub Main() Dim TextFile As File Dim RtfText As String >>> TextFile = >>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >>> FMain.LoadText(RtfFile) *' Here is the rub! >>> >>> * FMain.ShowmodalEnd* >>> >>> Regards >>> >>> - fernando >>> -- >>> Fernando Cabral >>> Blogue: http://fernandocabral.org >>> Twitter: http://twitter.com/fjcabral >>> e-mail : fernandojosecabral at ...626... >>> Facebook: f at ...3654... >>> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >>> Wickr ID: fernandocabral >>> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >>> Skype: fernandojosecabral >>> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >>> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >>> >>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>> nenhum pol?tico ou cientista poder? se gabar de nada. >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > From mckaygerhard at ...626... Sun Jul 2 16:40:52 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 10:10:52 -0430 Subject: [Gambas-user] =?utf-8?q?both_uses_/bin/sh=2C_wiki_seems_does_asum?= =?utf-8?q?me_always_bash=C2=A1=3F?= Message-ID: whats the differentces between usage of shell and exec?? http://gambaswiki.org/wiki/doc/shellexec wiki said that both in last call/exec to the /bin/bash, *umm i think must be "default shell" or really only calls to the /bin/sh ?* Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From bagonergi at ...626... Sun Jul 2 16:40:59 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 2 Jul 2017 16:40:59 +0200 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: To see how in a browser, webview is better, you have a WebBrowse sample in farm example. Gianluigi 2017-07-02 15:52 GMT+02:00 Fernando Cabral : > Thank you Gianluigi. It seems there more than one way to skin this cat. > I believe the problem has to do with my ignorance concerning Gambas. > I have just found a DocumentView that will probably work too. > Since I have a full example of this usage, I'll probably try it first. > > Thank you. > > - fernando > > > 2017-07-02 10:43 GMT-03:00 Gianluigi : > >> You can use WebView (gb.gui.qt.webkit) >> >> >> Gianluigi >> >> 2017-07-02 15:24 GMT+02:00 Fernando Cabral >> : >> >>> No, Lenz, reading the file is not te issue. This is easy and can be done >>> with several different methods. >>> What I am looking for is a way to render the html file (or rtf file). >>> So, I >>> want to read the file and display its contents. >>> Displaying (rendering the html) is the issue. >>> >>> To make it more concrete. Imagine there is a help file in html. When the >>> user clicks on the proper button, I'll read it >>> and display it so the user can see the document. I want a method to >>> display >>> it rendered as it would be rendered in a browser. >>> >>> The editor might be able to do it. But then, I can't find instructions on >>> how to create it, load and display de text. >>> >>> I have also found two lines of code that hint on the way to do it, but I >>> can not learn enough from them. Says the guy: >>> >>> Then in Gambas2 I have a form with Textedit1 and I add: >>> textedit1.text=file.load("filename.html") in my form_open sub >>> >>> I would guess textedit1.text is in a form that, when displayed, will >>> render >>> the file correctly. >>> But then again, I can't find the rest of the code. >>> >>> Thank you. >>> >>> - fernando >>> >>> >>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : >>> >>> > hi fernando,, u must read as stream.. see it: >>> > >>> > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >>> > >>> > but i think that what do you want its "understand" the file format! >>> right? >>> > >>> > due i guess rtf files have some "rich"text inside.. something in some >>> > binary/specific non ascii/plain text ... >>> > >>> > Lenz McKAY Gerardo (PICCORO) >>> > http://qgqlochekone.blogspot.com >>> > >>> > 2017-07-02 7:31 GMT-04:30 Fernando Cabral < >>> fernandojosecabral at ...626...>: >>> > >>> >> I've browsed the documentation but did not find what I am looking >>> for: a >>> >> way do read a html (or rtf) file and display it using some built in >>> >> method. >>> >> Say, something simple like this: >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> *Public Sub Main() Dim TextFile As File Dim RtfText As String >>> TextFile >>> >> = >>> >> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >>> >> FMain.LoadText(RtfFile) *' Here is the rub! >>> >> >>> >> * FMain.ShowmodalEnd* >>> >> >>> >> Regards >>> >> >>> >> - fernando >>> >> -- >>> >> Fernando Cabral >>> >> Blogue: http://fernandocabral.org >>> >> Twitter: http://twitter.com/fjcabral >>> >> e-mail : >>> fernandojosecabral at ...626... >>> >> Facebook: f at ...3654... >>> >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >>> >> Wickr ID: fernandocabral >>> >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >>> >> Skype: fernandojosecabral >>> >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >>> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >>> <(37)%2099988-8868> >>> >>> >> >>> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>> >> nenhum pol?tico ou cientista poder? se gabar de nada. >>> >> ------------------------------------------------------------ >>> >> ------------------ >>> >> Check out the vibrant tech community on one of the world's most >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> >> _______________________________________________ >>> >> Gambas-user mailing list >>> >> Gambas-user at lists.sourceforge.net >>> >> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >>> > >>> > >>> >>> >>> -- >>> Fernando Cabral >>> Blogue: http://fernandocabral.org >>> Twitter: http://twitter.com/fjcabral >>> e-mail : fernandojosecabral at ...626... >>> Facebook: f at ...3654... >>> Telegram: +55 (37) 99988-8868 >>> Wickr ID: fernandocabral >>> WhatsApp: +55 (37) 99988-8868 >>> Skype: fernandojosecabral >>> Telefone fixo: +55 (37) 3521-2183 >>> Telefone celular: +55 (37) 99988-8868 >>> >>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>> nenhum pol?tico ou cientista poder? se gabar de nada. >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 <+55%2037%2099988-8868> > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 <+55%2037%2099988-8868> > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 <+55%2037%203521-2183> > Telefone celular: +55 (37) 99988-8868 <+55%2037%2099988-8868> > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > From mckaygerhard at ...626... Sun Jul 2 16:44:36 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 10:14:36 -0430 Subject: [Gambas-user] how specifiy the shell in a shell gambas call, wiki does not give example Message-ID: how can i use that, there's no example, : Specifying The Shell SINCE 3.1 You can specify which shell is used for running the command with the System.Shell property. By default, the shell command is run through /bin/sh. and wiki ends abruptly with no further example.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From jussi.lahtinen at ...626... Sun Jul 2 18:38:29 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 2 Jul 2017 19:38:29 +0300 Subject: [Gambas-user] how specifiy the shell in a shell gambas call, wiki does not give example In-Reply-To: References: Message-ID: Since it's string, I assume: System.Shell = "/bin/sh" Jussi On Sun, Jul 2, 2017 at 5:44 PM, PICCORO McKAY Lenz wrote: > how can i use that, there's no example, : > Specifying The Shell > > SINCE 3.1 > > You can specify which shell is used for running the command with the > System.Shell property. > > By default, the shell command is run through /bin/sh. > > > and wiki ends abruptly with no further example.. > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Sun Jul 2 19:11:39 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 12:41:39 -0430 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: 2017-07-02 12:12 GMT-04:30 Fernando Cabral : > As to this, I think you still did not understand what I needed, which is > to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP. > The RTF and HTLM file are local file. I open them and them I wanted do > display them. No protocols involved. > jajaj Fernando.. the method i described its the same you do.. but you using pdf instead html just invoked a "own" localhost running inside project, same behaviour are used by the gambas IDE when you run a WEB project.. > >> i prefer the firs due all the hard work to interprete the html markup are >> "let to expert".. and not hadle by own.. due will be a extra work.. >> > > Yep. That's why I was searching for some built in method to do it. > * Try $hPdf.Open("pdfFIle.pdf")* > > > * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh* > same as for html.. but changing the open call by a httpd run process in private port and send a exec to browser to open the local running httpd "own" webserver the gambas ide do the same for web projects.. rund their own embebed http web server and start a browser.. instead use a embebed http webserver you can use the gb.httpd component that does/usage are the same.. > > This solves this issue for good, althou I still want to know how to do the > same thing with a HTML file. > as i described.. if you want a example run a new web gambas project, and in a console see the process with ps and its basically that i described... > > > >> >>> >>> To make it more concrete. Imagine there is a help file in html. When the >>> user clicks on the proper button, I'll read it >>> and display it so the user can see the document. I want a method to >>> display it rendered as it would be rendered in a browser. >>> >>> The editor might be able to do it. But then, I can't find instructions >>> on how to create it, load and display de text. >>> >>> I have also found two lines of code that hint on the way to do it, but I >>> can not learn enough from them. Says the guy: >>> >>> Then in Gambas2 I have a form with Textedit1 and I add: >>> textedit1.text=file.load("filename.html") in my form_open sub >>> >>> I would guess textedit1.text is in a form that, when displayed, will >>> render the file correctly. >>> But then again, I can't find the rest of the code. >>> >>> Thank you. >>> >>> - fernando >>> >>> >>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : >>> >>>> hi fernando,, u must read as stream.. see it: >>>> >>>> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >>>> >>>> but i think that what do you want its "understand" the file format! >>>> right? >>>> >>>> due i guess rtf files have some "rich"text inside.. something in some >>>> binary/specific non ascii/plain text ... >>>> >>>> Lenz McKAY Gerardo (PICCORO) >>>> http://qgqlochekone.blogspot.com >>>> >>>> 2017-07-02 7:31 GMT-04:30 Fernando Cabral >>> >: >>>> >>>>> I've browsed the documentation but did not find what I am looking for: >>>>> a >>>>> way do read a html (or rtf) file and display it using some built in >>>>> method. >>>>> Say, something simple like this: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *Public Sub Main() Dim TextFile As File Dim RtfText As String >>>>> TextFile = >>>>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >>>>> FMain.LoadText(RtfFile) *' Here is the rub! >>>>> >>>>> * FMain.ShowmodalEnd* >>>>> >>>>> Regards >>>>> >>>>> - fernando >>>>> -- >>>>> Fernando Cabral >>>>> Blogue: http://fernandocabral.org >>>>> Twitter: http://twitter.com/fjcabral >>>>> e-mail : >>>>> fernandojosecabral at ...626... >>>>> Facebook: f at ...3654... >>>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>> Wickr ID: fernandocabral >>>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>> Skype: fernandojosecabral >>>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >>>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>> >>>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>>>> nenhum pol?tico ou cientista poder? se gabar de nada. >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> >>>> >>> >>> >>> -- >>> Fernando Cabral >>> Blogue: http://fernandocabral.org >>> Twitter: http://twitter.com/fjcabral >>> e-mail: fernandojosecabral at ...626... >>> Facebook: f at ...3654... >>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>> Wickr ID: fernandocabral >>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>> Skype: fernandojosecabral >>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>> >>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>> nenhum pol?tico ou cientista poder? se gabar de nada. >>> >>> >> > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > From gambas.fr at ...626... Sun Jul 2 22:19:55 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 2 Jul 2017 22:19:55 +0200 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: Well DocumentView is just a viewer i've done for gb.report. In fact it's abilities is to manages different Image in a paging style layout. So this tool is good for display Documents such as pdf or reports. But for those documents the libs pdf and report have a .Draw method that render the image in the given DrawingArea or image container. For you job take a look in the gambas ide in the HelpView.class. It inherit webview and give the hability to manage personnal url's. (in this case "gambas://") by cheating with the error link event. Take a look :-). Even we generate web page on the fly for the help embedded in the code source. 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz : > 2017-07-02 12:12 GMT-04:30 Fernando Cabral : > >> As to this, I think you still did not understand what I needed, which is >> to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP. >> The RTF and HTLM file are local file. I open them and them I wanted do >> display them. No protocols involved. >> > jajaj Fernando.. the method i described its the same you do.. but you using > pdf instead html > > just invoked a "own" localhost running inside project, same behaviour are > used by the gambas IDE when you run a WEB project.. > > >> >>> i prefer the firs due all the hard work to interprete the html markup are >>> "let to expert".. and not hadle by own.. due will be a extra work.. >>> >> >> Yep. That's why I was searching for some built in method to do it. >> > * Try $hPdf.Open("pdfFIle.pdf")* >> >> >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh* >> > same as for html.. but changing the open call by a httpd run process in > private port and send a exec to browser to open the local running httpd > "own" webserver > > the gambas ide do the same for web projects.. rund their own embebed http > web server and start a browser.. > > instead use a embebed http webserver you can use the gb.httpd component > that does/usage are the same.. > > >> >> This solves this issue for good, althou I still want to know how to do the >> same thing with a HTML file. >> > as i described.. if you want a example run a new web gambas project, and in > a console see the process with ps and its basically that i described... > > >> >> >> >>> >>>> >>>> To make it more concrete. Imagine there is a help file in html. When the >>>> user clicks on the proper button, I'll read it >>>> and display it so the user can see the document. I want a method to >>>> display it rendered as it would be rendered in a browser. >>>> >>>> The editor might be able to do it. But then, I can't find instructions >>>> on how to create it, load and display de text. >>>> >>>> I have also found two lines of code that hint on the way to do it, but I >>>> can not learn enough from them. Says the guy: >>>> >>>> Then in Gambas2 I have a form with Textedit1 and I add: >>>> textedit1.text=file.load("filename.html") in my form_open sub >>>> >>>> I would guess textedit1.text is in a form that, when displayed, will >>>> render the file correctly. >>>> But then again, I can't find the rest of the code. >>>> >>>> Thank you. >>>> >>>> - fernando >>>> >>>> >>>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz : >>>> >>>>> hi fernando,, u must read as stream.. see it: >>>>> >>>>> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >>>>> >>>>> but i think that what do you want its "understand" the file format! >>>>> right? >>>>> >>>>> due i guess rtf files have some "rich"text inside.. something in some >>>>> binary/specific non ascii/plain text ... >>>>> >>>>> Lenz McKAY Gerardo (PICCORO) >>>>> http://qgqlochekone.blogspot.com >>>>> >>>>> 2017-07-02 7:31 GMT-04:30 Fernando Cabral >>>> >: >>>>> >>>>>> I've browsed the documentation but did not find what I am looking for: >>>>>> a >>>>>> way do read a html (or rtf) file and display it using some built in >>>>>> method. >>>>>> Say, something simple like this: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *Public Sub Main() Dim TextFile As File Dim RtfText As String >>>>>> TextFile = >>>>>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >>>>>> FMain.LoadText(RtfFile) *' Here is the rub! >>>>>> >>>>>> * FMain.ShowmodalEnd* >>>>>> >>>>>> Regards >>>>>> >>>>>> - fernando >>>>>> -- >>>>>> Fernando Cabral >>>>>> Blogue: http://fernandocabral.org >>>>>> Twitter: http://twitter.com/fjcabral >>>>>> e-mail : >>>>>> fernandojosecabral at ...626... >>>>>> Facebook: f at ...3654... >>>>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>>> Wickr ID: fernandocabral >>>>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>>> Skype: fernandojosecabral >>>>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >>>>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>>>> >>>>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>>>>> nenhum pol?tico ou cientista poder? se gabar de nada. >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Fernando Cabral >>>> Blogue: http://fernandocabral.org >>>> Twitter: http://twitter.com/fjcabral >>>> e-mail: fernandojosecabral at ...626... >>>> Facebook: f at ...3654... >>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>> Wickr ID: fernandocabral >>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>> Skype: fernandojosecabral >>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >>>> >>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >>>> nenhum pol?tico ou cientista poder? se gabar de nada. >>>> >>>> >>> >> >> >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail: fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 >> Telefone celular: +55 (37) 99988-8868 >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From fernandojosecabral at ...626... Sun Jul 2 23:17:22 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 2 Jul 2017 18:17:22 -0300 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: 2017-07-02 17:19 GMT-03:00 Fabien Bodard : > Well DocumentView is just a viewer i've done for gb.report. In fact > it's abilities is to manages different Image in a paging style layout. > Starting with you example I have been able to do what I needed. I just deleted the part that allows the user to select a PDF file. Instead I put a path/filename as a constant. Only problem is that I have not found how to change font size. Even so, it delivers what I needed. Thank you. - fernando > > So this tool is good for display Documents such as pdf or reports. But > for those documents the libs pdf and report have a .Draw method that > render the image in the given DrawingArea or image container. > > For you job take a look in the gambas ide in the HelpView.class. It > inherit webview and give the hability to manage personnal url's. (in > this case "gambas://") by cheating with the error link event. > > Take a look :-). Even we generate web page on the fly for the help > embedded in the code source. > > 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz : > > 2017-07-02 12:12 GMT-04:30 Fernando Cabral >: > > > >> As to this, I think you still did not understand what I needed, which is > >> to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP. > >> The RTF and HTLM file are local file. I open them and them I wanted do > >> display them. No protocols involved. > >> > > jajaj Fernando.. the method i described its the same you do.. but you > using > > pdf instead html > > > > just invoked a "own" localhost running inside project, same behaviour are > > used by the gambas IDE when you run a WEB project.. > > > > > >> > >>> i prefer the firs due all the hard work to interprete the html markup > are > >>> "let to expert".. and not hadle by own.. due will be a extra work.. > >>> > >> > >> Yep. That's why I was searching for some built in method to do it. > >> > > * Try $hPdf.Open("pdfFIle.pdf")* > >> > >> > >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh* > >> > > same as for html.. but changing the open call by a httpd run process in > > private port and send a exec to browser to open the local running httpd > > "own" webserver > > > > the gambas ide do the same for web projects.. rund their own embebed http > > web server and start a browser.. > > > > instead use a embebed http webserver you can use the gb.httpd component > > that does/usage are the same.. > > > > > >> > >> This solves this issue for good, althou I still want to know how to do > the > >> same thing with a HTML file. > >> > > as i described.. if you want a example run a new web gambas project, and > in > > a console see the process with ps and its basically that i described... > > > > > >> > >> > >> > >>> > >>>> > >>>> To make it more concrete. Imagine there is a help file in html. When > the > >>>> user clicks on the proper button, I'll read it > >>>> and display it so the user can see the document. I want a method to > >>>> display it rendered as it would be rendered in a browser. > >>>> > >>>> The editor might be able to do it. But then, I can't find instructions > >>>> on how to create it, load and display de text. > >>>> > >>>> I have also found two lines of code that hint on the way to do it, > but I > >>>> can not learn enough from them. Says the guy: > >>>> > >>>> Then in Gambas2 I have a form with Textedit1 and I add: > >>>> textedit1.text=file.load("filename.html") in my form_open sub > >>>> > >>>> I would guess textedit1.text is in a form that, when displayed, will > >>>> render the file correctly. > >>>> But then again, I can't find the rest of the code. > >>>> > >>>> Thank you. > >>>> > >>>> - fernando > >>>> > >>>> > >>>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz >: > >>>> > >>>>> hi fernando,, u must read as stream.. see it: > >>>>> > >>>>> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput > >>>>> > >>>>> but i think that what do you want its "understand" the file format! > >>>>> right? > >>>>> > >>>>> due i guess rtf files have some "rich"text inside.. something in some > >>>>> binary/specific non ascii/plain text ... > >>>>> > >>>>> Lenz McKAY Gerardo (PICCORO) > >>>>> http://qgqlochekone.blogspot.com > >>>>> > >>>>> 2017-07-02 7:31 GMT-04:30 Fernando Cabral < > fernandojosecabral at ...626... > >>>>> >: > >>>>> > >>>>>> I've browsed the documentation but did not find what I am looking > for: > >>>>>> a > >>>>>> way do read a html (or rtf) file and display it using some built in > >>>>>> method. > >>>>>> Say, something simple like this: > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> *Public Sub Main() Dim TextFile As File Dim RtfText As String > >>>>>> TextFile = > >>>>>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText > >>>>>> FMain.LoadText(RtfFile) *' Here is the rub! > >>>>>> > >>>>>> * FMain.ShowmodalEnd* > >>>>>> > >>>>>> Regards > >>>>>> > >>>>>> - fernando > >>>>>> -- > >>>>>> Fernando Cabral > >>>>>> Blogue: http://fernandocabral.org > >>>>>> Twitter: http://twitter.com/fjcabral > >>>>>> e-mail : > >>>>>> fernandojosecabral at ...626... > >>>>>> Facebook: f at ...3654... > >>>>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>>>> Wickr ID: fernandocabral > >>>>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>>>> Skype: fernandojosecabral > >>>>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> > >>>>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>>>> > >>>>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >>>>>> nenhum pol?tico ou cientista poder? se gabar de nada. > >>>>>> ------------------------------------------------------------ > >>>>>> ------------------ > >>>>>> Check out the vibrant tech community on one of the world's most > >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >>>>>> _______________________________________________ > >>>>>> Gambas-user mailing list > >>>>>> Gambas-user at lists.sourceforge.net > >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>>>>> > >>>>> > >>>>> > >>>> > >>>> > >>>> -- > >>>> Fernando Cabral > >>>> Blogue: http://fernandocabral.org > >>>> Twitter: http://twitter.com/fjcabral > >>>> e-mail: fernandojosecabral at ...626... > >>>> Facebook: f at ...3654... > >>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>> Wickr ID: fernandocabral > >>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>> Skype: fernandojosecabral > >>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> > >>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >>>> > >>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >>>> nenhum pol?tico ou cientista poder? se gabar de nada. > >>>> > >>>> > >>> > >> > >> > >> -- > >> Fernando Cabral > >> Blogue: http://fernandocabral.org > >> Twitter: http://twitter.com/fjcabral > >> e-mail: fernandojosecabral at ...626... > >> Facebook: f at ...3654... > >> Telegram: +55 (37) 99988-8868 > >> Wickr ID: fernandocabral > >> WhatsApp: +55 (37) 99988-8868 > >> Skype: fernandojosecabral > >> Telefone fixo: +55 (37) 3521-2183 > >> Telefone celular: +55 (37) 99988-8868 > >> > >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> nenhum pol?tico ou cientista poder? se gabar de nada. > >> > >> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Mon Jul 3 01:08:09 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 19:08:09 -0400 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: 2017-07-02 14:09 GMT-04:00 Fernando Cabral : > Lentz, it is not a HTTPD project. It is not a web project. I need no > webserver (and I don't want one). I just want to display some nicely > formatted text. HTML will do it; RTF will do > its does not matter, ... with pdf works due its the same idea.. that using pdf.. but as Fabien said.. may change in the future.. gbr3 -http as html does not... i'll explain more easy.. using your solution: rtf-text -> pdf -> viewer(embebed or not) in my words its the same.. trf-text -> thml -> mini-httpd(embebed) how do you think how ide shows to you the inline help ? gambas has a http web server that runs only when view the little help and stop it.. well, pdf its good too... From taboege at ...626... Mon Jul 3 01:20:28 2017 From: taboege at ...626... (Tobias Boege) Date: Mon, 3 Jul 2017 01:20:28 +0200 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: <20170702232028.GE568@...3600...> On Sun, 02 Jul 2017, PICCORO McKAY Lenz wrote: > 2017-07-02 14:09 GMT-04:00 Fernando Cabral : > > > Lentz, it is not a HTTPD project. It is not a web project. I need no > > webserver (and I don't want one). I just want to display some nicely > > formatted text. HTML will do it; RTF will do > > > > its does not matter, ... with pdf works due its the same idea.. that using > pdf.. > > > but as Fabien said.. may change in the future.. gbr3 -http as html does > not... i'll explain more easy.. using your solution: > > rtf-text -> pdf -> viewer(embebed or not) > > in my words its the same.. > > trf-text -> thml -> mini-httpd(embebed) > > how do you think how ide shows to you the inline help ? gambas has a http > web server that runs only when view the little help and stop it.. > No, the IDE does *not* use the built-in HTTP server. Delivering HTML documents via HTTP is something entirely different from rendering them. The IDE uses gb.gui.qt.webkit's WebView to display help pages. It doesn't need an HTTP server. Your web browser is not a web server either. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at ...626... Mon Jul 3 02:43:25 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 2 Jul 2017 20:43:25 -0400 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: <20170702232028.GE568@...3600...> References: <20170702232028.GE568@...3600...> Message-ID: 2017-07-02 19:20 GMT-04:00 Tobias Boege : > No, the IDE does *not* use the built-in HTTP server. Delivering HTML > documents via HTTP is something entirely different from rendering them. > The IDE uses gb.gui.qt.webkit's WebView to display help pages. It doesn't > need an HTTP server. Your web browser is not a web server either. > yeah,, was a way to explain.. in any case, the pdf way was a good idea, due depend on qt.webkit its more and more havy on those days,... > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Mon Jul 3 19:23:44 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 3 Jul 2017 13:23:44 -0400 Subject: [Gambas-user] who to detect if are running inside IDE Message-ID: a piece of code to who to detect if are running inside IDE? any ideas how to? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From d4t4full at ...626... Mon Jul 3 19:33:02 2017 From: d4t4full at ...626... (ML) Date: Mon, 3 Jul 2017 14:33:02 -0300 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: Message-ID: On 03/07/17 14:23, PICCORO McKAY Lenz wrote: > a piece of code to who to detect if are running inside IDE? any ideas how > to? > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com In the old days of VB6 I tried to print the result of 1/0 to the DEBUG pane. Since output to the debug pane is ignored in VB6 compiled, there would be no error in the final compiled app. I don't know if Gambas does the same, but try this: Function InIDE() As Boolean Dim retVal As Boolean = False Try Debug (1/0) retVal = (Error.Code <> 0) Error.Clear Return retVal End Hope it helps, zxMarce From jussi.lahtinen at ...626... Mon Jul 3 20:16:47 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 3 Jul 2017 21:16:47 +0300 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: Message-ID: I don't know how this reacts to Gambas scripts, but for "normal" projects it works. #If Exec Print "Executable" #Else Print "IDE" #Endif Jussi On Mon, Jul 3, 2017 at 8:23 PM, PICCORO McKAY Lenz wrote: > a piece of code to who to detect if are running inside IDE? any ideas how > to? > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From taboege at ...626... Mon Jul 3 20:40:46 2017 From: taboege at ...626... (Tobias Boege) Date: Mon, 3 Jul 2017 20:40:46 +0200 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: Message-ID: <20170703184046.GA575@...3600...> On Mon, 03 Jul 2017, PICCORO McKAY Lenz wrote: > a piece of code to who to detect if are running inside IDE? any ideas how > to? > Exact same question here: https://sourceforge.net/p/gambas/mailman/message/34204796/ If I may add something to the things said in the above thread: you could try to get the parent PID of your Gambas process and determine if it's the IDE. If you always run on Linux you can probably use the /proc filesystem to get the path to the executable of your parent process or its command line. Then it depends on if you want to trust that the user always installs the IDE as "gambas3.gambas", for instance. Examining the parent process will probably not work anymore if you run your process *from the IDE* but through gb.httpd or through xterm (which are options in the IDE). I'm convinced that no matter how you try to detect if you're run by the IDE or not, someone can create an environment where your test gives the wrong answer. I still stand by my statement from two years ago: you shouldn't care where your program is run from in the first place. What problem are you trying to solve by knowing that? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From karl.reinl at ...9... Mon Jul 3 21:51:42 2017 From: karl.reinl at ...9... (Karl Reinl) Date: Mon, 03 Jul 2017 21:51:42 +0200 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <20170703184046.GA575@...3600...> References: <20170703184046.GA575@...3600...> Message-ID: <1499111502.31238.15.camel@...3609...> Am Montag, den 03.07.2017, 20:40 +0200 schrieb Tobias Boege: > On Mon, 03 Jul 2017, PICCORO McKAY Lenz wrote: > > a piece of code to who to detect if are running inside IDE? any ideas how > > to? > > > > Exact same question here: https://sourceforge.net/p/gambas/mailman/message/34204796/ > > If I may add something to the things said in the above thread: you could try > to get the parent PID of your Gambas process and determine if it's the IDE. > > If you always run on Linux you can probably use the /proc filesystem to get > the path to the executable of your parent process or its command line. Then > it depends on if you want to trust that the user always installs the IDE as > "gambas3.gambas", for instance. Examining the parent process will probably > not work anymore if you run your process *from the IDE* but through gb.httpd > or through xterm (which are options in the IDE). > > I'm convinced that no matter how you try to detect if you're run by the IDE > or not, someone can create an environment where your test gives the wrong > answer. I still stand by my statement from two years ago: you shouldn't care > where your program is run from in the first place. What problem are you > trying to solve by knowing that? > > Regards, > Tobi > Salut Tobi, I use (since gambas1) the project Arguments from the IDE. I set a ISIDE. Sub chkIfIsIDE() Dim nI As Integer bIsIDE = False For nI = 0 To Application.Args.Count - 1 ' PRINT Application.Args[nI] If InStr(UCase(Application.Args[nI]), "ISIDE") > 0 Then bIsIDE = True Endif Next End So if I don't call my project with a parameter called ISIDE, I can be sure .I ran in the IDE. And the use is, I set the first key of my DB to 9999 that is my Test-Mandant that's just a copy from one of my Mandants in my DB. So no problems with crashing DB-data, that's the problem I solved with!. -- Amicalement Charlie From karl.reinl at ...9... Mon Jul 3 22:00:26 2017 From: karl.reinl at ...9... (Karl Reinl) Date: Mon, 03 Jul 2017 22:00:26 +0200 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <20170703184046.GA575@...3600...> References: <20170703184046.GA575@...3600...> Message-ID: <1499112026.31238.18.camel@...3609...> Am Montag, den 03.07.2017, 20:40 +0200 schrieb Tobias Boege: > On Mon, 03 Jul 2017, PICCORO McKAY Lenz wrote: > > a piece of code to who to detect if are running inside IDE? any ideas how > > to? > > > > Exact same question here: https://sourceforge.net/p/gambas/mailman/message/34204796/ > > If I may add something to the things said in the above thread: you could try > to get the parent PID of your Gambas process and determine if it's the IDE. > > If you always run on Linux you can probably use the /proc filesystem to get > the path to the executable of your parent process or its command line. Then > it depends on if you want to trust that the user always installs the IDE as > "gambas3.gambas", for instance. Examining the parent process will probably > not work anymore if you run your process *from the IDE* but through gb.httpd > or through xterm (which are options in the IDE). > > I'm convinced that no matter how you try to detect if you're run by the IDE > or not, someone can create an environment where your test gives the wrong > answer. I still stand by my statement from two years ago: you shouldn't care > where your program is run from in the first place. What problem are you > trying to solve by knowing that? > > Regards, > Tobi > Salut Tobi, I use (since gambas1) the project Arguments from the IDE. I set a ISIDE. Sub chkIfIsIDE() Dim nI As Integer bIsIDE = False For nI = 0 To Application.Args.Count - 1 ' PRINT Application.Args[nI] If InStr(UCase(Application.Args[nI]), "ISIDE") > 0 Then bIsIDE = True Endif Next End So if I don't call my project with a parameter called ISIDE, I can be sure .I ran in the IDE. And the use is, I set the first key of my DB to 9999 that is my Test-Mandant that's just a copy from one of my Mandants in my DB. So no problems with crashing DB-data, that's the problem I solved with!. Sorry : Mandant = mandator From taboege at ...626... Mon Jul 3 22:36:14 2017 From: taboege at ...626... (Tobias Boege) Date: Mon, 3 Jul 2017 22:36:14 +0200 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <1499112026.31238.18.camel@...3609...> References: <20170703184046.GA575@...3600...> <1499112026.31238.18.camel@...3609...> Message-ID: <20170703203614.GB575@...3600...> On Mon, 03 Jul 2017, Karl Reinl wrote: > Am Montag, den 03.07.2017, 20:40 +0200 schrieb Tobias Boege: > > On Mon, 03 Jul 2017, PICCORO McKAY Lenz wrote: > > > a piece of code to who to detect if are running inside IDE? any ideas how > > > to? > > > > > > > Exact same question here: https://sourceforge.net/p/gambas/mailman/message/34204796/ > > > > If I may add something to the things said in the above thread: you could try > > to get the parent PID of your Gambas process and determine if it's the IDE. > > > > If you always run on Linux you can probably use the /proc filesystem to get > > the path to the executable of your parent process or its command line. Then > > it depends on if you want to trust that the user always installs the IDE as > > "gambas3.gambas", for instance. Examining the parent process will probably > > not work anymore if you run your process *from the IDE* but through gb.httpd > > or through xterm (which are options in the IDE). > > > > I'm convinced that no matter how you try to detect if you're run by the IDE > > or not, someone can create an environment where your test gives the wrong > > answer. I still stand by my statement from two years ago: you shouldn't care > > where your program is run from in the first place. What problem are you > > trying to solve by knowing that? > > > > Regards, > > Tobi > > > > Salut Tobi, > > I use (since gambas1) the project Arguments from the IDE. I set a ISIDE. > > Sub chkIfIsIDE() > Dim nI As Integer > bIsIDE = False > For nI = 0 To Application.Args.Count - 1 > ' PRINT Application.Args[nI] > If InStr(UCase(Application.Args[nI]), "ISIDE") > 0 Then > bIsIDE = True > Endif > Next > End > > So if I don't call my project with a parameter called ISIDE, I can be > sure .I ran in the IDE. > > And the use is, I set the first key of my DB to 9999 that is my > Test-Mandant that's just a copy from one of my Mandants in my DB. > So no problems with crashing DB-data, that's the problem I solved with!. > > Sorry : Mandant = mandator > Yes, and, in my opinion, you solved it the right way, by introducing a proper interface which the user has to know and respect. Your program doesn't guess, it is instructed. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From adamnt42 at ...626... Mon Jul 3 22:38:24 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Tue, 4 Jul 2017 06:08:24 +0930 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <20170703184046.GA575@...3600...> References: <20170703184046.GA575@...3600...> Message-ID: <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> On Mon, 3 Jul 2017 20:40:46 +0200 Tobias Boege wrote: > I'm convinced that no matter how you try to detect if you're run by the IDE > or not, someone can create an environment where your test gives the wrong > answer. I still stand by my statement from two years ago: you shouldn't care > where your program is run from in the first place. What problem are you > trying to solve by knowing that? > > Regards, > Tobi Since you asked :-) Laziness! Many times I have a menu item in a form that just "Stop"s the program i.e. Private Sub mnuDebug() Stop End then in the Form_Open() #If Exec mnuDebug.Visible = False #Endif So at development time, or when the customer has a problem, I almost always have a way to stop the program when it's running in the IDE. All this does is "tidy up" the program automatically when run outside the IDE. If a user wants to go to the extent of creating a non-x version of the program just to see that menu item - which will do nothing anyway since the Stop is ignored - then all I can say is "Good luck to them." There are probably trickier or even "more correct" ways to hide a menu item at runtime, but hey! Three lines and "As Far As I Care" - problem solved. b -- B Bruen From adamnt42 at ...626... Mon Jul 3 23:11:05 2017 From: adamnt42 at ...626... (bb) Date: Tue, 4 Jul 2017 06:41:05 +0930 Subject: [Gambas-user] System.Language (gb) Message-ID: <595AB2E9.5060902@...626...> Static Property Language As String Returns or sets the current language setting. But which one? LANG? LC_ALL? LANGUAGE? ... My problem is that most of my ENV localisations are set to "en_AU.UTF-8", the UTF-8 bit is supposed to be ignored but it isn't somewhere and so the translation doesn't get done. b From taboege at ...626... Mon Jul 3 23:43:56 2017 From: taboege at ...626... (Tobias Boege) Date: Mon, 3 Jul 2017 23:43:56 +0200 Subject: [Gambas-user] System.Language (gb) In-Reply-To: <595AB2E9.5060902@...626...> References: <595AB2E9.5060902@...626...> Message-ID: <20170703214356.GC575@...3600...> On Tue, 04 Jul 2017, bb wrote: > Static Property Language As String > > Returns or sets the current language setting. > > But which one? LANG? LC_ALL? LANGUAGE? ... > According to source code it returns: 1. LC_ALL if that's non-empty, next 2. LANG if that's non-empty, or otherwise 3. en_US. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From adamnt42 at ...626... Mon Jul 3 23:57:43 2017 From: adamnt42 at ...626... (bb) Date: Tue, 4 Jul 2017 07:27:43 +0930 Subject: [Gambas-user] System.Language (gb) In-Reply-To: <20170703214356.GC575@...3600...> References: <595AB2E9.5060902@...626...> <20170703214356.GC575@...3600...> Message-ID: <595ABDD7.7090003@...626...> On 04/07/17 07:13, Tobias Boege wrote: > On Tue, 04 Jul 2017, bb wrote: >> >Static Property Language As String >> > >> >Returns or sets the current language setting. >> > >> >But which one? LANG? LC_ALL? LANGUAGE? ... >> > > According to source code it returns: > > 1. LC_ALL if that's non-empty, next > 2. LANG if that's non-empty, or otherwise > 3. en_US. > > Regards, > Tobi Thanks Tobi, ( I looked but couldn't find it in main ???) WIki updated. Any comment on the UTF-8 bit? b From taboege at ...626... Tue Jul 4 00:06:51 2017 From: taboege at ...626... (Tobias Boege) Date: Tue, 4 Jul 2017 00:06:51 +0200 Subject: [Gambas-user] System.Language (gb) In-Reply-To: <595ABDD7.7090003@...626...> References: <595AB2E9.5060902@...626...> <20170703214356.GC575@...3600...> <595ABDD7.7090003@...626...> Message-ID: <20170703220651.GD575@...3600...> On Tue, 04 Jul 2017, bb wrote: > On 04/07/17 07:13, Tobias Boege wrote: > > On Tue, 04 Jul 2017, bb wrote: > > > >Static Property Language As String > > > > > > > >Returns or sets the current language setting. > > > > > > > >But which one? LANG? LC_ALL? LANGUAGE? ... > > > > > > According to source code it returns: > > > > 1. LC_ALL if that's non-empty, next > > 2. LANG if that's non-empty, or otherwise > > 3. en_US. > > > > Regards, > > Tobi > > Thanks Tobi, > > ( I looked but couldn't find it in main ???) > It's in main/gbx/gbx_c_system.c (which carries you to gbx_local.c). > WIki updated. > > Any comment on the UTF-8 bit? > Sorry, I have no clue about locales. All I can say is that the interpreter seems to only give you the value of the environment variables. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at ...626... Tue Jul 4 00:42:07 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 4 Jul 2017 01:42:07 +0300 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> References: <20170703184046.GA575@...3600...> <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> Message-ID: I don't understand why you need stop menu to your project. Why can't you just use the stop button from the IDE? Jussi On Mon, Jul 3, 2017 at 11:38 PM, adamnt42 at ...626... wrote: > On Mon, 3 Jul 2017 20:40:46 +0200 > Tobias Boege wrote: > > > > I'm convinced that no matter how you try to detect if you're run by the > IDE > > or not, someone can create an environment where your test gives the wrong > > answer. I still stand by my statement from two years ago: you shouldn't > care > > where your program is run from in the first place. What problem are you > > trying to solve by knowing that? > > > > Regards, > > Tobi > > > Since you asked :-) > > Laziness! > > Many times I have a menu item in a form that just "Stop"s the program i.e. > > Private Sub mnuDebug() > Stop > End > > then in the Form_Open() > > #If Exec > mnuDebug.Visible = False > #Endif > > So at development time, or when the customer has a problem, I almost > always have a way to stop the program when it's running in the IDE. > > All this does is "tidy up" the program automatically when run outside the > IDE. If a user wants to go to the extent of creating a non-x version of the > program just to see that menu item - which will do nothing anyway since the > Stop is ignored - then all I can say is "Good luck to them." > > There are probably trickier or even "more correct" ways to hide a menu > item at runtime, but hey! Three lines and "As Far As I Care" - problem > solved. > > b > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Tue Jul 4 00:44:31 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 3 Jul 2017 18:44:31 -0400 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <20170703184046.GA575@...3600...> References: <20170703184046.GA575@...3600...> Message-ID: 2017-07-03 14:40 GMT-04:00 Tobias Boege : > Exact same question here: https://sourceforge.net/p/ > gambas/mailman/message/34204796/ its does work for scripts, gambas.cgi or normal excecutables? > answer. I still stand by my statement from two years ago: you shouldn't > care > where your program is run from in the first place. What problem are you > trying to solve by knowing that? > when run from ide i can take care of a local db , set local paths.. if run from NOT-ide so then must detect system behaviour and user right paths.. currenlty some things are not distro agnostic and/or are user specific or user-wide only... like the examples.. /gambas farm installation of programs.. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From adamnt42 at ...626... Tue Jul 4 00:46:44 2017 From: adamnt42 at ...626... (bb) Date: Tue, 4 Jul 2017 08:16:44 +0930 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: <20170703184046.GA575@...3600...> <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> Message-ID: <595AC954.9020702@...626...> On 04/07/17 08:12, Jussi Lahtinen wrote: > I don't understand why you need stop menu to your project. Why can't you > just use the stop button from the IDE? > > > Jussi Coz it stops at a defined place, not just next time the eventloop runs. b From jussi.lahtinen at ...626... Tue Jul 4 00:51:28 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 4 Jul 2017 01:51:28 +0300 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: <595AC954.9020702@...626...> References: <20170703184046.GA575@...3600...> <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> <595AC954.9020702@...626...> Message-ID: > Coz it stops at a defined place, not just next time the eventloop runs. The eventloop needs to hit menu click for that to happen anyway... also I don't get why that matters. But I guess it's up to your taste. Jussi From mckaygerhard at ...626... Tue Jul 4 01:08:27 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 3 Jul 2017 19:08:27 -0400 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: <20170703184046.GA575@...3600...> <20170704060824.eb2f89c7e473fa5eaf3b03ef@...626...> <595AC954.9020702@...626...> Message-ID: 2017-07-03 18:51 GMT-04:00 Jussi Lahtinen : > > Coz it stops at a defined place, not just next time the eventloop runs. > i matters, due depends on their environment and focused target objectives.. seems gambas developers have lack of vision... some users mails and trick sound pretty rare.. but area prooff of variety of needs.. that comes from externa vendor domination.. like me.. that many things dont exits in gambas.. but i building.. > > > The eventloop needs to hit menu click for that to happen anyway... also I > don't get why that matters. But I guess it's up to your taste. > > > > Jussi > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Tue Jul 4 10:40:15 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 4 Jul 2017 10:40:15 +0200 Subject: [Gambas-user] IconView strange behavior. Message-ID: Or I did not understand how it works or ... If I set Editable property on true, I expect to be able to change the icon text and receive the Rename event to complete with Move. This does not happen in Trunk 8113, should I report it as an error? Regards Gianluigi From gambas.fr at ...626... Tue Jul 4 12:03:55 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 4 Jul 2017 12:03:55 +0200 Subject: [Gambas-user] IconView strange behavior. In-Reply-To: References: Message-ID: can you send an example ? 2017-07-04 10:40 GMT+02:00 Gianluigi : > Or I did not understand how it works or ... > > If I set Editable property on true, I expect to be able to change the icon > text and receive the Rename event to complete with Move. > > This does not happen in Trunk 8113, should I report it as an error? > > Regards > Gianluigi > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From gambas.fr at ...626... Tue Jul 4 12:09:31 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 4 Jul 2017 12:09:31 +0200 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: Maybe you can send me a source. So i can take an eyes. 2017-07-02 23:17 GMT+02:00 Fernando Cabral : > 2017-07-02 17:19 GMT-03:00 Fabien Bodard : > >> Well DocumentView is just a viewer i've done for gb.report. In fact >> it's abilities is to manages different Image in a paging style layout. >> > > Starting with you example I have been able to do what I needed. I just > deleted the part that allows the user > to select a PDF file. Instead I put a path/filename as a constant. > > Only problem is that I have not found how to change font size. Even so, it > delivers what I needed. > > Thank you. > > - fernando > >> >> So this tool is good for display Documents such as pdf or reports. But >> for those documents the libs pdf and report have a .Draw method that >> render the image in the given DrawingArea or image container. >> >> For you job take a look in the gambas ide in the HelpView.class. It >> inherit webview and give the hability to manage personnal url's. (in >> this case "gambas://") by cheating with the error link event. >> >> Take a look :-). Even we generate web page on the fly for the help >> embedded in the code source. >> >> 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz : >> > 2017-07-02 12:12 GMT-04:30 Fernando Cabral > >: >> > >> >> As to this, I think you still did not understand what I needed, which is >> >> to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP. >> >> The RTF and HTLM file are local file. I open them and them I wanted do >> >> display them. No protocols involved. >> >> >> > jajaj Fernando.. the method i described its the same you do.. but you >> using >> > pdf instead html >> > >> > just invoked a "own" localhost running inside project, same behaviour are >> > used by the gambas IDE when you run a WEB project.. >> > >> > >> >> >> >>> i prefer the firs due all the hard work to interprete the html markup >> are >> >>> "let to expert".. and not hadle by own.. due will be a extra work.. >> >>> >> >> >> >> Yep. That's why I was searching for some built in method to do it. >> >> >> > * Try $hPdf.Open("pdfFIle.pdf")* >> >> >> >> >> >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh* >> >> >> > same as for html.. but changing the open call by a httpd run process in >> > private port and send a exec to browser to open the local running httpd >> > "own" webserver >> > >> > the gambas ide do the same for web projects.. rund their own embebed http >> > web server and start a browser.. >> > >> > instead use a embebed http webserver you can use the gb.httpd component >> > that does/usage are the same.. >> > >> > >> >> >> >> This solves this issue for good, althou I still want to know how to do >> the >> >> same thing with a HTML file. >> >> >> > as i described.. if you want a example run a new web gambas project, and >> in >> > a console see the process with ps and its basically that i described... >> > >> > >> >> >> >> >> >> >> >>> >> >>>> >> >>>> To make it more concrete. Imagine there is a help file in html. When >> the >> >>>> user clicks on the proper button, I'll read it >> >>>> and display it so the user can see the document. I want a method to >> >>>> display it rendered as it would be rendered in a browser. >> >>>> >> >>>> The editor might be able to do it. But then, I can't find instructions >> >>>> on how to create it, load and display de text. >> >>>> >> >>>> I have also found two lines of code that hint on the way to do it, >> but I >> >>>> can not learn enough from them. Says the guy: >> >>>> >> >>>> Then in Gambas2 I have a form with Textedit1 and I add: >> >>>> textedit1.text=file.load("filename.html") in my form_open sub >> >>>> >> >>>> I would guess textedit1.text is in a form that, when displayed, will >> >>>> render the file correctly. >> >>>> But then again, I can't find the rest of the code. >> >>>> >> >>>> Thank you. >> >>>> >> >>>> - fernando >> >>>> >> >>>> >> >>>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz > >: >> >>>> >> >>>>> hi fernando,, u must read as stream.. see it: >> >>>>> >> >>>>> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput >> >>>>> >> >>>>> but i think that what do you want its "understand" the file format! >> >>>>> right? >> >>>>> >> >>>>> due i guess rtf files have some "rich"text inside.. something in some >> >>>>> binary/specific non ascii/plain text ... >> >>>>> >> >>>>> Lenz McKAY Gerardo (PICCORO) >> >>>>> http://qgqlochekone.blogspot.com >> >>>>> >> >>>>> 2017-07-02 7:31 GMT-04:30 Fernando Cabral < >> fernandojosecabral at ...626... >> >>>>> >: >> >>>>> >> >>>>>> I've browsed the documentation but did not find what I am looking >> for: >> >>>>>> a >> >>>>>> way do read a html (or rtf) file and display it using some built in >> >>>>>> method. >> >>>>>> Say, something simple like this: >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> *Public Sub Main() Dim TextFile As File Dim RtfText As String >> >>>>>> TextFile = >> >>>>>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >> >>>>>> FMain.LoadText(RtfFile) *' Here is the rub! >> >>>>>> >> >>>>>> * FMain.ShowmodalEnd* >> >>>>>> >> >>>>>> Regards >> >>>>>> >> >>>>>> - fernando >> >>>>>> -- >> >>>>>> Fernando Cabral >> >>>>>> Blogue: http://fernandocabral.org >> >>>>>> Twitter: http://twitter.com/fjcabral >> >>>>>> e-mail : >> >>>>>> fernandojosecabral at ...626... >> >>>>>> Facebook: f at ...3654... >> >>>>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>>>> Wickr ID: fernandocabral >> >>>>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>>>> Skype: fernandojosecabral >> >>>>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >> >>>>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>>>> >> >>>>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> >>>>>> nenhum pol?tico ou cientista poder? se gabar de nada. >> >>>>>> ------------------------------------------------------------ >> >>>>>> ------------------ >> >>>>>> Check out the vibrant tech community on one of the world's most >> >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >>>>>> _______________________________________________ >> >>>>>> Gambas-user mailing list >> >>>>>> Gambas-user at lists.sourceforge.net >> >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >>>>>> >> >>>>> >> >>>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Fernando Cabral >> >>>> Blogue: http://fernandocabral.org >> >>>> Twitter: http://twitter.com/fjcabral >> >>>> e-mail: fernandojosecabral at ...626... >> >>>> Facebook: f at ...3654... >> >>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>> Wickr ID: fernandocabral >> >>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>> Skype: fernandojosecabral >> >>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >> >>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >>>> >> >>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> >>>> nenhum pol?tico ou cientista poder? se gabar de nada. >> >>>> >> >>>> >> >>> >> >> >> >> >> >> -- >> >> Fernando Cabral >> >> Blogue: http://fernandocabral.org >> >> Twitter: http://twitter.com/fjcabral >> >> e-mail: fernandojosecabral at ...626... >> >> Facebook: f at ...3654... >> >> Telegram: +55 (37) 99988-8868 >> >> Wickr ID: fernandocabral >> >> WhatsApp: +55 (37) 99988-8868 >> >> Skype: fernandojosecabral >> >> Telefone fixo: +55 (37) 3521-2183 >> >> Telefone celular: +55 (37) 99988-8868 >> >> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> >> nenhum pol?tico ou cientista poder? se gabar de nada. >> >> >> >> >> > ------------------------------------------------------------ >> ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> >> -- >> Fabien Bodard >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From fernandojosecabral at ...626... Tue Jul 4 13:26:01 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 08:26:01 -0300 Subject: [Gambas-user] Any (easy) way to render RTF or HTML with gambas? In-Reply-To: References: Message-ID: Sure, Fabien, here it is. Note that basically, I took your program and deleted what I didn' t need. I didn't need, for instance, a file pickup list -- That's because I know beforehand which file I want to display. I could put to good use some niceties like a zooming button, but I can do without them. *Private $hPdf As New PdfDocumentPublic Sub Form_Open() Me.Center Try $hPdf.Open("/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoH?fen.pdf") If Error Then Message.Error("Unable to open the file : " & "/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoHifen.pdf") Return Endif DocumentView1.Count = $hPdf.Count DocumentView1.RefreshEndPublic Sub DocumentView1_Layout(Page As Integer) DocumentView1.Layout.Width = $hPdf[Page + 1].Width + 150 DocumentView1.Layout.Height = $hPdf[Page + 1].Height + 150EndPublic Sub DocumentView1_Draw(Page As Integer, Width As Integer, Height As Integer) Paint.DrawImage($hPdf[Page + 1].Image, 0, 0, Paint.Width, Paint.Height)EndPublic Sub Button2_Click() Me.CloseEnd* 2017-07-04 7:09 GMT-03:00 Fabien Bodard : > Maybe you can send me a source. So i can take an eyes. > > 2017-07-02 23:17 GMT+02:00 Fernando Cabral : > > 2017-07-02 17:19 GMT-03:00 Fabien Bodard : > > > >> Well DocumentView is just a viewer i've done for gb.report. In fact > >> it's abilities is to manages different Image in a paging style layout. > >> > > > > Starting with you example I have been able to do what I needed. I just > > deleted the part that allows the user > > to select a PDF file. Instead I put a path/filename as a constant. > > > > Only problem is that I have not found how to change font size. Even so, > it > > delivers what I needed. > > > > Thank you. > > > > - fernando > > > >> > >> So this tool is good for display Documents such as pdf or reports. But > >> for those documents the libs pdf and report have a .Draw method that > >> render the image in the given DrawingArea or image container. > >> > >> For you job take a look in the gambas ide in the HelpView.class. It > >> inherit webview and give the hability to manage personnal url's. (in > >> this case "gambas://") by cheating with the error link event. > >> > >> Take a look :-). Even we generate web page on the fly for the help > >> embedded in the code source. > >> > >> 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz : > >> > 2017-07-02 12:12 GMT-04:30 Fernando Cabral < > fernandojosecabral at ...626... > >> >: > >> > > >> >> As to this, I think you still did not understand what I needed, > which is > >> >> to render a HTML or RTF file. This has nothing to do with HTTPD or > HTTP. > >> >> The RTF and HTLM file are local file. I open them and them I wanted > do > >> >> display them. No protocols involved. > >> >> > >> > jajaj Fernando.. the method i described its the same you do.. but you > >> using > >> > pdf instead html > >> > > >> > just invoked a "own" localhost running inside project, same behaviour > are > >> > used by the gambas IDE when you run a WEB project.. > >> > > >> > > >> >> > >> >>> i prefer the firs due all the hard work to interprete the html > markup > >> are > >> >>> "let to expert".. and not hadle by own.. due will be a extra work.. > >> >>> > >> >> > >> >> Yep. That's why I was searching for some built in method to do it. > >> >> > >> > * Try $hPdf.Open("pdfFIle.pdf")* > >> >> > >> >> > >> >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh* > >> >> > >> > same as for html.. but changing the open call by a httpd run process > in > >> > private port and send a exec to browser to open the local running > httpd > >> > "own" webserver > >> > > >> > the gambas ide do the same for web projects.. rund their own embebed > http > >> > web server and start a browser.. > >> > > >> > instead use a embebed http webserver you can use the gb.httpd > component > >> > that does/usage are the same.. > >> > > >> > > >> >> > >> >> This solves this issue for good, althou I still want to know how to > do > >> the > >> >> same thing with a HTML file. > >> >> > >> > as i described.. if you want a example run a new web gambas project, > and > >> in > >> > a console see the process with ps and its basically that i > described... > >> > > >> > > >> >> > >> >> > >> >> > >> >>> > >> >>>> > >> >>>> To make it more concrete. Imagine there is a help file in html. > When > >> the > >> >>>> user clicks on the proper button, I'll read it > >> >>>> and display it so the user can see the document. I want a method to > >> >>>> display it rendered as it would be rendered in a browser. > >> >>>> > >> >>>> The editor might be able to do it. But then, I can't find > instructions > >> >>>> on how to create it, load and display de text. > >> >>>> > >> >>>> I have also found two lines of code that hint on the way to do it, > >> but I > >> >>>> can not learn enough from them. Says the guy: > >> >>>> > >> >>>> Then in Gambas2 I have a form with Textedit1 and I add: > >> >>>> textedit1.text=file.load("filename.html") in my form_open sub > >> >>>> > >> >>>> I would guess textedit1.text is in a form that, when displayed, > will > >> >>>> render the file correctly. > >> >>>> But then again, I can't find the rest of the code. > >> >>>> > >> >>>> Thank you. > >> >>>> > >> >>>> - fernando > >> >>>> > >> >>>> > >> >>>> 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz < > mckaygerhard at ...626... > >> >: > >> >>>> > >> >>>>> hi fernando,, u must read as stream.. see it: > >> >>>>> > >> >>>>> here a example minimal: http://gambaswiki.org/wiki/lang/lineinput > >> >>>>> > >> >>>>> but i think that what do you want its "understand" the file > format! > >> >>>>> right? > >> >>>>> > >> >>>>> due i guess rtf files have some "rich"text inside.. something in > some > >> >>>>> binary/specific non ascii/plain text ... > >> >>>>> > >> >>>>> Lenz McKAY Gerardo (PICCORO) > >> >>>>> http://qgqlochekone.blogspot.com > >> >>>>> > >> >>>>> 2017-07-02 7:31 GMT-04:30 Fernando Cabral < > >> fernandojosecabral at ...626... > >> >>>>> >: > >> >>>>> > >> >>>>>> I've browsed the documentation but did not find what I am looking > >> for: > >> >>>>>> a > >> >>>>>> way do read a html (or rtf) file and display it using some built > in > >> >>>>>> method. > >> >>>>>> Say, something simple like this: > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> *Public Sub Main() Dim TextFile As File Dim RtfText As String > >> >>>>>> TextFile = > >> >>>>>> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText > >> >>>>>> FMain.LoadText(RtfFile) *' Here is the rub! > >> >>>>>> > >> >>>>>> * FMain.ShowmodalEnd* > >> >>>>>> > >> >>>>>> Regards > >> >>>>>> > >> >>>>>> - fernando > >> >>>>>> -- > >> >>>>>> Fernando Cabral > >> >>>>>> Blogue: http://fernandocabral.org > >> >>>>>> Twitter: http://twitter.com/fjcabral > >> >>>>>> e-mail : > >> >>>>>> fernandojosecabral at ...626... > >> >>>>>> Facebook: f at ...3654... > >> >>>>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>>>> Wickr ID: fernandocabral > >> >>>>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>>>> Skype: fernandojosecabral > >> >>>>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> > >> >>>>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>>>> > >> >>>>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> >>>>>> nenhum pol?tico ou cientista poder? se gabar de nada. > >> >>>>>> ------------------------------------------------------------ > >> >>>>>> ------------------ > >> >>>>>> Check out the vibrant tech community on one of the world's most > >> >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> >>>>>> _______________________________________________ > >> >>>>>> Gambas-user mailing list > >> >>>>>> Gambas-user at lists.sourceforge.net > >> >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> >>>>>> > >> >>>>> > >> >>>>> > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> Fernando Cabral > >> >>>> Blogue: http://fernandocabral.org > >> >>>> Twitter: http://twitter.com/fjcabral > >> >>>> e-mail: fernandojosecabral at ...626... > >> >>>> Facebook: f at ...3654... > >> >>>> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>> Wickr ID: fernandocabral > >> >>>> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>> Skype: fernandojosecabral > >> >>>> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> > >> >>>> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> > >> >>>> > >> >>>> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> >>>> nenhum pol?tico ou cientista poder? se gabar de nada. > >> >>>> > >> >>>> > >> >>> > >> >> > >> >> > >> >> -- > >> >> Fernando Cabral > >> >> Blogue: http://fernandocabral.org > >> >> Twitter: http://twitter.com/fjcabral > >> >> e-mail: fernandojosecabral at ...626... > >> >> Facebook: f at ...3654... > >> >> Telegram: +55 (37) 99988-8868 > >> >> Wickr ID: fernandocabral > >> >> WhatsApp: +55 (37) 99988-8868 > >> >> Skype: fernandojosecabral > >> >> Telefone fixo: +55 (37) 3521-2183 > >> >> Telefone celular: +55 (37) 99988-8868 > >> >> > >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> >> nenhum pol?tico ou cientista poder? se gabar de nada. > >> >> > >> >> > >> > ------------------------------------------------------------ > >> ------------------ > >> > Check out the vibrant tech community on one of the world's most > >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > >> > >> -- > >> Fabien Bodard > >> > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bagonergi at ...626... Tue Jul 4 13:33:01 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 4 Jul 2017 13:33:01 +0200 Subject: [Gambas-user] IconView strange behavior. In-Reply-To: References: Message-ID: Hi Fabien, I attach the rename test as required. Regards Gianluigi 2017-07-04 12:03 GMT+02:00 Fabien Bodard : > can you send an example ? > > 2017-07-04 10:40 GMT+02:00 Gianluigi : > > Or I did not understand how it works or ... > > > > If I set Editable property on true, I expect to be able to change the > icon > > text and receive the Rename event to complete with Move. > > > > This does not happen in Trunk 8113, should I report it as an error? > > > > Regards > > Gianluigi > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: RenameTest-0.0.1.tar.gz Type: application/x-gzip Size: 13060 bytes Desc: not available URL: From mckaygerhard at ...626... Tue Jul 4 14:37:33 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 4 Jul 2017 08:37:33 -0400 Subject: [Gambas-user] System.Language (gb) In-Reply-To: <595ABDD7.7090003@...626...> References: <595AB2E9.5060902@...626...> <20170703214356.GC575@...3600...> <595ABDD7.7090003@...626...> Message-ID: 2017-07-03 17:57 GMT-04:00 bb : > Thanks Tobi, > > ( I looked but couldn't find it in main ???) > > WIki updated. > wiki spanish translated but.. > > Any comment on the UTF-8 bit? yeah? seems there's its no care of? > > > b > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Jul 4 15:12:01 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 4 Jul 2017 15:12:01 +0200 Subject: [Gambas-user] Fwd: Problem to be examined by those who must use UTF8 with Gambas In-Reply-To: References: Message-ID: <7fc2508b-ddc6-d4c1-b555-86269b0aff43@...1...> Le 02/07/2017 ? 01:12, Fernando Cabral a ?crit : > ---------- Forwarded message ---------- > From: Fernando Cabral > Date: 2017-07-01 17:34 GMT-03:00 > Subject: Re: [Gambas-user] Problem to be examined by those who must use > UTF8 with Gambas > To: Jussi Lahtinen > > > 2017-07-01 16:15 GMT-03:00 Jussi Lahtinen : > >> I don't quite get your description of the problem. It seems self >> contradictory. I mean this part: >> >> Perhaps It should sound contradictory. That's because if I write directly > to a TextArea.text from > inside the program, it will show "?" correctly. Nevertheless, if I read the > same string from a file read into a variable and then try to display it... > it does not work. > >> Are you using ascii functions for UTF-8 at some point? > > I only use ascii functions where there are no UTF-8 functions. For > instance, split(). > >> I think we need to see your code to understand the issue. > > I have attached a text file (ODT) as well as the code itself. Note that, in > order to run the code you will have to have unoconv installed. > > If you comment the two lines bellow, the code will not work. > > > > * RawText = RegExp.Replace(RawText, "?", "?") RawText = > RegExp.Replace(RawText, "?", "?")* > > This happens because for some mysterious reason, the QT library seems to > get confused > with *?* and *?*. But not always! > > Jussi > Not mysterious: you are using UTF-8 separators with Split(), whereas Split() only deals with ASCII strings. Consequently, the resulting MatchedWords array gets incorrect UTF-8 strings. If you have took the time to just trace your program between line #54 and line #60 and watch the MatchedWords array, you would have seen the problem. Regards, -- Beno?t Minisini From fernandojosecabral at ...626... Tue Jul 4 17:06:34 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 12:06:34 -0300 Subject: [Gambas-user] Is it possible to read a file directly into an array? Message-ID: Is there a straightforward way to read a file directly into an array? Say I have a file with several lines (lines ended with "\n"). I want to read each line and push its content as an item of an array. Lets say the file contents are "a\nb\nc\n" and what I need is: word[0] = "a" word[1] = "b" word[2] = "c" Yes, I know I can LINE INPUT each line and copy it into the array. But I have seen that Gambas has so many shortcuts that perhaps there is one for this operation too. Any hints? Regards - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Tue Jul 4 17:59:09 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 12:59:09 -0300 Subject: [Gambas-user] Is it possible to read a file directly into an array? In-Reply-To: References: Message-ID: Well, I found a very easy way to do it: *Dim Wordlist as string []* *Wordlist = Split(File.Load("strings.txt"), "\n")* It seems it can't be easier, can it? 2017-07-04 12:06 GMT-03:00 Fernando Cabral : > Is there a straightforward way to read a file directly into an array? > Say I have a file with several lines (lines ended with "\n"). > I want to read each line and push its content as an item of an array. > > Lets say the file contents are "a\nb\nc\n" and what I need is: > > word[0] = "a" > word[1] = "b" > word[2] = "c" > > Yes, I know I can LINE INPUT each line and copy it into the array. > But I have seen that Gambas has so many shortcuts that perhaps there is > one for this operation too. > > Any hints? > > Regards > > - fernando > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> > Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Tue Jul 4 18:59:40 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 4 Jul 2017 12:59:40 -0400 Subject: [Gambas-user] who to detect if are running inside IDE In-Reply-To: References: <20170703184046.GA575@...3600...> Message-ID: so in short investigations i have Public Sub Main() print "running" #If Exec print "in ide" #Endif End so testing by normal steps to compile produce a exec (either a cgi or not) so works for cgi: $ gbc3 -ga $ gba3 $ ./test.gambas running but for other cases i see tha if gambas archiver for executables are not run for distribute, it fails: $ gbx3 /tmp/testexec running in the reference mail it fails, but for production detection are good.. due its only for set paths, vars and environment this due, another way its detecting the gambas runtime environment.. seem gambas create a lof of files in /proc, based on Application.Id.. and also in "/tmp" ... i'm very curious about how gambas made this in cygwin installations, and or in macos/freebsd flavors (if any) 2017-07-03 18:44 GMT-04:00 PICCORO McKAY Lenz : > 2017-07-03 14:40 GMT-04:00 Tobias Boege : > >> Exact same question here: https://sourceforge.net/p/gamb >> as/mailman/message/34204796/ > > its does work for scripts, gambas.cgi or normal excecutables? > > From mckaygerhard at ...626... Tue Jul 4 19:17:12 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 4 Jul 2017 13:17:12 -0400 Subject: [Gambas-user] gambas for MAC OS ppc/intel ? Message-ID: i can see that there a FreeBSD install/compile how to in wiki: http://gambaswiki.org/wiki/install/freebsd since MacOS / ppc flavor are based lossely on FreeBSD, there's a MacOS version of Gambas ? and also a MacOS /intel version of gambas at least? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From fernandojosecabral at ...626... Wed Jul 5 03:16:32 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 22:16:32 -0300 Subject: [Gambas-user] Isn't bracket regular expression compatible with UTF8? Message-ID: I have been trying something like *poder[^[:alpha:]* so I could find the word "poder " ("poder" followed by an space) but not "poder?o" ("?" being an alpha character in Portuguese.) In English it could be like finding "power" but not "powerless". Problem is that it seems [^[alpha]] includes accented characters like "?", "?", "?". That is, accented characters are not understood as alpha, but not alpha. Please, note that I have compiled it with the UTF8 flag: * re.Compile(poder[^[:alpha]], RegExp.utf8)* Any hints? - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Wed Jul 5 03:29:14 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 22:29:14 -0300 Subject: [Gambas-user] Mystery with file.load and regexp Message-ID: Concerning RegExp I have another mysterious thing to understand If I do something like: *Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The same")For Each searchedfor In searchfor re.Compile(searchedfor, re.utf8)Next* The expression gest compiled. No error. Neverthelesse, if I the same words from a file, using this expression: *Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")* re.Compile will not work. It will display an error message saying there is nothing to compile. Now, if I do: *print "@" & Searchfor[n] &"@\n"* in both cases I will see precisely the same output. I can't distinguish one from the other. So, why it compiles in the first case, but does not in the second? This is the mystery I must solve with a little help from a good soul out there. - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Wed Jul 5 04:28:40 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 4 Jul 2017 23:28:40 -0300 Subject: [Gambas-user] Mystery with file.load and regexp In-Reply-To: References: Message-ID: I have found and worked around the problem. When you do the following: *Dim Expressions as string[] = Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"), "\n") * The last item pushed into *Expressions* is an empty string ("") even though it DOES NOT exist in the file. So, the expressions are compiled one after the other til the last one, that is empty. Then the program crashes. So it seems there is a bug in the *load.file()*. Bug that I was able to compensate for by adding the option *True* in the call to the functions *split()*. 2017-07-04 22:29 GMT-03:00 Fernando Cabral : > Concerning RegExp I have another mysterious thing to understand > > If I do something like: > > > > > > > > > *Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The > same")For Each searchedfor In searchfor re.Compile(searchedfor, > re.utf8)Next* > The expression gest compiled. No error. > Neverthelesse, if I the same words from a file, using this expression: > > *Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")* > > re.Compile will not work. It will display an error message saying there is > nothing to compile. Now, if I do: > > > *print "@" & Searchfor[n] &"@\n"* > in both cases I will see precisely the same output. I can't distinguish > one from the other. So, why it compiles in the first case, but does not in > the second? > > This is the mystery I must solve with a little help from a good soul out > there. > > - fernando > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> > Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bugtracker at ...3416... Wed Jul 5 05:08:17 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 05 Jul 2017 03:08:17 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1113: ODBC driver problem: driver connects but does not exec query In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1113&from=L21haW4- Comment #14 by PICCORO LENZ MCKAY: hi, how its the progress on this?, gambas 3.10 i think could be released soon i guess/suspect i'm very interesting that of all the reported issues of odbc this about inmediate query could be resolved for next release... From tmorehen at ...3602... Wed Jul 5 05:17:07 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Tue, 4 Jul 2017 23:17:07 -0400 Subject: [Gambas-user] Mystery with file.load and regexp In-Reply-To: References: Message-ID: File.Load is working fine. It is just loading a file that has a trailing "\n". Split then adds an empty string as the last entry in the array. This is Split's documented behaviour. Adding the True option suppresses empty entries. Note that Split will also add an empty entry for any blank lines ie "\n\n". The True option will also suppress those empty entries. A word of caution: the True option will not suppress lines that are comprised entirely of spaces. I'd test to see if those kind of lines also cause problems. On 2017-07-04 10:28 PM, Fernando Cabral wrote: > I have found and worked around the problem. When you do the following: > > *Dim Expressions as string[] = > Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"), > "\n") * > > The last item pushed into *Expressions* is an empty string ("") even though > it DOES NOT exist > in the file. So, the expressions are compiled one after the other til the > last one, that is empty. Then the program crashes. > > So it seems there is a bug in the *load.file()*. Bug that I was able to > compensate for by adding the option *True* in the call to the functions > *split()*. > > 2017-07-04 22:29 GMT-03:00 Fernando Cabral : > >> Concerning RegExp I have another mysterious thing to understand >> >> If I do something like: >> >> >> >> >> >> >> >> >> *Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The >> same")For Each searchedfor In searchfor re.Compile(searchedfor, >> re.utf8)Next* >> The expression gest compiled. No error. >> Neverthelesse, if I the same words from a file, using this expression: >> >> *Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")* >> >> re.Compile will not work. It will display an error message saying there is >> nothing to compile. Now, if I do: >> >> >> *print "@" & Searchfor[n] &"@\n"* >> in both cases I will see precisely the same output. I can't distinguish >> one from the other. So, why it compiles in the first case, but does not in >> the second? >> >> This is the mystery I must solve with a little help from a good soul out >> there. >> >> - fernando >> >> >> >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail: fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> >> > From adamnt42 at ...626... Wed Jul 5 05:43:15 2017 From: adamnt42 at ...626... (bb) Date: Wed, 5 Jul 2017 13:13:15 +0930 Subject: [Gambas-user] Mystery with file.load and regexp In-Reply-To: References: Message-ID: <595C6053.8060708@...626...> On 05/07/17 11:58, Fernando Cabral wrote: > I have found and worked around the problem. When you do the following: > > *Dim Expressions as string[] = > Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"), > "\n") * > > The last item pushed into *Expressions* is an empty string ("") even though > it DOES NOT exist > in the file. So, the expressions are compiled one after the other til the > last one, that is empty. Then the program crashes. > > So it seems there is a bug in the *load.file()*. Bug that I was able to > compensate for by adding the option *True* in the call to the functions > *split()*. > > I think you might find that the last character of indesejaveis.txt is a \n (as is the case for many, many files) so in actual fact your original split did exactly what it was supposed to do. And your work around is correct. Although it is not actually a work around it is a very common construct when dealing with text files. So, I very much doubt there is a bug in File.Load() b From taboege at ...626... Wed Jul 5 11:37:59 2017 From: taboege at ...626... (Tobias Boege) Date: Wed, 5 Jul 2017 11:37:59 +0200 Subject: [Gambas-user] Isn't bracket regular expression compatible with UTF8? In-Reply-To: References: Message-ID: <20170705093759.GA580@...3600...> On Tue, 04 Jul 2017, Fernando Cabral wrote: > I have been trying something like *poder[^[:alpha:]* so I could find the > word "poder " ("poder" followed by an space) but not "poder?o" ("?" being > an alpha character in Portuguese.) > > In English it could be like finding "power" but not "powerless". > > Problem is that it seems [^[alpha]] includes accented characters like "?", > "?", "?". > > That is, accented characters are not understood as alpha, but not alpha. > > Please, note that I have compiled it with the UTF8 flag: > * re.Compile(poder[^[:alpha]], RegExp.utf8)* > > Any hints? > In your mail I can see three distinct attempts at writing down a negative character class: [^[:alpha:], [^[alpha]], and [^[:alpha]], but the correct syntax is [[:^alpha:]] You want to check this first. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From fernandojosecabral at ...626... Wed Jul 5 11:44:07 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Wed, 5 Jul 2017 06:44:07 -0300 Subject: [Gambas-user] Mystery with file.load and regexp In-Reply-To: <595C6053.8060708@...626...> References: <595C6053.8060708@...626...> Message-ID: bb wrote: >I think you might find that the last character of indesejaveis.txt is a \n (as is the case for many, many > files) so in actual fact your original split did exactly what it was supposed to do. > > And your work around is correct. Although it is not actually a work around it is a very > common construct when dealing with text files. > So, I very much doubt there is a bug in File.Load() In the beginning, I thought I File.Load() had an idiosyncratic behavior. Then I understood that's not true. It just reads everything from the file into the variable. So, it is good behavior when it brings in the last "\n". Then I thought Split() had a strange behavior since it brought in something that did not exist after the last separator, that is, an empty string. Then, I discovered I was wrong on this account: if I have a separator as the last real element, then after that what I have is an empty string. So, I can't blame Split() for bringing it in. Unless I explicitly tell Split() to drop it. Yes, in this case, the bug was in my brain. It is called lack of knowledge or faulty reasoning. Thank you bb and Tony for showing me the light. - fernando 2017-07-05 0:43 GMT-03:00 bb : > On 05/07/17 11:58, Fernando Cabral wrote: > >> I have found and worked around the problem. When you do the following: >> >> *Dim Expressions as string[] = >> Split(File.Load("/home/fernando/.config/libreoffice/4/user/ >> basic/indesejaveis.txt"), >> "\n") * >> >> The last item pushed into *Expressions* is an empty string ("") even >> though >> it DOES NOT exist >> in the file. So, the expressions are compiled one after the other til the >> last one, that is empty. Then the program crashes. >> >> So it seems there is a bug in the *load.file()*. Bug that I was able to >> compensate for by adding the option *True* in the call to the functions >> *split()*. >> >> > >> I think you might find that the last character of indesejaveis.txt is a > \n (as is the case for many, many files) so in actual fact your original > split did exactly what it was supposed to do. > > And your work around is correct. Although it is not actually a work around > it is a very common construct when dealing with text files. > > So, I very much doubt there is a bug in File.Load() > > b > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Wed Jul 5 11:56:32 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Wed, 5 Jul 2017 06:56:32 -0300 Subject: [Gambas-user] Isn't bracket regular expression compatible with UTF8? In-Reply-To: <20170705093759.GA580@...3600...> References: <20170705093759.GA580@...3600...> Message-ID: Tobi wrote: > n your mail I can see three distinct attempts at writing down a > negative character class: [^[:alpha:], [^[alpha]], and [^[:alpha]], > but the correct syntax is > > [[:^alpha:]] > > You want to check this first. Right again, Tobi. I can't understand how I missed this. Thank you. - fernando 2017-07-05 6:37 GMT-03:00 Tobias Boege : > On Tue, 04 Jul 2017, Fernando Cabral wrote: > > I have been trying something like *poder[^[:alpha:]* so I could find > the > > word "poder " ("poder" followed by an space) but not "poder?o" ("?" being > > an alpha character in Portuguese.) > > > > In English it could be like finding "power" but not "powerless". > > > > Problem is that it seems [^[alpha]] includes accented characters like > "?", > > "?", "?". > > > > That is, accented characters are not understood as alpha, but not alpha. > > > > Please, note that I have compiled it with the UTF8 flag: > > * re.Compile(poder[^[:alpha]], RegExp.utf8)* > > > > Any hints? > > > > In your mail I can see three distinct attempts at writing down a > negative character class: [^[:alpha:], [^[alpha]], and [^[:alpha]], > but the correct syntax is > > [[:^alpha:]] > > You want to check this first. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bugtracker at ...3416... Wed Jul 5 19:14:22 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 05 Jul 2017 17:14:22 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1113: ODBC driver problem: driver connects but does not exec query In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1113&from=L21haW4- Comment #15 by PICCORO LENZ MCKAY: some info from freetds git repo: https://github.com/FreeTDS/freetds/issues/131#issuecomment-313166673 are that info usefully? i cannot understant that freddy77 said! From bugtracker at ...3416... Wed Jul 5 19:15:12 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 05 Jul 2017 17:15:12 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1102: ODBC driver super buggy 3: impossible made subquerys if the previous its a call/select to SP In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1102&from=L21haW4- Comment #4 by PICCORO LENZ MCKAY: some info related to this issue too: https://github.com/FreeTDS/freetds/issues/131#issuecomment-313166673 but i cant understand in total that freddy77 said! From fernandojosecabral at ...626... Wed Jul 5 23:00:00 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Wed, 5 Jul 2017 18:00:00 -0300 Subject: [Gambas-user] What is the simplest way to display text properties in Gambas? Message-ID: I'd like to display text highlights like bold and italics. Can I do it using TextArea? If yes, how? If I can't which resource should I use? Regards - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Thu Jul 6 03:40:16 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 5 Jul 2017 21:10:16 -0430 Subject: [Gambas-user] Is it possible to read a file directly into an array? In-Reply-To: References: Message-ID: 2017-07-04 11:29 GMT-04:30 Fernando Cabral : > Well, I found a very easy way to do it: > > > *Dim Wordlist as string []* > > *Wordlist = Split(File.Load("strings.txt"), "\n")* > It seems it can't be easier, can it? > wow, very easy.. good made it > > > > > 2017-07-04 12:06 GMT-03:00 Fernando Cabral : > > > Is there a straightforward way to read a file directly into an array? > > Say I have a file with several lines (lines ended with "\n"). > > I want to read each line and push its content as an item of an array. > > > > Lets say the file contents are "a\nb\nc\n" and what I need is: > > > > word[0] = "a" > > word[1] = "b" > > word[2] = "c" > > > > Yes, I know I can LINE INPUT each line and copy it into the array. > > But I have seen that Gambas has so many shortcuts that perhaps there is > > one for this operation too. > > > > Any hints? > > > > Regards > > > > - fernando > > > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> > > Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Thu Jul 6 03:43:51 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Wed, 5 Jul 2017 22:43:51 -0300 Subject: [Gambas-user] How to make installation package Message-ID: I'd like to make an installation package to install a gambas program on a machine that does not have gambas. I tried doing it clicking on Project -> Make -> Installation package. After presenting some questions, it runs and creates 22 files (regular, .gz, dsc and deb files). Four of them a *.deb files. Now, here are the issues: 1) They are all small files, so, for sure, they do not contain the interpreter 2) trying to install the deb files results in nothing (no error message, but nothing happens) Is there a wiki page where I can get better information on how to do this? -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Thu Jul 6 14:46:12 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 6 Jul 2017 08:46:12 -0400 Subject: [Gambas-user] How to make installation package In-Reply-To: References: Message-ID: some time ago gambas only produces a one package and two sets of sources.. since gambas 3.5/3.7 now gambas produces two flavors of debian packages: those that depends on qt4/qt5 and those that depends on gtk2.. if you want only a specific flavor must make depends specific on gb.xxx toolklit event gb.gui etc etc... that's the only information.. i can provide more but i need to research and remenber also investigate in the old mails... Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-05 21:43 GMT-04:00 Fernando Cabral : > I'd like to make an installation package to install a gambas program on a > machine that does not have gambas. I tried doing it clicking on > Project -> Make -> Installation package. > After presenting some questions, it runs and creates 22 files (regular, > .gz, dsc and deb files). Four of them a *.deb files. Now, here are the > issues: > > 1) They are all small files, so, for sure, they do not contain the > interpreter > 2) trying to install the deb files results in nothing (no error message, > but nothing happens) > > Is there a wiki page where I can get better information on how to do this? > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From charlie at ...2793... Thu Jul 6 16:08:48 2017 From: charlie at ...2793... (Charlie) Date: Thu, 6 Jul 2017 07:08:48 -0700 (MST) Subject: [Gambas-user] What is the simplest way to display text properties in Gambas? In-Reply-To: References: Message-ID: <1499350128016-59696.post@...3046...> Fernando Cabral wrote > I'd like to display text highlights like bold and italics. Can I do it > using TextArea? If yes, how? > > If I can't which resource should I use? Try using a TextLabel: - ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/What-is-the-simplest-way-to-display-text-properties-in-Gambas-tp59692p59696.html Sent from the gambas-user mailing list archive at Nabble.com. From fernandojosecabral at ...626... Thu Jul 6 18:43:59 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Thu, 6 Jul 2017 13:43:59 -0300 Subject: [Gambas-user] What is the simplest way to display text properties in Gambas? In-Reply-To: <1499350128016-59696.post@...3046...> References: <1499350128016-59696.post@...3046...> Message-ID: Based on the image you've sent a link to, I have not been able to understand how to do it. Thank you. - fernando 2017-07-06 11:08 GMT-03:00 Charlie : > Fernando Cabral wrote > > I'd like to display text highlights like bold and italics. Can I do it > > using TextArea? If yes, how? > > > > If I can't which resource should I use? > > Try using a TextLabel: - > > > > > > > ----- > Check out www.gambas.one > -- > View this message in context: http://gambas.8142.n7.nabble. > com/What-is-the-simplest-way-to-display-text-properties-in- > Gambas-tp59692p59696.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From tmorehen at ...3602... Thu Jul 6 20:17:45 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 6 Jul 2017 14:17:45 -0400 Subject: [Gambas-user] What is the simplest way to display text properties in Gambas? In-Reply-To: References: <1499350128016-59696.post@...3046...> Message-ID: <9a88fb31-884a-7e6e-f91f-6fcdc72f00f9@...3602...> Basically, assign some simple HTML to the text property. Not sure what comprises simple HTML though. ie TextLabel1.Text="Bold not bold" Seelhttp://gambaswiki.org/wiki/comp/gb.qt4/textlabel On 2017-07-06 12:43 PM, Fernando Cabral wrote: > Based on the image you've sent a link to, I have not been able to > understand how to do it. > > Thank you. > > - fernando > > 2017-07-06 11:08 GMT-03:00 Charlie : > >> Fernando Cabral wrote >>> I'd like to display text highlights like bold and italics. Can I do it >>> using TextArea? If yes, how? >>> >>> If I can't which resource should I use? >> Try using a TextLabel: - >> >> >> >> >> >> >> ----- >> Check out www.gambas.one >> -- >> View this message in context: http://gambas.8142.n7.nabble. >> com/What-is-the-simplest-way-to-display-text-properties-in- >> Gambas-tp59692p59696.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From bugtracker at ...3416... Thu Jul 6 20:52:42 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Thu, 06 Jul 2017 18:52:42 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1102: ODBC driver super buggy 3: impossible made subquerys if the previous its a call/select to SP In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1102&from=L21haW4- Comment #5 by PICCORO LENZ MCKAY: now this its a confirmed bug: seems the odbc implementation for TDS protocol in gambas does not enabled the advanced cursor.. and uses the default cursor, that does not support subquerys (multiple cursor and moveto cursors) ok, after some research MARS are supported in FreeTDS since version 0.95, its not enabled by default, so the problem here its that the gambas implementatin seems does not enabled the needed features.. PICCORO LENZ MCKAY changed the state of the bug to: Accepted. From bugtracker at ...3416... Thu Jul 6 20:53:08 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Thu, 06 Jul 2017 18:53:08 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1100: ODBC driver super buggy 1: rs.count return always negative and only one event in lasted In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1100&from=L21haW4- Comment #13 by PICCORO LENZ MCKAY: now this its a confirmed bug: seems the odbc implementation for TDS protocol in gambas does not enabled the advanced cursor.. and uses the default cursor, that does not support subquerys (multiple cursor and moveto cursors) ok, after some research MARS are supported in FreeTDS since version 0.95, its not enabled by default, so the problem here its that the gambas implementatin seems does not enabled the needed features.. PICCORO LENZ MCKAY changed the state of the bug to: Accepted. From gambas.fr at ...626... Thu Jul 6 22:19:24 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 6 Jul 2017 22:19:24 +0200 Subject: [Gambas-user] IconView strange behavior. In-Reply-To: References: Message-ID: You need to call the function Rename of the item. Public Sub IconView1_MouseUp() if Mouse.Right then IconView1.Current.Rename End 2017-07-04 13:33 GMT+02:00 Gianluigi : > Hi Fabien, > > I attach the rename test as required. > > Regards > Gianluigi > > 2017-07-04 12:03 GMT+02:00 Fabien Bodard : > >> can you send an example ? >> >> 2017-07-04 10:40 GMT+02:00 Gianluigi : >> > Or I did not understand how it works or ... >> > >> > If I set Editable property on true, I expect to be able to change the >> icon >> > text and receive the Rename event to complete with Move. >> > >> > This does not happen in Trunk 8113, should I report it as an error? >> > >> > Regards >> > Gianluigi >> > ------------------------------------------------------------ >> ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> >> -- >> Fabien Bodard >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From bagonergi at ...626... Thu Jul 6 23:59:54 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 6 Jul 2017 23:59:54 +0200 Subject: [Gambas-user] IconView strange behavior. In-Reply-To: References: Message-ID: Hi Fabien, thank you very much. Damn I should have understood it on my own :-( Regards Gianluigi 2017-07-06 22:19 GMT+02:00 Fabien Bodard : > You need to call the function Rename of the item. > > Public Sub IconView1_MouseUp() > > if Mouse.Right then IconView1.Current.Rename > > End > > 2017-07-04 13:33 GMT+02:00 Gianluigi : > > Hi Fabien, > > > > I attach the rename test as required. > > > > Regards > > Gianluigi > > > > 2017-07-04 12:03 GMT+02:00 Fabien Bodard : > > > >> can you send an example ? > >> > >> 2017-07-04 10:40 GMT+02:00 Gianluigi : > >> > Or I did not understand how it works or ... > >> > > >> > If I set Editable property on true, I expect to be able to change the > >> icon > >> > text and receive the Rename event to complete with Move. > >> > > >> > This does not happen in Trunk 8113, should I report it as an error? > >> > > >> > Regards > >> > Gianluigi > >> > ------------------------------------------------------------ > >> ------------------ > >> > Check out the vibrant tech community on one of the world's most > >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > >> > >> -- > >> Fabien Bodard > >> > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fabien Bodard > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Fri Jul 7 00:06:53 2017 From: bagonergi at ...626... (Gianluigi) Date: Fri, 7 Jul 2017 00:06:53 +0200 Subject: [Gambas-user] What is the simplest way to display text properties in Gambas? In-Reply-To: <9a88fb31-884a-7e6e-f91f-6fcdc72f00f9@...3602...> References: <1499350128016-59696.post@...3046...> <9a88fb31-884a-7e6e-f91f-6fcdc72f00f9@...3602...> Message-ID: Yes, strangely, gmail deleted part of Charlie's message http://gambas.8142.n7.nabble.com/What-is-the-simplest-way-to-display-text-properties-in-Gambas-td59692.html Gianluigi 2017-07-06 20:17 GMT+02:00 Tony Morehen : > Basically, assign some simple HTML to the text property. Not sure what > comprises simple HTML though. > > ie TextLabel1.Text="Bold not bold" > > Seelhttp://gambaswiki.org/wiki/comp/gb.qt4/textlabel > > > On 2017-07-06 12:43 PM, Fernando Cabral wrote: > >> Based on the image you've sent a link to, I have not been able to >> understand how to do it. >> >> Thank you. >> >> - fernando >> >> 2017-07-06 11:08 GMT-03:00 Charlie : >> >> Fernando Cabral wrote >>> >>>> I'd like to display text highlights like bold and italics. Can I do it >>>> using TextArea? If yes, how? >>>> >>>> If I can't which resource should I use? >>>> >>> Try using a TextLabel: - >>> >>> >>> >>> >>> >>> >>> ----- >>> Check out www.gambas.one >>> -- >>> View this message in context: http://gambas.8142.n7.nabble. >>> com/What-is-the-simplest-way-to-display-text-properties-in- >>> Gambas-tp59692p59696.html >>> Sent from the gambas-user mailing list archive at Nabble.com. >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gbwilly at ...3606... Fri Jul 7 15:15:39 2017 From: gbwilly at ...3606... (gbwilly at ...3606...) Date: Fri, 07 Jul 2017 15:15:39 +0200 Subject: [Gambas-user] How to make installation package In-Reply-To: References: Message-ID: <514f66baf5300c33a2256d88e3b5dbdd@...3606...> On 2017-07-06 03:43, Fernando Cabral wrote: > I'd like to make an installation package to install a gambas program on > a > machine that does not have gambas. I tried doing it clicking on > Project -> Make -> Installation package. > After presenting some questions, it runs and creates 22 files (regular, > .gz, dsc and deb files). Four of them a *.deb files. Now, here are the > issues: > > 1) They are all small files, so, for sure, they do not contain the > interpreter > 2) trying to install the deb files results in nothing (no error > message, > but nothing happens) > The target system where you want to install the gambas application on has to have the link to the gambas repository. Seems you are on Debian/Ubuntu. For Ubuntu open terminal on target system and do: sudo add-apt-repository ppa:gambas-team/gambas3 sudo apt-get update Next you can install your gambas application, it will pull in all dependencies (like interpreter) and install them. It will only install those parts of Gambas the application needs to run properly. Above is for Gambas stable 3.9.2, if you developed your application in trunk you will need to add trunk repo to target system instead of stable repo. Hope this explains all. gbWilly From bugtracker at ...3416... Fri Jul 7 16:04:46 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Fri, 07 Jul 2017 14:04:46 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1126: idea to add code snippets Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1126&from=L21haW4- V?ctor PEREZ reported a new bug. Summary ------- idea to add code snippets Type : Request Priority : Low Gambas version : 3.9 Product : Development Environment Description ----------- It would be a good idea to add code snippets something like this: Public Const _Properties As String = "*" 'Public Const _DefaultEvent As String = "" 'Public Const _DefaultSize As String = "" 'Public Const _Group As String = "" 'Public Const _DrawWith As String = "" 'Public Const _Similar As String = "" Pcdg Public const default group System information ------------------ Gambas=3.9.2 OperatingSystem=Linux Kernel=3.19.0-32-generic Architecture=x86 Distribution=Linux Mint 17.3 Rosa Desktop=MATE Theme=Gtk Language=es_UY.UTF-8 Memory=1950M [Libraries] Cairo=libcairo.so.2.11301.0 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.7.6 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.204.0 GTK+2=libgtk-x11-2.0.so.0.2400.23 GTK+3=libgtk-3.so.0.1000.8 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 QT4=libQtCore.so.4.8.6 QT5=libQt5Core.so.5.2.1 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 From fernandojosecabral at ...626... Fri Jul 7 16:18:32 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 7 Jul 2017 11:18:32 -0300 Subject: [Gambas-user] How to make installation package In-Reply-To: <514f66baf5300c33a2256d88e3b5dbdd@...3606...> References: <514f66baf5300c33a2256d88e3b5dbdd@...3606...> Message-ID: 2017-07-07 10:15 GMT-03:00 : wrote The target system where you want to install the gambas application on has >>> to have the link to the gambas repository. >>> Seems you are on Debian/Ubuntu. >>> >>> For Ubuntu open terminal on target system and do: >>> >>> sudo add-apt-repository ppa:gambas-team/gambas3 >>> sudo apt-get update >>> >>> >>> Next you can install your gambas application, it will pull in all >>> dependencies (like interpreter) and install them. >>> It will only install those parts of Gambas the application needs to run >>> properly. >>> >>> >>> Above is for Gambas stable 3.9.2, if you developed your application in >>> trunk you will need to add trunk repo to target system instead of stable >>> repo. >>> >>> Hope this explains all. >> >> Willy, it does explain. Just to be on the safe side: a) It means Gambas iteself is not installed when we run the package installer, right? b) What do the *.deb files do? Just copy the sorce code and the bytecode to the new system? Thank you. - fernando On 2017-07-06 03:43, Fernando Cabral wrote: > >> I'd like to make an installation package to install a gambas program on a >> machine that does not have gambas. I tried doing it clicking on >> Project -> Make -> Installation package. >> After presenting some questions, it runs and creates 22 files (regular, >> .gz, dsc and deb files). Four of them a *.deb files. Now, here are the >> issues: >> >> 1) They are all small files, so, for sure, they do not contain the >> interpreter >> 2) trying to install the deb files results in nothing (no error message, >> but nothing happens) >> >> > The target system where you want to install the gambas application on has > to have the link to the gambas repository. > Seems you are on Debian/Ubuntu. > > For Ubuntu open terminal on target system and do: > > sudo add-apt-repository ppa:gambas-team/gambas3 > sudo apt-get update > > > Next you can install your gambas application, it will pull in all > dependencies (like interpreter) and install them. > It will only install those parts of Gambas the application needs to run > properly. > > > Above is for Gambas stable 3.9.2, if you developed your application in > trunk you will need to add trunk repo to target system instead of stable > repo. > > Hope this explains all. > > gbWilly > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From gbwilly at ...3606... Fri Jul 7 16:53:25 2017 From: gbwilly at ...3606... (gbwilly at ...3606...) Date: Fri, 07 Jul 2017 16:53:25 +0200 Subject: [Gambas-user] How to make installation package In-Reply-To: References: <514f66baf5300c33a2256d88e3b5dbdd@...3606...> Message-ID: On 2017-07-07 16:18, Fernando Cabral wrote: > 2017-07-07 10:15 GMT-03:00 : wrote > > The target system where you want to install the gambas application on > has >>>> to have the link to the gambas repository. >>>> Seems you are on Debian/Ubuntu. >>>> >>>> For Ubuntu open terminal on target system and do: >>>> >>>> sudo add-apt-repository ppa:gambas-team/gambas3 >>>> sudo apt-get update >>>> >>>> >>>> Next you can install your gambas application, it will pull in all >>>> dependencies (like interpreter) and install them. >>>> It will only install those parts of Gambas the application needs to >>>> run >>>> properly. >>>> >>>> >>>> Above is for Gambas stable 3.9.2, if you developed your application >>>> in >>>> trunk you will need to add trunk repo to target system instead of >>>> stable >>>> repo. >>>> >>>> Hope this explains all. >>> >>> Hi Fernando, > Willy, it does explain. Just to be on the safe side: > a) It means Gambas iteself is not installed when we run the package > installer, right? It does NOT install Gambas IDE, only those parts needed to run your Gambas application (so interpreter, components used etc.) > b) What do the *.deb files do? Just copy the sorce code and the > bytecode to > the new system? They are the debian installer files. They do all kinds of things like put your executable at proper location, pull in the needed dependencies (like interpreter, components used by your application...), make desktop menu entry, take care of application icon and all more that is needed to make your application work properly on the system it is installed too. Debain determines how these files are build. They have policies (see: https://wiki.debian.org/Packaging) Hope this clarifies things for you. gbWilly From charlie at ...2793... Mon Jul 10 13:11:42 2017 From: charlie at ...2793... (Charlie) Date: Mon, 10 Jul 2017 04:11:42 -0700 (MST) Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1126: idea to add code snippets In-Reply-To: References: Message-ID: <1499685102426-59708.post@...3046...> bugtracker wrote > It would be a good idea to add code snippets > something like this: > Public Const _Properties As String = "*" > 'Public Const _DefaultEvent As String = "" > 'Public Const _DefaultSize As String = "" > 'Public Const _Group As String = "" > 'Public Const _DrawWith As String = "" > 'Public Const _Similar As String = "" > > Pcdg > > Public const default group You can add these yourself. Press [Ctrl]+[Alt]+P, select 'Code snippets' ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Gambas-Bug-Tracker-Bug-1126-idea-to-add-code-snippets-tp59705p59708.html Sent from the gambas-user mailing list archive at Nabble.com. From bugtracker at ...3416... Mon Jul 10 16:44:30 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 14:44:30 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1126: idea to add code snippets In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1126&from=L21haW4- PICCORO LENZ MCKAY changed the state of the bug to: Invalid. From bugtracker at ...3416... Mon Jul 10 16:44:42 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 14:44:42 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1126: idea to add code snippets In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1126&from=L21haW4- Comment #1 by PICCORO LENZ MCKAY: bugtracker wrote > It would be a good idea to add code snippets > something like this: > Public Const _Properties As String = "*" > 'Public Const _DefaultEvent As String = "" > 'Public Const _DefaultSize As String = "" > 'Public Const _Group As String = "" > 'Public Const _DrawWith As String = "" > 'Public Const _Similar As String = "" > > Pcdg > > Public const default group You can add these yourself. Press [Ctrl]+[Alt]+P, select 'Code snippets' From bugtracker at ...3416... Mon Jul 10 18:24:37 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 16:24:37 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1127: please switch to libsecret from keyring Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1127&from=L21haW4- Gianfranco COSTAMAGNA reported a new bug. Summary ------- please switch to libsecret from keyring Type : Bug Priority : Medium Gambas version : Unknown Product : Unknown Description ----------- taken from http://bugs.debian.org/867930 Hi, The libgnome-keyring library is deprecated and its usage is strongly discouraged [1]. Your package gambas3 declares a build-dependency on libgnome-keyring-dev or links against libgnome-keyring0. Please update your application to use libsecret instead [2]. Such a port should ideally happen with upstream being involved. On behalf of the Debian GNOME team, Michael Biebl [1] https://git.gnome.org/browse/libgnome-keyring/commit/?id=6a5adea4aec93 [2] https://wiki.gnome.org/Projects/Libsecret From bugtracker at ...3416... Mon Jul 10 18:33:50 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 16:33:50 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1127: please switch to libsecret from keyring In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1127&from=L21haW4- Beno?t MINISINI changed the state of the bug to: Accepted. From bugtracker at ...3416... Mon Jul 10 18:53:42 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 16:53:42 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1127: please switch to libsecret from keyring In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1127&from=L21haW4- Comment #1 by Beno?t MINISINI: I deprecated the 'gb.desktop.gnome' component, and do not use it anymore. Is it enough for debian? After all, you don't have to compile all the components to compile Gambas. Beno?t MINISINI changed the state of the bug to: NeedsInfo. From bugtracker at ...3416... Mon Jul 10 20:09:37 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 10 Jul 2017 18:09:37 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1127: please switch to libsecret from keyring In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1127&from=L21haW4- Comment #2 by PICCORO LENZ MCKAY: the requirements for libsecret are very high, with only removal of gnome related its just fine.. From mckaygerhard at ...626... Mon Jul 10 21:22:16 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 15:22:16 -0400 Subject: [Gambas-user] Gambas in a tablet. Is it possible? Message-ID: hi, sorry for revivin old threaths, but i'm interesting in gambas in other systems.. its there any new or something about gambas in androit? tablets? Message: 1 > Date: Thu, 31 Oct 2013 11:51:16 -0400 > From: Rob Kudla > One way you could get a virtual keyboard and mouse input is to use one of > the Linux installers available on Google Play (preferably a free one; > I've..... > this looks like a complicated solution... for users i mean... but reasonable for a static instalation by "service" > Running an Android X server app in conjunction with one of those Linux > installers would be another option, probably a cleaner one, but that's > one.... > sound better.. still complicated > https://play.google.com/store/apps/details?id=au.com.darkside.XServer > > Running Linux in a chroot (as many Android Linux installers will set up for > you) will probably give you far better performance than a virtual > machine... > this may affect the performance due limited resource in device.. > As you can see, there's no easy turnkey solution, but a number of > possibilities. Personally, I'd go with something like Phonegap, which just > uses Javascript/jquery and HTML, if I wanted to write Android apps (at > least the kind of app I would have used Gambas for on the Linux desktop) > that env "thing" only are for MAC and guindows... seems easy to develop.. but dev env are very limited.. > without dealing with Java. You can even put them in Google Play if you > want. > > Rob > From mckaygerhard at ...626... Mon Jul 10 22:02:51 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 16:02:51 -0400 Subject: [Gambas-user] how to trap show modal close response? Message-ID: i have a simple module: Public Sub Main() FLogin.ShowModal End and on the FLogin.class i have a simple override of a buton event: Public Sub closebtn_Click() Me.Close(33) End how can i trap in the MMain module in main the reponse of the FLogin without explicit call to moduleo inside the FLogin form.. ? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From jussi.lahtinen at ...626... Mon Jul 10 22:19:31 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 10 Jul 2017 23:19:31 +0300 Subject: [Gambas-user] how to trap show modal close response? In-Reply-To: References: Message-ID: Public Sub Main() Dim ii As Integer = FLogin.ShowModal() End ''Now the ii contains the output. PS. Are you sure that is override of something? Jussi On Mon, Jul 10, 2017 at 11:02 PM, PICCORO McKAY Lenz wrote: > i have a simple module: > > > Public Sub Main() > > FLogin.ShowModal > > End > > and on the FLogin.class i have a simple override of a buton event: > > Public Sub closebtn_Click() > > Me.Close(33) > > End > > how can i trap in the MMain module in main the reponse of the FLogin > without explicit call to moduleo inside the FLogin form.. ? > > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Mon Jul 10 23:01:52 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 17:01:52 -0400 Subject: [Gambas-user] how to trap show modal close response? In-Reply-To: References: Message-ID: ah, the problem was i write: "FLogin.ShowModal" and due its a function must be: "FLogin.ShowModal()" thanks Jussi.. why this heck are not well documented in the wiki? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-10 16:19 GMT-04:00 Jussi Lahtinen : > Public Sub Main() > > Dim ii As Integer = FLogin.ShowModal() > > End > > ''Now the ii contains the output. > > PS. Are you sure that is override of something? > > > Jussi > > > > On Mon, Jul 10, 2017 at 11:02 PM, PICCORO McKAY Lenz < > mckaygerhard at ...626... > > wrote: > > > i have a simple module: > > > > > > Public Sub Main() > > > > FLogin.ShowModal > > > > End > > > > and on the FLogin.class i have a simple override of a buton event: > > > > Public Sub closebtn_Click() > > > > Me.Close(33) > > > > End > > > > how can i trap in the MMain module in main the reponse of the FLogin > > without explicit call to moduleo inside the FLogin form.. ? > > > > > > > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rwe-sse at ...3629... Mon Jul 10 23:42:28 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Mon, 10 Jul 2017 23:42:28 +0200 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: Message-ID: Basically, someone would have to do what Benoit once did: sacrifice "some" time and write a library that links Gambas functions to Android GUI. Android is similar to Linux, at its core. So very basic Gambas functions should run on an Android without too much adaptation. The GUI however is completely different, with finger-wipes etc., that would have to be re-designed. If someone would do that, the community would be happy! Rolf Am 10.07.2017 um 21:22 schrieb PICCORO McKAY Lenz: > hi, sorry for revivin old threaths, but i'm interesting in gambas in other > systems.. > > its there any new or something about gambas in androit? tablets? > > Message: 1 >> Date: Thu, 31 Oct 2013 11:51:16 -0400 >> From: Rob Kudla >> > One way you could get a virtual keyboard and mouse input is to use one of >> the Linux installers available on Google Play (preferably a free one; >> I've..... >> > this looks like a complicated solution... for users i mean... but > reasonable for a static instalation by "service" > > >> Running an Android X server app in conjunction with one of those Linux >> installers would be another option, probably a cleaner one, but that's >> one.... >> > sound better.. still complicated > > >> https://play.google.com/store/apps/details?id=au.com.darkside.XServer >> >> Running Linux in a chroot (as many Android Linux installers will set up for >> you) will probably give you far better performance than a virtual >> machine... >> > this may affect the performance due limited resource in device.. > > >> As you can see, there's no easy turnkey solution, but a number of >> possibilities. Personally, I'd go with something like Phonegap, which just >> uses Javascript/jquery and HTML, if I wanted to write Android apps (at >> least the kind of app I would have used Gambas for on the Linux desktop) >> > that env "thing" only are for MAC and guindows... > seems easy to develop.. but dev env are very limited.. > > >> without dealing with Java. You can even put them in Google Play if you >> want. >> >> Rob >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From rwe-sse at ...3629... Mon Jul 10 23:50:17 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Mon, 10 Jul 2017 23:50:17 +0200 Subject: [Gambas-user] How to use drag-and-drop Message-ID: The basic usage of the drag-and-drop functions isn't quite clear to me. I couldn't find much information in the wiki about it. Here is my code. I use t$ as a simple storage place and TextBox1 is only to see what the thing does. The user should pick the red cell in GridView1 and drag it to another cell. The contents should appear there. I use "MouseUp" and not "Drop" because Drop didn't have any result. But maybe the way I implemented the whole thing isn't the right one anyhow? Thank you for your insight! Rolf Public t$ As String Public Sub Form_Open() GridView1.Rows.Count = 7 GridView1.Columns.Count = 5 TextBox1.Text = t$ End Public Sub GridView1_Data(Row As Integer, Column As Integer) If Row = 4 And Column = 3 Then GridView1.Data.Background = Color.Red GridView1.Data.Alignment = Align.Center GridView1.Data.Text = "E\nKorr\nWg" t$ = GridView1.Data.Text Endif End Public Sub GridView1_Click() t$ = GridView1.Current.Text TextBox1.Text = "" End Public Sub GridView1_MouseDrag() TextBox1.Text = t$ End Public Sub GridView1_MouseUp() TextBox1.Text = GridView1.Row & "::" & GridView1.Column GridView1.Current.Text = t$ End From rwe-sse at ...3629... Mon Jul 10 23:58:15 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Mon, 10 Jul 2017 23:58:15 +0200 Subject: [Gambas-user] RichText in Gambas Message-ID: <2b16c925-5f81-d57c-755a-f08b92de7c2a@...3629...> Is there an information about the RichText property? I mean, which HTML tags are accepted etc.? I could imagine at least Benoit should know where to get information about it. In my GridView example, I tried RichText for the cell. Pure font style tags run well, like bold, italics etc. But I had a problem with center.
results in not showing the text in the cell at all. Same thing happens if I try GridView1.Data.Alignment = Align.Center and then give RichText. When I use simple Text instead, Align.Center will run. But then I cannot vary the fontstyles anymore... Any idea how to solve this? Regards Rolf From taboege at ...626... Tue Jul 11 00:24:14 2017 From: taboege at ...626... (Tobias Boege) Date: Tue, 11 Jul 2017 00:24:14 +0200 Subject: [Gambas-user] RichText in Gambas In-Reply-To: <2b16c925-5f81-d57c-755a-f08b92de7c2a@...3629...> References: <2b16c925-5f81-d57c-755a-f08b92de7c2a@...3629...> Message-ID: <20170710222414.GB579@...3600...> On Mon, 10 Jul 2017, Rolf-Werner Eilert wrote: > Is there an information about the RichText property? I mean, which HTML tags > are accepted etc.? > GridView is in gb.gui.base (written in Gambas) and you can see that it uses the Paint class to draw its cells. To draw RichText it uses Paint.DrawRichText(). If you use gb.qt4 as Paint backend you can trace its source code to see that ultimately rich text is put into a QTextDocument (by setHTML()) and drawn from there. The supported HTML is then documented over at QT [1]. > I could imagine at least Benoit should know where to get information about > it. > > In my GridView example, I tried RichText for the cell. Pure font style tags > run well, like bold, italics etc. But I had a problem with center. > >
results in not showing the text in the cell at all. > > Same thing happens if I try GridView1.Data.Alignment = Align.Center and then > give RichText. > > When I use simple Text instead, Align.Center will run. But then I cannot > vary the fontstyles anymore... > > Any idea how to solve this? > The GridViewData.Alignment seems to be passed to the DrawRichText() call and, at least in gb.qt4, the rich text drawing routine constructs an alignment div out of the Alignment parameter, so I don't know what the problem is. You could try the
tag? Regards, Tobi [1] https://doc.qt.io/qt-4.8/richtext-html-subset.html -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at ...626... Tue Jul 11 01:37:33 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 19:37:33 -0400 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: Message-ID: 2017-07-10 17:42 GMT-04:00 Rolf-Werner Eilert : > Basically, someone would have to do what Benoit once did: sacrifice "some" > time and write a library that links Gambas functions to Android GUI. those that have the time does not have the money or food in that time > > Android is similar to Linux, at its core. So very basic Gambas functions > should run on an Android without too much adaptation. The GUI however is > completely different, with finger-wipes etc., that would have to be > re-designed. its a hard work.. well was just a question for time.. i remenber that benoit said that gambas has a close relation with X so well.. > > If someone would do that, the community would be happy! of course.. ok thanks for response... > > Rolf > > > > Am 10.07.2017 um 21:22 schrieb PICCORO McKAY Lenz: >> >> hi, sorry for revivin old threaths, but i'm interesting in gambas in other >> systems.. >> >> its there any new or something about gambas in androit? tablets? >> >> Message: 1 >>> >>> Date: Thu, 31 Oct 2013 11:51:16 -0400 >>> From: Rob Kudla >>> >> One way you could get a virtual keyboard and mouse input is to use one of >>> >>> the Linux installers available on Google Play (preferably a free one; >>> I've..... >>> >> this looks like a complicated solution... for users i mean... but >> reasonable for a static instalation by "service" >> >> >>> Running an Android X server app in conjunction with one of those Linux >>> installers would be another option, probably a cleaner one, but that's >>> one.... >>> >> sound better.. still complicated >> >> >>> https://play.google.com/store/apps/details?id=au.com.darkside.XServer >>> >>> Running Linux in a chroot (as many Android Linux installers will set up >>> for >>> you) will probably give you far better performance than a virtual >>> machine... >>> >> this may affect the performance due limited resource in device.. >> >> >>> As you can see, there's no easy turnkey solution, but a number of >>> possibilities. Personally, I'd go with something like Phonegap, which >>> just >>> uses Javascript/jquery and HTML, if I wanted to write Android apps (at >>> least the kind of app I would have used Gambas for on the Linux desktop) >>> >> that env "thing" only are for MAC and guindows... >> seems easy to develop.. but dev env are very limited.. >> >> >>> without dealing with Java. You can even put them in Google Play if you >>> want. >>> >>> Rob >>> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From mckaygerhard at ...626... Tue Jul 11 01:38:36 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 19:38:36 -0400 Subject: [Gambas-user] gambas for MAC OS ppc/intel ? In-Reply-To: References: Message-ID: any news/notes about MAC port of gambas? where download etc? if any! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-04 13:17 GMT-04:00 PICCORO McKAY Lenz : > i can see that there a FreeBSD install/compile how to in wiki: > http://gambaswiki.org/wiki/install/freebsd > > since MacOS / ppc flavor are based lossely on FreeBSD, there's a MacOS > version of Gambas ? > > and also a MacOS /intel version of gambas at least? > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com From taboege at ...626... Tue Jul 11 02:22:04 2017 From: taboege at ...626... (Tobias Boege) Date: Tue, 11 Jul 2017 02:22:04 +0200 Subject: [Gambas-user] gambas for MAC OS ppc/intel ? In-Reply-To: References: Message-ID: <20170711002204.GC579@...3600...> On Mon, 10 Jul 2017, PICCORO McKAY Lenz wrote: > any news/notes about MAC port of gambas? where download etc? if any! I'm not aware of any news but you may want to contact Francois Gallo who was able to run the Gambas IDE on OS X back in 2011 [1]. I'm sure you can dig up his email address in the archives. Regards, Tobi [1] http://gambaswiki.org/wiki/doc/screenshot -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at ...626... Tue Jul 11 03:48:49 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Mon, 10 Jul 2017 21:48:49 -0400 Subject: [Gambas-user] gambas for MAC OS ppc/intel ? In-Reply-To: <20170711002204.GC579@...3600...> References: <20170711002204.GC579@...3600...> Message-ID: thanks toby! great! holy sh*t, yeah, i need it to get out my way that thing named java! now "urgar" int archives.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-10 20:22 GMT-04:00 Tobias Boege : > On Mon, 10 Jul 2017, PICCORO McKAY Lenz wrote: > > any news/notes about MAC port of gambas? where download etc? if any! > > I'm not aware of any news but you may want to contact Francois Gallo who > was able to run the Gambas IDE on OS X back in 2011 [1]. I'm sure you can > dig up his email address in the archives. > > Regards, > Tobi > > [1] http://gambaswiki.org/wiki/doc/screenshot > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue Jul 11 09:08:57 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 11 Jul 2017 09:08:57 +0200 Subject: [Gambas-user] reparent menu item In-Reply-To: References: <1497779320507-59397.post@...3046...> Message-ID: ok so just set the filemenu(parent item) invisible and then call the same menu with filemenu.popup. All menus are contained by the form parent... just they are visible or not. 2017-06-18 16:52 GMT+02:00 Leon Davis : > I have created a form with containing a component I designed. When the > program is started the menu is created: MenuItem = new Menu(FormMain) as > "FileMenu" and is displayed as a text menu of the form. There is also a > context menu that is created for when the user right clicks on the control: > MenuItem = new Menu(Control) as "PopupMenu". One of the options I want to > present is to the user is to move the "FileMenu" to the "PopupMenu" so that > the "FileMenu" is no longer displayed on the form but on the "PopupMenu". > > On Sun, Jun 18, 2017 at 4:48 AM, Charlie wrote: > >> Can you supply more detail and an example of what you are trying to do? >> >> >> >> ----- >> Check out www.gambas.one >> -- >> View this message in context: http://gambas.8142.n7.nabble. >> com/reparent-menu-item-tp59386p59397.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From charlie at ...2793... Tue Jul 11 12:23:25 2017 From: charlie at ...2793... (Charlie) Date: Tue, 11 Jul 2017 03:23:25 -0700 (MST) Subject: [Gambas-user] How to use drag-and-drop In-Reply-To: References: Message-ID: <1499768605780-59728.post@...3046...> Rolf-Werner Eilert-2 wrote > The basic usage of the drag-and-drop functions isn't quite clear to me. > I couldn't find much information in the wiki about it. Here is my code. > I use t$ as a simple storage place and TextBox1 is only to see what the > thing does. > > The user should pick the red cell in GridView1 and drag it to another > cell. The contents should appear there. > > I use "MouseUp" and not "Drop" because Drop didn't have any result. But > maybe the way I implemented the whole thing isn't the right one anyhow? Your code works. Is it that you want to drag the Background colour as well? You can only drag Text or Images so if you want the Background as well you will need to use other tricks. Try your modified code below. If I have missed the point let me know. t$ As String iBackGround As Integer Public Sub Form_Open() GridView1.Rows.Count = 7 GridView1.Columns.Count = 5 TextBox1.Text = t$ End Public Sub GridView1_Data(Row As Integer, Column As Integer) If Row = 4 And Column = 3 Then GridView1.Data.Background = Color.Red GridView1.Data.Alignment = Align.Center GridView1.Data.Text = "E\nKorr\nWg" t$ = GridView1.Data.Text Endif End Public Sub GridView1_Click() t$ = GridView1.Current.Text TextBox1.Text = "" iBackGround = GridView1.Current.Background End Public Sub GridView1_MouseDrag() TextBox1.Text = t$ End Public Sub GridView1_MouseUp() TextBox1.Text = GridView1.Row & "::" & GridView1.Column GridView1.Current.Text = t$ GridView1.Current.Background = iBackGround End ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-use-drag-and-drop-tp59720p59728.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas.fr at ...626... Wed Jul 12 17:02:40 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 12 Jul 2017 17:02:40 +0200 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: Message-ID: Le 11 juil. 2017 01:39, "PICCORO McKAY Lenz" a ?crit : 2017-07-10 17:42 GMT-04:00 Rolf-Werner Eilert : > Basically, someone would have to do what Benoit once did: sacrifice "some" > time and write a library that links Gambas functions to Android GUI. those that have the time does not have the money or food in that time > > Android is similar to Linux, at its core. So very basic Gambas functions > should run on an Android without too much adaptation. The GUI however is > completely different, with finger-wipes etc., that would have to be > re-designed. its a hard work.. well was just a question for time.. i remenber that benoit said that gambas has a close relation with X so well.. Not really. We just need x functions for the desktop lib. All can be done from cocoa to w32ctl passing by android toolkit. Just matter of knowledge and time as Gambas is just a compiler with term output on the basis depending only on glibc. > > If someone would do that, the community would be happy! of course.. ok thanks for response... > > Rolf > > > > Am 10.07.2017 um 21:22 schrieb PICCORO McKAY Lenz: >> >> hi, sorry for revivin old threaths, but i'm interesting in gambas in other >> systems.. >> >> its there any new or something about gambas in androit? tablets? >> >> Message: 1 >>> >>> Date: Thu, 31 Oct 2013 11:51:16 -0400 >>> From: Rob Kudla >>> >> One way you could get a virtual keyboard and mouse input is to use one of >>> >>> the Linux installers available on Google Play (preferably a free one; >>> I've..... >>> >> this looks like a complicated solution... for users i mean... but >> reasonable for a static instalation by "service" >> >> >>> Running an Android X server app in conjunction with one of those Linux >>> installers would be another option, probably a cleaner one, but that's >>> one.... >>> >> sound better.. still complicated >> >> >>> https://play.google.com/store/apps/details?id=au.com.darkside.XServer >>> >>> Running Linux in a chroot (as many Android Linux installers will set up >>> for >>> you) will probably give you far better performance than a virtual >>> machine... >>> >> this may affect the performance due limited resource in device.. >> >> >>> As you can see, there's no easy turnkey solution, but a number of >>> possibilities. Personally, I'd go with something like Phonegap, which >>> just >>> uses Javascript/jquery and HTML, if I wanted to write Android apps (at >>> least the kind of app I would have used Gambas for on the Linux desktop) >>> >> that env "thing" only are for MAC and guindows... >> seems easy to develop.. but dev env are very limited.. >> >> >>> without dealing with Java. You can even put them in Google Play if you >>> want. >>> >>> Rob >>> >> >> ------------------------------------------------------------ ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > > ------------------------------------------------------------ ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------ ------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From mckaygerhard at ...626... Wed Jul 12 17:26:03 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 12 Jul 2017 11:26:03 -0400 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: Message-ID: 2017-07-12 11:02 GMT-04:00 Fabien Bodard : > Not really. We just need x functions for the desktop lib. All can be done > from cocoa to w32ctl passing by android toolkit. > Just matter of knowledge and time as Gambas is just a compiler with term > output on the basis depending only on glibc. > umm It is encouraging to hear that, which means that only time is really required, since the rest is to read and "translate" calls appropriately. But we have a manpower's deficit. For sample, my work depends on adjusting the odbc part in gambas, as in other projects like FreeTDS ... i can colaborate but due lack of odbc funtionality, i rirght now have lot fo work at my job.. modify the code to work as spected.. any man that can give a try to this support on tables? as all said, its just time dedication and further reading.. From gambas at ...1... Wed Jul 12 17:41:36 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 12 Jul 2017 17:41:36 +0200 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: Message-ID: <770d2cb4-1daf-4279-be84-94c446ca10cc@...1...> Le 12/07/2017 ? 17:26, PICCORO McKAY Lenz a ?crit : > 2017-07-12 11:02 GMT-04:00 Fabien Bodard : > >> Not really. We just need x functions for the desktop lib. All can be done >> from cocoa to w32ctl passing by android toolkit. >> Just matter of knowledge and time as Gambas is just a compiler with term >> output on the basis depending only on glibc. >> > > umm It is encouraging to hear that, which means that only time is really > required, since the rest is to read and "translate" calls appropriately. > > But we have a manpower's deficit. For sample, my work depends on adjusting > the odbc part in gambas, as in other projects like FreeTDS ... > > i can colaborate but due lack of odbc funtionality, i rirght now have lot > fo work at my job.. modify the code to work as spected.. > > any man that can give a try to this support on tables? as all said, its > just time dedication and further reading.. > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > The first step is to compile Gambas on a tablet, except the GUI components. The big job is making a GUI component based on Android libraries, if possible. Or maybe Qt 5 can run on Android? -- Beno?t Minisini From mckaygerhard at ...626... Wed Jul 12 17:59:24 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 12 Jul 2017 11:59:24 -0400 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: <770d2cb4-1daf-4279-be84-94c446ca10cc@...1...> References: <770d2cb4-1daf-4279-be84-94c446ca10cc@...1...> Message-ID: 2017-07-12 11:41 GMT-04:00 Beno?t Minisini : > The first step is to compile Gambas on a tablet, except the GUI components. > as i see, compiling a app "for" androit its not same as "to" androit.. as happened also in Mac, we need the runtime of gcc/glibc equivalent if the compilation are native.. in other case, will need the complete (stupi very heavy) development env of androit, the (in)fammous SDK > The big job is making a GUI component based on Android libraries, if > possible. Or maybe Qt 5 can run on Android? > runs, as Maebo does.. but... there's a standar qt5/qt4 installation for androit? > > > -- > Beno?t Minisini > From alexchernoff at ...67... Thu Jul 13 07:39:53 2017 From: alexchernoff at ...67... (alexchernoff) Date: Wed, 12 Jul 2017 22:39:53 -0700 (MST) Subject: [Gambas-user] Best ways to format float values Message-ID: <1499924393447-59733.post@...3046...> Peace to all, this might a bit silly but what is the best way to format float values like 26.6601666666666 into having two digits AND/OR with rounding them? e.g. 26.6601666666666 becomes 26.66 shortened 26.6601666666666 becomes 26.67 rounded cheers! -- View this message in context: http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-tp59733.html Sent from the gambas-user mailing list archive at Nabble.com. From alexchernoff at ...67... Thu Jul 13 07:41:44 2017 From: alexchernoff at ...67... (alexchernoff) Date: Wed, 12 Jul 2017 22:41:44 -0700 (MST) Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: References: <770d2cb4-1daf-4279-be84-94c446ca10cc@...1...> Message-ID: <1499924504204-59734.post@...3046...> There is a software called NSBasic that can build Android apps and is very similar to VB/Gambas. Not free but works fine. -- View this message in context: http://gambas.8142.n7.nabble.com/Re-Gambas-in-a-tablet-Is-it-possible-tp59715p59734.html Sent from the gambas-user mailing list archive at Nabble.com. From adamnt42 at ...626... Thu Jul 13 07:46:08 2017 From: adamnt42 at ...626... (bb) Date: Thu, 13 Jul 2017 15:16:08 +0930 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <1499924393447-59733.post@...3046...> References: <1499924393447-59733.post@...3046...> Message-ID: <59670920.3050900@...626...> I always round i.e. Print Round(26.6601666666666,-2) --> which is 26.66 by the way, not 26.67! (I have no idea how you got that.) b On 13/07/17 15:09, alexchernoff wrote: > Peace to all, > > this might a bit silly but what is the best way to format float values like > 26.6601666666666 into having two digits AND/OR with rounding them? > > e.g. > > 26.6601666666666 becomes 26.66 shortened > 26.6601666666666 becomes 26.67 rounded > > cheers! > > > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-tp59733.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Thu Jul 13 08:01:31 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Thu, 13 Jul 2017 03:01:31 -0300 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <1499924393447-59733.post@...3046...> References: <1499924393447-59733.post@...3046...> Message-ID: I can say this is the best way to do what you want, but I use the following: * Print Int(100.559999 * 100) / 100.00 Print Round(100.559999, -2)* The first operation truncates the number to 100.55 (no rounding takes effect). The second operation rounds the number to at most two digits after the decimal separator. This means in the example above, result will be 100.56. If the number was 100.59999 it would be rounded to 100.6. Again, I dont know if those are the best way to do it, but it works. Regards -fernando 2017-07-13 2:39 GMT-03:00 alexchernoff : > Peace to all, > > this might a bit silly but what is the best way to format float values like > 26.6601666666666 into having two digits AND/OR with rounding them? > > e.g. > > 26.6601666666666 becomes 26.66 shortened > 26.6601666666666 becomes 26.67 rounded > > cheers! > > > > > > -- > View this message in context: http://gambas.8142.n7.nabble. > com/Best-ways-to-format-float-values-tp59733.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Thu Jul 13 08:37:06 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Thu, 13 Jul 2017 03:37:06 -0300 Subject: [Gambas-user] About gambas, the word Message-ID: *Warning: this is only a linguistic curiosity with no relation to Gambas, the language.* Entirely by chance, I came across the following definition and etymology for gambas, the word: *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique cammarus, du grec kammarosv? Grosses crevettes comestibles de la M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? Rare Une gamba [g??ba].* In Brazil, I never heard the word gamba. I never found it in written text. Nevertheless, at least one Brazilian dictionary registers it as a Spanish word only recently introduced into Portuguese. So, perhaps it is used in Portugal. Anyway, it is interesting to know that, in the end, it comes from Greek "kammaros" that gave us the Portuguese "camar?o" and the Italian "gamberetto". Nevertheless, at the first sight, it is hard to see that "gamba" and "camar?o" come from the same Greek word. -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From shordi at ...626... Thu Jul 13 10:18:47 2017 From: shordi at ...626... (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Thu, 13 Jul 2017 10:18:47 +0200 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: It's a joke, I think. Searching for something that contains BAS, from Basic. Why an animal I don't know. Benoit likes to eat prawns, I soppouse... ??? Best Regards 2017-07-13 8:37 GMT+02:00 Fernando Cabral : > *Warning: this is only a linguistic curiosity with no relation to Gambas, > the language.* > > Entirely by chance, I came across the following definition and etymology > for gambas, the word: > > > > > > > > > > > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique > cammarus, du grec kammarosv? Grosses crevettes comestibles de la > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? > Rare Une gamba [g??ba].* > In Brazil, I never heard the word gamba. I never found it in written text. > Nevertheless, at least one Brazilian dictionary registers it as a Spanish > word only recently introduced into Portuguese. So, perhaps it is used in > Portugal. > > Anyway, it is interesting to know that, in the end, it comes from Greek > "kammaros" that gave us the Portuguese "camar?o" and the Italian > "gamberetto". Nevertheless, at the first sight, it is hard to see that > "gamba" and "camar?o" come from the same Greek word. > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...2345... Thu Jul 13 10:36:13 2017 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Thu, 13 Jul 2017 10:36:13 +0200 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: <1499934973.5918.62.camel@...3609...> Am Donnerstag, den 13.07.2017, 10:18 +0200 schrieb Jorge Carri?n: > It's a joke, I think. Searching for something that contains BAS, from > Basic. Why an animal I don't know. Benoit likes to eat prawns, I soppouse... > > ??? > > Best Regards > > 2017-07-13 8:37 GMT+02:00 Fernando Cabral : > > > *Warning: this is only a linguistic curiosity with no relation to Gambas, > > the language.* > > > > Entirely by chance, I came across the following definition and etymology > > for gambas, the word: > > > > > > > > > > > > > > > > > > > > > > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. > > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique > > cammarus, du grec kammarosv? Grosses crevettes comestibles de la > > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? > > Rare Une gamba [g??ba].* > > In Brazil, I never heard the word gamba. I never found it in written text. > > Nevertheless, at least one Brazilian dictionary registers it as a Spanish > > word only recently introduced into Portuguese. So, perhaps it is used in > > Portugal. > > > > Anyway, it is interesting to know that, in the end, it comes from Greek > > "kammaros" that gave us the Portuguese "camar?o" and the Italian > > "gamberetto". Nevertheless, at the first sight, it is hard to see that > > "gamba" and "camar?o" come from the same Greek word. > > There is the old meaning : Gambas Almost Means BASIC! look here http://gambas.sourceforge.net/en/main.html -- Amicalement Charlie From charlie at ...2793... Thu Jul 13 11:13:20 2017 From: charlie at ...2793... (Charlie) Date: Thu, 13 Jul 2017 02:13:20 -0700 (MST) Subject: [Gambas-user] Best ways to format float values In-Reply-To: <1499924393447-59733.post@...3046...> References: <1499924393447-59733.post@...3046...> Message-ID: <1499937200992-59740.post@...3046...> alexchernoff wrote > Peace to all, > > this might a bit silly but what is the best way to format float values > like 26.6601666666666 into having two digits AND/OR with rounding them? > > e.g. > 26.6601666666666 becomes 26.66 shortened > 26.6601666666666 becomes 26.67 rounded > > cheers! You said 'Format' so you could use: - Print Format("26.6601666666666", "#.00") '26.66 Print Format("26", "#.00") '26.00 Print Format("1.533", "#.00") '1.53 ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-tp59733p59740.html Sent from the gambas-user mailing list archive at Nabble.com. From rwe-sse at ...3629... Thu Jul 13 12:27:40 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Thu, 13 Jul 2017 12:27:40 +0200 Subject: [Gambas-user] How to use drag-and-drop In-Reply-To: <1499768605780-59728.post@...3046...> References: <1499768605780-59728.post@...3046...> Message-ID: Am 11.07.2017 um 12:23 schrieb Charlie: > Rolf-Werner Eilert-2 wrote >> The basic usage of the drag-and-drop functions isn't quite clear to me. >> I couldn't find much information in the wiki about it. Here is my code. >> I use t$ as a simple storage place and TextBox1 is only to see what the >> thing does. >> >> The user should pick the red cell in GridView1 and drag it to another >> cell. The contents should appear there. >> >> I use "MouseUp" and not "Drop" because Drop didn't have any result. But >> maybe the way I implemented the whole thing isn't the right one anyhow? > Your code works. Is it that you want to drag the Background colour as well? > You can only drag Text or Images so if you want the Background as well you > will need to use other tricks. Try your modified code below. If I have > missed the point let me know. > > Public Sub GridView1_MouseUp() > > TextBox1.Text = GridView1.Row & "::" & GridView1.Column > GridView1.Current.Text = t$ > GridView1.Current.Background = iBackGround > > End > > Thank you Charlie for your answer. I wonder why GridView1_Drop doesn't fire here. So I was forced to use MouseUp instead. The inconvenience here is that I have to use a flag to distinguish whether it was a Drag-and-Drop action that fired MouseUp, or a usual Mouse action that ended there. Otherwise you may get errors when you click or pull handles or whatever. So, when GridView1.Drop is True, and I implemented everything correctly, why is GridView1_Drop not fired? Regards Rolf From bagonergi at ...626... Thu Jul 13 12:30:23 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 13 Jul 2017 12:30:23 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <1499924393447-59733.post@...3046...> References: <1499924393447-59733.post@...3046...> Message-ID: One thing that could be useful? Public Sub Main() Dim n As Float = 26.6601666666666 Dim b As Byte b = Val(Mid(CStr(Frac(n)), 5, 1)) Print Round(n, -2) If b >= 5 Then Print Round(n, -2) Else Print Round(n + 0.01, -2) Endif End Regards Gianluigi 2017-07-13 7:39 GMT+02:00 alexchernoff : > Peace to all, > > this might a bit silly but what is the best way to format float values like > 26.6601666666666 into having two digits AND/OR with rounding them? > > e.g. > > 26.6601666666666 becomes 26.66 shortened > 26.6601666666666 becomes 26.67 rounded > > cheers! > > > > > > -- > View this message in context: http://gambas.8142.n7.nabble. > com/Best-ways-to-format-float-values-tp59733.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From charlie at ...2793... Thu Jul 13 17:12:39 2017 From: charlie at ...2793... (Charlie) Date: Thu, 13 Jul 2017 08:12:39 -0700 (MST) Subject: [Gambas-user] Best ways to format float values In-Reply-To: References: <1499924393447-59733.post@...3046...> Message-ID: <1499958759919-59743.post@...3046...> Also consider: - Public Sub Main() Dim fNum As Float[] = [26.6601666666666, 26.6651666666666] 'Note 26.660.. and 26.665.. Dim fTemp As Float For Each fTemp In fNum fTemp *= 100 fTemp += 0.5 fTemp = Int(fTemp) fTemp /= 100 Print fTemp;; Next 'Output 26.66 26.67 End ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-tp59733p59743.html Sent from the gambas-user mailing list archive at Nabble.com. From mckaygerhard at ...626... Thu Jul 13 17:31:33 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 11:31:33 -0400 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <59670920.3050900@...626...> References: <1499924393447-59733.post@...3046...> <59670920.3050900@...626...> Message-ID: 2017-07-13 1:46 GMT-04:00 bb : > I always round i.e. Print Round(26.6601666666666,-2) --> the digits see -> .660 > which is 26.66 by the way, not 26.67! (I have no idea how you got that.) due 660 and -2 said the firts two digits, the round will take effect only in last digit.. due the last no have another mayor than 5, then let in "6" sorry i dont know how to explain, i deal with this several months ago and solve it in that way > > > b > > > > > On 13/07/17 15:09, alexchernoff wrote: > >> Peace to all, >> >> this might a bit silly but what is the best way to format float values >> like >> 26.6601666666666 into having two digits AND/OR with rounding them? >> >> e.g. >> >> 26.6601666666666 becomes 26.66 shortened >> 26.6601666666666 becomes 26.67 rounded >> >> cheers! >> >> >> >> >> >> -- >> View this message in context: http://gambas.8142.n7.nabble.c >> om/Best-ways-to-format-float-values-tp59733.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 13 17:34:52 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 11:34:52 -0400 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: 2017-07-13 4:18 GMT-04:00 Jorge Carri?n : > Benoit likes to eat prawns, I soppouse... > ka ka ka ka >.< ? as a post note: GAMBAS acron of that its not basic > > ??? > > Best Regards > > 2017-07-13 8:37 GMT+02:00 Fernando Cabral : > > > *Warning: this is only a linguistic curiosity with no relation to Gambas, > > the language.* > > > > Entirely by chance, I came across the following definition and etymology > > for gambas, the word: > > > > > > > > > > > > > > > > > > > > > > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. > > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique > > cammarus, du grec kammarosv? Grosses crevettes comestibles de la > > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? > > Rare Une gamba [g??ba].* > > In Brazil, I never heard the word gamba. I never found it in written > text. > > Nevertheless, at least one Brazilian dictionary registers it as a Spanish > > word only recently introduced into Portuguese. So, perhaps it is used in > > Portugal. > > > > Anyway, it is interesting to know that, in the end, it comes from Greek > > "kammaros" that gave us the Portuguese "camar?o" and the Italian > > "gamberetto". Nevertheless, at the first sight, it is hard to see that > > "gamba" and "camar?o" come from the same Greek word. > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 13 17:38:33 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 11:38:33 -0400 Subject: [Gambas-user] Gambas in a tablet. Is it possible? In-Reply-To: <1499924504204-59734.post@...3046...> References: <770d2cb4-1daf-4279-be84-94c446ca10cc@...1...> <1499924504204-59734.post@...3046...> Message-ID: 2017-07-13 1:41 GMT-04:00 alexchernoff : > There is a software called NSBasic that can build Android apps and is very > it's another mess up, a guindows-only stupid software... the idea its complete develop in linux to deploy in the others/all platforms, i'm tyred of guindows From bagonergi at ...626... Thu Jul 13 17:42:00 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 13 Jul 2017 17:42:00 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: References: <1499924393447-59733.post@...3046...> <59670920.3050900@...626...> Message-ID: I would not be misunderstood. I had understood that Alex wanted a forced increase "Round". To recap: Dim n As Float = 26.6601666666666 Dim b As Byte Print Int(n * 100) / 100 ' Normal truncate, as already mentioned by other Print Round(n, -2) ' Normal round, as already mentioned by other If Len(CStr(Frac(n))) > 4 Then b = Val(Mid(CStr(Frac(n)), 5, 1)) If b >= 5 Then Print Round(n, -2) Else Print Round(n + 0.01, -2) ' Forced increase round, as proposed by me Endif Endif Regards Gianluigi 2017-07-13 17:31 GMT+02:00 PICCORO McKAY Lenz : > 2017-07-13 1:46 GMT-04:00 bb : > > > I always round i.e. Print Round(26.6601666666666,-2) --> > > the digits see -> .660 > > > > which is 26.66 by the way, not 26.67! (I have no idea how you got that.) > > > due 660 and -2 said the firts two digits, the round will take effect only > in last digit.. due the last no have another mayor than 5, then let in "6" > > sorry i dont know how to explain, i deal with this several months ago and > solve it in that way > > > > > > > > > b > > > > > > > > > > On 13/07/17 15:09, alexchernoff wrote: > > > >> Peace to all, > >> > >> this might a bit silly but what is the best way to format float values > >> like > >> 26.6601666666666 into having two digits AND/OR with rounding them? > >> > >> e.g. > >> > >> 26.6601666666666 becomes 26.66 shortened > >> 26.6601666666666 becomes 26.67 rounded > >> > >> cheers! > >> > >> > >> > >> > >> > >> -- > >> View this message in context: http://gambas.8142.n7.nabble.c > >> om/Best-ways-to-format-float-values-tp59733.html > >> Sent from the gambas-user mailing list archive at Nabble.com. > >> > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 13 18:47:44 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 12:47:44 -0400 Subject: [Gambas-user] how to log to stdout/stderr Message-ID: how can i log to stdout and stderr my program actions/methods/things ? note that due vendor/client i cannot use gambas 3.5+ only 3.4... due its the already installed.. some time ago benoit respond me that recent version of gambas implements something similar already, but i cannot find the main in the horrible sourgeforce heavyweith web interface Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From taboege at ...626... Thu Jul 13 20:00:19 2017 From: taboege at ...626... (Tobias Boege) Date: Thu, 13 Jul 2017 20:00:19 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: References: <1499924393447-59733.post@...3046...> <59670920.3050900@...626...> Message-ID: <20170713180019.GC590@...3600...> On Thu, 13 Jul 2017, Gianluigi wrote: > I would not be misunderstood. > I had understood that Alex wanted a forced increase "Round". > > To recap: > > Dim n As Float = 26.6601666666666 > Dim b As Byte > > Print Int(n * 100) / 100 ' Normal truncate, as already > mentioned by other > Print Round(n, -2) ' Normal round, as already > mentioned by other > If Len(CStr(Frac(n))) > 4 Then > b = Val(Mid(CStr(Frac(n)), 5, 1)) > If b >= 5 Then > Print Round(n, -2) > Else > Print Round(n + 0.01, -2) ' Forced increase round, as > proposed by me > Endif > Endif > I would avoid arithmetic operations involving even more floats, such as you proposed. Consider this: $ gbx3 -e 'Round(0.80999999950+0.1,-9)' 0.909999999 $ gbx3 -e 'Round(0.80999999951+0.1,-9)' 0.91 I only changed the very last digit (of order 10^-11) from 0 to 1 which shouldn't influence the rouding to 9 decimals at all -- but it does! The problem here is, famously, that the decimal 0.1 has no finite binary representation, so *storing* the value that is represented in decimal by the string "0.1" in a binary float already gives you an unavoidable error. Whenever you use 0.1 in your program, this error propagates. Specifically, the error when storing 0.1 in a Single is about 1.49*10^-9, which is how I arrived at that example above. Of course, the same applies to the 0.01 you use above. You can think by yourself about a similar example where float addition with 0.01 makes the result of a later rounding unreliable. The other method Floor(n*100)/100 ' round down to two decimals Ceil(n*100)/100 ' round up to two decimals is reliable, since the *integer* 100 can be stored without error in a float and IEEE754 requires the outcome of float arithmetic to be the same as if the operation was performed exactly and then rounded to the limited precision of the float datatype [1]. Regards, Tobi [1] http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html#865 -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Thu Jul 13 20:11:25 2017 From: taboege at ...626... (Tobias Boege) Date: Thu, 13 Jul 2017 20:11:25 +0200 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: References: Message-ID: <20170713181125.GD590@...3600...> On Thu, 13 Jul 2017, PICCORO McKAY Lenz wrote: > how can i log to stdout and stderr my program actions/methods/things ? > > note that due vendor/client i cannot use gambas 3.5+ only 3.4... due its > the already installed.. > > some time ago benoit respond me that recent version of gambas implements > something similar already, > but i cannot find the main in the horrible sourgeforce heavyweith web > interface > The PRINT instruction writes to stdout (by default) and the ERROR instruction to stderr (by default). There is also DEBUG which writes to stderr and includes the filename, function name and line number where it is executed at the beginning of the output. It is for print- style debugging and if you don't compile the project with gbc3's "-g" switch the DEBUG statements will NOT be compiled, so don't do anything in those statements which could have side effects. You can change the default stream PRINT and ERROR/DEBUG operate on by OUTPUT TO and ERROR TO. Those things must have been in Gambas since forever, there is by far no 3.x version requirement. The more sophisticated (by always broken when I tried it, IIRC) component gb.logging was added in Gambas 3.5, but if you just want to print to stdout and stderr, there is no reason to use it. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at ...626... Thu Jul 13 20:44:53 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 13 Jul 2017 21:44:53 +0300 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: Many open source projects have animal name or logo. So I guess it's just old tradition. Jussi On Thu, Jul 13, 2017 at 11:18 AM, Jorge Carri?n wrote: > It's a joke, I think. Searching for something that contains BAS, from > Basic. Why an animal I don't know. Benoit likes to eat prawns, I > soppouse... > > ??? > > Best Regards > > 2017-07-13 8:37 GMT+02:00 Fernando Cabral : > > > *Warning: this is only a linguistic curiosity with no relation to Gambas, > > the language.* > > > > Entirely by chance, I came across the following definition and etymology > > for gambas, the word: > > > > > > > > > > > > > > > > > > > > > > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. > > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique > > cammarus, du grec kammarosv? Grosses crevettes comestibles de la > > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? > > Rare Une gamba [g??ba].* > > In Brazil, I never heard the word gamba. I never found it in written > text. > > Nevertheless, at least one Brazilian dictionary registers it as a Spanish > > word only recently introduced into Portuguese. So, perhaps it is used in > > Portugal. > > > > Anyway, it is interesting to know that, in the end, it comes from Greek > > "kammaros" that gave us the Portuguese "camar?o" and the Italian > > "gamberetto". Nevertheless, at the first sight, it is hard to see that > > "gamba" and "camar?o" come from the same Greek word. > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 13 21:39:35 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 15:39:35 -0400 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: <20170713181125.GD590@...3600...> References: <20170713181125.GD590@...3600...> Message-ID: hello toby, when i set the gambas binary to backgroud to runs as daemon ...and lauch other gambas process from that gambas ... then the stdout and stderr does not have that behaviour you said! so then? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-13 14:11 GMT-04:00 Tobias Boege : > On Thu, 13 Jul 2017, PICCORO McKAY Lenz wrote: > > how can i log to stdout and stderr my program actions/methods/things ? > > > > note that due vendor/client i cannot use gambas 3.5+ only 3.4... due its > > the already installed.. > > > > some time ago benoit respond me that recent version of gambas implements > > something similar already, > > but i cannot find the main in the horrible sourgeforce heavyweith web > > interface > > > > The PRINT instruction writes to stdout (by default) and the ERROR > instruction to stderr (by default). There is also DEBUG which writes > to stderr and includes the filename, function name and line number > where it is executed at the beginning of the output. It is for print- > style debugging and if you don't compile the project with gbc3's > "-g" switch the DEBUG statements will NOT be compiled, so don't do > anything in those statements which could have side effects. > > You can change the default stream PRINT and ERROR/DEBUG operate on > by OUTPUT TO and ERROR TO. > > Those things must have been in Gambas since forever, there is by far > no 3.x version requirement. The more sophisticated (by always broken > when I tried it, IIRC) component gb.logging was added in Gambas 3.5, > but if you just want to print to stdout and stderr, there is no reason > to use it. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From taboege at ...626... Thu Jul 13 22:11:00 2017 From: taboege at ...626... (Tobias Boege) Date: Thu, 13 Jul 2017 22:11:00 +0200 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: References: <20170713181125.GD590@...3600...> Message-ID: <20170713201100.GE590@...3600...> On Thu, 13 Jul 2017, PICCORO McKAY Lenz wrote: > hello toby, when i set the gambas binary to backgroud to runs as daemon > ...and lauch other gambas process from that gambas ... > > then the stdout and stderr does not have that behaviour you said! > so then? > You're wrong, it does exactly what you wanted and specifically asked about: print to stdout and stderr. As we discussed recently [1], stdout and stderr are redirected to /dev/null when you daemonise, so there is not really any value in wanting to print there if you want to make a daemon. If you still want the output of your system daemon to arrive somewhere, you have to point stdout and stderr to somewhere meaningful again, like your syslog. You can also make your own log files as was discussed in [1], if you don't have a real *system* daemon that should be integrated into the systemd (or what have you) ecosystem. There is information available about this on the net [2], which is completely independent of Gambas, BTW. There's an(other) old saying: If you want a good answer you have to ask a very good question. Regards, Tobi [1] https://sourceforge.net/p/gambas/mailman/gambas-user/thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830 [2] https://stackoverflow.com/questions/17954432/creating-a-daemon-in-linux -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at ...626... Thu Jul 13 22:11:21 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 16:11:21 -0400 Subject: [Gambas-user] ho to use code snipes Message-ID: i see for constructor "_new" the "_n" but how to use it? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From taboege at ...626... Thu Jul 13 22:17:30 2017 From: taboege at ...626... (Tobias Boege) Date: Thu, 13 Jul 2017 22:17:30 +0200 Subject: [Gambas-user] ho to use code snipes In-Reply-To: References: Message-ID: <20170713201730.GF590@...3600...> On Thu, 13 Jul 2017, PICCORO McKAY Lenz wrote: > i see for constructor "_new" the "_n" but how to use it? > http://gambaswiki.org/wiki/ide/idesnippets : Entering a code shortcut at the beginning of a line and pressing the TAB key will automatically expand the shortcut into a defined piece of code. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas.fr at ...626... Thu Jul 13 22:28:49 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 Jul 2017 22:28:49 +0200 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: 2017-07-13 20:44 GMT+02:00 Jussi Lahtinen : > Many open source projects have animal name or logo. So I guess it's just > old tradition. In fact the tradition for geek programmers in the unix world was to find a recurssive acronym. It means the Name is an acronym that contain the name itself WINE = Wine Is Not Emulator GAMBAS = Gambas Almost Mean BASic So the logo of something looking a bit to a shrimp was a logical choice... Well normally shrimps have not claws... but i find it give an idea of super powerfull shrimp ;-) > > Jussi > > On Thu, Jul 13, 2017 at 11:18 AM, Jorge Carri?n wrote: > >> It's a joke, I think. Searching for something that contains BAS, from >> Basic. Why an animal I don't know. Benoit likes to eat prawns, I >> soppouse... >> >> ??? >> >> Best Regards >> >> 2017-07-13 8:37 GMT+02:00 Fernando Cabral : >> >> > *Warning: this is only a linguistic curiosity with no relation to Gambas, >> > the language.* >> > >> > Entirely by chance, I came across the following definition and etymology >> > for gambas, the word: >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin pluriel?tym. >> > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique >> > cammarus, du grec kammarosv? Grosses crevettes comestibles de la >> > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de gambas.? >> > Rare Une gamba [g??ba].* >> > In Brazil, I never heard the word gamba. I never found it in written >> text. >> > Nevertheless, at least one Brazilian dictionary registers it as a Spanish >> > word only recently introduced into Portuguese. So, perhaps it is used in >> > Portugal. >> > >> > Anyway, it is interesting to know that, in the end, it comes from Greek >> > "kammaros" that gave us the Portuguese "camar?o" and the Italian >> > "gamberetto". Nevertheless, at the first sight, it is hard to see that >> > "gamba" and "camar?o" come from the same Greek word. >> > >> > -- >> > Fernando Cabral >> > Blogue: http://fernandocabral.org >> > Twitter: http://twitter.com/fjcabral >> > e-mail: fernandojosecabral at ...626... >> > Facebook: f at ...3654... >> > Telegram: +55 (37) 99988-8868 >> > Wickr ID: fernandocabral >> > WhatsApp: +55 (37) 99988-8868 >> > Skype: fernandojosecabral >> > Telefone fixo: +55 (37) 3521-2183 >> > Telefone celular: +55 (37) 99988-8868 >> > >> > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> > nenhum pol?tico ou cientista poder? se gabar de nada. >> > ------------------------------------------------------------ >> > ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From mckaygerhard at ...626... Thu Jul 13 22:58:24 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 16:58:24 -0400 Subject: [Gambas-user] About gambas, the word In-Reply-To: References: Message-ID: all of this conversation give so much hungry: a coup of WINE, with some friet GAMBAS! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-13 16:28 GMT-04:00 Fabien Bodard : > 2017-07-13 20:44 GMT+02:00 Jussi Lahtinen : > > Many open source projects have animal name or logo. So I guess it's just > > old tradition. > > In fact the tradition for geek programmers in the unix world was to > find a recurssive acronym. > > It means the Name is an acronym that contain the name itself > > WINE = Wine Is Not Emulator > > GAMBAS = Gambas Almost Mean BASic > > So the logo of something looking a bit to a shrimp was a logical > choice... Well normally shrimps have not claws... but i find it give > an idea of super powerfull shrimp ;-) > > > > > Jussi > > > > On Thu, Jul 13, 2017 at 11:18 AM, Jorge Carri?n > wrote: > > > >> It's a joke, I think. Searching for something that contains BAS, from > >> Basic. Why an animal I don't know. Benoit likes to eat prawns, I > >> soppouse... > >> > >> ??? > >> > >> Best Regards > >> > >> 2017-07-13 8:37 GMT+02:00 Fernando Cabral >: > >> > >> > *Warning: this is only a linguistic curiosity with no relation to > Gambas, > >> > the language.* > >> > > >> > Entirely by chance, I came across the following definition and > etymology > >> > for gambas, the word: > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > *From Petit Robert 2007: gambasgambas [g??bas] nom f?minin > pluriel?tym. > >> > r?pandu v. 1960; catalan gamba, du latin populaire cambarus, classique > >> > cammarus, du grec kammarosv? Grosses crevettes comestibles de la > >> > M?diterran?e. Gambas frites (? scampi), grill?es. Brochette de > gambas.? > >> > Rare Une gamba [g??ba].* > >> > In Brazil, I never heard the word gamba. I never found it in written > >> text. > >> > Nevertheless, at least one Brazilian dictionary registers it as a > Spanish > >> > word only recently introduced into Portuguese. So, perhaps it is used > in > >> > Portugal. > >> > > >> > Anyway, it is interesting to know that, in the end, it comes from > Greek > >> > "kammaros" that gave us the Portuguese "camar?o" and the Italian > >> > "gamberetto". Nevertheless, at the first sight, it is hard to see that > >> > "gamba" and "camar?o" come from the same Greek word. > >> > > >> > -- > >> > Fernando Cabral > >> > Blogue: http://fernandocabral.org > >> > Twitter: http://twitter.com/fjcabral > >> > e-mail: fernandojosecabral at ...626... > >> > Facebook: f at ...3654... > >> > Telegram: +55 (37) 99988-8868 > >> > Wickr ID: fernandocabral > >> > WhatsApp: +55 (37) 99988-8868 > >> > Skype: fernandojosecabral > >> > Telefone fixo: +55 (37) 3521-2183 > >> > Telefone celular: +55 (37) 99988-8868 > >> > > >> > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > >> > nenhum pol?tico ou cientista poder? se gabar de nada. > >> > ------------------------------------------------------------ > >> > ------------------ > >> > Check out the vibrant tech community on one of the world's most > >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 13 23:02:56 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 17:02:56 -0400 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: <20170713201100.GE590@...3600...> References: <20170713181125.GD590@...3600...> <20170713201100.GE590@...3600...> Message-ID: ok, thanks.. that's the mail ([1]) the problem of make right answer its the languaje barrier.. in my countrie its very spensive make a english course, and internet connection are very slowly and spensive too Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-13 16:11 GMT-04:00 Tobias Boege : > On Thu, 13 Jul 2017, PICCORO McKAY Lenz wrote: > > hello toby, when i set the gambas binary to backgroud to runs as daemon > > ...and lauch other gambas process from that gambas ... > > > > then the stdout and stderr does not have that behaviour you said! > > so then? > > > > You're wrong, it does exactly what you wanted and specifically asked about: > print to stdout and stderr. > > As we discussed recently [1], stdout and stderr are redirected to /dev/null > when you daemonise, so there is not really any value in wanting to print > there if you want to make a daemon. > > If you still want the output of your system daemon to arrive somewhere, you > have to point stdout and stderr to somewhere meaningful again, like your > syslog. You can also make your own log files as was discussed in [1], if > you > don't have a real *system* daemon that should be integrated into the > systemd > (or what have you) ecosystem. There is information available about this on > the net [2], which is completely independent of Gambas, BTW. > > There's an(other) old saying: If you want a good answer you have to ask a > very good question. > > Regards, > Tobi > > [1] https://sourceforge.net/p/gambas/mailman/gambas-user/ > thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830 > [2] https://stackoverflow.com/questions/17954432/creating-a- > daemon-in-linux > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Thu Jul 13 23:14:17 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 13 Jul 2017 23:14:17 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <20170713180019.GC590@...3600...> References: <1499924393447-59733.post@...3046...> <59670920.3050900@...626...> <20170713180019.GC590@...3600...> Message-ID: Great Tobias, You are a good teacher and I am honored to have your attention. OK I understand, never more extravagant mathematics. Thank you very much for your explanations Regards Gianluigi P.S. You will not believe it but some tests with Floor and Ceil I did :-( 2017-07-13 20:00 GMT+02:00 Tobias Boege : > On Thu, 13 Jul 2017, Gianluigi wrote: > > I would not be misunderstood. > > I had understood that Alex wanted a forced increase "Round". > > > > To recap: > > > > Dim n As Float = 26.6601666666666 > > Dim b As Byte > > > > Print Int(n * 100) / 100 ' Normal truncate, as already > > mentioned by other > > Print Round(n, -2) ' Normal round, as already > > mentioned by other > > If Len(CStr(Frac(n))) > 4 Then > > b = Val(Mid(CStr(Frac(n)), 5, 1)) > > If b >= 5 Then > > Print Round(n, -2) > > Else > > Print Round(n + 0.01, -2) ' Forced increase round, as > > proposed by me > > Endif > > Endif > > > > I would avoid arithmetic operations involving even more floats, such as you > proposed. Consider this: > > $ gbx3 -e 'Round(0.80999999950+0.1,-9)' > 0.909999999 > $ gbx3 -e 'Round(0.80999999951+0.1,-9)' > 0.91 > > I only changed the very last digit (of order 10^-11) from 0 to 1 which > shouldn't influence the rouding to 9 decimals at all -- but it does! > > The problem here is, famously, that the decimal 0.1 has no finite binary > representation, so *storing* the value that is represented in decimal by > the string "0.1" in a binary float already gives you an unavoidable error. > Whenever you use 0.1 in your program, this error propagates. Specifically, > the error when storing 0.1 in a Single is about 1.49*10^-9, which is how > I arrived at that example above. > > Of course, the same applies to the 0.01 you use above. You can think > by yourself about a similar example where float addition with 0.01 makes > the result of a later rounding unreliable. > > The other method > > Floor(n*100)/100 ' round down to two decimals > Ceil(n*100)/100 ' round up to two decimals > > is reliable, since the *integer* 100 can be stored without error in a > float and IEEE754 requires the outcome of float arithmetic to be the > same as if the operation was performed exactly and then rounded to the > limited precision of the float datatype [1]. > > Regards, > Tobi > > [1] http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html#865 > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fernandojosecabral at ...626... Fri Jul 14 01:54:04 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Thu, 13 Jul 2017 20:54:04 -0300 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: <20170713201100.GE590@...3600...> References: <20170713181125.GD590@...3600...> <20170713201100.GE590@...3600...> Message-ID: 2017-07-13 17:11 GMT-03:00 Tobias Boege said: > As we discussed recently [1], stdout and stderr are redirected to /dev/null > when you daemonise, so there is not really any value in wanting to print > there if you want to make a daemon. I don't know if I have understood you correctly and completely. I am an old timer and Linux may have changed things as compared to UNIX. A daemon is supposed to run in the background. Typically, when you put something to run in the background, Unix would send the standard output to... standard output. Now, if you do "nohup something.gambas", standard outuput will to to "nohup.out". But, if you do "nohup something.gambas >x &" or "something.gambas >x", standard output wll be sent to "x". In any case, if you don't want to preserve any output, you should redirect stderr and stdout to /dev/null. I would guess that a daemon started at startup or by cron would give the same result. Am I wrong? Regards - fernando > [1] https://sourceforge.net/p/gambas/mailman/gambas-user/ > thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830 > [2] https://stackoverflow.com/questions/17954432/creating-a- > daemon-in-linux > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Fri Jul 14 02:21:09 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 20:21:09 -0400 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: References: <20170713181125.GD590@...3600...> <20170713201100.GE590@...3600...> Message-ID: in part you have right fernando.. but that was dicuss several time previously.. i want to no made special commands to daemonize my app.. i want my app are daemon by selft.. now my app are a property daemon.. and every night at 00:00 restart all setting and starts a new day to regist people.. the log must also be manage by the application.. if not then its not a proper daemon.. the nohup trick not always work.. for that there's the gambas redirection print.. that's why i ask previously how i detec if are runnig inside ide.. if are inside ide. let normal print, if not, redirect... Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-13 19:54 GMT-04:00 Fernando Cabral : > 2017-07-13 17:11 GMT-03:00 Tobias Boege said: > > > As we discussed recently [1], stdout and stderr are redirected to > /dev/null > > when you daemonise, so there is not really any value in wanting to print > > there if you want to make a daemon. > > > I don't know if I have understood you correctly and completely. > I am an old timer and Linux may have changed things as compared to UNIX. > A daemon is supposed to run in the background. Typically, when you put > something to > run in the background, Unix would send the standard output to... standard > output. > > Now, if you do "nohup something.gambas", standard outuput will to to > "nohup.out". > But, if you do "nohup something.gambas >x &" or "something.gambas >x", > standard output wll be sent to "x". > > In any case, if you don't want to preserve any output, you should redirect > stderr and > stdout to /dev/null. > > I would guess that a daemon started at startup or by cron would give the > same result. > Am I wrong? > > Regards > > - fernando > > > [1] https://sourceforge.net/p/gambas/mailman/gambas-user/ > > thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830 > > [2] https://stackoverflow.com/questions/17954432/creating-a- > > daemon-in-linux > > > > -- > > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Fri Jul 14 02:27:30 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 13 Jul 2017 20:27:30 -0400 Subject: [Gambas-user] gui controls are only applied to components, cant able use as libraries Message-ID: i made several components, and when i try to reuse as libraries (i generated the gambas and link/use in properties tab) can instanciate the object/class but cannot useit .. gambas said that "some componets are missing" for those class not are gui, gambas said "missing class" Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From fernandojosecabral at ...626... Fri Jul 14 02:54:57 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Thu, 13 Jul 2017 21:54:57 -0300 Subject: [Gambas-user] how to log to stdout/stderr In-Reply-To: References: <20170713181125.GD590@...3600...> <20170713201100.GE590@...3600...> Message-ID: 2017-07-13 21:21 GMT-03:00 PICCORO McKAY Lenz : > the nohup trick not always work.. for that there's the gambas redirection > print.. that's why i ask previously how i detec if are runnig inside ide.. > if are inside ide. let normal print, if not, redirect... > > I am not sure I have understood what you said. What I can say is that, for logging purpose, you can just open a regular file and then write to or append to. In order to determine if your application is running as a daemon or not, if can be quite easy and fool proof. For intance, you can create a command line options like, say "-d". If it is present, your applicaiton should run as a daemon, so you act accordingly. Otherwise the application is not running as daemon, so you should act as a regular application. As to printing (if you mean, printing to a printer proper) you can either open a pipe to the printer daemon or else create a file and then use a shell () instruction to print and delete that file. Both should work well. - fernando > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-13 19:54 GMT-04:00 Fernando Cabral : > > > 2017-07-13 17:11 GMT-03:00 Tobias Boege said: > > > > > As we discussed recently [1], stdout and stderr are redirected to > > /dev/null > > > when you daemonise, so there is not really any value in wanting to > print > > > there if you want to make a daemon. > > > > > > I don't know if I have understood you correctly and completely. > > I am an old timer and Linux may have changed things as compared to UNIX. > > A daemon is supposed to run in the background. Typically, when you put > > something to > > run in the background, Unix would send the standard output to... standard > > output. > > > > Now, if you do "nohup something.gambas", standard outuput will to to > > "nohup.out". > > But, if you do "nohup something.gambas >x &" or "something.gambas >x", > > standard output wll be sent to "x". > > > > In any case, if you don't want to preserve any output, you should > redirect > > stderr and > > stdout to /dev/null. > > > > I would guess that a daemon started at startup or by cron would give the > > same result. > > Am I wrong? > > > > Regards > > > > - fernando > > > > > [1] https://sourceforge.net/p/gambas/mailman/gambas-user/ > > > thread/1498036647346-59450.post%40n7.nabble.com/#msg35904830 > > > [2] https://stackoverflow.com/questions/17954432/creating-a- > > > daemon-in-linux > > > > > > -- > > > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From buster6seven at ...626... Fri Jul 14 09:27:44 2017 From: buster6seven at ...626... (Shane) Date: Fri, 14 Jul 2017 17:27:44 +1000 Subject: [Gambas-user] vb code Message-ID: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> I have some vb code i want to convert to gambas and it uses this code Private Type ID3V22HDR frameName1 As String * 3 frameSize1 As Byte frameSize2 As Byte frameSize3 As Byte End Type what would be the best way to convert this to gambas? From adamnt42 at ...626... Fri Jul 14 10:09:52 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Fri, 14 Jul 2017 17:39:52 +0930 Subject: [Gambas-user] vb code In-Reply-To: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> References: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> Message-ID: <20170714173952.ec9be8ffead24e49167da095@...626...> Guessing without information about what a vb private type is and where and why you would use it , but there is a thing called a Struct in Gambas, maybe that is what you are looking for. b On Fri, 14 Jul 2017 17:27:44 +1000 Shane wrote: > I have some vb code i want to convert to gambas and it uses this code > > Private Type ID3V22HDR > frameName1 As String * 3 > frameSize1 As Byte > frameSize2 As Byte > frameSize3 As Byte > End Type > > what would be the best way to convert this to gambas? > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- B Bruen From mckaygerhard at ...626... Fri Jul 14 14:35:04 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 14 Jul 2017 08:35:04 -0400 Subject: [Gambas-user] vb code In-Reply-To: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> References: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> Message-ID: 2017-07-14 3:27 GMT-04:00 Shane : > I have some vb code i want to convert to gambas and it uses this code > > Private Type ID3V22HDR > frameName1 As String * 3 > frameSize1 As Byte > frameSize2 As Byte > frameSize3 As Byte > End Type > the most close are a struc.. i mean.. in the (poor) visual basic u define a "type" but really that "type" must be instanciated/redeclared before use it so then struc maybe its the shor.. but will act as a new class to use it, i mean, event Dim variable as new ID3V22HDR > > what would be the best way to convert this to gambas? > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Fri Jul 14 14:36:24 2017 From: bagonergi at ...626... (Gianluigi) Date: Fri, 14 Jul 2017 14:36:24 +0200 Subject: [Gambas-user] vb code In-Reply-To: <20170714173952.ec9be8ffead24e49167da095@...626...> References: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> <20170714173952.ec9be8ffead24e49167da095@...626...> Message-ID: You can take a look at this discussion [0] Regards Gianluigi [0] http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html 2017-07-14 10:09 GMT+02:00 adamnt42 at ...626... : > Guessing without information about what a vb private type is and where and > why you would use it , but there is a thing called a Struct in Gambas, > maybe that is what you are looking for. > b > > On Fri, 14 Jul 2017 17:27:44 +1000 > Shane wrote: > > > I have some vb code i want to convert to gambas and it uses this code > > > > Private Type ID3V22HDR > > frameName1 As String * 3 > > frameSize1 As Byte > > frameSize2 As Byte > > frameSize3 As Byte > > End Type > > > > what would be the best way to convert this to gambas? > > > > > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tmorehen at ...3602... Fri Jul 14 16:33:24 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Fri, 14 Jul 2017 10:33:24 -0400 Subject: [Gambas-user] Weather app in Software Farm Message-ID: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> I just uploaded a Weather systray app to the software farm. Comments/suggestions welcome. Enjoy. From d4t4full at ...626... Fri Jul 14 17:28:55 2017 From: d4t4full at ...626... (d4t4full at ...626...) Date: Fri, 14 Jul 2017 12:28:55 -0300 Subject: [Gambas-user] vb code In-Reply-To: References: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> Message-ID: <98e72c55-d772-4b21-9300-c85c74eb4713@...626...> Actually a type in VBA (old VB6 and MSOffice Basic) is not regarded as an object, it is more akin to a C Struc. All you do to use it is "Dim myVar As UserType". You use New for object classes only, and Type is not a class or object. The Private clause makes the user type definition accessible only in the form, module or class where it is defined, making the type unavsilable to others. HTH, zxMarce. On Jul 14, 2017, 09:36, at 09:36, PICCORO McKAY Lenz wrote: >2017-07-14 3:27 GMT-04:00 Shane : > >> I have some vb code i want to convert to gambas and it uses this code >> >> Private Type ID3V22HDR >> frameName1 As String * 3 >> frameSize1 As Byte >> frameSize2 As Byte >> frameSize3 As Byte >> End Type >> > >the most close are a struc.. i mean.. in the (poor) visual basic u >define a >"type" but really that "type" must be instanciated/redeclared before >use it > >so then struc maybe its the shor.. but will act as a new class to use >it, i >mean, event > >Dim variable as new ID3V22HDR > > >> >> what would be the best way to convert this to gambas? >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >------------------------------------------------------------------------------ >Check out the vibrant tech community on one of the world's most >engaging tech sites, Slashdot.org! http://sdm.link/slashdot >_______________________________________________ >Gambas-user mailing list >Gambas-user at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Fri Jul 14 17:39:17 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 14 Jul 2017 17:39:17 +0200 Subject: [Gambas-user] vb code In-Reply-To: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> References: <28bd38c9-54da-c421-cb31-de50305817c4@...626...> Message-ID: <1e438242-44b9-6572-7ebf-092ea33c18c2@...1...> Le 14/07/2017 ? 09:27, Shane a ?crit : > I have some vb code i want to convert to gambas and it uses this code > > Private Type ID3V22HDR > frameName1 As String * 3 > frameSize1 As Byte > frameSize2 As Byte > frameSize3 As Byte > End Type > > what would be the best way to convert this to gambas? > Did you read that? http://gambaswiki.org/wiki/lang/structdecl -- Beno?t Minisini From charlie at ...2793... Sat Jul 15 15:39:39 2017 From: charlie at ...2793... (Charlie) Date: Sat, 15 Jul 2017 06:39:39 -0700 (MST) Subject: [Gambas-user] Weather app in Software Farm In-Reply-To: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> References: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> Message-ID: <1500125979770-59771.post@...3046...> Tony Morehen wrote > I just uploaded a Weather systray app to the software farm. > Comments/suggestions welcome. Enjoy. Hi Tony, I tried your program on a computer at work and got it working after adding *gb.qt4*. Linux Mint does not have QT5 yet. I tried it a home but even after fixing QT I got: - *"sni-qt/5871" WARN 12:51:31.765 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE * After 20 seconds FMain appeared but with no data. Not sure what the problem is. ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59771.html Sent from the gambas-user mailing list archive at Nabble.com. From fernandojosecabral at ...626... Sat Jul 15 16:08:17 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 15 Jul 2017 11:08:17 -0300 Subject: [Gambas-user] My quest for efficiency Message-ID: Hi I've found a file whose text has been obfuscated by subtracting 11 from every byte. Now I want to bring it back to regular text. To do this I have to add 11 to each byte read from that file. Now, I have tried several ways to do it, and they all seemed every inefficient to me. Two examples follow *j = 0For i = 0 To Len(RawText)str &= Chr(CByte(Asc(RawText, i) + 11)) ' either this or the following'Mid(Rawtext, i, 1) = Chr(CByte(Asc(RawText, i) + 11))Inc jIf j = 100000 Then Print i; Now j = 0EndifNext* In the first option (uncommented) I am building a new string byte by byte. In the second option (commented) I am replacing each character in place. I expected the second option to be way faster, especially because there is no need for the string to be reallocated. Nevertheless, it showed to be a snail. The first option, in spite of the fact that it grows slower and slower as the string grows, is still way faster than the second option. To me it does not make sense. Does it for you? Also, is there a faster way to do this? -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From gambas at ...1... Sat Jul 15 16:28:47 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 15 Jul 2017 16:28:47 +0200 Subject: [Gambas-user] My quest for efficiency In-Reply-To: References: Message-ID: Le 15/07/2017 ? 16:08, Fernando Cabral a ?crit : > Hi > > I've found a file whose text has been obfuscated by subtracting 11 from > every byte. Now I want to bring it back to regular text. To do this I have > to add 11 to each byte read from that file. Now, I have tried several ways > to do it, and they all seemed every inefficient to me. Two examples follow > > *j = 0For i = 0 To Len(RawText)str &= Chr(CByte(Asc(RawText, i) + 11)) ' > either this or the following'Mid(Rawtext, i, 1) = Chr(CByte(Asc(RawText, i) > + 11))Inc jIf j = 100000 Then Print i; Now j = 0EndifNext* > > In the first option (uncommented) I am building a new string byte by byte. > In the second option (commented) I am replacing each character in place. > I expected the second option to be way faster, especially because there is > no need for the string to be reallocated. Nevertheless, it showed to be a > snail. > The first option, in spite of the fact that it grows slower and slower as > the string grows, is still way faster than the second option. > > > To me it does not make sense. Does it for you? > Also, is there a faster way to do this? > Strings in Gambas are immutable. The second method does not act "in place", because this syntactic sugar actually creates a new string by concatenating the left part, the new character, and the right part. Use a byte array instead of a string (if you are sure that you are dealing with ASCII of course), or a string buffer (OPEN STRING syntax see the wiki for the details) Regards, -- Beno?t Minisini From fernandojosecabral at ...626... Sat Jul 15 19:36:28 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sat, 15 Jul 2017 14:36:28 -0300 Subject: [Gambas-user] My quest for efficiency In-Reply-To: References: Message-ID: Well, after 5 hours the most efficient version is still running. Only 1/5 of the file has been processed. The less efficient version has only processed 1 MB, or 1/ 42 of the file. So I decided to write a C program to do the same task. Since I have not been using C in the last 20 years, I did not try any fancy thing. I know C has to be more efficient, so I expected to find find, perhaps, 10 minutes, 5 minutes. Not so. To my surprise, the program bellow did the whole thing in ONE SECOND! I found this to be quite inexpected. *#include int main(void){ FILE *fp; int c; fp = fopen("/home/fernando/temp/deah001.dhn", "r"); while((c = fgetc(fp)) != EOF) { putchar(c + 11); } fclose(fp); return 0;}* I am sure there is a way to do this efficiently in Gambas.Certainly not in 1 second, as it happened here, but perhaps in 5 or 10 minutes instead of the several hours it is now taking. - fernando 2017-07-15 11:08 GMT-03:00 Fernando Cabral : > Hi > > I've found a file whose text has been obfuscated by subtracting 11 from > every byte. Now I want to bring it back to regular text. To do this I have > to add 11 to each byte read from that file. Now, I have tried several ways > to do it, and they all seemed every inefficient to me. Two examples follow > > > > > > > > > > > > *j = 0For i = 0 To Len(RawText)str &= Chr(CByte(Asc(RawText, i) + 11)) ' > either this or the following'Mid(Rawtext, i, 1) = Chr(CByte(Asc(RawText, i) > + 11))Inc jIf j = 100000 Then Print i; Now j = 0EndifNext* > > In the first option (uncommented) I am building a new string byte by byte. > In the second option (commented) I am replacing each character in place. > I expected the second option to be way faster, especially because there is > no need for the string to be reallocated. Nevertheless, it showed to be a > snail. > The first option, in spite of the fact that it grows slower and slower as > the string grows, is still way faster than the second option. > > > To me it does not make sense. Does it for you? > Also, is there a faster way to do this? > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> > Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From tmorehen at ...3602... Sat Jul 15 20:49:34 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Sat, 15 Jul 2017 14:49:34 -0400 Subject: [Gambas-user] My quest for efficiency In-Reply-To: References: Message-ID: Did you try Benoit's suggestion: Public Sub Main() Dim sIn as String Dim sOut as String sIn = File.Load("/home/fernando/temp/deah001.dhn") sOut = Add11(sIn) File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) End Public Sub Add11(InputString as String) as String Dim bArray As Byte[] Dim String11 As String Dim i As Integer bArray = Byte[].FromString(InputString) For i = 0 To bArray.Max bArray[i] += 11 Next Return bArray.ToString End On 2017-07-15 01:36 PM, Fernando Cabral wrote: > Well, after 5 hours the most efficient version is still running. Only 1/5 > of the file has been processed. The less efficient version has only > processed 1 MB, or 1/ 42 of the file. > > So I decided to write a C program to do the same task. Since I have not > been using C in the last 20 years, I did not try any fancy thing. I know C > has to be more efficient, so I expected to find find, perhaps, 10 minutes, > 5 minutes. Not so. To my surprise, the program bellow did the whole thing > in ONE SECOND! > > I found this to be quite inexpected. > > > > > > > > > > > > > > > > > > *#include int main(void){ FILE *fp; int c; fp = > fopen("/home/fernando/temp/deah001.dhn", "r"); while((c = fgetc(fp)) != > EOF) { putchar(c + 11); } fclose(fp); return 0;}* > > I am sure there is a way to do this efficiently in Gambas.Certainly not in > 1 second, as it happened here, but perhaps in 5 or 10 minutes instead of > the several hours it is now taking. > > - fernando > > 2017-07-15 11:08 GMT-03:00 Fernando Cabral : > >> Hi >> >> I've found a file whose text has been obfuscated by subtracting 11 from >> every byte. Now I want to bring it back to regular text. To do this I have >> to add 11 to each byte read from that file. Now, I have tried several ways >> to do it, and they all seemed every inefficient to me. Two examples follow >> >> >> >> >> >> >> >> >> >> >> >> *j = 0For i = 0 To Len(RawText)str &= Chr(CByte(Asc(RawText, i) + 11)) ' >> either this or the following'Mid(Rawtext, i, 1) = Chr(CByte(Asc(RawText, i) >> + 11))Inc jIf j = 100000 Then Print i; Now j = 0EndifNext* >> >> In the first option (uncommented) I am building a new string byte by byte. >> In the second option (commented) I am replacing each character in place. >> I expected the second option to be way faster, especially because there is >> no need for the string to be reallocated. Nevertheless, it showed to be a >> snail. >> The first option, in spite of the fact that it grows slower and slower as >> the string grows, is still way faster than the second option. >> >> >> To me it does not make sense. Does it for you? >> Also, is there a faster way to do this? >> >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail: fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> >> > From gambas at ...1... Sat Jul 15 21:24:12 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 15 Jul 2017 21:24:12 +0200 Subject: [Gambas-user] My quest for efficiency In-Reply-To: References: Message-ID: <3f207983-023a-ee3f-0028-66326d274e7c@...1...> Le 15/07/2017 ? 20:49, Tony Morehen a ?crit : > Did you try Benoit's suggestion: > > Public Sub Main() > > Dim sIn as String > Dim sOut as String > > sIn = File.Load("/home/fernando/temp/deah001.dhn") > sOut = Add11(sIn) > File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) > > End > > Public Sub Add11(InputString as String) as String > Dim bArray As Byte[] > Dim String11 As String > Dim i As Integer > > bArray = Byte[].FromString(InputString) > For i = 0 To bArray.Max > bArray[i] += 11 > Next > Return bArray.ToString > End > > Just a remark: You don't have to use Byte[].FromString. You can use the Bute[].Read() method instead, to load the file directly into the array. You save an intermediate string that way. Regards, -- Beno?t Minisini From Gambas at ...3662... Sat Jul 15 22:28:38 2017 From: Gambas at ...3662... (Caveat) Date: Sat, 15 Jul 2017 22:28:38 +0200 Subject: [Gambas-user] My quest for efficiency In-Reply-To: <3f207983-023a-ee3f-0028-66326d274e7c@...1...> References: <3f207983-023a-ee3f-0028-66326d274e7c@...1...> Message-ID: <6efcb91f-5b17-0b16-2a54-c255f62d63bc@...3662...> Something is horribly wrong, or you're running on a 286 :-) I just tested here, and the program runs on a 51 MB test file in about 5 seconds. Some reasonably well commented code for you... Public Sub Main() Dim inFile, outFile As File Dim buff As New Byte[1024] Dim idx, remBytes, readSize As Integer ' CHANGE THIS to your input file inFile = Open "/home/caveat/Downloads/mytestfile" For Read ' CHANGE THIS to your output file outFile = Open "/home/caveat/Downloads/mytestfile.out2" For Create ' Remaining bytes starts as the total length of the file remBytes = Lof(inFile) ' Until we reach the end of the input file...guess you could instead check on remBytes... While Not Eof(inFile) If remBytes > buff.length Then ' Limit reading to the size of our buffer (the Byte[]) readSize = buff.length Else ' Only read the bytes we have left into our buffer (the Byte[]) readSize = remBytes Endif ' Read from the input file into our buffer, starting at offset 0 in the buffer buff.Read(inFile, 0, readSize) ' Update the number of bytes remaining... remBytes = remBytes - readSize ' Run round each byte in our buffer For idx = 0 To buff.length - 1 ' Dunno if you need any conditions, I check for > 30 as I can put newlines in the file to make it more readable for testing If buff[idx] > 30 Then ' This is the 'trick' you need to apply... subtract 11 from every byte in the file ' Not sure how you deal with edge cases... if you have a byte of 5, is your result then 250? buff[idx] = buff[idx] - 11 Endif Next ' Write the whole buffer out to the output file buff.Write(outFile, 0, readSize) Wend Close #inFile Close #outFile End Kind regards, Caveat On 15-07-17 21:24, Beno?t Minisini via Gambas-user wrote: > Le 15/07/2017 ? 20:49, Tony Morehen a ?crit : >> Did you try Benoit's suggestion: >> >> Public Sub Main() >> >> Dim sIn as String >> Dim sOut as String >> >> sIn = File.Load("/home/fernando/temp/deah001.dhn") >> sOut = Add11(sIn) >> File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) >> >> End >> >> Public Sub Add11(InputString as String) as String >> Dim bArray As Byte[] >> Dim String11 As String >> Dim i As Integer >> >> bArray = Byte[].FromString(InputString) >> For i = 0 To bArray.Max >> bArray[i] += 11 >> Next >> Return bArray.ToString >> End >> >> > > Just a remark: > > You don't have to use Byte[].FromString. > > You can use the Bute[].Read() method instead, to load the file > directly into the array. You save an intermediate string that way. > > Regards, > From adrien.prokopowicz at ...626... Sun Jul 16 01:37:04 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Sun, 16 Jul 2017 01:37:04 +0200 Subject: [Gambas-user] Gambas Playground Message-ID: Hello Everyone ! These past few days I had fun putting together an online playground for Gambas ! You can find it here : https://gambas-playground.proko.eu/ :) The playground is a little place to write and run Gambas code snippets, which I think could be very useful in the mailing-list where codes flies around everywhere. :) You can also directly share a link of your code in the playground using the "Share" button, which will generate a link like this : https://gambas-playground.proko.eu/?gist=07db52169ef8b747d26f8bee4a4a19e9 The code is actually stored in a GitHub Gist, rather than in the playground itself, which makes it completely stateless. Of course, since this is a web service (i.e. not your computer ! :) ), there are a few limitations : - Your code cannot run for more than 2 seconds, or it will get SIGKILL'd - It cannot use more than 16 megabytes of RAM (it segfaults if you use too much) - You cannot make any network access whatsoever (there are no network cards, and the process does not have permission to open sockets). - You *can* read, write or delete any file, but all changes to the filesystem are discarded when the process ends. - There are probably a few edge cases I didn't think of, so please don't abuse it. :) However, a few components are available, just add the USE instruction to load it, just like you would in a Gambas script. Here is an example : https://gambas-playground.proko.eu/?gist=8a49aae5f5e24569c3f7f7e55c619f05 The following components are available in the playground : gb.args, gb.clipper, gb.complex, gb.compress, gb.data, gb.debug, gb.draw, gb.eval, gb.eval.highlight, gb.geom, gb.image.effect, gb.image, gb.inotify, gb.markdown, gb.option, gb.settings, gb.signal, gb.term, gb.util, gb.util.web, gb.vb, gb.xml, gb.xml.html (Basically, any component that doesn't depend on networking or GUI, tell me if any is missing :) ) Behind the scenes, it is a simple Gambas application serving a REST API, which takes the code as input. It then spins up a Docker container, which has a simple "runner" Gambas application as its init process, which takes the code, feeds it to the Gambas Scripter (gbs3) and then returns its output. The app is still a bit rough on the edges (for instance, I should make a proper Gambas highlighter for the editor, instead of using the VBScript one :p), but I think it is good enough to see some use. Tell me if you have some ideas to improve it, and have fun with it ! :) -- Adrien Prokopowicz From nando_f at ...951... Sun Jul 16 10:07:01 2017 From: nando_f at ...951... (nando_f at ...951...) Date: Sun, 16 Jul 2017 04:07:01 -0400 Subject: [Gambas-user] Best ways to format float values In-Reply-To: References: <1499924393447-59733.post@...3046...> Message-ID: <20170716075553.M80451@...951...> Rounding depends on what rounding you want. Most people think of 5/4 rounding. I prefer to round manually 5/4... 5 up, 4 down. Dim n as Float = 26.660166666666 n = n * 100. 'n = 2666.0166666666 ' 2 decimal points rounding n = n + 0.5 'n = 2666.5166666666 ' 5/4 rounding* n = CLong(n) 'n = 2666 n = n / 100. 'n = 26.66 *If you wish to round down, do not add 0.5. (add 0.0) *If you wish to round up, add 0.999999999 If you wish to do 3 digits, then *1000 and /1000. This works for any type of rounding scheme and any reasonable number of digits. -Nando(Canada) -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Gianluigi To: mailing list for gambas users Sent: Thu, 13 Jul 2017 12:30:23 +0200 Subject: Re: [Gambas-user] Best ways to format float values > One thing that could be useful? > > Public Sub Main() > > Dim n As Float = 26.6601666666666 > Dim b As Byte > > b = Val(Mid(CStr(Frac(n)), 5, 1)) > Print Round(n, -2) > If b >= 5 Then > Print Round(n, -2) > Else > Print Round(n + 0.01, -2) > Endif > > End > > Regards > Gianluigi > > 2017-07-13 7:39 GMT+02:00 alexchernoff : > > > Peace to all, > > > > this might a bit silly but what is the best way to format float values like > > 26.6601666666666 into having two digits AND/OR with rounding them? > > > > e.g. > > > > 26.6601666666666 becomes 26.66 shortened > > 26.6601666666666 becomes 26.67 rounded > > > > cheers! > > > > > > > > > > > > -- > > View this message in context: http://gambas.8142.n7.nabble. > > com/Best-ways-to-format-float-values-tp59733.html > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From karl.reinl at ...9... Sun Jul 16 11:11:40 2017 From: karl.reinl at ...9... (Karl Reinl) Date: Sun, 16 Jul 2017 11:11:40 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: Message-ID: <1500196300.29119.31.camel@...3609...> Am Sonntag, den 16.07.2017, 01:37 +0200 schrieb Adrien Prokopowicz: > Hello Everyone ! > > These past few days I had fun putting together an online playground for > Gambas ! > You can find it here : https://gambas-playground.proko.eu/ :) > > The playground is a little place to write and run Gambas code snippets, > which I > think could be very useful in the mailing-list where codes flies around > everywhere. :) > > You can also directly share a link of your code in the playground using the > "Share" button, which will generate a link like this : > > https://gambas-playground.proko.eu/?gist=07db52169ef8b747d26f8bee4a4a19e9 > > The code is actually stored in a GitHub Gist, rather than in the playground > itself, which makes it completely stateless. > > Of course, since this is a web service (i.e. not your computer ! :) ), > there are > a few limitations : > > - Your code cannot run for more than 2 seconds, or it will get SIGKILL'd > - It cannot use more than 16 megabytes of RAM (it segfaults if you use too > much) > - You cannot make any network access whatsoever (there are no network > cards, > and the process does not have permission to open sockets). > - You *can* read, write or delete any file, but all changes to the > filesystem > are discarded when the process ends. > - There are probably a few edge cases I didn't think of, so please don't > abuse > it. :) > > However, a few components are available, just add the USE instruction to > load > it, just like you would in a Gambas script. Here is an example : > > https://gambas-playground.proko.eu/?gist=8a49aae5f5e24569c3f7f7e55c619f05 > > The following components are available in the playground : > > gb.args, gb.clipper, gb.complex, gb.compress, gb.data, gb.debug, gb.draw, > gb.eval, gb.eval.highlight, gb.geom, gb.image.effect, gb.image, > gb.inotify, > gb.markdown, gb.option, gb.settings, gb.signal, gb.term, gb.util, > gb.util.web, > gb.vb, gb.xml, gb.xml.html > > (Basically, any component that doesn't depend on networking or GUI, tell > me if > any is missing :) ) > > Behind the scenes, it is a simple Gambas application serving a REST API, > which takes the code as input. It then spins up a Docker container, which > has > a simple "runner" Gambas application as its init process, which takes the > code, > feeds it to the Gambas Scripter (gbs3) and then returns its output. > > The app is still a bit rough on the edges (for instance, I should make a > proper > Gambas highlighter for the editor, instead of using the VBScript one :p), > but I think it is good enough to see some use. > > Tell me if you have some ideas to improve it, and have fun with it ! :) > Salut Adrien, now we can discuss 'Best ways to format float values' like this look here you can test Nando's way https://gambas-playground.proko.eu/?gist=037e17d22f3ac93cd3da3d6ad681f713 Thanks -- Amicalement Charlie From bagonergi at ...626... Sun Jul 16 11:47:45 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 16 Jul 2017 11:47:45 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: <20170716075553.M80451@...951...> References: <1499924393447-59733.post@...3046...> <20170716075553.M80451@...951...> Message-ID: Hi Nando, good explanation, suitable for a guys with an elementary school preparation like me. Thank you very much Gianluigi 2017-07-16 10:07 GMT+02:00 : > Rounding depends on what rounding you want. > Most people think of 5/4 rounding. > I prefer to round manually 5/4... 5 up, 4 down. > > Dim n as Float = 26.660166666666 > > n = n * 100. 'n = 2666.0166666666 ' 2 decimal points rounding > n = n + 0.5 'n = 2666.5166666666 ' 5/4 rounding* > n = CLong(n) 'n = 2666 > n = n / 100. 'n = 26.66 > > > *If you wish to round down, do not add 0.5. (add 0.0) > *If you wish to round up, add 0.999999999 > > If you wish to do 3 digits, then *1000 and /1000. > This works for any type of rounding scheme and any reasonable number of > digits. > > -Nando(Canada) > > > -- > Open WebMail Project (http://openwebmail.org) > > > ---------- Original Message ----------- > From: Gianluigi > To: mailing list for gambas users > Sent: Thu, 13 Jul 2017 12:30:23 +0200 > Subject: Re: [Gambas-user] Best ways to format float values > > > One thing that could be useful? > > > > Public Sub Main() > > > > Dim n As Float = 26.6601666666666 > > Dim b As Byte > > > > b = Val(Mid(CStr(Frac(n)), 5, 1)) > > Print Round(n, -2) > > If b >= 5 Then > > Print Round(n, -2) > > Else > > Print Round(n + 0.01, -2) > > Endif > > > > End > > > > Regards > > Gianluigi > > > > 2017-07-13 7:39 GMT+02:00 alexchernoff : > > > > > Peace to all, > > > > > > this might a bit silly but what is the best way to format float values > like > > > 26.6601666666666 into having two digits AND/OR with rounding them? > > > > > > e.g. > > > > > > 26.6601666666666 becomes 26.66 shortened > > > 26.6601666666666 becomes 26.67 rounded > > > > > > cheers! > > > > > > > > > > > > > > > > > > -- > > > View this message in context: http://gambas.8142.n7.nabble. > > > com/Best-ways-to-format-float-values-tp59733.html > > > Sent from the gambas-user mailing list archive at Nabble.com. > > > > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From buster6seven at ...626... Sun Jul 16 12:57:57 2017 From: buster6seven at ...626... (Shane) Date: Sun, 16 Jul 2017 20:57:57 +1000 Subject: [Gambas-user] reading files Message-ID: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> given this example PRIVATE SUB BinaryRead(FilePath AS String) DIM binaryFile AS File DIM i AS Integer DIM b AS Byte DIM s AS Short DIM s1 AS String DIM s2 AS String ' Read binary file binaryFile = OPEN FilePath FOR READ READ #binaryFile, i READ #binaryFile, b READ #binaryFile, s READ #binaryFile, s1 READ #binaryFile, s2 CLOSE #binaryFile ' Display results PRINT i PRINT b PRINT s PRINT s1 PRINT s2 END is there a way for gambas to read a struct of all these variables in one read ? From fernandojosecabral at ...626... Sun Jul 16 14:13:39 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 16 Jul 2017 09:13:39 -0300 Subject: [Gambas-user] My quest for efficiency In-Reply-To: <6efcb91f-5b17-0b16-2a54-c255f62d63bc@...3662...> References: <3f207983-023a-ee3f-0028-66326d274e7c@...1...> <6efcb91f-5b17-0b16-2a54-c255f62d63bc@...3662...> Message-ID: Thank you, Caveat [emptor?]. The code you proposed worked very, very well. In fact, I timed it against two versions of the C program and the result was quite good. In C, reading from the standard input and writing to the standard output took a trifle beyond half a second (0.6?? real time). Meanwhile, your version in Gambas ran in 2.5?? (real time). The question mark means little variation from trial to trial. Out of curiosity, I wrote a Gambas version similar to the C version. Here are the two codes: *Dim b As Byte* * While Not Eof() b = Read As Byte Write (b + 11) As Byte Wend* - - - - - - - * int c; while((c = getchar()) != EOF) putchar(c + 11);* The C version ran in 0.59 against the Gambas version that ran in 7.6 seconds (real time). Not too bad in my opinion! Then I tried to stretch it a little bit and wrote: * Write (( Read As Byte) + 11) As Byte* Alas! this is something Gambas does not understand. These are just for the sake of experience. I am happy with the solution Caveat proposed. Thank you. 2017-07-15 17:28 GMT-03:00 Caveat : > Something is horribly wrong, or you're running on a 286 :-) > > I just tested here, and the program runs on a 51 MB test file in about 5 > seconds. > > Some reasonably well commented code for you... > > Public Sub Main() > > Dim inFile, outFile As File > Dim buff As New Byte[1024] > Dim idx, remBytes, readSize As Integer > > ' CHANGE THIS to your input file > inFile = Open "/home/caveat/Downloads/mytestfile" For Read > > ' CHANGE THIS to your output file > outFile = Open "/home/caveat/Downloads/mytestfile.out2" For Create > > ' Remaining bytes starts as the total length of the file > remBytes = Lof(inFile) > > ' Until we reach the end of the input file...guess you could instead > check on remBytes... > While Not Eof(inFile) > If remBytes > buff.length Then > ' Limit reading to the size of our buffer (the Byte[]) > readSize = buff.length > Else > ' Only read the bytes we have left into our buffer (the Byte[]) > readSize = remBytes > Endif > ' Read from the input file into our buffer, starting at offset 0 in > the buffer > buff.Read(inFile, 0, readSize) > ' Update the number of bytes remaining... > remBytes = remBytes - readSize > ' Run round each byte in our buffer > For idx = 0 To buff.length - 1 > ' Dunno if you need any conditions, I check for > 30 as I can put > newlines in the file to make it more readable for testing > If buff[idx] > 30 Then > ' This is the 'trick' you need to apply... subtract 11 from every > byte in the file > ' Not sure how you deal with edge cases... if you have a byte of > 5, is your result then 250? > buff[idx] = buff[idx] - 11 > Endif > Next > ' Write the whole buffer out to the output file > buff.Write(outFile, 0, readSize) > Wend > > Close #inFile > Close #outFile > > End > > > Kind regards, > Caveat > > On 15-07-17 21:24, Beno?t Minisini via Gambas-user wrote: > >> Le 15/07/2017 ? 20:49, Tony Morehen a ?crit : >> >>> Did you try Benoit's suggestion: >>> >>> Public Sub Main() >>> >>> Dim sIn as String >>> Dim sOut as String >>> >>> sIn = File.Load("/home/fernando/temp/deah001.dhn") >>> sOut = Add11(sIn) >>> File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) >>> >>> End >>> >>> Public Sub Add11(InputString as String) as String >>> Dim bArray As Byte[] >>> Dim String11 As String >>> Dim i As Integer >>> >>> bArray = Byte[].FromString(InputString) >>> For i = 0 To bArray.Max >>> bArray[i] += 11 >>> Next >>> Return bArray.ToString >>> End >>> >>> >>> >> Just a remark: >> >> You don't have to use Byte[].FromString. >> >> You can use the Bute[].Read() method instead, to load the file directly >> into the array. You save an intermediate string that way. >> >> Regards, >> >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bagonergi at ...626... Sun Jul 16 14:53:20 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 16 Jul 2017 14:53:20 +0200 Subject: [Gambas-user] Best ways to format float values In-Reply-To: References: <1499924393447-59733.post@...3046...> <20170716075553.M80451@...951...> Message-ID: The street indicated by Tobias should be the safest, right? I try to attach Adrien's link instead of the code: https://gambas-playground.proko.eu/?gist=f5dbde82ee8f5f1f5799184108fd57c1 Regards Gianluigi 2017-07-16 11:47 GMT+02:00 Gianluigi : > Hi Nando, > > good explanation, suitable for a guys with an elementary school > preparation like me. > > Thank you very much > > Gianluigi > > 2017-07-16 10:07 GMT+02:00 : > >> Rounding depends on what rounding you want. >> Most people think of 5/4 rounding. >> I prefer to round manually 5/4... 5 up, 4 down. >> >> Dim n as Float = 26.660166666666 >> >> n = n * 100. 'n = 2666.0166666666 ' 2 decimal points rounding >> n = n + 0.5 'n = 2666.5166666666 <(516)%20666-6666> ' 5/4 rounding* >> n = CLong(n) 'n = 2666 >> n = n / 100. 'n = 26.66 >> >> >> *If you wish to round down, do not add 0.5. (add 0.0) >> *If you wish to round up, add 0.999999999 >> >> If you wish to do 3 digits, then *1000 and /1000. >> This works for any type of rounding scheme and any reasonable number of >> digits. >> >> -Nando(Canada) >> >> >> -- >> Open WebMail Project (http://openwebmail.org) >> >> >> ---------- Original Message ----------- >> From: Gianluigi >> To: mailing list for gambas users >> Sent: Thu, 13 Jul 2017 12:30:23 +0200 >> Subject: Re: [Gambas-user] Best ways to format float values >> >> > One thing that could be useful? >> > >> > Public Sub Main() >> > >> > Dim n As Float = 26.6601666666666 >> > Dim b As Byte >> > >> > b = Val(Mid(CStr(Frac(n)), 5, 1)) >> > Print Round(n, -2) >> > If b >= 5 Then >> > Print Round(n, -2) >> > Else >> > Print Round(n + 0.01, -2) >> > Endif >> > >> > End >> > >> > Regards >> > Gianluigi >> > >> > 2017-07-13 7:39 GMT+02:00 alexchernoff : >> > >> > > Peace to all, >> > > >> > > this might a bit silly but what is the best way to format float >> values like >> > > 26.6601666666666 into having two digits AND/OR with rounding them? >> > > >> > > e.g. >> > > >> > > 26.6601666666666 becomes 26.66 shortened >> > > 26.6601666666666 becomes 26.67 rounded >> > > >> > > cheers! >> > > >> > > >> > > >> > > >> > > >> > > -- >> > > View this message in context: http://gambas.8142.n7.nabble. >> > > com/Best-ways-to-format-float-values-tp59733.html >> > > Sent from the gambas-user mailing list archive at Nabble.com. >> > > >> > > ------------------------------------------------------------ >> > > ------------------ >> > > Check out the vibrant tech community on one of the world's most >> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > > _______________________________________________ >> > > Gambas-user mailing list >> > > Gambas-user at lists.sourceforge.net >> > > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > >> > ------------------------------------------------------------ >> ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> ------- End of Original Message ------- >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From bagonergi at ...626... Sun Jul 16 15:10:55 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 16 Jul 2017 15:10:55 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: <1500196300.29119.31.camel@...3609...> References: <1500196300.29119.31.camel@...3609...> Message-ID: Thanks Adrien, I was able to mistake my first insertion (I left useless code) :(. Can I fix it? [0] Regards Gianluigi [0] http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-td59733.html 2017-07-16 11:11 GMT+02:00 Karl Reinl : > Am Sonntag, den 16.07.2017, 01:37 +0200 schrieb Adrien Prokopowicz: > > Hello Everyone ! > > > > These past few days I had fun putting together an online playground for > > Gambas ! > > You can find it here : https://gambas-playground.proko.eu/ :) > > > > The playground is a little place to write and run Gambas code snippets, > > which I > > think could be very useful in the mailing-list where codes flies around > > everywhere. :) > > > > You can also directly share a link of your code in the playground using > the > > "Share" button, which will generate a link like this : > > > > https://gambas-playground.proko.eu/?gist=07db52169ef8b747d26f8bee4a4a19 > e9 > > > > The code is actually stored in a GitHub Gist, rather than in the > playground > > itself, which makes it completely stateless. > > > > Of course, since this is a web service (i.e. not your computer ! :) ), > > there are > > a few limitations : > > > > - Your code cannot run for more than 2 seconds, or it will get SIGKILL'd > > - It cannot use more than 16 megabytes of RAM (it segfaults if you use > too > > much) > > - You cannot make any network access whatsoever (there are no network > > cards, > > and the process does not have permission to open sockets). > > - You *can* read, write or delete any file, but all changes to the > > filesystem > > are discarded when the process ends. > > - There are probably a few edge cases I didn't think of, so please don't > > abuse > > it. :) > > > > However, a few components are available, just add the USE instruction to > > load > > it, just like you would in a Gambas script. Here is an example : > > > > https://gambas-playground.proko.eu/?gist=8a49aae5f5e24569c3f7f7e55c619f > 05 > > > > The following components are available in the playground : > > > > gb.args, gb.clipper, gb.complex, gb.compress, gb.data, gb.debug, > gb.draw, > > gb.eval, gb.eval.highlight, gb.geom, gb.image.effect, gb.image, > > gb.inotify, > > gb.markdown, gb.option, gb.settings, gb.signal, gb.term, gb.util, > > gb.util.web, > > gb.vb, gb.xml, gb.xml.html > > > > (Basically, any component that doesn't depend on networking or GUI, tell > > me if > > any is missing :) ) > > > > Behind the scenes, it is a simple Gambas application serving a REST API, > > which takes the code as input. It then spins up a Docker container, which > > has > > a simple "runner" Gambas application as its init process, which takes the > > code, > > feeds it to the Gambas Scripter (gbs3) and then returns its output. > > > > The app is still a bit rough on the edges (for instance, I should make a > > proper > > Gambas highlighter for the editor, instead of using the VBScript one :p), > > but I think it is good enough to see some use. > > > > Tell me if you have some ideas to improve it, and have fun with it ! :) > > > > Salut Adrien, > > now we can discuss 'Best ways to format float values' like this > > look here you can test Nando's way > > https://gambas-playground.proko.eu/?gist=037e17d22f3ac93cd3da3d6ad681f713 > > Thanks > -- > Amicalement > Charlie > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From adrien.prokopowicz at ...626... Sun Jul 16 16:03:26 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Sun, 16 Jul 2017 16:03:26 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: Le Sun, 16 Jul 2017 15:10:55 +0200, Gianluigi a ?crit: > Thanks Adrien, > I was able to mistake my first insertion (I left useless code) :(. > Can I fix it? [0] > > Regards > Gianluigi > > [0] > http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-values-td59733.html > Hi Gianluigi, You can't edit anonymous Gists once they are created, but a bit of extra code is no big deal, you can just edit your code in the playground and generate a new link. (GitHub has plenty of storage space. :) ) As a side note, if you happen to accidentally share sensitive data inside a code link (such as passwords), you can contact the GitHub team[0] and ask them to delete it. The playground itself does not store anything, so you don't need to worry about it. If, in the future, you want to share some code on the playground and be able to edit it later, you can log in in GitHub, create a Gist from there and then manually craft a link to the playground like this : https://gambas-playground.proko.eu/?gist=your_gist_id_here Hope this helps. :) [0] https://help.github.com/articles/deleting-an-anonymous-gist/ -- Adrien Prokopowicz From bagonergi at ...626... Sun Jul 16 16:32:48 2017 From: bagonergi at ...626... (Gianluigi) Date: Sun, 16 Jul 2017 16:32:48 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: Hi Adrien, Thank you very much for the detailed answer. Now I know how to behave the next time I'm wrong :) Regards Gianluigi 2017-07-16 16:03 GMT+02:00 Adrien Prokopowicz : > Le Sun, 16 Jul 2017 15:10:55 +0200, Gianluigi a > ?crit: > > Thanks Adrien, >> I was able to mistake my first insertion (I left useless code) :(. >> Can I fix it? [0] >> >> Regards >> Gianluigi >> >> [0] >> http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-v >> alues-td59733.html >> >> > Hi Gianluigi, > > You can't edit anonymous Gists once they are created, but a bit of extra > code is > no big deal, you can just edit your code in the playground and generate a > new link. > (GitHub has plenty of storage space. :) ) > > As a side note, if you happen to accidentally share sensitive data inside > a code link > (such as passwords), you can contact the GitHub team[0] and ask them to > delete it. > The playground itself does not store anything, so you don't need to worry > about it. > > If, in the future, you want to share some code on the playground and be > able to edit > it later, you can log in in GitHub, create a Gist from there and then > manually craft > a link to the playground like this : > https://gambas-playground.proko.eu/?gist=your_gist_id_here > > Hope this helps. :) > > [0] https://help.github.com/articles/deleting-an-anonymous-gist/ > -- > Adrien Prokopowicz > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From t.lee.davidson at ...626... Sun Jul 16 18:42:35 2017 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Sun, 16 Jul 2017 12:42:35 -0400 Subject: [Gambas-user] reading files In-Reply-To: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> Message-ID: On 07/16/2017 06:57 AM, Shane wrote: > given this example > > PRIVATE SUB BinaryRead(FilePath AS String) > DIM binaryFile AS File > DIM i AS Integer > DIM b AS Byte > DIM s AS Short > DIM s1 AS String > DIM s2 AS String > ' Read binary file > binaryFile = OPEN FilePath FOR READ > READ #binaryFile, i > READ #binaryFile, b > READ #binaryFile, s > READ #binaryFile, s1 > READ #binaryFile, s2 > CLOSE #binaryFile > ' Display results > PRINT i > PRINT b > PRINT s > PRINT s1 > PRINT s2 > END > > > is there a way for gambas to read a struct of all these variables > in one read ? > You may have hinted at the solution within your question. Have you considered using a Structure? http://gambaswiki.org/wiki/lang/read : "... reads the stream Stream as binary data whose type is specified by the Datatype argument." "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, Collection or structure." http://gambaswiki.org/wiki/lang/structdecl -- Lee From tmorehen at ...3602... Sun Jul 16 20:32:12 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Sun, 16 Jul 2017 14:32:12 -0400 Subject: [Gambas-user] Weather app in Software Farm In-Reply-To: <1873fabb-5503-93bc-367f-15425e087dbf@...3602...> References: <1873fabb-5503-93bc-367f-15425e087dbf@...3602...> Message-ID: I just uploaded a version that uses the gb.gui component instead of gb.qt5. It also has a workaround that may fix your error. That error arises when your system does not have a systray enabled. See: https://unix.stackexchange.com/questions/278104/app-icons-dont-appear-in-system-tray-on-linux-mint-17-3 I haven't been able to test since I'm running Manjaro. What version of Mint are you using : Cinnamon, Mate Xfce? 17.? 18.? On 2017-07-15 09:39 AM, Charlie wrote: > Tony Morehen wrote >> I just uploaded a Weather systray app to the software farm. >> Comments/suggestions welcome. Enjoy. > Hi Tony, > > I tried your program on a computer at work and got it working after adding > *gb.qt4*. Linux Mint does not have QT5 yet. I tried it a home but even after > fixing QT I got: - > > *"sni-qt/5871" WARN 12:51:31.765 void > StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE * > > After 20 seconds FMain appeared but with no data. > > Not sure what the problem is. > > > > > ----- > Check out www.gambas.one > -- > View this message in context: http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59771.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From nando_f at ...951... Mon Jul 17 21:05:58 2017 From: nando_f at ...951... (nando_f at ...951...) Date: Mon, 17 Jul 2017 15:05:58 -0400 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> Message-ID: <20170717185859.M85377@...951...> Yes it is possible, I do it. here is some code (incomplete) -Nando (Canada) ' top of class file Public Struct recstruc _a as integer _b as integer _c as integer end struct ' a function public function openAfile(filename as string) as file dim hfile as file dim arec as recstruc hfile = open filename for read write create with arec 'some values to write. ._a = 1 ._b = 22 ._c = 333 end with write #hfile, arec as recstruc 'if you position the hfile pointer back to zero, you can... read #hfile, arec as recstruc close #hfile end -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: T Lee Davidson To: gambas-user at lists.sourceforge.net Sent: Sun, 16 Jul 2017 12:42:35 -0400 Subject: Re: [Gambas-user] reading files > On 07/16/2017 06:57 AM, Shane wrote: > > given this example > > > > PRIVATE SUB BinaryRead(FilePath AS String) > > DIM binaryFile AS File > > DIM i AS Integer > > DIM b AS Byte > > DIM s AS Short > > DIM s1 AS String > > DIM s2 AS String > > ' Read binary file > > binaryFile = OPEN FilePath FOR READ > > READ #binaryFile, i > > READ #binaryFile, b > > READ #binaryFile, s > > READ #binaryFile, s1 > > READ #binaryFile, s2 > > CLOSE #binaryFile > > ' Display results > > PRINT i > > PRINT b > > PRINT s > > PRINT s1 > > PRINT s2 > > END > > > > > > is there a way for gambas to read a struct of all these variables > > in one read ? > > > > You may have hinted at the solution within your question. Have you considered > using a Structure? > > http://gambaswiki.org/wiki/lang/read : > "... reads the stream Stream as binary data whose type is specified by the > Datatype argument." > > "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, > Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, > Collection or structure." > > http://gambaswiki.org/wiki/lang/structdecl > > -- > Lee > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From buster6seven at ...626... Tue Jul 18 02:50:43 2017 From: buster6seven at ...626... (Shane) Date: Tue, 18 Jul 2017 10:50:43 +1000 Subject: [Gambas-user] reading files In-Reply-To: <20170717185859.M85377@...951...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> Message-ID: <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> i don't know what i am doing wrong Public Struct ID3v1_TAG '(128 bytes) Tag[3] As String 'always TAG Title[30] As String 'title, 30 characters Artist[30] As String 'artist, 30 characters Album[30] As String 'album, 30 characters Year[4] As String 'year, 4 characters Comment[30] As String 'comment, 30 characters (or 28 if track# included) Genre As Byte 'genre, 255 for none defined End Struct Private Sub GetID3v1(File As String) Dim IDtag As ID3v1_TAG Dim hfile As File hfile = Open File For Read ' 'read the tag ' seek to end of less tag size Read #hfile, IDtag, ID3v1_TAG here i get IDtag is NULL On 18/07/17 05:05, nando_f at ...951... wrote: > Yes it is possible, I do it. here is some code (incomplete) > > -Nando (Canada) > > > > ' top of class file > Public Struct recstruc > _a as integer > _b as integer > _c as integer > end struct > > > ' a function > public function openAfile(filename as string) as file > > dim hfile as file > dim arec as recstruc > > hfile = open filename for read write create > > with arec 'some values to write. > ._a = 1 > ._b = 22 > ._c = 333 > end with > > write #hfile, arec as recstruc > > 'if you position the hfile pointer back to zero, you can... > read #hfile, arec as recstruc > > close #hfile > > end > > > > > > > -- > Open WebMail Project (http://openwebmail.org) > > > ---------- Original Message ----------- > From: T Lee Davidson > To: gambas-user at lists.sourceforge.net > Sent: Sun, 16 Jul 2017 12:42:35 -0400 > Subject: Re: [Gambas-user] reading files > >> On 07/16/2017 06:57 AM, Shane wrote: >>> given this example >>> >>> PRIVATE SUB BinaryRead(FilePath AS String) >>> DIM binaryFile AS File >>> DIM i AS Integer >>> DIM b AS Byte >>> DIM s AS Short >>> DIM s1 AS String >>> DIM s2 AS String >>> ' Read binary file >>> binaryFile = OPEN FilePath FOR READ >>> READ #binaryFile, i >>> READ #binaryFile, b >>> READ #binaryFile, s >>> READ #binaryFile, s1 >>> READ #binaryFile, s2 >>> CLOSE #binaryFile >>> ' Display results >>> PRINT i >>> PRINT b >>> PRINT s >>> PRINT s1 >>> PRINT s2 >>> END >>> >>> >>> is there a way for gambas to read a struct of all these variables >>> in one read ? >>> >> You may have hinted at the solution within your question. Have you considered >> using a Structure? >> >> http://gambaswiki.org/wiki/lang/read : >> "... reads the stream Stream as binary data whose type is specified by the >> Datatype argument." >> >> "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, >> Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, >> Collection or structure." >> >> http://gambaswiki.org/wiki/lang/structdecl >> >> -- >> Lee >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From nando_f at ...951... Tue Jul 18 04:44:57 2017 From: nando_f at ...951... (nando_f at ...951...) Date: Mon, 17 Jul 2017 22:44:57 -0400 Subject: [Gambas-user] reading files In-Reply-To: <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> Message-ID: <20170718024145.M61248@...951...> I think Read #hfile, IDtag, ID3v1_TAG should be Read #hfile, IDtag as ID3v1_TAG -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Shane To: gambas-user at lists.sourceforge.net Sent: Tue, 18 Jul 2017 10:50:43 +1000 Subject: Re: [Gambas-user] reading files > i don't know what i am doing wrong > > Public Struct ID3v1_TAG '(128 bytes) > Tag[3] As String 'always TAG > Title[30] As String 'title, 30 characters > Artist[30] As String 'artist, 30 characters > Album[30] As String 'album, 30 characters > Year[4] As String 'year, 4 characters > Comment[30] As String 'comment, 30 characters (or 28 if > track# included) > Genre As Byte 'genre, 255 for none defined > End Struct > > Private Sub GetID3v1(File As String) > Dim IDtag As ID3v1_TAG > Dim hfile As File > > hfile = Open File For Read > > ' > 'read the tag > ' seek to end of less tag size > > Read #hfile, IDtag, ID3v1_TAG > > here i get IDtag is NULL > > On 18/07/17 05:05, nando_f at ...951... wrote: > > Yes it is possible, I do it. here is some code (incomplete) > > > > -Nando (Canada) > > > > > > > > ' top of class file > > Public Struct recstruc > > _a as integer > > _b as integer > > _c as integer > > end struct > > > > > > ' a function > > public function openAfile(filename as string) as file > > > > dim hfile as file > > dim arec as recstruc > > > > hfile = open filename for read write create > > > > with arec 'some values to write. > > ._a = 1 > > ._b = 22 > > ._c = 333 > > end with > > > > write #hfile, arec as recstruc > > > > 'if you position the hfile pointer back to zero, you can... > > read #hfile, arec as recstruc > > > > close #hfile > > > > end > > > > > > > > > > > > > > -- > > Open WebMail Project (http://openwebmail.org) > > > > > > ---------- Original Message ----------- > > From: T Lee Davidson > > To: gambas-user at lists.sourceforge.net > > Sent: Sun, 16 Jul 2017 12:42:35 -0400 > > Subject: Re: [Gambas-user] reading files > > > >> On 07/16/2017 06:57 AM, Shane wrote: > >>> given this example > >>> > >>> PRIVATE SUB BinaryRead(FilePath AS String) > >>> DIM binaryFile AS File > >>> DIM i AS Integer > >>> DIM b AS Byte > >>> DIM s AS Short > >>> DIM s1 AS String > >>> DIM s2 AS String > >>> ' Read binary file > >>> binaryFile = OPEN FilePath FOR READ > >>> READ #binaryFile, i > >>> READ #binaryFile, b > >>> READ #binaryFile, s > >>> READ #binaryFile, s1 > >>> READ #binaryFile, s2 > >>> CLOSE #binaryFile > >>> ' Display results > >>> PRINT i > >>> PRINT b > >>> PRINT s > >>> PRINT s1 > >>> PRINT s2 > >>> END > >>> > >>> > >>> is there a way for gambas to read a struct of all these variables > >>> in one read ? > >>> > >> You may have hinted at the solution within your question. Have you considered > >> using a Structure? > >> > >> http://gambaswiki.org/wiki/lang/read : > >> "... reads the stream Stream as binary data whose type is specified by the > >> Datatype argument." > >> > >> "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, > >> Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, > >> Collection or structure." > >> > >> http://gambaswiki.org/wiki/lang/structdecl > >> > >> -- > >> Lee > >> > >> ------------------------------------------------------------------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------- End of Original Message ------- > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From buster6seven at ...626... Tue Jul 18 09:04:04 2017 From: buster6seven at ...626... (Shane) Date: Tue, 18 Jul 2017 17:04:04 +1000 Subject: [Gambas-user] reading files In-Reply-To: <20170718024145.M61248@...951...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> Message-ID: <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> I am very confused from the docs _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ so wouldn't it be_ _ IDtag = read #hfile as ID3v1_TAG ? with doesn't work by the way On 18/07/17 12:44, nando_f at ...951... wrote: > I think > Read #hfile, IDtag, ID3v1_TAG > should be > Read #hfile, IDtag as ID3v1_TAG > > > -- > Open WebMail Project (http://openwebmail.org) > > > ---------- Original Message ----------- > From: Shane > To: gambas-user at lists.sourceforge.net > Sent: Tue, 18 Jul 2017 10:50:43 +1000 > Subject: Re: [Gambas-user] reading files > >> i don't know what i am doing wrong >> >> Public Struct ID3v1_TAG '(128 bytes) >> Tag[3] As String 'always TAG >> Title[30] As String 'title, 30 characters >> Artist[30] As String 'artist, 30 characters >> Album[30] As String 'album, 30 characters >> Year[4] As String 'year, 4 characters >> Comment[30] As String 'comment, 30 characters (or 28 if >> track# included) >> Genre As Byte 'genre, 255 for none defined >> End Struct >> >> Private Sub GetID3v1(File As String) >> Dim IDtag As ID3v1_TAG >> Dim hfile As File >> >> hfile = Open File For Read >> >> ' >> 'read the tag >> ' seek to end of less tag size >> >> Read #hfile, IDtag, ID3v1_TAG >> >> here i get IDtag is NULL >> >> On 18/07/17 05:05, nando_f at ...951... wrote: >>> Yes it is possible, I do it. here is some code (incomplete) >>> >>> -Nando (Canada) >>> >>> >>> >>> ' top of class file >>> Public Struct recstruc >>> _a as integer >>> _b as integer >>> _c as integer >>> end struct >>> >>> >>> ' a function >>> public function openAfile(filename as string) as file >>> >>> dim hfile as file >>> dim arec as recstruc >>> >>> hfile = open filename for read write create >>> >>> with arec 'some values to write. >>> ._a = 1 >>> ._b = 22 >>> ._c = 333 >>> end with >>> >>> write #hfile, arec as recstruc >>> >>> 'if you position the hfile pointer back to zero, you can... >>> read #hfile, arec as recstruc >>> >>> close #hfile >>> >>> end >>> >>> >>> >>> >>> >>> >>> -- >>> Open WebMail Project (http://openwebmail.org) >>> >>> >>> ---------- Original Message ----------- >>> From: T Lee Davidson >>> To: gambas-user at lists.sourceforge.net >>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>> Subject: Re: [Gambas-user] reading files >>> >>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>> given this example >>>>> >>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>> DIM binaryFile AS File >>>>> DIM i AS Integer >>>>> DIM b AS Byte >>>>> DIM s AS Short >>>>> DIM s1 AS String >>>>> DIM s2 AS String >>>>> ' Read binary file >>>>> binaryFile = OPEN FilePath FOR READ >>>>> READ #binaryFile, i >>>>> READ #binaryFile, b >>>>> READ #binaryFile, s >>>>> READ #binaryFile, s1 >>>>> READ #binaryFile, s2 >>>>> CLOSE #binaryFile >>>>> ' Display results >>>>> PRINT i >>>>> PRINT b >>>>> PRINT s >>>>> PRINT s1 >>>>> PRINT s2 >>>>> END >>>>> >>>>> >>>>> is there a way for gambas to read a struct of all these variables >>>>> in one read ? >>>>> >>>> You may have hinted at the solution within your question. Have you considered >>>> using a Structure? >>>> >>>> http://gambaswiki.org/wiki/lang/read : >>>> "... reads the stream Stream as binary data whose type is specified by the >>>> Datatype argument." >>>> >>>> "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, >>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, >>>> Collection or structure." >>>> >>>> http://gambaswiki.org/wiki/lang/structdecl >>>> >>>> -- >>>> Lee >>>> >>>> ------------------------------------------------------------------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> ------- End of Original Message ------- >>> >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From bagonergi at ...626... Tue Jul 18 11:22:18 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 18 Jul 2017 11:22:18 +0200 Subject: [Gambas-user] reading files In-Reply-To: <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> Message-ID: Why do not you take a moment of rest and read what Tobias Boege recommend me in the discussion [0] I told you here [1]? [0] http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html 2017-07-18 9:04 GMT+02:00 Shane : > I am very confused from the docs > > _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ > > _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ > > so wouldn't it be_ > _ > > IDtag = read #hfile as ID3v1_TAG ? > > with doesn't work by the way > > > > On 18/07/17 12:44, nando_f at ...951... wrote: > >> I think >> Read #hfile, IDtag, ID3v1_TAG >> should be >> Read #hfile, IDtag as ID3v1_TAG >> >> >> -- >> Open WebMail Project (http://openwebmail.org) >> >> >> ---------- Original Message ----------- >> From: Shane >> To: gambas-user at lists.sourceforge.net >> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >> Subject: Re: [Gambas-user] reading files >> >> i don't know what i am doing wrong >>> >>> Public Struct ID3v1_TAG '(128 bytes) >>> Tag[3] As String 'always TAG >>> Title[30] As String 'title, 30 characters >>> Artist[30] As String 'artist, 30 characters >>> Album[30] As String 'album, 30 characters >>> Year[4] As String 'year, 4 characters >>> Comment[30] As String 'comment, 30 characters (or 28 if >>> track# included) >>> Genre As Byte 'genre, 255 for none defined >>> End Struct >>> >>> Private Sub GetID3v1(File As String) >>> Dim IDtag As ID3v1_TAG >>> Dim hfile As File >>> >>> hfile = Open File For Read >>> >>> ' >>> 'read the tag >>> ' seek to end of less tag size >>> >>> Read #hfile, IDtag, ID3v1_TAG >>> >>> here i get IDtag is NULL >>> >>> On 18/07/17 05:05, nando_f at ...951... wrote: >>> >>>> Yes it is possible, I do it. here is some code (incomplete) >>>> >>>> -Nando (Canada) >>>> >>>> >>>> >>>> ' top of class file >>>> Public Struct recstruc >>>> _a as integer >>>> _b as integer >>>> _c as integer >>>> end struct >>>> >>>> >>>> ' a function >>>> public function openAfile(filename as string) as file >>>> >>>> dim hfile as file >>>> dim arec as recstruc >>>> >>>> hfile = open filename for read write create >>>> >>>> with arec 'some values to write. >>>> ._a = 1 >>>> ._b = 22 >>>> ._c = 333 >>>> end with >>>> >>>> write #hfile, arec as recstruc >>>> >>>> 'if you position the hfile pointer back to zero, you can... >>>> read #hfile, arec as recstruc >>>> >>>> close #hfile >>>> >>>> end >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Open WebMail Project (http://openwebmail.org) >>>> >>>> >>>> ---------- Original Message ----------- >>>> From: T Lee Davidson >>>> To: gambas-user at lists.sourceforge.net >>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>> Subject: Re: [Gambas-user] reading files >>>> >>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>> >>>>>> given this example >>>>>> >>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>> DIM binaryFile AS File >>>>>> DIM i AS Integer >>>>>> DIM b AS Byte >>>>>> DIM s AS Short >>>>>> DIM s1 AS String >>>>>> DIM s2 AS String >>>>>> ' Read binary file >>>>>> binaryFile = OPEN FilePath FOR READ >>>>>> READ #binaryFile, i >>>>>> READ #binaryFile, b >>>>>> READ #binaryFile, s >>>>>> READ #binaryFile, s1 >>>>>> READ #binaryFile, s2 >>>>>> CLOSE #binaryFile >>>>>> ' Display results >>>>>> PRINT i >>>>>> PRINT b >>>>>> PRINT s >>>>>> PRINT s1 >>>>>> PRINT s2 >>>>>> END >>>>>> >>>>>> >>>>>> is there a way for gambas to read a struct of all these variables >>>>>> in one read ? >>>>>> >>>>>> You may have hinted at the solution within your question. Have you >>>>> considered >>>>> using a Structure? >>>>> >>>>> http://gambaswiki.org/wiki/lang/read : >>>>> "... reads the stream Stream as binary data whose type is specified by >>>>> the >>>>> Datatype argument." >>>>> >>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>> Byte, Short, >>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, any >>>>> Array, >>>>> Collection or structure." >>>>> >>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>> >>>>> -- >>>>> Lee >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> ------- End of Original Message ------- >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------- End of Original Message ------- >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Tue Jul 18 14:05:47 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 18 Jul 2017 14:05:47 +0200 Subject: [Gambas-user] Undo/Redo logic. Message-ID: In addition to what Gambas already provides for some controls, I would like to implement undo/redo on the whole project level. I tried to understand the logic of Gambas's IDE, unfortunately without success. Which is the right way forward. Regards Gianluigi From gambas at ...1... Tue Jul 18 17:56:32 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 18 Jul 2017 17:56:32 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 Message-ID: Hi, I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download Can people test it and report any problem before I make the release public? Thanks in advance! -- Beno?t Minisini From tmorehen at ...3602... Tue Jul 18 19:12:45 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Tue, 18 Jul 2017 13:12:45 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> I'll compile and start using it right away. In the meantime, a feature request: Currently, a menu item with children does nothing before displaying its child menu items. I propose that the parent menu raise a click event before displaying its children. This would allow you to show/not show enable/disable child menu items based on the current state of the app or its environment. For example, when the edit menu is clicked, you can enable/disable the paste item based on the state of the clipboard. This change should not affect existing apps as they will not have click handlers for parent menus. On 2017-07-18 11:56 AM, Beno?t Minisini via Gambas-user wrote: > Hi, > > I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: > > https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download > > > Can people test it and report any problem before I make the release > public? > > Thanks in advance! > From jusabejusabe at ...626... Tue Jul 18 19:31:27 2017 From: jusabejusabe at ...626... (Julio Sanchez) Date: Tue, 18 Jul 2017 19:31:27 +0200 Subject: [Gambas-user] Undo/Redo logic. In-Reply-To: References: Message-ID: Gianluigi: I leave you an example where you can see the use of the Command pattern to do and undo. Hope this can help you. http://jsbsan.blogspot.com.es/2013/11/patron-command-implementar-deshacer-y.html Regards Julio 2017-07-18 14:05 GMT+02:00 Gianluigi : > In addition to what Gambas already provides for some controls, I would like > to implement undo/redo on the whole project level. > I tried to understand the logic of Gambas's IDE, unfortunately without > success. > Which is the right way forward. > > Regards > Gianluigi > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Tue Jul 18 19:52:17 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 13:52:17 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> Message-ID: seems the problems in odbc are still present, why? please gambas witout odbc are a toy to play with mysql and postgres! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-18 13:12 GMT-04:00 Tony Morehen : > I'll compile and start using it right away. In the meantime, a feature > request: > > Currently, a menu item with children does nothing before displaying its > child menu items. I propose that the parent menu raise a click event > before displaying its children. This would allow you to show/not show > enable/disable child menu items based on the current state of the app or > its environment. > > For example, when the edit menu is clicked, you can enable/disable the > paste item based on the state of the clipboard. > > This change should not affect existing apps as they will not have click > handlers for parent menus. > > > On 2017-07-18 11:56 AM, Beno?t Minisini via Gambas-user wrote: > >> Hi, >> >> I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: >> >> https://sourceforge.net/projects/gambas/files/gambas3/gambas >> 3-3.10.0.tar.bz2/download >> >> Can people test it and report any problem before I make the release >> public? >> >> Thanks in advance! >> >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Jul 18 21:39:57 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 18 Jul 2017 21:39:57 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> Message-ID: Le 18/07/2017 ? 19:12, Tony Morehen a ?crit : > I'll compile and start using it right away. In the meantime, a feature > request: > > Currently, a menu item with children does nothing before displaying its > child menu items. I propose that the parent menu raise a click event > before displaying its children. This would allow you to show/not show > enable/disable child menu items based on the current state of the app or > its environment. > > For example, when the edit menu is clicked, you can enable/disable the > paste item based on the state of the clipboard. > > This change should not affect existing apps as they will not have click > handlers for parent menus. > Why don't you use the Show and Hide events? -- Beno?t Minisini From mckaygerhard at ...626... Tue Jul 18 22:15:05 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 16:15:05 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 Message-ID: SORRY i send and all the conversation was beetwen benoit and me without noted it!!! seerending! 2017-07-18 16:05 GMT-04:00 Beno?t Minisini : > Of course, for proprietary databases, this is a problem. We must wait for > zxMarce to fix the driver. That's life... ahhh that's better response rather than "use mysql its great" or "migrate to mysql".. uffff ok the problem its that i cannot upgrade my OS's so i hope gambas will not raise depends again until this issues wirth odbc have solved! Help us "zxMarce" you are our only hope!! "you are the chose man" (umm that sound like a movie frase, sounds familiar ! ) Le 18/07/2017 ? 22:00, PICCORO McKAY Lenz a ?crit : > ok but for enterprise and migration tool to those databases i need pleny > access with gambas to sybase, mssql, informix, gambas had very bad support > in that DBMS and for worse, the odbc in gambas has some issues with that > databases... > > how can i migrate and promote opensource with mysql if i can access pleny > with the application in those DBMS? > > of course, many here now will said "use another languaje, use another > platform" or must be that the point? > From gambas at ...1... Tue Jul 18 22:29:51 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 18 Jul 2017 22:29:51 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Le 18/07/2017 ? 22:15, PICCORO McKAY Lenz a ?crit : > SORRY i send and all the conversation was beetwen benoit and me without > noted it!!! seerending! > > 2017-07-18 16:05 GMT-04:00 Beno?t Minisini : > >> Of course, for proprietary databases, this is a problem. We must wait for >> zxMarce to fix the driver. That's life... > > ... > Moreover, I think you can workaround the problems of the ODBC driver by reimplementing the Result class in Gambas, overriding the accurate properties (Count) and methods (Move...), and fixing the default behaviour according to the Connection type. Something like that: ' Result class Export Property Read Count As Integer Private Sub Count_Read() As Integer If Me.Connection.Type = "odbc" Then ' workaround ... Else Return Super.Count Endif End -- Beno?t Minisini From bagonergi at ...626... Tue Jul 18 22:30:58 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 18 Jul 2017 22:30:58 +0200 Subject: [Gambas-user] Undo/Redo logic. In-Reply-To: References: Message-ID: Hi Julio, only now I could take a look. It looks like a very interesting code. As soon as possible I go to study it, then I'll let you know. Thank You very much. Regards Gianluigi 2017-07-18 19:31 GMT+02:00 Julio Sanchez : > Gianluigi: > > I leave you an example where you can see the use of the Command pattern to > do and undo. Hope this can help you. > > http://jsbsan.blogspot.com.es/2013/11/patron-command- > implementar-deshacer-y.html > > > Regards > > Julio > > > > 2017-07-18 14:05 GMT+02:00 Gianluigi : > > > In addition to what Gambas already provides for some controls, I would > like > > to implement undo/redo on the whole project level. > > I tried to understand the logic of Gambas's IDE, unfortunately without > > success. > > Which is the right way forward. > > > > Regards > > Gianluigi > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Tue Jul 18 22:38:19 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 16:38:19 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: wheantime i do that, but are quite slower and ocmplicated due memory hungy in large datasets! also i notes that when i work with collections the IDE becomes slower, some icons dissapears and then hangs after many minutes of use it! i'll try to report this before but a low interes happened! the problem persist in gambas 3.10 2017-07-18 16:29 GMT-04:00 Beno?t Minisini : > Le 18/07/2017 ? 22:15, PICCORO McKAY Lenz a ?crit : > >> SORRY i send and all the conversation was beetwen benoit and me without >> noted it!!! seerending! >> >> 2017-07-18 16:05 GMT-04:00 Beno?t Minisini >> : >> >> Of course, for proprietary databases, this is a problem. We must wait for >>> zxMarce to fix the driver. That's life... >>> >> > > >> ... > >> > > Moreover, I think you can workaround the problems of the ODBC driver by > reimplementing the Result class in Gambas, overriding the accurate > properties (Count) and methods (Move...), and fixing the default behaviour > according to the Connection type. > > Something like that: > > ' Result class > > Export > > Property Read Count As Integer > > Private Sub Count_Read() As Integer > > If Me.Connection.Type = "odbc" Then > ' workaround > ... > Else > Return Super.Count > Endif > > End > > > -- > Beno?t Minisini > From tmorehen at ...3602... Tue Jul 18 23:10:31 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Tue, 18 Jul 2017 17:10:31 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> Message-ID: <615e10c5-901c-134f-8b4a-ad405a8c6bcd@...3602...> Because when I saw them I confused them with Show and Hide methods. Duh! Another request. Is it possible to expose/export the DirCache class. I've been using it in several derivatives of some of your other classes (Dirview, FileChooser etc) BTW I have several compoments I have been working on. How do I submit them for your approval and possible inclusion in Gambas. One is Filebrower, based on Dirview. It's drop in compatible with DirView but adds two additional properties to allow the display of files in the tree and to sort folders first. It also has an added event GetSpecialIcon(sPath As String, iIconType As Integer), which is like the Icon event but includes a flag specifying folder, open folder or file. Another component is UpDown. It is derived from Spinbar with a property (Showbar) that toggles the display of the bar. I needed a SpinBox with a float value. On a more trivial note, I have a status bar component, based on code I found floating on the web. Finally, I'd like to say how amazingly satisfying it is to work with Gambas. So far I have developed a Desktop Panel and Menu, a Text Editor, a File Explorer and a car computer app that runs on a Raspberry Pi and plays audiovideo and embeds NavIt, plus other projects. I intend to upload these to the software farm, testing permitted. Attached is a screen shot showing off some of these projects. On 2017-07-18 03:39 PM, Beno?t Minisini wrote: > Le 18/07/2017 ? 19:12, Tony Morehen a ?crit : >> I'll compile and start using it right away. In the meantime, a >> feature request: >> >> Currently, a menu item with children does nothing before displaying >> its child menu items. I propose that the parent menu raise a click >> event before displaying its children. This would allow you to >> show/not show enable/disable child menu items based on the current >> state of the app or its environment. >> >> For example, when the edit menu is clicked, you can enable/disable >> the paste item based on the state of the clipboard. >> >> This change should not affect existing apps as they will not have >> click handlers for parent menus. >> > > Why don't you use the Show and Hide events? > -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 295244 bytes Desc: not available URL: From mckaygerhard at ...626... Wed Jul 19 00:27:42 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 18:27:42 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <615e10c5-901c-134f-8b4a-ad405a8c6bcd@...3602...> References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> <615e10c5-901c-134f-8b4a-ad405a8c6bcd@...3602...> Message-ID: 2017-07-18 17:10 GMT-04:00 Tony Morehen : > Finally, I'd like to say how amazingly satisfying it is to work with > Gambas. So far I have developed a Desktop Panel and Menu, a Text Editor, a > File Explorer and a car computer app that runs on a Raspberry Pi and plays > audiovideo and embeds NavIt, plus other projects. I intend to upload these > to the software farm, testing permitted. Attached is a screen shot showing > off some of these projects. > its great that a languaje has so easy to lear.. i really need the odbc componente to fixed due make programs in gambas are sure for easy! the most easy to make its gambas i dont understand why python its so famous, i understand now! gambas not have enough support and vision! > BTW I have several compoments I have been working on. How do I submit > them for your approval and possible inclusion in Gambas. > > One is Filebrower, based on Dirview. It's drop in compatible with DirView > but adds two additional properties to allow the display of files in the > tree and to sort folders first. It also has an added event > GetSpecialIcon(sPath As String, iIconType As Integer), which is like the > Icon event but includes a flag specifying folder, open folder or file. > > Another component is UpDown. It is derived from Spinbar with a property > (Showbar) that toggles the display of the bar. I needed a SpinBox with a > float value. > > On a more trivial note, I have a status bar component, based on code I > found floating on the web. > > the best place to put your code its a git repo, please use gitlab due github are close to closed source and privative software > On 2017-07-18 03:39 PM, Beno?t Minisini wrote: > >> Le 18/07/2017 ? 19:12, Tony Morehen a ?crit : >> >>> I'll compile and start using it right away. In the meantime, a feature >>> request: >>> >>> Currently, a menu item with children does nothing before displaying its >>> child menu items. I propose that the parent menu raise a click event >>> before displaying its children. This would allow you to show/not show >>> enable/disable child menu items based on the current state of the app or >>> its environment. >>> >>> For example, when the edit menu is clicked, you can enable/disable the >>> paste item based on the state of the clipboard. >>> >>> This change should not affect existing apps as they will not have click >>> handlers for parent menus. >>> >>> >> Why don't you use the Show and Hide events? >> >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From fernandojosecabral at ...626... Wed Jul 19 01:18:59 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Tue, 18 Jul 2017 20:18:59 -0300 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> <615e10c5-901c-134f-8b4a-ad405a8c6bcd@...3602...> Message-ID: "2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : its great that a languaje has so easy to lear.. i really need the odbc > componente to fixed due make programs in gambas are sure for easy! the > most easy to make its gambas > > i dont understand why python its so famous, i understand now! gambas not > have enough support and vision! > Piccoro, I want to give you for free my two cents on this issue. As I see it, Gambas is a free-to-use language. Free and "as is". *No guarantees*. It means, take it, or leave it. It was developed and made available by a volunteer with the eventual help of other volunteers. So, I can't understand why you insist in saying things like "gambas [has] not enough support and vision!". I don't think this is a nice thing to say when you have free lunch. The least I can say is that you should not look a gift horse in the mouth. Or, as the Romans used to say, "Noli equi dentes inspicere donati". This can be translated to plain English (I think) as "don't be ungrateful when you receive a gift. If you need a good ODBC interface and Gambas doesn't provide it, perhaps you can develop it yourself and make it available for other people that may have the same need. That would be much appreciated, I am sure. Otherwise, you can use other available libraries (I am sure there are many). If neither is attractive to you, then you can give up Gambas and try something different. I think saying Gambas has not "enough support and vision" is not a good way to obtain what you want. Those are my two cents. After that, I'll shut my mouth up as far as this issue is concerned. Best regards - fernando 2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > 2017-07-18 17:10 GMT-04:00 Tony Morehen : > > > Finally, I'd like to say how amazingly satisfying it is to work with > > Gambas. So far I have developed a Desktop Panel and Menu, a Text > Editor, a > > File Explorer and a car computer app that runs on a Raspberry Pi and > plays > > audiovideo and embeds NavIt, plus other projects. I intend to upload > these > > to the software farm, testing permitted. Attached is a screen shot > showing > > off some of these projects. > > > its great that a languaje has so easy to lear.. i really need the odbc > componente to fixed due make programs in gambas are sure for easy! the > most easy to make its gambas > > i dont understand why python its so famous, i understand now! gambas not > have enough support and vision! > > > > > BTW I have several compoments I have been working on. How do I submit > > them for your approval and possible inclusion in Gambas. > > > > One is Filebrower, based on Dirview. It's drop in compatible with > DirView > > but adds two additional properties to allow the display of files in the > > tree and to sort folders first. It also has an added event > > GetSpecialIcon(sPath As String, iIconType As Integer), which is like the > > Icon event but includes a flag specifying folder, open folder or file. > > > > Another component is UpDown. It is derived from Spinbar with a property > > (Showbar) that toggles the display of the bar. I needed a SpinBox with a > > float value. > > > > On a more trivial note, I have a status bar component, based on code I > > found floating on the web. > > > > the best place to put your code its a git repo, please use gitlab due > github are close to closed source and privative software > > > > On 2017-07-18 03:39 PM, Beno?t Minisini wrote: > > > >> Le 18/07/2017 ? 19:12, Tony Morehen a ?crit : > >> > >>> I'll compile and start using it right away. In the meantime, a feature > >>> request: > >>> > >>> Currently, a menu item with children does nothing before displaying its > >>> child menu items. I propose that the parent menu raise a click event > >>> before displaying its children. This would allow you to show/not show > >>> enable/disable child menu items based on the current state of the app > or > >>> its environment. > >>> > >>> For example, when the edit menu is clicked, you can enable/disable the > >>> paste item based on the state of the clipboard. > >>> > >>> This change should not affect existing apps as they will not have click > >>> handlers for parent menus. > >>> > >>> > >> Why don't you use the Show and Hide events? > >> > >> > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Wed Jul 19 01:45:37 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 19:45:37 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: <7f7dc71e-ae42-e13d-0d79-7f52b4840385@...3602...> <615e10c5-901c-134f-8b4a-ad405a8c6bcd@...3602...> Message-ID: by second chance fernando you dont have the complete overall of the threath and also the problem of odbc has all my colaboration... please search for the bugtracketr.. 2017-07-18 19:18 GMT-04:00 Fernando Cabral : > "2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > > its great that a languaje has so easy to lear.. i really need the odbc > > componente to fixed due make programs in gambas are sure for easy! the > > most easy to make its gambas > > > > i dont understand why python its so famous, i understand now! gambas not > > have enough support and vision! > > > > Piccoro, I want to give you for free my two cents on this issue. > > As I see it, Gambas is a free-to-use language. Free and "as is". *No > guarantees*. It means, take it, or leave it. > > It was developed and made available by a volunteer with the eventual help > of other volunteers. So, I can't understand why you insist in saying things > like "gambas [has] not enough support and vision!". > > I don't think this is a nice thing to say when you have free lunch. The > least I can say is that you should not look a gift horse in the mouth. Or, > as the Romans used to say, "Noli equi dentes inspicere donati". This can be > translated to plain English (I think) as "don't be ungrateful when you > receive a gift. > > If you need a good ODBC interface and Gambas doesn't provide it, perhaps > you can develop it yourself and make it available for other people that may > have the same need. That would be much appreciated, I am sure. > > Otherwise, you can use other available libraries (I am sure there are > many). > If neither is attractive to you, then you can give up Gambas and try > something different. > > I think saying Gambas has not "enough support and vision" is not a good way > to obtain what you want. > > Those are my two cents. After that, I'll shut my mouth up as far as this > issue is concerned. > > Best regards > > - fernando > > 2017-07-18 19:27 GMT-03:00 PICCORO McKAY Lenz : > > > 2017-07-18 17:10 GMT-04:00 Tony Morehen : > > > > > Finally, I'd like to say how amazingly satisfying it is to work with > > > Gambas. So far I have developed a Desktop Panel and Menu, a Text > > Editor, a > > > File Explorer and a car computer app that runs on a Raspberry Pi and > > plays > > > audiovideo and embeds NavIt, plus other projects. I intend to upload > > these > > > to the software farm, testing permitted. Attached is a screen shot > > showing > > > off some of these projects. > > > > > its great that a languaje has so easy to lear.. i really need the odbc > > componente to fixed due make programs in gambas are sure for easy! the > > most easy to make its gambas > > > > i dont understand why python its so famous, i understand now! gambas not > > have enough support and vision! > > > > > > > > > BTW I have several compoments I have been working on. How do I submit > > > them for your approval and possible inclusion in Gambas. > > > > > > One is Filebrower, based on Dirview. It's drop in compatible with > > DirView > > > but adds two additional properties to allow the display of files in the > > > tree and to sort folders first. It also has an added event > > > GetSpecialIcon(sPath As String, iIconType As Integer), which is like > the > > > Icon event but includes a flag specifying folder, open folder or file. > > > > > > Another component is UpDown. It is derived from Spinbar with a > property > > > (Showbar) that toggles the display of the bar. I needed a SpinBox > with a > > > float value. > > > > > > On a more trivial note, I have a status bar component, based on code I > > > found floating on the web. > > > > > > the best place to put your code its a git repo, please use gitlab due > > github are close to closed source and privative software > > > > > > > On 2017-07-18 03:39 PM, Beno?t Minisini wrote: > > > > > >> Le 18/07/2017 ? 19:12, Tony Morehen a ?crit : > > >> > > >>> I'll compile and start using it right away. In the meantime, a > feature > > >>> request: > > >>> > > >>> Currently, a menu item with children does nothing before displaying > its > > >>> child menu items. I propose that the parent menu raise a click event > > >>> before displaying its children. This would allow you to show/not > show > > >>> enable/disable child menu items based on the current state of the app > > or > > >>> its environment. > > >>> > > >>> For example, when the edit menu is clicked, you can enable/disable > the > > >>> paste item based on the state of the clipboard. > > >>> > > >>> This change should not affect existing apps as they will not have > click > > >>> handlers for parent menus. > > >>> > > >>> > > >> Why don't you use the Show and Hide events? > > >> > > >> > > > > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Wed Jul 19 01:50:08 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 18 Jul 2017 19:50:08 -0400 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: good made it! its good to know more and more of gambas are happened two things> 1) the playground seems only applies most to gambas scripts rather thant other gambas things 2) wheres its the code that generates the service, i mean url post here! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-16 10:32 GMT-04:00 Gianluigi : > Hi Adrien, > > Thank you very much for the detailed answer. > Now I know how to behave the next time I'm wrong :) > > Regards > Gianluigi > > 2017-07-16 16:03 GMT+02:00 Adrien Prokopowicz < > adrien.prokopowicz at ...626...> > : > > > Le Sun, 16 Jul 2017 15:10:55 +0200, Gianluigi a > > ?crit: > > > > Thanks Adrien, > >> I was able to mistake my first insertion (I left useless code) :(. > >> Can I fix it? [0] > >> > >> Regards > >> Gianluigi > >> > >> [0] > >> http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-v > >> alues-td59733.html > >> > >> > > Hi Gianluigi, > > > > You can't edit anonymous Gists once they are created, but a bit of extra > > code is > > no big deal, you can just edit your code in the playground and generate a > > new link. > > (GitHub has plenty of storage space. :) ) > > > > As a side note, if you happen to accidentally share sensitive data inside > > a code link > > (such as passwords), you can contact the GitHub team[0] and ask them to > > delete it. > > The playground itself does not store anything, so you don't need to worry > > about it. > > > > If, in the future, you want to share some code on the playground and be > > able to edit > > it later, you can log in in GitHub, create a Gist from there and then > > manually craft > > a link to the playground like this : > > https://gambas-playground.proko.eu/?gist=your_gist_id_here > > > > Hope this helps. :) > > > > [0] https://help.github.com/articles/deleting-an-anonymous-gist/ > > -- > > Adrien Prokopowicz > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From adrien.prokopowicz at ...626... Wed Jul 19 04:38:41 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Wed, 19 Jul 2017 04:38:41 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: Le Wed, 19 Jul 2017 01:50:08 +0200, PICCORO McKAY Lenz a ?crit: > good made it! its good to know more and more of gambas are happened > > two things> > > 1) the playground seems only applies most to gambas scripts rather thant > other gambas things > 2) wheres its the code that generates the service, i mean url post here! > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > I'm not sure I can understand you correctly, but I'll try my best. :) If by "other gambas things" you mean "full projects", then yes, the playground is only intended to run Gambas scripts, since it is designed for quick tests and prototyping, and sharing/running code on Gambas mailing-lists and forums. But since Gambas scripts are no different from a regular project (except that every class/module is in a single file), I don't see how it is a problem. And for the code, I just pushed it to a GitLab repository. You'll find it here : https://gitlab.com/prokopyl/gambas-playground Regards, -- Adrien Prokopowicz From buster6seven at ...626... Wed Jul 19 06:33:45 2017 From: buster6seven at ...626... (Shane) Date: Wed, 19 Jul 2017 14:33:45 +1000 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> Message-ID: <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> thank you Gian i did take a rest and read but alas it did not help as far as i see it he is saying don't use binary file for fixed length strings but as this is an mp3 file tag witch i have no control i am doomed On 18/07/17 19:22, Gianluigi wrote: > Why do not you take a moment of rest and read what Tobias Boege recommend > me in the discussion [0] I told you here [1]? > > [0] > http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html > [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html > > 2017-07-18 9:04 GMT+02:00 Shane : > >> I am very confused from the docs >> >> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >> >> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >> >> so wouldn't it be_ >> _ >> >> IDtag = read #hfile as ID3v1_TAG ? >> >> with doesn't work by the way >> >> >> >> On 18/07/17 12:44, nando_f at ...951... wrote: >> >>> I think >>> Read #hfile, IDtag, ID3v1_TAG >>> should be >>> Read #hfile, IDtag as ID3v1_TAG >>> >>> >>> -- >>> Open WebMail Project (http://openwebmail.org) >>> >>> >>> ---------- Original Message ----------- >>> From: Shane >>> To: gambas-user at lists.sourceforge.net >>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>> Subject: Re: [Gambas-user] reading files >>> >>> i don't know what i am doing wrong >>>> Public Struct ID3v1_TAG '(128 bytes) >>>> Tag[3] As String 'always TAG >>>> Title[30] As String 'title, 30 characters >>>> Artist[30] As String 'artist, 30 characters >>>> Album[30] As String 'album, 30 characters >>>> Year[4] As String 'year, 4 characters >>>> Comment[30] As String 'comment, 30 characters (or 28 if >>>> track# included) >>>> Genre As Byte 'genre, 255 for none defined >>>> End Struct >>>> >>>> Private Sub GetID3v1(File As String) >>>> Dim IDtag As ID3v1_TAG >>>> Dim hfile As File >>>> >>>> hfile = Open File For Read >>>> >>>> ' >>>> 'read the tag >>>> ' seek to end of less tag size >>>> >>>> Read #hfile, IDtag, ID3v1_TAG >>>> >>>> here i get IDtag is NULL >>>> >>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>> >>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>> >>>>> -Nando (Canada) >>>>> >>>>> >>>>> >>>>> ' top of class file >>>>> Public Struct recstruc >>>>> _a as integer >>>>> _b as integer >>>>> _c as integer >>>>> end struct >>>>> >>>>> >>>>> ' a function >>>>> public function openAfile(filename as string) as file >>>>> >>>>> dim hfile as file >>>>> dim arec as recstruc >>>>> >>>>> hfile = open filename for read write create >>>>> >>>>> with arec 'some values to write. >>>>> ._a = 1 >>>>> ._b = 22 >>>>> ._c = 333 >>>>> end with >>>>> >>>>> write #hfile, arec as recstruc >>>>> >>>>> 'if you position the hfile pointer back to zero, you can... >>>>> read #hfile, arec as recstruc >>>>> >>>>> close #hfile >>>>> >>>>> end >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Open WebMail Project (http://openwebmail.org) >>>>> >>>>> >>>>> ---------- Original Message ----------- >>>>> From: T Lee Davidson >>>>> To: gambas-user at lists.sourceforge.net >>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>> Subject: Re: [Gambas-user] reading files >>>>> >>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>> given this example >>>>>>> >>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>> DIM binaryFile AS File >>>>>>> DIM i AS Integer >>>>>>> DIM b AS Byte >>>>>>> DIM s AS Short >>>>>>> DIM s1 AS String >>>>>>> DIM s2 AS String >>>>>>> ' Read binary file >>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>> READ #binaryFile, i >>>>>>> READ #binaryFile, b >>>>>>> READ #binaryFile, s >>>>>>> READ #binaryFile, s1 >>>>>>> READ #binaryFile, s2 >>>>>>> CLOSE #binaryFile >>>>>>> ' Display results >>>>>>> PRINT i >>>>>>> PRINT b >>>>>>> PRINT s >>>>>>> PRINT s1 >>>>>>> PRINT s2 >>>>>>> END >>>>>>> >>>>>>> >>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>> in one read ? >>>>>>> >>>>>>> You may have hinted at the solution within your question. Have you >>>>>> considered >>>>>> using a Structure? >>>>>> >>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>> "... reads the stream Stream as binary data whose type is specified by >>>>>> the >>>>>> Datatype argument." >>>>>> >>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>> Byte, Short, >>>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, any >>>>>> Array, >>>>>> Collection or structure." >>>>>> >>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>> >>>>>> -- >>>>>> Lee >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>> ------- End of Original Message ------- >>>>> >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> ------- End of Original Message ------- >>> >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From mckaygerhard at ...626... Wed Jul 19 12:11:39 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 06:11:39 -0400 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: 2017-07-18 22:38 GMT-04:00 Adrien Prokopowicz : > I'm not sure I can understand you correctly, but I'll try my best. :) > yes your are right, sorry for my english > > If by "other gambas things" you mean "full projects", then yes, the > playground > is only intended to run Gambas scripts, since it is designed for quick > tests and prototyping, and sharing/running code on Gambas mailing-lists and > forums. > But since Gambas scripts are no different from a regular project (except > that > every class/module is in a single file), I don't see how it is a problem. > its not a problem, its only to clarify, and its make sense due GUI are difficult to "lauch" from web.. > > And for the code, I just pushed it to a GitLab repository. You'll find it > here : > https://gitlab.com/prokopyl/gambas-playground good made, better than the old-comlex svn.. thanks > > > Regards, > > -- > Adrien Prokopowicz > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Wed Jul 19 12:15:43 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 06:15:43 -0400 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: 2017-07-19 6:11 GMT-04:00 PICCORO McKAY Lenz : > >> And for the code, I just pushed it to a GitLab repository. You'll find it >> here : >> https://gitlab.com/prokopyl/gambas-playground > > good made, better than the old-comlex svn.. thanks > i found seeds and some traces, but have private non-opensource repositoryes in both github and gilab, please be share/open does not gambas are open/free software for you ? give same back to community .. thanks in advance! > > >> >> >> Regards, >> >> -- >> Adrien Prokopowicz >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From bagonergi at ...626... Wed Jul 19 13:45:19 2017 From: bagonergi at ...626... (Gianluigi) Date: Wed, 19 Jul 2017 13:45:19 +0200 Subject: [Gambas-user] reading files In-Reply-To: <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> Message-ID: You can take a look at our Italian wiki [0][1][2] using Google Translate. You can also subscribe and ask a question in English, I do not understand mp3, but there is someone who understands it. Regards Gianluigi [0] http://www.gambas-it.org/wiki/index.php?title=Estrarre_informazioni_e_TAG_da_un_file_MP3_con_le_sole_funzioni_di_Gambas [1] http://www.gambas-it.org/wiki/index.php?title=Guide_della_comunit%C3%A0#Gestione_dei_dati_audio_e_dei_file_audio [2] http://www.gambas-it.org/wiki/index.php?title=Guide_della_comunit%C3%A0#Struttur 2017-07-19 6:33 GMT+02:00 Shane : > thank you Gian i did take a rest and read but alas it did not help > > as far as i see it he is saying don't use binary file for fixed length > strings > > but as this is an mp3 file tag witch i have no control i am doomed > > > > On 18/07/17 19:22, Gianluigi wrote: > >> Why do not you take a moment of rest and read what Tobias Boege recommend >> me in the discussion [0] I told you here [1]? >> >> [0] >> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >> xed-length-string-td50880.html >> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >> >> 2017-07-18 9:04 GMT+02:00 Shane : >> >> I am very confused from the docs >>> >>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>> >>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>> >>> so wouldn't it be_ >>> _ >>> >>> IDtag = read #hfile as ID3v1_TAG ? >>> >>> with doesn't work by the way >>> >>> >>> >>> On 18/07/17 12:44, nando_f at ...951... wrote: >>> >>> I think >>>> Read #hfile, IDtag, ID3v1_TAG >>>> should be >>>> Read #hfile, IDtag as ID3v1_TAG >>>> >>>> >>>> -- >>>> Open WebMail Project (http://openwebmail.org) >>>> >>>> >>>> ---------- Original Message ----------- >>>> From: Shane >>>> To: gambas-user at lists.sourceforge.net >>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>> Subject: Re: [Gambas-user] reading files >>>> >>>> i don't know what i am doing wrong >>>> >>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>> Tag[3] As String 'always TAG >>>>> Title[30] As String 'title, 30 characters >>>>> Artist[30] As String 'artist, 30 characters >>>>> Album[30] As String 'album, 30 characters >>>>> Year[4] As String 'year, 4 characters >>>>> Comment[30] As String 'comment, 30 characters (or 28 >>>>> if >>>>> track# included) >>>>> Genre As Byte 'genre, 255 for none defined >>>>> End Struct >>>>> >>>>> Private Sub GetID3v1(File As String) >>>>> Dim IDtag As ID3v1_TAG >>>>> Dim hfile As File >>>>> >>>>> hfile = Open File For Read >>>>> >>>>> ' >>>>> 'read the tag >>>>> ' seek to end of less tag size >>>>> >>>>> Read #hfile, IDtag, ID3v1_TAG >>>>> >>>>> here i get IDtag is NULL >>>>> >>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>> >>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>> >>>>>> -Nando (Canada) >>>>>> >>>>>> >>>>>> >>>>>> ' top of class file >>>>>> Public Struct recstruc >>>>>> _a as integer >>>>>> _b as integer >>>>>> _c as integer >>>>>> end struct >>>>>> >>>>>> >>>>>> ' a function >>>>>> public function openAfile(filename as string) as file >>>>>> >>>>>> dim hfile as file >>>>>> dim arec as recstruc >>>>>> >>>>>> hfile = open filename for read write create >>>>>> >>>>>> with arec 'some values to write. >>>>>> ._a = 1 >>>>>> ._b = 22 >>>>>> ._c = 333 >>>>>> end with >>>>>> >>>>>> write #hfile, arec as recstruc >>>>>> >>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>> read #hfile, arec as recstruc >>>>>> >>>>>> close #hfile >>>>>> >>>>>> end >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Open WebMail Project (http://openwebmail.org) >>>>>> >>>>>> >>>>>> ---------- Original Message ----------- >>>>>> From: T Lee Davidson >>>>>> To: gambas-user at lists.sourceforge.net >>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>> Subject: Re: [Gambas-user] reading files >>>>>> >>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>> >>>>>>> given this example >>>>>>>> >>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>> DIM binaryFile AS File >>>>>>>> DIM i AS Integer >>>>>>>> DIM b AS Byte >>>>>>>> DIM s AS Short >>>>>>>> DIM s1 AS String >>>>>>>> DIM s2 AS String >>>>>>>> ' Read binary file >>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>> READ #binaryFile, i >>>>>>>> READ #binaryFile, b >>>>>>>> READ #binaryFile, s >>>>>>>> READ #binaryFile, s1 >>>>>>>> READ #binaryFile, s2 >>>>>>>> CLOSE #binaryFile >>>>>>>> ' Display results >>>>>>>> PRINT i >>>>>>>> PRINT b >>>>>>>> PRINT s >>>>>>>> PRINT s1 >>>>>>>> PRINT s2 >>>>>>>> END >>>>>>>> >>>>>>>> >>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>> in one read ? >>>>>>>> >>>>>>>> You may have hinted at the solution within your question. Have you >>>>>>>> >>>>>>> considered >>>>>>> using a Structure? >>>>>>> >>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>> "... reads the stream Stream as binary data whose type is specified >>>>>>> by >>>>>>> the >>>>>>> Datatype argument." >>>>>>> >>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>> Byte, Short, >>>>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, any >>>>>>> Array, >>>>>>> Collection or structure." >>>>>>> >>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>> >>>>>>> -- >>>>>>> Lee >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------- End of Original Message ------- >>>>>> >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------- End of Original Message ------- >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tmorehen at ...3602... Wed Jul 19 14:34:04 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Wed, 19 Jul 2017 08:34:04 -0400 Subject: [Gambas-user] reading files In-Reply-To: <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> Message-ID: <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> I've attached an archive containing the code I use to read v1 and v2 MP3 tags and other MP3 info including bitrates (fixed and VBR), sampling rates and number of channels. v1 tags are pretty staightforward to read if you don't try to read the structure directly, but by each element of the structure at a time. Some tips: 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be read directly from the stream. ie (4 byte Integer) = Read #Stream As Integer. Gambas can handle little endian/big endian issues. 2) Fixed length strings must be handled in a two stage process. First, the required string length number of bytes is read into a byte array. This byte array is then converted to a string. Sample code: Dim Bytes As New Byte[StringLength] Bytes.Read(Stream) FixedString = Bytes.ToString() Note: Bytes.ToString stops the string conversion at the first null or at the end of the array. Therfore, you don't have to worry about null-terminated strings. v2 tags are more complicated, particularly since the tags can be ascii, either kind of utf16, or utf8 encoding. The code I sent has been tested with over 10,000 mp3 files has seems to have no issues. On 2017-07-19 12:33 AM, Shane wrote: > thank you Gian i did take a rest and read but alas it did not help > > as far as i see it he is saying don't use binary file for fixed length > strings > > but as this is an mp3 file tag witch i have no control i am doomed > > > > On 18/07/17 19:22, Gianluigi wrote: >> Why do not you take a moment of rest and read what Tobias Boege >> recommend >> me in the discussion [0] I told you here [1]? >> >> [0] >> http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html >> >> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >> >> 2017-07-18 9:04 GMT+02:00 Shane : >> >>> I am very confused from the docs >>> >>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>> >>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>> >>> so wouldn't it be_ >>> _ >>> >>> IDtag = read #hfile as ID3v1_TAG ? >>> >>> with doesn't work by the way >>> >>> >>> >>> On 18/07/17 12:44, nando_f at ...951... wrote: >>> >>>> I think >>>> Read #hfile, IDtag, ID3v1_TAG >>>> should be >>>> Read #hfile, IDtag as ID3v1_TAG >>>> >>>> >>>> -- >>>> Open WebMail Project (http://openwebmail.org) >>>> >>>> >>>> ---------- Original Message ----------- >>>> From: Shane >>>> To: gambas-user at lists.sourceforge.net >>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>> Subject: Re: [Gambas-user] reading files >>>> >>>> i don't know what i am doing wrong >>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>> Tag[3] As String 'always TAG >>>>> Title[30] As String 'title, 30 characters >>>>> Artist[30] As String 'artist, 30 characters >>>>> Album[30] As String 'album, 30 characters >>>>> Year[4] As String 'year, 4 characters >>>>> Comment[30] As String 'comment, 30 characters (or >>>>> 28 if >>>>> track# included) >>>>> Genre As Byte 'genre, 255 for none defined >>>>> End Struct >>>>> >>>>> Private Sub GetID3v1(File As String) >>>>> Dim IDtag As ID3v1_TAG >>>>> Dim hfile As File >>>>> >>>>> hfile = Open File For Read >>>>> >>>>> ' >>>>> 'read the tag >>>>> ' seek to end of less tag size >>>>> >>>>> Read #hfile, IDtag, ID3v1_TAG >>>>> >>>>> here i get IDtag is NULL >>>>> >>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>> >>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>> >>>>>> -Nando (Canada) >>>>>> >>>>>> >>>>>> >>>>>> ' top of class file >>>>>> Public Struct recstruc >>>>>> _a as integer >>>>>> _b as integer >>>>>> _c as integer >>>>>> end struct >>>>>> >>>>>> >>>>>> ' a function >>>>>> public function openAfile(filename as string) as file >>>>>> >>>>>> dim hfile as file >>>>>> dim arec as recstruc >>>>>> >>>>>> hfile = open filename for read write create >>>>>> >>>>>> with arec 'some values to write. >>>>>> ._a = 1 >>>>>> ._b = 22 >>>>>> ._c = 333 >>>>>> end with >>>>>> >>>>>> write #hfile, arec as recstruc >>>>>> >>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>> read #hfile, arec as recstruc >>>>>> >>>>>> close #hfile >>>>>> >>>>>> end >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Open WebMail Project (http://openwebmail.org) >>>>>> >>>>>> >>>>>> ---------- Original Message ----------- >>>>>> From: T Lee Davidson >>>>>> To: gambas-user at lists.sourceforge.net >>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>> Subject: Re: [Gambas-user] reading files >>>>>> >>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>> given this example >>>>>>>> >>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>> DIM binaryFile AS File >>>>>>>> DIM i AS Integer >>>>>>>> DIM b AS Byte >>>>>>>> DIM s AS Short >>>>>>>> DIM s1 AS String >>>>>>>> DIM s2 AS String >>>>>>>> ' Read binary file >>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>> READ #binaryFile, i >>>>>>>> READ #binaryFile, b >>>>>>>> READ #binaryFile, s >>>>>>>> READ #binaryFile, s1 >>>>>>>> READ #binaryFile, s2 >>>>>>>> CLOSE #binaryFile >>>>>>>> ' Display results >>>>>>>> PRINT i >>>>>>>> PRINT b >>>>>>>> PRINT s >>>>>>>> PRINT s1 >>>>>>>> PRINT s2 >>>>>>>> END >>>>>>>> >>>>>>>> >>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>> in one read ? >>>>>>>> >>>>>>>> You may have hinted at the solution within your question. Have you >>>>>>> considered >>>>>>> using a Structure? >>>>>>> >>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>> specified by >>>>>>> the >>>>>>> Datatype argument." >>>>>>> >>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>> Byte, Short, >>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>> Variant, any >>>>>>> Array, >>>>>>> Collection or structure." >>>>>>> >>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>> >>>>>>> -- >>>>>>> Lee >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>> ------- End of Original Message ------- >>>>>> >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> ------- End of Original Message ------- >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -------------- next part -------------- A non-text attachment was scrubbed... Name: Mp3Tag.tar.gz Type: application/gzip Size: 20831 bytes Desc: not available URL: From adrien.prokopowicz at ...626... Wed Jul 19 15:03:35 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Wed, 19 Jul 2017 15:03:35 +0200 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: Le Wed, 19 Jul 2017 12:15:43 +0200, PICCORO McKAY Lenz a ?crit: > 2017-07-19 6:11 GMT-04:00 PICCORO McKAY Lenz : > >> >>> And for the code, I just pushed it to a GitLab repository. You'll find >>> it >>> here : >>> https://gitlab.com/prokopyl/gambas-playground >> >> good made, better than the old-comlex svn.. thanks >> > i found seeds and some traces, but have private non-opensource > repositoryes > in both github and gilab, please be share/open > > does not gambas are open/free software for you ? give same back to > community .. thanks in advance! > The repository I linked was indeed private, that was not intended. It is now fixed, everyone should now be able to access it. Regards, -- Adrien Prokopowicz From mckaygerhard at ...626... Wed Jul 19 15:14:15 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 09:14:15 -0400 Subject: [Gambas-user] Gambas Playground In-Reply-To: References: <1500196300.29119.31.camel@...3609...> Message-ID: a docker to take more overall control to the env (also due to put a good necesary gambas env). good idea (and i not avocate to doker containers.. ) some js are minified make very dificult understand and study the code (special for those that are not experts) as i understand setup a minimal env/docker with gambas, the make a copy/instance of playground-runner and then that runner paly a server playground that server the web interface.. ? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-19 9:03 GMT-04:00 Adrien Prokopowicz : > Le Wed, 19 Jul 2017 12:15:43 +0200, PICCORO McKAY Lenz < > mckaygerhard at ...626...> a ?crit: > > 2017-07-19 6:11 GMT-04:00 PICCORO McKAY Lenz : >> >> >>> And for the code, I just pushed it to a GitLab repository. You'll find it >>>> here : >>>> https://gitlab.com/prokopyl/gambas-playground >>>> >>> >>> good made, better than the old-comlex svn.. thanks >>> >>> i found seeds and some traces, but have private non-opensource >> repositoryes >> in both github and gilab, please be share/open >> >> does not gambas are open/free software for you ? give same back to >> community .. thanks in advance! >> >> > The repository I linked was indeed private, that was not intended. > It is now fixed, everyone should now be able to access it. > > > Regards, > -- > Adrien Prokopowicz > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bugtracker at ...3416... Wed Jul 19 15:20:52 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 19 Jul 2017 13:20:52 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- C THAL reported a new bug. Summary ------- Message.Question should return -1 on cancel Type : Bug Priority : Medium Gambas version : 3.9.90 (TRUNK) Product : Language Description ----------- Message.Question returns 2 if the message window was closed or canceled via . That is bad, especially if there are two buttons and the action should not be default, but on button two, like so: Dim ret as integer ret = Message.Question("Do you really want to delete all?", "No", "Yes") -------------------------------------------------------------------------- If the user cancels or closes the window of the message it returns 2! All will be deleted ... From tmorehen at ...3602... Wed Jul 19 15:33:20 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Wed, 19 Jul 2017 09:33:20 -0400 Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel In-Reply-To: References: Message-ID: <598e9f5d-361e-9c73-5dc3-add6c7709f8d@...3602...> That is the documented behaviour: All Message functions can have up to three buttons: * The first button is always the default button. * The last button is always the cancel button. On 2017-07-19 09:20 AM, bugtracker at ...3416... wrote: > http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- > > C THAL reported a new bug. > > Summary > ------- > > Message.Question should return -1 on cancel > > Type : Bug > Priority : Medium > Gambas version : 3.9.90 (TRUNK) > Product : Language > > > Description > ----------- > > Message.Question returns 2 if the message window was closed or canceled via . > > That is bad, especially if there are two buttons and the action should not be default, but on button two, like so: > > Dim ret as integer > > ret = Message.Question("Do you really want to delete all?", "No", "Yes") > > -------------------------------------------------------------------------- > > If the user cancels or closes the window of the message it returns 2! All will be deleted ... > > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From bugtracker at ...3416... Wed Jul 19 15:42:37 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 19 Jul 2017 13:42:37 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- Comment #1 by PICCORO LENZ MCKAY: That is the documented behaviour: >All Message functions can have up to three buttons: > * The first button is always the default button. > * The last button is always the cancel button. http://gambaswiki.org/wiki/comp/gb.qt4/message and for tony, it must be answered in the bugtracker.. the nex time, i'll make now but take in consideration that the next time: PICCORO LENZ MCKAY changed the state of the bug to: Invalid. From sebikul at ...626... Wed Jul 19 17:01:21 2017 From: sebikul at ...626... (=?UTF-8?Q?Sebasti=C3=A1n_Kulesz?=) Date: Wed, 19 Jul 2017 17:01:21 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Hi Beno?t, I wanted to ask you what were the component changes since the last release. I am on an exchange in Germany and couldn't really follow the progress on this development cycle. Specifically, any added or removed components. And any changes of dependencies. With that information, and as soon as I have time, I will update the PPAs. Regards, Sebastian On Tue, Jul 18, 2017 at 5:56 PM, Beno?t Minisini via Gambas-user < gambas-user at lists.sourceforge.net> wrote: > Hi, > > I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: > > https://sourceforge.net/projects/gambas/files/gambas3/gambas > 3-3.10.0.tar.bz2/download > > Can people test it and report any problem before I make the release public? > > Thanks in advance! > > -- > Beno?t Minisini > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From herberthguzman at ...626... Wed Jul 19 18:10:14 2017 From: herberthguzman at ...626... (herberth guzman) Date: Wed, 19 Jul 2017 10:10:14 -0600 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 Message-ID: Regards Benoit In the menu New Project, the list of the types of applications that we want to create are shown, example: Application QT (Application using the component QT5 or QT4) Application GTK+ 3 (pplication using the component GTK+3) Application Web (Scrip CGI). It is possible to create a new one that says: "Web Form Application" (You can create Web Form) Herberth Guzman From mckaygerhard at ...626... Wed Jul 19 18:18:00 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 12:18:00 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: 2017-07-19 12:10 GMT-04:00 herberth guzman : > "Web Form Application" > (You can create Web Form) > ah right its missing of can at least choose/convert the cgi to a mix of cgi and form and let user removed manually if not want any of forms seems something of gtk2 are removed? i only can see gtk3 or i forget something in compliation!? > > > Herberth Guzman > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From herberthguzman at ...626... Wed Jul 19 18:35:35 2017 From: herberthguzman at ...626... (herberth guzman) Date: Wed, 19 Jul 2017 10:35:35 -0600 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 Message-ID: My system tray does not work with gb.qt5. I remember you had it run in revision # 7098 I know that KDE 5 dropped the support for the old system tray protocol. It is possible to temporarily run the system tray, please. Thanks Herberth Guzman From mckaygerhard at ...626... Wed Jul 19 18:40:29 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 12:40:29 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: 2017-07-19 12:35 GMT-04:00 herberth guzman : > I know that KDE 5 dropped the support for the old system tray protocol. > the gnome-puach also dropped some about it.. i think that this component must have a citation that oly works with normal desktops.. like lxde and mate.. openbox+fbpanel and lxde still use the old/today behaviour.. why follow those desktops that want to change everithig are working? > > It is possible to temporarily run the system tray, please. > > > Thanks > > > Herberth Guzman > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Wed Jul 19 22:19:43 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 19 Jul 2017 22:19:43 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: you need to use the gb.gui.trayicon component http://gambaswiki.org/wiki/comp/gb.gui.trayicon witch support all the protocols 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > 2017-07-19 12:35 GMT-04:00 herberth guzman : > >> I know that KDE 5 dropped the support for the old system tray protocol. >> > the gnome-puach also dropped some about it.. > > i think that this component must have a citation that oly works with normal > desktops.. like lxde and mate.. > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > those desktops that want to change everithig are working? > > >> >> It is possible to temporarily run the system tray, please. >> >> >> Thanks >> >> >> Herberth Guzman >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From mckaygerhard at ...626... Wed Jul 19 22:28:14 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Wed, 19 Jul 2017 16:28:14 -0400 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: i like it:! > but, alas, KDE and Ubuntu implementations are mutually incompatible! Well done guys totally right!!, that's why i dont like such stupid thing and changes.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-19 16:19 GMT-04:00 Fabien Bodard : > you need to use the gb.gui.trayicon component > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > witch support all the protocols > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > >> I know that KDE 5 dropped the support for the old system tray protocol. > >> > > the gnome-puach also dropped some about it.. > > > > i think that this component must have a citation that oly works with > normal > > desktops.. like lxde and mate.. > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > those desktops that want to change everithig are working? > > > > > >> > >> It is possible to temporarily run the system tray, please. > >> > >> > >> Thanks > >> > >> > >> Herberth Guzman > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Wed Jul 19 23:06:49 2017 From: bagonergi at ...626... (Gianluigi) Date: Wed, 19 Jul 2017 23:06:49 +0200 Subject: [Gambas-user] reading files In-Reply-To: <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> Message-ID: A very interesting work ? Regards Gianluigi 2017-07-19 14:34 GMT+02:00 Tony Morehen : > I've attached an archive containing the code I use to read v1 and v2 MP3 > tags and other MP3 info including bitrates (fixed and VBR), sampling rates > and number of channels. v1 tags are pretty staightforward to read if you > don't try to read the structure directly, but by each element of the > structure at a time. Some tips: > > 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be > read directly from the stream. ie (4 byte Integer) = Read #Stream As > Integer. Gambas can handle little endian/big endian issues. > > 2) Fixed length strings must be handled in a two stage process. First, the > required string length number of bytes is read into a byte array. This > byte array is then converted to a string. Sample code: > > Dim Bytes As New Byte[StringLength] > Bytes.Read(Stream) > FixedString = Bytes.ToString() > > Note: Bytes.ToString stops the string conversion at the first null or at > the end of the array. Therfore, you don't have to worry about > null-terminated strings. > > v2 tags are more complicated, particularly since the tags can be ascii, > either kind of utf16, or utf8 encoding. The code I sent has been tested > with over 10,000 mp3 files has seems to have no issues. > > > On 2017-07-19 12:33 AM, Shane wrote: > >> thank you Gian i did take a rest and read but alas it did not help >> >> as far as i see it he is saying don't use binary file for fixed length >> strings >> >> but as this is an mp3 file tag witch i have no control i am doomed >> >> >> >> On 18/07/17 19:22, Gianluigi wrote: >> >>> Why do not you take a moment of rest and read what Tobias Boege recommend >>> me in the discussion [0] I told you here [1]? >>> >>> [0] >>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>> xed-length-string-td50880.html >>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>> >>> 2017-07-18 9:04 GMT+02:00 Shane : >>> >>> I am very confused from the docs >>>> >>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>> >>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>> >>>> so wouldn't it be_ >>>> _ >>>> >>>> IDtag = read #hfile as ID3v1_TAG ? >>>> >>>> with doesn't work by the way >>>> >>>> >>>> >>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>> >>>> I think >>>>> Read #hfile, IDtag, ID3v1_TAG >>>>> should be >>>>> Read #hfile, IDtag as ID3v1_TAG >>>>> >>>>> >>>>> -- >>>>> Open WebMail Project (http://openwebmail.org) >>>>> >>>>> >>>>> ---------- Original Message ----------- >>>>> From: Shane >>>>> To: gambas-user at lists.sourceforge.net >>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>> Subject: Re: [Gambas-user] reading files >>>>> >>>>> i don't know what i am doing wrong >>>>> >>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>> Tag[3] As String 'always TAG >>>>>> Title[30] As String 'title, 30 characters >>>>>> Artist[30] As String 'artist, 30 characters >>>>>> Album[30] As String 'album, 30 characters >>>>>> Year[4] As String 'year, 4 characters >>>>>> Comment[30] As String 'comment, 30 characters (or 28 >>>>>> if >>>>>> track# included) >>>>>> Genre As Byte 'genre, 255 for none defined >>>>>> End Struct >>>>>> >>>>>> Private Sub GetID3v1(File As String) >>>>>> Dim IDtag As ID3v1_TAG >>>>>> Dim hfile As File >>>>>> >>>>>> hfile = Open File For Read >>>>>> >>>>>> ' >>>>>> 'read the tag >>>>>> ' seek to end of less tag size >>>>>> >>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>> >>>>>> here i get IDtag is NULL >>>>>> >>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>> >>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>> >>>>>>> -Nando (Canada) >>>>>>> >>>>>>> >>>>>>> >>>>>>> ' top of class file >>>>>>> Public Struct recstruc >>>>>>> _a as integer >>>>>>> _b as integer >>>>>>> _c as integer >>>>>>> end struct >>>>>>> >>>>>>> >>>>>>> ' a function >>>>>>> public function openAfile(filename as string) as file >>>>>>> >>>>>>> dim hfile as file >>>>>>> dim arec as recstruc >>>>>>> >>>>>>> hfile = open filename for read write create >>>>>>> >>>>>>> with arec 'some values to write. >>>>>>> ._a = 1 >>>>>>> ._b = 22 >>>>>>> ._c = 333 >>>>>>> end with >>>>>>> >>>>>>> write #hfile, arec as recstruc >>>>>>> >>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>> read #hfile, arec as recstruc >>>>>>> >>>>>>> close #hfile >>>>>>> >>>>>>> end >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>> >>>>>>> >>>>>>> ---------- Original Message ----------- >>>>>>> From: T Lee Davidson >>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>> >>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>> >>>>>>>> given this example >>>>>>>>> >>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>> DIM binaryFile AS File >>>>>>>>> DIM i AS Integer >>>>>>>>> DIM b AS Byte >>>>>>>>> DIM s AS Short >>>>>>>>> DIM s1 AS String >>>>>>>>> DIM s2 AS String >>>>>>>>> ' Read binary file >>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>> READ #binaryFile, i >>>>>>>>> READ #binaryFile, b >>>>>>>>> READ #binaryFile, s >>>>>>>>> READ #binaryFile, s1 >>>>>>>>> READ #binaryFile, s2 >>>>>>>>> CLOSE #binaryFile >>>>>>>>> ' Display results >>>>>>>>> PRINT i >>>>>>>>> PRINT b >>>>>>>>> PRINT s >>>>>>>>> PRINT s1 >>>>>>>>> PRINT s2 >>>>>>>>> END >>>>>>>>> >>>>>>>>> >>>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>>> in one read ? >>>>>>>>> >>>>>>>>> You may have hinted at the solution within your question. Have you >>>>>>>>> >>>>>>>> considered >>>>>>>> using a Structure? >>>>>>>> >>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>> "... reads the stream Stream as binary data whose type is specified >>>>>>>> by >>>>>>>> the >>>>>>>> Datatype argument." >>>>>>>> >>>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>>> Byte, Short, >>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, >>>>>>>> any >>>>>>>> Array, >>>>>>>> Collection or structure." >>>>>>>> >>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>> >>>>>>>> -- >>>>>>>> Lee >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------- End of Original Message ------- >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------- End of Original Message ------- >>>>> >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> ------------------------------------------------------------------------------ >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From bagonergi at ...626... Wed Jul 19 23:08:09 2017 From: bagonergi at ...626... (Gianluigi) Date: Wed, 19 Jul 2017 23:08:09 +0200 Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel In-Reply-To: <598e9f5d-361e-9c73-5dc3-add6c7709f8d@...3602...> References: <598e9f5d-361e-9c73-5dc3-add6c7709f8d@...3602...> Message-ID: Thal, you could take a look at this discussion [0] Regards Gianluigi [0] http://gambas.8142.n7.nabble.com/MessageBox-problem-td56154.html#a56231 2017-07-19 15:33 GMT+02:00 Tony Morehen : > That is the documented behaviour: > > All Message functions can have up to three buttons: > > * > > The first button is always the default button. > > * > > The last button is always the cancel button. > > > On 2017-07-19 09:20 AM, bugtracker at ...3416... wrote: > >> http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- >> >> C THAL reported a new bug. >> >> Summary >> ------- >> >> Message.Question should return -1 on cancel >> >> Type : Bug >> Priority : Medium >> Gambas version : 3.9.90 (TRUNK) >> Product : Language >> >> >> Description >> ----------- >> >> Message.Question returns 2 if the message window was closed or canceled >> via . >> >> That is bad, especially if there are two buttons and the action should >> not be default, but on button two, like so: >> >> Dim ret as integer >> >> ret = Message.Question("Do you really want to delete all?", "No", "Yes") >> >> ------------------------------------------------------------ >> -------------- >> >> If the user cancels or closes the window of the message it returns 2! All >> will be deleted ... >> >> >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Wed Jul 19 23:36:43 2017 From: bagonergi at ...626... (Gianluigi) Date: Wed, 19 Jul 2017 23:36:43 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Thank you Benoit, here it seems to work well. Regards Gianluigi [System] Gambas=3.10 OperatingSystem=Linux Kernel=4.4.0-83-generic Architecture=x86 Distribution=Ubuntu 16.04.2 LTS Desktop=XFCE Theme=Cleanlooks Language=it_IT.UTF-8 Memory=3018M 2017-07-18 17:56 GMT+02:00 Beno?t Minisini via Gambas-user < gambas-user at lists.sourceforge.net>: > Hi, > > I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: > > https://sourceforge.net/projects/gambas/files/gambas3/gambas > 3-3.10.0.tar.bz2/download > > Can people test it and report any problem before I make the release public? > > Thanks in advance! > > -- > Beno?t Minisini > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bugtracker at ...3416... Thu Jul 20 00:30:34 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Wed, 19 Jul 2017 22:30:34 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- Comment #2 by C THAL: Ok, thank you all. I did not see it because I just saw http://gambaswiki.org/wiki/comp/gb.form/message (linked from inside the IDE). From herberthguzman at ...626... Thu Jul 20 00:38:12 2017 From: herberthguzman at ...626... (herberth guzman) Date: Wed, 19 Jul 2017 16:38:12 -0600 Subject: [Gambas-user] Gambas-user Digest, Vol 134, Issue 54 In-Reply-To: References: Message-ID: > i like it:! > but, alas, KDE and Ubuntu implementations are mutually incompatible! Well done guys > totally right!!, that's why i dont like such stupid thing and changes.. > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > 2017-07-19 16:19 GMT-04:00 Fabien Bodard : > you need to use the gb.gui.trayicon component > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > witch support all the protocols Fabien I did what you suggested and it does not work for me. Show me the following message FMain.ArrangeTray.28: QXcbWindow: Unhandled client message: "_NET_WM_DESKTOP" QXcbWindow: Unhandled client message: "_KDE_WM_CHANGE_STATE" FMain.ArrangeTray.28: QXcbWindow: Unhandled client message: "_NET_SYSTEM_TRAY_OPCODE" > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > >> I know that KDE 5 dropped the support for the old system tray protocol. > >> > > the gnome-puach also dropped some about it.. > > > > i think that this component must have a citation that oly works with > normal > > desktops.. like lxde and mate.. > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > those desktops that want to change everithig are working? > > > > > >> > >> It is possible to temporarily run the system tray, please. > >> > >> > >> Thanks > >> > >> > >> Herberth Guzman > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard 2017-07-19 14:28 GMT-06:00 : > Send Gambas-user mailing list submissions to > gambas-user at lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/gambas-user > or, via email, send a message with subject or body 'help' to > gambas-user-request at lists.sourceforge.net > > You can reach the person managing the list at > gambas-user-owner at lists.sourceforge.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Gambas-user digest..." > > > Today's Topics: > > 1. Re: Pre-release of Gambas 3.10.0 (herberth guzman) > 2. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > 3. Re: Pre-release of Gambas 3.10.0 (herberth guzman) > 4. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > 5. Re: Pre-release of Gambas 3.10.0 (Fabien Bodard) > 6. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 19 Jul 2017 10:10:14 -0600 > From: herberth guzman > To: gambas-user > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > gmail.com> > Content-Type: text/plain; charset="UTF-8" > > Regards Benoit > > In the menu New Project, the list of the types of applications that we want > to create are shown, example: > > Application QT > (Application using the component QT5 or QT4) > > Application GTK+ 3 > (pplication using the component GTK+3) > > Application Web > (Scrip CGI). > > > It is possible to create a new one that says: > > "Web Form Application" > (You can create Web Form) > > > Herberth Guzman > > > ------------------------------ > > Message: 2 > Date: Wed, 19 Jul 2017 12:18:00 -0400 > From: PICCORO McKAY Lenz > To: mailing list for gambas users > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > T0xjg at ...627...> > Content-Type: text/plain; charset="UTF-8" > > 2017-07-19 12:10 GMT-04:00 herberth guzman : > > > "Web Form Application" > > (You can create Web Form) > > > ah right its missing of can at least choose/convert the cgi to a mix of cgi > and form and let user removed manually if not want any of forms > > seems something of gtk2 are removed? i only can see gtk3 or i forget > something in compliation!? > > > > > > > > Herberth Guzman > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------ > > Message: 3 > Date: Wed, 19 Jul 2017 10:35:35 -0600 > From: herberth guzman > To: gambas-user > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > My system tray does not work with gb.qt5. > I remember you had it run in revision # 7098 > > I know that KDE 5 dropped the support for the old system tray protocol. > > It is possible to temporarily run the system tray, please. > > > Thanks > > > Herberth Guzman > > > ------------------------------ > > Message: 4 > Date: Wed, 19 Jul 2017 12:40:29 -0400 > From: PICCORO McKAY Lenz > To: mailing list for gambas users > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > 8ej791M9CA at ...627...> > Content-Type: text/plain; charset="UTF-8" > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > I know that KDE 5 dropped the support for the old system tray protocol. > > > the gnome-puach also dropped some about it.. > > i think that this component must have a citation that oly works with normal > desktops.. like lxde and mate.. > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > those desktops that want to change everithig are working? > > > > > > It is possible to temporarily run the system tray, please. > > > > > > Thanks > > > > > > Herberth Guzman > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------ > > Message: 5 > Date: Wed, 19 Jul 2017 22:19:43 +0200 > From: Fabien Bodard > To: mailing list for gambas users > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > k-6pSGThuN8g at ...627...> > Content-Type: text/plain; charset="UTF-8" > > you need to use the gb.gui.trayicon component > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > witch support all the protocols > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > >> I know that KDE 5 dropped the support for the old system tray protocol. > >> > > the gnome-puach also dropped some about it.. > > > > i think that this component must have a citation that oly works with > normal > > desktops.. like lxde and mate.. > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > those desktops that want to change everithig are working? > > > > > >> > >> It is possible to temporarily run the system tray, please. > >> > >> > >> Thanks > >> > >> > >> Herberth Guzman > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard > > > > ------------------------------ > > Message: 6 > Date: Wed, 19 Jul 2017 16:28:14 -0400 > From: PICCORO McKAY Lenz > To: mailing list for gambas users > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > Message-ID: > GZZZqnSfBVcogAw at ...627...> > Content-Type: text/plain; charset="UTF-8" > > i like it:! > > > but, alas, KDE and Ubuntu implementations are mutually incompatible! Well > done guys > > totally right!!, that's why i dont like such stupid thing and changes.. > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-19 16:19 GMT-04:00 Fabien Bodard : > > > you need to use the gb.gui.trayicon component > > > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > > > witch support all the protocols > > > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > > > >> I know that KDE 5 dropped the support for the old system tray > protocol. > > >> > > > the gnome-puach also dropped some about it.. > > > > > > i think that this component must have a citation that oly works with > > normal > > > desktops.. like lxde and mate.. > > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > > those desktops that want to change everithig are working? > > > > > > > > >> > > >> It is possible to temporarily run the system tray, please. > > >> > > >> > > >> Thanks > > >> > > >> > > >> Herberth Guzman > > >> ------------------------------------------------------------ > > >> ------------------ > > >> Check out the vibrant tech community on one of the world's most > > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > >> _______________________________________________ > > >> Gambas-user mailing list > > >> Gambas-user at lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > >> > > > ------------------------------------------------------------ > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > -- > > Fabien Bodard > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------ > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------ > > End of Gambas-user Digest, Vol 134, Issue 54 > ******************************************** > From buster6seven at ...626... Thu Jul 20 03:15:55 2017 From: buster6seven at ...626... (Shane) Date: Thu, 20 Jul 2017 11:15:55 +1000 Subject: [Gambas-user] reading files In-Reply-To: <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> Message-ID: <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> thanks tony sounds like just what i needed i will take a look cheers On 19/07/17 22:34, Tony Morehen wrote: > I've attached an archive containing the code I use to read v1 and v2 > MP3 tags and other MP3 info including bitrates (fixed and VBR), > sampling rates and number of channels. v1 tags are pretty > staightforward to read if you don't try to read the structure > directly, but by each element of the structure at a time. Some tips: > > 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can > be read directly from the stream. ie (4 byte Integer) = Read #Stream > As Integer. Gambas can handle little endian/big endian issues. > > 2) Fixed length strings must be handled in a two stage process. First, > the required string length number of bytes is read into a byte array. > This byte array is then converted to a string. Sample code: > > Dim Bytes As New Byte[StringLength] > Bytes.Read(Stream) > FixedString = Bytes.ToString() > > Note: Bytes.ToString stops the string conversion at the first null or > at the end of the array. Therfore, you don't have to worry about > null-terminated strings. > > v2 tags are more complicated, particularly since the tags can be > ascii, either kind of utf16, or utf8 encoding. The code I sent has > been tested with over 10,000 mp3 files has seems to have no issues. > > > On 2017-07-19 12:33 AM, Shane wrote: >> thank you Gian i did take a rest and read but alas it did not help >> >> as far as i see it he is saying don't use binary file for fixed >> length strings >> >> but as this is an mp3 file tag witch i have no control i am doomed >> >> >> >> On 18/07/17 19:22, Gianluigi wrote: >>> Why do not you take a moment of rest and read what Tobias Boege >>> recommend >>> me in the discussion [0] I told you here [1]? >>> >>> [0] >>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html >>> >>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>> >>> 2017-07-18 9:04 GMT+02:00 Shane : >>> >>>> I am very confused from the docs >>>> >>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>> >>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>> >>>> so wouldn't it be_ >>>> _ >>>> >>>> IDtag = read #hfile as ID3v1_TAG ? >>>> >>>> with doesn't work by the way >>>> >>>> >>>> >>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>> >>>>> I think >>>>> Read #hfile, IDtag, ID3v1_TAG >>>>> should be >>>>> Read #hfile, IDtag as ID3v1_TAG >>>>> >>>>> >>>>> -- >>>>> Open WebMail Project (http://openwebmail.org) >>>>> >>>>> >>>>> ---------- Original Message ----------- >>>>> From: Shane >>>>> To: gambas-user at lists.sourceforge.net >>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>> Subject: Re: [Gambas-user] reading files >>>>> >>>>> i don't know what i am doing wrong >>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>> Tag[3] As String 'always TAG >>>>>> Title[30] As String 'title, 30 characters >>>>>> Artist[30] As String 'artist, 30 characters >>>>>> Album[30] As String 'album, 30 characters >>>>>> Year[4] As String 'year, 4 characters >>>>>> Comment[30] As String 'comment, 30 characters >>>>>> (or 28 if >>>>>> track# included) >>>>>> Genre As Byte 'genre, 255 for none defined >>>>>> End Struct >>>>>> >>>>>> Private Sub GetID3v1(File As String) >>>>>> Dim IDtag As ID3v1_TAG >>>>>> Dim hfile As File >>>>>> >>>>>> hfile = Open File For Read >>>>>> >>>>>> ' >>>>>> 'read the tag >>>>>> ' seek to end of less tag size >>>>>> >>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>> >>>>>> here i get IDtag is NULL >>>>>> >>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>> >>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>> >>>>>>> -Nando (Canada) >>>>>>> >>>>>>> >>>>>>> >>>>>>> ' top of class file >>>>>>> Public Struct recstruc >>>>>>> _a as integer >>>>>>> _b as integer >>>>>>> _c as integer >>>>>>> end struct >>>>>>> >>>>>>> >>>>>>> ' a function >>>>>>> public function openAfile(filename as string) as file >>>>>>> >>>>>>> dim hfile as file >>>>>>> dim arec as recstruc >>>>>>> >>>>>>> hfile = open filename for read write create >>>>>>> >>>>>>> with arec 'some values to write. >>>>>>> ._a = 1 >>>>>>> ._b = 22 >>>>>>> ._c = 333 >>>>>>> end with >>>>>>> >>>>>>> write #hfile, arec as recstruc >>>>>>> >>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>> read #hfile, arec as recstruc >>>>>>> >>>>>>> close #hfile >>>>>>> >>>>>>> end >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>> >>>>>>> >>>>>>> ---------- Original Message ----------- >>>>>>> From: T Lee Davidson >>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>> >>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>> given this example >>>>>>>>> >>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>> DIM binaryFile AS File >>>>>>>>> DIM i AS Integer >>>>>>>>> DIM b AS Byte >>>>>>>>> DIM s AS Short >>>>>>>>> DIM s1 AS String >>>>>>>>> DIM s2 AS String >>>>>>>>> ' Read binary file >>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>> READ #binaryFile, i >>>>>>>>> READ #binaryFile, b >>>>>>>>> READ #binaryFile, s >>>>>>>>> READ #binaryFile, s1 >>>>>>>>> READ #binaryFile, s2 >>>>>>>>> CLOSE #binaryFile >>>>>>>>> ' Display results >>>>>>>>> PRINT i >>>>>>>>> PRINT b >>>>>>>>> PRINT s >>>>>>>>> PRINT s1 >>>>>>>>> PRINT s2 >>>>>>>>> END >>>>>>>>> >>>>>>>>> >>>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>>> in one read ? >>>>>>>>> >>>>>>>>> You may have hinted at the solution within your question. Have >>>>>>>>> you >>>>>>>> considered >>>>>>>> using a Structure? >>>>>>>> >>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>> specified by >>>>>>>> the >>>>>>>> Datatype argument." >>>>>>>> >>>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>>> Byte, Short, >>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>> Variant, any >>>>>>>> Array, >>>>>>>> Collection or structure." >>>>>>>> >>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>> >>>>>>>> -- >>>>>>>> Lee >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>> ------- End of Original Message ------- >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>> ------- End of Original Message ------- >>>>> >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> ------------------------------------------------------------------------------ >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From bagonergi at ...626... Thu Jul 20 11:56:56 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 20 Jul 2017 11:56:56 +0200 Subject: [Gambas-user] reading files In-Reply-To: <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> Message-ID: Right ... and a look here too [0] Ciao :) Gianluigi [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793 2017-07-20 3:15 GMT+02:00 Shane : > thanks tony sounds like just what i needed i will take a look > > cheers > > > > On 19/07/17 22:34, Tony Morehen wrote: > >> I've attached an archive containing the code I use to read v1 and v2 MP3 >> tags and other MP3 info including bitrates (fixed and VBR), sampling rates >> and number of channels. v1 tags are pretty staightforward to read if you >> don't try to read the structure directly, but by each element of the >> structure at a time. Some tips: >> >> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be >> read directly from the stream. ie (4 byte Integer) = Read #Stream As >> Integer. Gambas can handle little endian/big endian issues. >> >> 2) Fixed length strings must be handled in a two stage process. First, >> the required string length number of bytes is read into a byte array. This >> byte array is then converted to a string. Sample code: >> >> Dim Bytes As New Byte[StringLength] >> Bytes.Read(Stream) >> FixedString = Bytes.ToString() >> >> Note: Bytes.ToString stops the string conversion at the first null or at >> the end of the array. Therfore, you don't have to worry about >> null-terminated strings. >> >> v2 tags are more complicated, particularly since the tags can be ascii, >> either kind of utf16, or utf8 encoding. The code I sent has been tested >> with over 10,000 mp3 files has seems to have no issues. >> >> >> On 2017-07-19 12:33 AM, Shane wrote: >> >>> thank you Gian i did take a rest and read but alas it did not help >>> >>> as far as i see it he is saying don't use binary file for fixed length >>> strings >>> >>> but as this is an mp3 file tag witch i have no control i am doomed >>> >>> >>> >>> On 18/07/17 19:22, Gianluigi wrote: >>> >>>> Why do not you take a moment of rest and read what Tobias Boege >>>> recommend >>>> me in the discussion [0] I told you here [1]? >>>> >>>> [0] >>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>> xed-length-string-td50880.html >>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>> >>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>> >>>> I am very confused from the docs >>>>> >>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>> >>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>> >>>>> so wouldn't it be_ >>>>> _ >>>>> >>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>> >>>>> with doesn't work by the way >>>>> >>>>> >>>>> >>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>> >>>>> I think >>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>> should be >>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>> >>>>>> >>>>>> -- >>>>>> Open WebMail Project (http://openwebmail.org) >>>>>> >>>>>> >>>>>> ---------- Original Message ----------- >>>>>> From: Shane >>>>>> To: gambas-user at lists.sourceforge.net >>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>> Subject: Re: [Gambas-user] reading files >>>>>> >>>>>> i don't know what i am doing wrong >>>>>> >>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>> Tag[3] As String 'always TAG >>>>>>> Title[30] As String 'title, 30 characters >>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>> Album[30] As String 'album, 30 characters >>>>>>> Year[4] As String 'year, 4 characters >>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>> 28 if >>>>>>> track# included) >>>>>>> Genre As Byte 'genre, 255 for none defined >>>>>>> End Struct >>>>>>> >>>>>>> Private Sub GetID3v1(File As String) >>>>>>> Dim IDtag As ID3v1_TAG >>>>>>> Dim hfile As File >>>>>>> >>>>>>> hfile = Open File For Read >>>>>>> >>>>>>> ' >>>>>>> 'read the tag >>>>>>> ' seek to end of less tag size >>>>>>> >>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>> >>>>>>> here i get IDtag is NULL >>>>>>> >>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>> >>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>> >>>>>>>> -Nando (Canada) >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ' top of class file >>>>>>>> Public Struct recstruc >>>>>>>> _a as integer >>>>>>>> _b as integer >>>>>>>> _c as integer >>>>>>>> end struct >>>>>>>> >>>>>>>> >>>>>>>> ' a function >>>>>>>> public function openAfile(filename as string) as file >>>>>>>> >>>>>>>> dim hfile as file >>>>>>>> dim arec as recstruc >>>>>>>> >>>>>>>> hfile = open filename for read write create >>>>>>>> >>>>>>>> with arec 'some values to write. >>>>>>>> ._a = 1 >>>>>>>> ._b = 22 >>>>>>>> ._c = 333 >>>>>>>> end with >>>>>>>> >>>>>>>> write #hfile, arec as recstruc >>>>>>>> >>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>> read #hfile, arec as recstruc >>>>>>>> >>>>>>>> close #hfile >>>>>>>> >>>>>>>> end >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>> >>>>>>>> >>>>>>>> ---------- Original Message ----------- >>>>>>>> From: T Lee Davidson >>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>> >>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>> >>>>>>>>> given this example >>>>>>>>>> >>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>> DIM binaryFile AS File >>>>>>>>>> DIM i AS Integer >>>>>>>>>> DIM b AS Byte >>>>>>>>>> DIM s AS Short >>>>>>>>>> DIM s1 AS String >>>>>>>>>> DIM s2 AS String >>>>>>>>>> ' Read binary file >>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>> READ #binaryFile, i >>>>>>>>>> READ #binaryFile, b >>>>>>>>>> READ #binaryFile, s >>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>> CLOSE #binaryFile >>>>>>>>>> ' Display results >>>>>>>>>> PRINT i >>>>>>>>>> PRINT b >>>>>>>>>> PRINT s >>>>>>>>>> PRINT s1 >>>>>>>>>> PRINT s2 >>>>>>>>>> END >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>>>> in one read ? >>>>>>>>>> >>>>>>>>>> You may have hinted at the solution within your question. Have you >>>>>>>>>> >>>>>>>>> considered >>>>>>>>> using a Structure? >>>>>>>>> >>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>> specified by >>>>>>>>> the >>>>>>>>> Datatype argument." >>>>>>>>> >>>>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>>>> Byte, Short, >>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, >>>>>>>>> any >>>>>>>>> Array, >>>>>>>>> Collection or structure." >>>>>>>>> >>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Lee >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> ------------------ >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> ------- End of Original Message ------- >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------- End of Original Message ------- >>>>>> >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------------------------------------------------------------------------------ >>>> >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From buster6seven at ...626... Thu Jul 20 12:09:56 2017 From: buster6seven at ...626... (Shane) Date: Thu, 20 Jul 2017 20:09:56 +1000 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> Message-ID: yep can't use structs have to do like tony's code works perfect thanks again tony p.s is this your code ? On 20/07/17 19:56, Gianluigi wrote: > Right ... and a look here too [0] > > Ciao :) > Gianluigi > > [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793 > > 2017-07-20 3:15 GMT+02:00 Shane : > >> thanks tony sounds like just what i needed i will take a look >> >> cheers >> >> >> >> On 19/07/17 22:34, Tony Morehen wrote: >> >>> I've attached an archive containing the code I use to read v1 and v2 MP3 >>> tags and other MP3 info including bitrates (fixed and VBR), sampling rates >>> and number of channels. v1 tags are pretty staightforward to read if you >>> don't try to read the structure directly, but by each element of the >>> structure at a time. Some tips: >>> >>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be >>> read directly from the stream. ie (4 byte Integer) = Read #Stream As >>> Integer. Gambas can handle little endian/big endian issues. >>> >>> 2) Fixed length strings must be handled in a two stage process. First, >>> the required string length number of bytes is read into a byte array. This >>> byte array is then converted to a string. Sample code: >>> >>> Dim Bytes As New Byte[StringLength] >>> Bytes.Read(Stream) >>> FixedString = Bytes.ToString() >>> >>> Note: Bytes.ToString stops the string conversion at the first null or at >>> the end of the array. Therfore, you don't have to worry about >>> null-terminated strings. >>> >>> v2 tags are more complicated, particularly since the tags can be ascii, >>> either kind of utf16, or utf8 encoding. The code I sent has been tested >>> with over 10,000 mp3 files has seems to have no issues. >>> >>> >>> On 2017-07-19 12:33 AM, Shane wrote: >>> >>>> thank you Gian i did take a rest and read but alas it did not help >>>> >>>> as far as i see it he is saying don't use binary file for fixed length >>>> strings >>>> >>>> but as this is an mp3 file tag witch i have no control i am doomed >>>> >>>> >>>> >>>> On 18/07/17 19:22, Gianluigi wrote: >>>> >>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>> recommend >>>>> me in the discussion [0] I told you here [1]? >>>>> >>>>> [0] >>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>> xed-length-string-td50880.html >>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>> >>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>> >>>>> I am very confused from the docs >>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>> >>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>> >>>>>> so wouldn't it be_ >>>>>> _ >>>>>> >>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>> >>>>>> with doesn't work by the way >>>>>> >>>>>> >>>>>> >>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>> >>>>>> I think >>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>> should be >>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>> >>>>>>> >>>>>>> ---------- Original Message ----------- >>>>>>> From: Shane >>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>> >>>>>>> i don't know what i am doing wrong >>>>>>> >>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>> Tag[3] As String 'always TAG >>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>> 28 if >>>>>>>> track# included) >>>>>>>> Genre As Byte 'genre, 255 for none defined >>>>>>>> End Struct >>>>>>>> >>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>> Dim hfile As File >>>>>>>> >>>>>>>> hfile = Open File For Read >>>>>>>> >>>>>>>> ' >>>>>>>> 'read the tag >>>>>>>> ' seek to end of less tag size >>>>>>>> >>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>> >>>>>>>> here i get IDtag is NULL >>>>>>>> >>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>> >>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>> -Nando (Canada) >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ' top of class file >>>>>>>>> Public Struct recstruc >>>>>>>>> _a as integer >>>>>>>>> _b as integer >>>>>>>>> _c as integer >>>>>>>>> end struct >>>>>>>>> >>>>>>>>> >>>>>>>>> ' a function >>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>> >>>>>>>>> dim hfile as file >>>>>>>>> dim arec as recstruc >>>>>>>>> >>>>>>>>> hfile = open filename for read write create >>>>>>>>> >>>>>>>>> with arec 'some values to write. >>>>>>>>> ._a = 1 >>>>>>>>> ._b = 22 >>>>>>>>> ._c = 333 >>>>>>>>> end with >>>>>>>>> >>>>>>>>> write #hfile, arec as recstruc >>>>>>>>> >>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>> read #hfile, arec as recstruc >>>>>>>>> >>>>>>>>> close #hfile >>>>>>>>> >>>>>>>>> end >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------- Original Message ----------- >>>>>>>>> From: T Lee Davidson >>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>> >>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>> >>>>>>>>>> given this example >>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>> DIM i AS Integer >>>>>>>>>>> DIM b AS Byte >>>>>>>>>>> DIM s AS Short >>>>>>>>>>> DIM s1 AS String >>>>>>>>>>> DIM s2 AS String >>>>>>>>>>> ' Read binary file >>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>> ' Display results >>>>>>>>>>> PRINT i >>>>>>>>>>> PRINT b >>>>>>>>>>> PRINT s >>>>>>>>>>> PRINT s1 >>>>>>>>>>> PRINT s2 >>>>>>>>>>> END >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> is there a way for gambas to read a struct of all these variables >>>>>>>>>>> in one read ? >>>>>>>>>>> >>>>>>>>>>> You may have hinted at the solution within your question. Have you >>>>>>>>>>> >>>>>>>>>> considered >>>>>>>>>> using a Structure? >>>>>>>>>> >>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>> specified by >>>>>>>>>> the >>>>>>>>>> Datatype argument." >>>>>>>>>> >>>>>>>>>> "The returned datatype can be one of the following: NULL, Boolean, >>>>>>>>>> Byte, Short, >>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, Variant, >>>>>>>>>> any >>>>>>>>>> Array, >>>>>>>>>> Collection or structure." >>>>>>>>>> >>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Lee >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> ------------------ >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> ------- End of Original Message ------- >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> ------------------ >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------- End of Original Message ------- >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> >>> >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From bagonergi at ...626... Thu Jul 20 13:04:46 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 20 Jul 2017 13:04:46 +0200 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> Message-ID: 2017-07-20 12:09 GMT+02:00 Shane : > yep can't use structs have to do like tony's code works perfect thanks > again tony > mmmmh are you sure? > > p.s is this your code ? > No, but you can easily see who wrote it :) > > > > On 20/07/17 19:56, Gianluigi wrote: > >> Right ... and a look here too [0] >> >> Ciao :) >> Gianluigi >> >> [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793 >> >> 2017-07-20 3:15 GMT+02:00 Shane : >> >> thanks tony sounds like just what i needed i will take a look >>> >>> cheers >>> >>> >>> >>> On 19/07/17 22:34, Tony Morehen wrote: >>> >>> I've attached an archive containing the code I use to read v1 and v2 MP3 >>>> tags and other MP3 info including bitrates (fixed and VBR), sampling >>>> rates >>>> and number of channels. v1 tags are pretty staightforward to read if >>>> you >>>> don't try to read the structure directly, but by each element of the >>>> structure at a time. Some tips: >>>> >>>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be >>>> read directly from the stream. ie (4 byte Integer) = Read #Stream As >>>> Integer. Gambas can handle little endian/big endian issues. >>>> >>>> 2) Fixed length strings must be handled in a two stage process. First, >>>> the required string length number of bytes is read into a byte array. >>>> This >>>> byte array is then converted to a string. Sample code: >>>> >>>> Dim Bytes As New Byte[StringLength] >>>> Bytes.Read(Stream) >>>> FixedString = Bytes.ToString() >>>> >>>> Note: Bytes.ToString stops the string conversion at the first null or at >>>> the end of the array. Therfore, you don't have to worry about >>>> null-terminated strings. >>>> >>>> v2 tags are more complicated, particularly since the tags can be ascii, >>>> either kind of utf16, or utf8 encoding. The code I sent has been tested >>>> with over 10,000 mp3 files has seems to have no issues. >>>> >>>> >>>> On 2017-07-19 12:33 AM, Shane wrote: >>>> >>>> thank you Gian i did take a rest and read but alas it did not help >>>>> >>>>> as far as i see it he is saying don't use binary file for fixed length >>>>> strings >>>>> >>>>> but as this is an mp3 file tag witch i have no control i am doomed >>>>> >>>>> >>>>> >>>>> On 18/07/17 19:22, Gianluigi wrote: >>>>> >>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>>> recommend >>>>>> me in the discussion [0] I told you here [1]? >>>>>> >>>>>> [0] >>>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>>> xed-length-string-td50880.html >>>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>>> >>>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>>> >>>>>> I am very confused from the docs >>>>>> >>>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>>> >>>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>>> >>>>>>> so wouldn't it be_ >>>>>>> _ >>>>>>> >>>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>>> >>>>>>> with doesn't work by the way >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>>> >>>>>>> I think >>>>>>> >>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>> should be >>>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>> >>>>>>>> >>>>>>>> ---------- Original Message ----------- >>>>>>>> From: Shane >>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>> >>>>>>>> i don't know what i am doing wrong >>>>>>>> >>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>>> Tag[3] As String 'always TAG >>>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>>> 28 if >>>>>>>>> track# included) >>>>>>>>> Genre As Byte 'genre, 255 for none >>>>>>>>> defined >>>>>>>>> End Struct >>>>>>>>> >>>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>>> Dim hfile As File >>>>>>>>> >>>>>>>>> hfile = Open File For Read >>>>>>>>> >>>>>>>>> ' >>>>>>>>> 'read the tag >>>>>>>>> ' seek to end of less tag size >>>>>>>>> >>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>> >>>>>>>>> here i get IDtag is NULL >>>>>>>>> >>>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>>> >>>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>> >>>>>>>>>> -Nando (Canada) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ' top of class file >>>>>>>>>> Public Struct recstruc >>>>>>>>>> _a as integer >>>>>>>>>> _b as integer >>>>>>>>>> _c as integer >>>>>>>>>> end struct >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ' a function >>>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>>> >>>>>>>>>> dim hfile as file >>>>>>>>>> dim arec as recstruc >>>>>>>>>> >>>>>>>>>> hfile = open filename for read write create >>>>>>>>>> >>>>>>>>>> with arec 'some values to write. >>>>>>>>>> ._a = 1 >>>>>>>>>> ._b = 22 >>>>>>>>>> ._c = 333 >>>>>>>>>> end with >>>>>>>>>> >>>>>>>>>> write #hfile, arec as recstruc >>>>>>>>>> >>>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>>> read #hfile, arec as recstruc >>>>>>>>>> >>>>>>>>>> close #hfile >>>>>>>>>> >>>>>>>>>> end >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>> From: T Lee Davidson >>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>> >>>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>>> >>>>>>>>>> given this example >>>>>>>>>>> >>>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>>> DIM i AS Integer >>>>>>>>>>>> DIM b AS Byte >>>>>>>>>>>> DIM s AS Short >>>>>>>>>>>> DIM s1 AS String >>>>>>>>>>>> DIM s2 AS String >>>>>>>>>>>> ' Read binary file >>>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>>> ' Display results >>>>>>>>>>>> PRINT i >>>>>>>>>>>> PRINT b >>>>>>>>>>>> PRINT s >>>>>>>>>>>> PRINT s1 >>>>>>>>>>>> PRINT s2 >>>>>>>>>>>> END >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> is there a way for gambas to read a struct of all these >>>>>>>>>>>> variables >>>>>>>>>>>> in one read ? >>>>>>>>>>>> >>>>>>>>>>>> You may have hinted at the solution within your question. Have >>>>>>>>>>>> you >>>>>>>>>>>> >>>>>>>>>>>> considered >>>>>>>>>>> using a Structure? >>>>>>>>>>> >>>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>>> specified by >>>>>>>>>>> the >>>>>>>>>>> Datatype argument." >>>>>>>>>>> >>>>>>>>>>> "The returned datatype can be one of the following: NULL, >>>>>>>>>>> Boolean, >>>>>>>>>>> Byte, Short, >>>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>>>>> Variant, >>>>>>>>>>> any >>>>>>>>>>> Array, >>>>>>>>>>> Collection or structure." >>>>>>>>>>> >>>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Lee >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> ------------------ >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>> >>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> ------------------ >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> ------------------ >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> ------- End of Original Message ------- >>>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> >>>> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From buster6seven at ...626... Thu Jul 20 13:16:22 2017 From: buster6seven at ...626... (Shane) Date: Thu, 20 Jul 2017 21:16:22 +1000 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> Message-ID: <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> with the code i was trying to adapt you can't i was getting strange values eg. a struct size of 208 when it was meant to be 128 and for some strange reason get end of file when seeking to eof less header even if i backed up more than the 208 bytes i can see that tony didn't right it i should of said did he convert it to gambas ? i think this should be in the farm ? On 20/07/17 21:04, Gianluigi wrote: > 2017-07-20 12:09 GMT+02:00 Shane : > >> yep can't use structs have to do like tony's code works perfect thanks >> again tony >> > mmmmh are you sure? > > >> p.s is this your code ? >> > No, but you can easily see who wrote it :) > > >> >> >> On 20/07/17 19:56, Gianluigi wrote: >> >>> Right ... and a look here too [0] >>> >>> Ciao :) >>> Gianluigi >>> >>> [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793 >>> >>> 2017-07-20 3:15 GMT+02:00 Shane : >>> >>> thanks tony sounds like just what i needed i will take a look >>>> cheers >>>> >>>> >>>> >>>> On 19/07/17 22:34, Tony Morehen wrote: >>>> >>>> I've attached an archive containing the code I use to read v1 and v2 MP3 >>>>> tags and other MP3 info including bitrates (fixed and VBR), sampling >>>>> rates >>>>> and number of channels. v1 tags are pretty staightforward to read if >>>>> you >>>>> don't try to read the structure directly, but by each element of the >>>>> structure at a time. Some tips: >>>>> >>>>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be >>>>> read directly from the stream. ie (4 byte Integer) = Read #Stream As >>>>> Integer. Gambas can handle little endian/big endian issues. >>>>> >>>>> 2) Fixed length strings must be handled in a two stage process. First, >>>>> the required string length number of bytes is read into a byte array. >>>>> This >>>>> byte array is then converted to a string. Sample code: >>>>> >>>>> Dim Bytes As New Byte[StringLength] >>>>> Bytes.Read(Stream) >>>>> FixedString = Bytes.ToString() >>>>> >>>>> Note: Bytes.ToString stops the string conversion at the first null or at >>>>> the end of the array. Therfore, you don't have to worry about >>>>> null-terminated strings. >>>>> >>>>> v2 tags are more complicated, particularly since the tags can be ascii, >>>>> either kind of utf16, or utf8 encoding. The code I sent has been tested >>>>> with over 10,000 mp3 files has seems to have no issues. >>>>> >>>>> >>>>> On 2017-07-19 12:33 AM, Shane wrote: >>>>> >>>>> thank you Gian i did take a rest and read but alas it did not help >>>>>> as far as i see it he is saying don't use binary file for fixed length >>>>>> strings >>>>>> >>>>>> but as this is an mp3 file tag witch i have no control i am doomed >>>>>> >>>>>> >>>>>> >>>>>> On 18/07/17 19:22, Gianluigi wrote: >>>>>> >>>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>>>> recommend >>>>>>> me in the discussion [0] I told you here [1]? >>>>>>> >>>>>>> [0] >>>>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>>>> xed-length-string-td50880.html >>>>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>>>> >>>>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>>>> >>>>>>> I am very confused from the docs >>>>>>> >>>>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>>>> >>>>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>>>> >>>>>>>> so wouldn't it be_ >>>>>>>> _ >>>>>>>> >>>>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>>>> >>>>>>>> with doesn't work by the way >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>>>> >>>>>>>> I think >>>>>>>> >>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>> should be >>>>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------- Original Message ----------- >>>>>>>>> From: Shane >>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>> >>>>>>>>> i don't know what i am doing wrong >>>>>>>>> >>>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>>>> Tag[3] As String 'always TAG >>>>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>>>> 28 if >>>>>>>>>> track# included) >>>>>>>>>> Genre As Byte 'genre, 255 for none >>>>>>>>>> defined >>>>>>>>>> End Struct >>>>>>>>>> >>>>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>>>> Dim hfile As File >>>>>>>>>> >>>>>>>>>> hfile = Open File For Read >>>>>>>>>> >>>>>>>>>> ' >>>>>>>>>> 'read the tag >>>>>>>>>> ' seek to end of less tag size >>>>>>>>>> >>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>> >>>>>>>>>> here i get IDtag is NULL >>>>>>>>>> >>>>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>>>> >>>>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>>> >>>>>>>>>>> -Nando (Canada) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ' top of class file >>>>>>>>>>> Public Struct recstruc >>>>>>>>>>> _a as integer >>>>>>>>>>> _b as integer >>>>>>>>>>> _c as integer >>>>>>>>>>> end struct >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ' a function >>>>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>>>> >>>>>>>>>>> dim hfile as file >>>>>>>>>>> dim arec as recstruc >>>>>>>>>>> >>>>>>>>>>> hfile = open filename for read write create >>>>>>>>>>> >>>>>>>>>>> with arec 'some values to write. >>>>>>>>>>> ._a = 1 >>>>>>>>>>> ._b = 22 >>>>>>>>>>> ._c = 333 >>>>>>>>>>> end with >>>>>>>>>>> >>>>>>>>>>> write #hfile, arec as recstruc >>>>>>>>>>> >>>>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>>>> read #hfile, arec as recstruc >>>>>>>>>>> >>>>>>>>>>> close #hfile >>>>>>>>>>> >>>>>>>>>>> end >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>> From: T Lee Davidson >>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>> >>>>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>>>> >>>>>>>>>>> given this example >>>>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>>>> DIM i AS Integer >>>>>>>>>>>>> DIM b AS Byte >>>>>>>>>>>>> DIM s AS Short >>>>>>>>>>>>> DIM s1 AS String >>>>>>>>>>>>> DIM s2 AS String >>>>>>>>>>>>> ' Read binary file >>>>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>>>> ' Display results >>>>>>>>>>>>> PRINT i >>>>>>>>>>>>> PRINT b >>>>>>>>>>>>> PRINT s >>>>>>>>>>>>> PRINT s1 >>>>>>>>>>>>> PRINT s2 >>>>>>>>>>>>> END >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> is there a way for gambas to read a struct of all these >>>>>>>>>>>>> variables >>>>>>>>>>>>> in one read ? >>>>>>>>>>>>> >>>>>>>>>>>>> You may have hinted at the solution within your question. Have >>>>>>>>>>>>> you >>>>>>>>>>>>> >>>>>>>>>>>>> considered >>>>>>>>>>>> using a Structure? >>>>>>>>>>>> >>>>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>>>> specified by >>>>>>>>>>>> the >>>>>>>>>>>> Datatype argument." >>>>>>>>>>>> >>>>>>>>>>>> "The returned datatype can be one of the following: NULL, >>>>>>>>>>>> Boolean, >>>>>>>>>>>> Byte, Short, >>>>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>>>>>> Variant, >>>>>>>>>>>> any >>>>>>>>>>>> Array, >>>>>>>>>>>> Collection or structure." >>>>>>>>>>>> >>>>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Lee >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>> ------------------ >>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>> >>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> ------------------ >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>> ------------------ >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> ------------------ >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> >>>>> >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From rwe-sse at ...3629... Thu Jul 20 15:35:39 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Thu, 20 Jul 2017 15:35:39 +0200 Subject: [Gambas-user] New Gambas on Suse Message-ID: <4f959d13-4d98-8219-e961-afee1ff18a65@...3629...> Hi folks, Now that the next version of Gambas is en route, I wonder whether it will come on Suse Leap 42.2 automatically, as there are lots of updates to Gambas each time I update the system. Or will I have to compile myself, as I was used to do on my older systems? Thank you for your insight! Regards Rolf From tmorehen at ...3602... Thu Jul 20 15:35:40 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 20 Jul 2017 09:35:40 -0400 Subject: [Gambas-user] reading files In-Reply-To: <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> Message-ID: It is my code. It started off life as part of a cd ripper program I wrote in 2010 in vb6. It was inspired by code provided by Steve McMahon (steve at ...3671...) under an Apache style licence. The code has since been heavily rewritten, translated to vb.net and finally translated to gambas. On 2017-07-20 07:16 AM, Shane wrote: > with the code i was trying to adapt you can't > > i was getting strange values eg. > > a struct size of 208 when it was meant to be 128 and for some strange > reason get end of file > > when seeking to eof less header even if i backed up more than the 208 > bytes > > i can see that tony didn't right it i should of said did he convert it > to gambas ? > > i think this should be in the farm ? > > > > > On 20/07/17 21:04, Gianluigi wrote: >> 2017-07-20 12:09 GMT+02:00 Shane : >> >>> yep can't use structs have to do like tony's code works perfect thanks >>> again tony >>> >> mmmmh are you sure? >> >> >>> p.s is this your code ? >>> >> No, but you can easily see who wrote it :) >> >> >>> >>> >>> On 20/07/17 19:56, Gianluigi wrote: >>> >>>> Right ... and a look here too [0] >>>> >>>> Ciao :) >>>> Gianluigi >>>> >>>> [0] >>>> http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793 >>>> >>>> 2017-07-20 3:15 GMT+02:00 Shane : >>>> >>>> thanks tony sounds like just what i needed i will take a look >>>>> cheers >>>>> >>>>> >>>>> >>>>> On 19/07/17 22:34, Tony Morehen wrote: >>>>> >>>>> I've attached an archive containing the code I use to read v1 and >>>>> v2 MP3 >>>>>> tags and other MP3 info including bitrates (fixed and VBR), sampling >>>>>> rates >>>>>> and number of channels. v1 tags are pretty staightforward to >>>>>> read if >>>>>> you >>>>>> don't try to read the structure directly, but by each element of the >>>>>> structure at a time. Some tips: >>>>>> >>>>>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) >>>>>> can be >>>>>> read directly from the stream. ie (4 byte Integer) = Read >>>>>> #Stream As >>>>>> Integer. Gambas can handle little endian/big endian issues. >>>>>> >>>>>> 2) Fixed length strings must be handled in a two stage process. >>>>>> First, >>>>>> the required string length number of bytes is read into a byte >>>>>> array. >>>>>> This >>>>>> byte array is then converted to a string. Sample code: >>>>>> >>>>>> Dim Bytes As New Byte[StringLength] >>>>>> Bytes.Read(Stream) >>>>>> FixedString = Bytes.ToString() >>>>>> >>>>>> Note: Bytes.ToString stops the string conversion at the first >>>>>> null or at >>>>>> the end of the array. Therfore, you don't have to worry about >>>>>> null-terminated strings. >>>>>> >>>>>> v2 tags are more complicated, particularly since the tags can be >>>>>> ascii, >>>>>> either kind of utf16, or utf8 encoding. The code I sent has been >>>>>> tested >>>>>> with over 10,000 mp3 files has seems to have no issues. >>>>>> >>>>>> >>>>>> On 2017-07-19 12:33 AM, Shane wrote: >>>>>> >>>>>> thank you Gian i did take a rest and read but alas it did not help >>>>>>> as far as i see it he is saying don't use binary file for fixed >>>>>>> length >>>>>>> strings >>>>>>> >>>>>>> but as this is an mp3 file tag witch i have no control i am doomed >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 18/07/17 19:22, Gianluigi wrote: >>>>>>> >>>>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>>>>> recommend >>>>>>>> me in the discussion [0] I told you here [1]? >>>>>>>> >>>>>>>> [0] >>>>>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>>>>> xed-length-string-td50880.html >>>>>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>>>>> >>>>>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>>>>> >>>>>>>> I am very confused from the docs >>>>>>>> >>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>>>>> >>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>>>>> >>>>>>>>> so wouldn't it be_ >>>>>>>>> _ >>>>>>>>> >>>>>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>>>>> >>>>>>>>> with doesn't work by the way >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>>>>> >>>>>>>>> I think >>>>>>>>> >>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>> should be >>>>>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>> From: Shane >>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>> >>>>>>>>>> i don't know what i am doing wrong >>>>>>>>>> >>>>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>>>>> Tag[3] As String 'always TAG >>>>>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>>>>> 28 if >>>>>>>>>>> track# included) >>>>>>>>>>> Genre As Byte 'genre, 255 for none >>>>>>>>>>> defined >>>>>>>>>>> End Struct >>>>>>>>>>> >>>>>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>>>>> Dim hfile As File >>>>>>>>>>> >>>>>>>>>>> hfile = Open File For Read >>>>>>>>>>> >>>>>>>>>>> ' >>>>>>>>>>> 'read the tag >>>>>>>>>>> ' seek to end of less tag size >>>>>>>>>>> >>>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>>> >>>>>>>>>>> here i get IDtag is NULL >>>>>>>>>>> >>>>>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>>>>> >>>>>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>>>> >>>>>>>>>>>> -Nando (Canada) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ' top of class file >>>>>>>>>>>> Public Struct recstruc >>>>>>>>>>>> _a as integer >>>>>>>>>>>> _b as integer >>>>>>>>>>>> _c as integer >>>>>>>>>>>> end struct >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ' a function >>>>>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>>>>> >>>>>>>>>>>> dim hfile as file >>>>>>>>>>>> dim arec as recstruc >>>>>>>>>>>> >>>>>>>>>>>> hfile = open filename for read write create >>>>>>>>>>>> >>>>>>>>>>>> with arec 'some values to write. >>>>>>>>>>>> ._a = 1 >>>>>>>>>>>> ._b = 22 >>>>>>>>>>>> ._c = 333 >>>>>>>>>>>> end with >>>>>>>>>>>> >>>>>>>>>>>> write #hfile, arec as recstruc >>>>>>>>>>>> >>>>>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>>>>> read #hfile, arec as recstruc >>>>>>>>>>>> >>>>>>>>>>>> close #hfile >>>>>>>>>>>> >>>>>>>>>>>> end >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>>> From: T Lee Davidson >>>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>>> >>>>>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>>>>> >>>>>>>>>>>> given this example >>>>>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>>>>> DIM i AS Integer >>>>>>>>>>>>>> DIM b AS Byte >>>>>>>>>>>>>> DIM s AS Short >>>>>>>>>>>>>> DIM s1 AS String >>>>>>>>>>>>>> DIM s2 AS String >>>>>>>>>>>>>> ' Read binary file >>>>>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>>>>> ' Display results >>>>>>>>>>>>>> PRINT i >>>>>>>>>>>>>> PRINT b >>>>>>>>>>>>>> PRINT s >>>>>>>>>>>>>> PRINT s1 >>>>>>>>>>>>>> PRINT s2 >>>>>>>>>>>>>> END >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> is there a way for gambas to read a struct of all these >>>>>>>>>>>>>> variables >>>>>>>>>>>>>> in one read ? >>>>>>>>>>>>>> >>>>>>>>>>>>>> You may have hinted at the solution within your question. >>>>>>>>>>>>>> Have >>>>>>>>>>>>>> you >>>>>>>>>>>>>> >>>>>>>>>>>>>> considered >>>>>>>>>>>>> using a Structure? >>>>>>>>>>>>> >>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>>>>> specified by >>>>>>>>>>>>> the >>>>>>>>>>>>> Datatype argument." >>>>>>>>>>>>> >>>>>>>>>>>>> "The returned datatype can be one of the following: NULL, >>>>>>>>>>>>> Boolean, >>>>>>>>>>>>> Byte, Short, >>>>>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>>>>>>> Variant, >>>>>>>>>>>>> any >>>>>>>>>>>>> Array, >>>>>>>>>>>>> Collection or structure." >>>>>>>>>>>>> >>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Lee >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>> ------------------ >>>>>>>>>>>>> Check out the vibrant tech community on one of the world's >>>>>>>>>>>>> most >>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>> >>>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>> ------------------ >>>>>>>>>>>> Check out the vibrant tech community on one of the world's >>>>>>>>>>>> most >>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> ------------------ >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>> >>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> ------------------ >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> ------------------ >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>>> ------------------ >>>>>>>>> >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From matti.eber at ...3240... Thu Jul 20 15:49:00 2017 From: matti.eber at ...3240... (Matti) Date: Thu, 20 Jul 2017 15:49:00 +0200 Subject: [Gambas-user] New Gambas on Suse In-Reply-To: <4f959d13-4d98-8219-e961-afee1ff18a65@...3629...> References: <4f959d13-4d98-8219-e961-afee1ff18a65@...3629...> Message-ID: <824bf8c5-e5bb-1750-77bb-f991e98758fb@...3240...> Hi Rolf, someone is putting the Gambas updates into the Suse repo. Why should there be an exception with 3.10? We'll see soon... Matti Am 20.07.2017 um 15:35 schrieb Rolf-Werner Eilert: > Hi folks, > > Now that the next version of Gambas is en route, I wonder whether it > will come on Suse Leap 42.2 automatically, as there are lots of updates > to Gambas each time I update the system. > > Or will I have to compile myself, as I was used to do on my older systems? > > Thank you for your insight! > > Regards > > Rolf > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Thu Jul 20 18:22:01 2017 From: bagonergi at ...626... (Gianluigi) Date: Thu, 20 Jul 2017 18:22:01 +0200 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> Message-ID: Hi Tony, Sorry if i answered instead of you, but I did not understand who the question was for :-( Regards Gianluigi 2017-07-20 15:35 GMT+02:00 Tony Morehen : > It is my code. It started off life as part of a cd ripper program I wrote > in 2010 in vb6. It was inspired by code provided by Steve McMahon ( > steve at ...3671...) under an Apache style licence. The code has > since been heavily rewritten, translated to vb.net and finally translated > to gambas. > > > On 2017-07-20 07:16 AM, Shane wrote: > >> with the code i was trying to adapt you can't >> >> i was getting strange values eg. >> >> a struct size of 208 when it was meant to be 128 and for some strange >> reason get end of file >> >> when seeking to eof less header even if i backed up more than the 208 >> bytes >> >> i can see that tony didn't right it i should of said did he convert it to >> gambas ? >> >> i think this should be in the farm ? >> >> >> >> >> On 20/07/17 21:04, Gianluigi wrote: >> >>> 2017-07-20 12:09 GMT+02:00 Shane : >>> >>> yep can't use structs have to do like tony's code works perfect thanks >>>> again tony >>>> >>>> mmmmh are you sure? >>> >>> >>> p.s is this your code ? >>>> >>>> No, but you can easily see who wrote it :) >>> >>> >>> >>>> >>>> On 20/07/17 19:56, Gianluigi wrote: >>>> >>>> Right ... and a look here too [0] >>>>> >>>>> Ciao :) >>>>> Gianluigi >>>>> >>>>> [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#m >>>>> sg41793 >>>>> >>>>> 2017-07-20 3:15 GMT+02:00 Shane : >>>>> >>>>> thanks tony sounds like just what i needed i will take a look >>>>> >>>>>> cheers >>>>>> >>>>>> >>>>>> >>>>>> On 19/07/17 22:34, Tony Morehen wrote: >>>>>> >>>>>> I've attached an archive containing the code I use to read v1 and v2 >>>>>> MP3 >>>>>> >>>>>>> tags and other MP3 info including bitrates (fixed and VBR), sampling >>>>>>> rates >>>>>>> and number of channels. v1 tags are pretty staightforward to read if >>>>>>> you >>>>>>> don't try to read the structure directly, but by each element of the >>>>>>> structure at a time. Some tips: >>>>>>> >>>>>>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can >>>>>>> be >>>>>>> read directly from the stream. ie (4 byte Integer) = Read #Stream As >>>>>>> Integer. Gambas can handle little endian/big endian issues. >>>>>>> >>>>>>> 2) Fixed length strings must be handled in a two stage process. >>>>>>> First, >>>>>>> the required string length number of bytes is read into a byte array. >>>>>>> This >>>>>>> byte array is then converted to a string. Sample code: >>>>>>> >>>>>>> Dim Bytes As New Byte[StringLength] >>>>>>> Bytes.Read(Stream) >>>>>>> FixedString = Bytes.ToString() >>>>>>> >>>>>>> Note: Bytes.ToString stops the string conversion at the first null >>>>>>> or at >>>>>>> the end of the array. Therfore, you don't have to worry about >>>>>>> null-terminated strings. >>>>>>> >>>>>>> v2 tags are more complicated, particularly since the tags can be >>>>>>> ascii, >>>>>>> either kind of utf16, or utf8 encoding. The code I sent has been >>>>>>> tested >>>>>>> with over 10,000 mp3 files has seems to have no issues. >>>>>>> >>>>>>> >>>>>>> On 2017-07-19 12:33 AM, Shane wrote: >>>>>>> >>>>>>> thank you Gian i did take a rest and read but alas it did not help >>>>>>> >>>>>>>> as far as i see it he is saying don't use binary file for fixed >>>>>>>> length >>>>>>>> strings >>>>>>>> >>>>>>>> but as this is an mp3 file tag witch i have no control i am doomed >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 18/07/17 19:22, Gianluigi wrote: >>>>>>>> >>>>>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>>>>> >>>>>>>>> recommend >>>>>>>>> me in the discussion [0] I told you here [1]? >>>>>>>>> >>>>>>>>> [0] >>>>>>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>>>>>> xed-length-string-td50880.html >>>>>>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>>>>>> >>>>>>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>>>>>> >>>>>>>>> I am very confused from the docs >>>>>>>>> >>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>>>>>> >>>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>>>>>> >>>>>>>>>> so wouldn't it be_ >>>>>>>>>> _ >>>>>>>>>> >>>>>>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>>>>>> >>>>>>>>>> with doesn't work by the way >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>>>>>> >>>>>>>>>> I think >>>>>>>>>> >>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>>> should be >>>>>>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>> From: Shane >>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>> >>>>>>>>>>> i don't know what i am doing wrong >>>>>>>>>>> >>>>>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>>>>> >>>>>>>>>>>> Tag[3] As String 'always TAG >>>>>>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>>>>>> 28 if >>>>>>>>>>>> track# included) >>>>>>>>>>>> Genre As Byte 'genre, 255 for none >>>>>>>>>>>> defined >>>>>>>>>>>> End Struct >>>>>>>>>>>> >>>>>>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>>>>>> Dim hfile As File >>>>>>>>>>>> >>>>>>>>>>>> hfile = Open File For Read >>>>>>>>>>>> >>>>>>>>>>>> ' >>>>>>>>>>>> 'read the tag >>>>>>>>>>>> ' seek to end of less tag size >>>>>>>>>>>> >>>>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>>>> >>>>>>>>>>>> here i get IDtag is NULL >>>>>>>>>>>> >>>>>>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>>>>>> >>>>>>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>>>>> >>>>>>>>>>>> -Nando (Canada) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ' top of class file >>>>>>>>>>>>> Public Struct recstruc >>>>>>>>>>>>> _a as integer >>>>>>>>>>>>> _b as integer >>>>>>>>>>>>> _c as integer >>>>>>>>>>>>> end struct >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ' a function >>>>>>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>>>>>> >>>>>>>>>>>>> dim hfile as file >>>>>>>>>>>>> dim arec as recstruc >>>>>>>>>>>>> >>>>>>>>>>>>> hfile = open filename for read write create >>>>>>>>>>>>> >>>>>>>>>>>>> with arec 'some values to write. >>>>>>>>>>>>> ._a = 1 >>>>>>>>>>>>> ._b = 22 >>>>>>>>>>>>> ._c = 333 >>>>>>>>>>>>> end with >>>>>>>>>>>>> >>>>>>>>>>>>> write #hfile, arec as recstruc >>>>>>>>>>>>> >>>>>>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>>>>>> read #hfile, arec as recstruc >>>>>>>>>>>>> >>>>>>>>>>>>> close #hfile >>>>>>>>>>>>> >>>>>>>>>>>>> end >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>>>> From: T Lee Davidson >>>>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>>>> >>>>>>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> given this example >>>>>>>>>>>>> >>>>>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>>>>>> DIM i AS Integer >>>>>>>>>>>>>>> DIM b AS Byte >>>>>>>>>>>>>>> DIM s AS Short >>>>>>>>>>>>>>> DIM s1 AS String >>>>>>>>>>>>>>> DIM s2 AS String >>>>>>>>>>>>>>> ' Read binary file >>>>>>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>>>>>> ' Display results >>>>>>>>>>>>>>> PRINT i >>>>>>>>>>>>>>> PRINT b >>>>>>>>>>>>>>> PRINT s >>>>>>>>>>>>>>> PRINT s1 >>>>>>>>>>>>>>> PRINT s2 >>>>>>>>>>>>>>> END >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> is there a way for gambas to read a struct of all these >>>>>>>>>>>>>>> variables >>>>>>>>>>>>>>> in one read ? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> You may have hinted at the solution within your question. >>>>>>>>>>>>>>> Have >>>>>>>>>>>>>>> you >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> considered >>>>>>>>>>>>>>> >>>>>>>>>>>>>> using a Structure? >>>>>>>>>>>>>> >>>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>>>>>> specified by >>>>>>>>>>>>>> the >>>>>>>>>>>>>> Datatype argument." >>>>>>>>>>>>>> >>>>>>>>>>>>>> "The returned datatype can be one of the following: NULL, >>>>>>>>>>>>>> Boolean, >>>>>>>>>>>>>> Byte, Short, >>>>>>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>>>>>>>> Variant, >>>>>>>>>>>>>> any >>>>>>>>>>>>>> Array, >>>>>>>>>>>>>> Collection or structure." >>>>>>>>>>>>>> >>>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Lee >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>> Check out the vibrant tech community on one of the world's >>>>>>>>>>>>>> most >>>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>> ------------------ >>>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------ >>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>> >>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> ------------------ >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>>> ------------------ >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>> ------------------ >>>>>>>>>> >>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> ------------------------------------------------------------------------------ >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 20 19:44:02 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 20 Jul 2017 13:44:02 -0400 Subject: [Gambas-user] systray seems do not work with qt5 Message-ID: Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-19 18:38 GMT-04:00 herberth guzman : > Fabien > > I did what you suggested and it does not work for me. > Show me the following message > > FMain.ArrangeTray.28: > QXcbWindow: Unhandled client message: "_NET_WM_DESKTOP" > QXcbWindow: Unhandled client message: "_KDE_WM_CHANGE_STATE" > FMain.ArrangeTray.28: > QXcbWindow: Unhandled client message: "_NET_SYSTEM_TRAY_OPCODE" > i hear reports that gnome shell systray are a problem,, by example my x11vnc never are embebed in the systray of the gnome, but works perfect in the OLDER and stable LXDE.. maybe a bug in gambas 3.X ? > > > > > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > > > >> I know that KDE 5 dropped the support for the old system tray > protocol. > > >> > > > the gnome-puach also dropped some about it.. > > > > > > i think that this component must have a citation that oly works with > > normal > > > desktops.. like lxde and mate.. > > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > > those desktops that want to change everithig are working? > > > > > > > > >> > > >> It is possible to temporarily run the system tray, please. > > >> > > >> > > >> Thanks > > >> > > >> > > >> Herberth Guzman > > >> ------------------------------------------------------------ > > >> ------------------ > > >> Check out the vibrant tech community on one of the world's most > > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > >> _______________________________________________ > > >> Gambas-user mailing list > > >> Gambas-user at lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > >> > > > ------------------------------------------------------------ > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > -- > > Fabien Bodard > > 2017-07-19 14:28 GMT-06:00 : > > > Send Gambas-user mailing list submissions to > > gambas-user at lists.sourceforge.net > > > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > or, via email, send a message with subject or body 'help' to > > gambas-user-request at lists.sourceforge.net > > > > You can reach the person managing the list at > > gambas-user-owner at lists.sourceforge.net > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Gambas-user digest..." > > > > > > Today's Topics: > > > > 1. Re: Pre-release of Gambas 3.10.0 (herberth guzman) > > 2. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > > 3. Re: Pre-release of Gambas 3.10.0 (herberth guzman) > > 4. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > > 5. Re: Pre-release of Gambas 3.10.0 (Fabien Bodard) > > 6. Re: Pre-release of Gambas 3.10.0 (PICCORO McKAY Lenz) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 19 Jul 2017 10:10:14 -0600 > > From: herberth guzman > > To: gambas-user > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > gmail.com> > > Content-Type: text/plain; charset="UTF-8" > > > > Regards Benoit > > > > In the menu New Project, the list of the types of applications that we > want > > to create are shown, example: > > > > Application QT > > (Application using the component QT5 or QT4) > > > > Application GTK+ 3 > > (pplication using the component GTK+3) > > > > Application Web > > (Scrip CGI). > > > > > > It is possible to create a new one that says: > > > > "Web Form Application" > > (You can create Web Form) > > > > > > Herberth Guzman > > > > > > ------------------------------ > > > > Message: 2 > > Date: Wed, 19 Jul 2017 12:18:00 -0400 > > From: PICCORO McKAY Lenz > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > T0xjg at ...627...> > > Content-Type: text/plain; charset="UTF-8" > > > > 2017-07-19 12:10 GMT-04:00 herberth guzman : > > > > > "Web Form Application" > > > (You can create Web Form) > > > > > ah right its missing of can at least choose/convert the cgi to a mix of > cgi > > and form and let user removed manually if not want any of forms > > > > seems something of gtk2 are removed? i only can see gtk3 or i forget > > something in compliation!? > > > > > > > > > > > > > Herberth Guzman > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > ------------------------------ > > > > Message: 3 > > Date: Wed, 19 Jul 2017 10:35:35 -0600 > > From: herberth guzman > > To: gambas-user > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > mail.gmail.com> > > Content-Type: text/plain; charset="UTF-8" > > > > My system tray does not work with gb.qt5. > > I remember you had it run in revision # 7098 > > > > I know that KDE 5 dropped the support for the old system tray protocol. > > > > It is possible to temporarily run the system tray, please. > > > > > > Thanks > > > > > > Herberth Guzman > > > > > > ------------------------------ > > > > Message: 4 > > Date: Wed, 19 Jul 2017 12:40:29 -0400 > > From: PICCORO McKAY Lenz > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > 8ej791M9CA at ...627...> > > Content-Type: text/plain; charset="UTF-8" > > > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > > > I know that KDE 5 dropped the support for the old system tray protocol. > > > > > the gnome-puach also dropped some about it.. > > > > i think that this component must have a citation that oly works with > normal > > desktops.. like lxde and mate.. > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > those desktops that want to change everithig are working? > > > > > > > > > > It is possible to temporarily run the system tray, please. > > > > > > > > > Thanks > > > > > > > > > Herberth Guzman > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > ------------------------------ > > > > Message: 5 > > Date: Wed, 19 Jul 2017 22:19:43 +0200 > > From: Fabien Bodard > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > k-6pSGThuN8g at ...627...> > > Content-Type: text/plain; charset="UTF-8" > > > > you need to use the gb.gui.trayicon component > > > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > > > witch support all the protocols > > > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz : > > > 2017-07-19 12:35 GMT-04:00 herberth guzman : > > > > > >> I know that KDE 5 dropped the support for the old system tray > protocol. > > >> > > > the gnome-puach also dropped some about it.. > > > > > > i think that this component must have a citation that oly works with > > normal > > > desktops.. like lxde and mate.. > > > openbox+fbpanel and lxde still use the old/today behaviour.. why follow > > > those desktops that want to change everithig are working? > > > > > > > > >> > > >> It is possible to temporarily run the system tray, please. > > >> > > >> > > >> Thanks > > >> > > >> > > >> Herberth Guzman > > >> ------------------------------------------------------------ > > >> ------------------ > > >> Check out the vibrant tech community on one of the world's most > > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > >> _______________________________________________ > > >> Gambas-user mailing list > > >> Gambas-user at lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > >> > > > ------------------------------------------------------------ > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > -- > > Fabien Bodard > > > > > > > > ------------------------------ > > > > Message: 6 > > Date: Wed, 19 Jul 2017 16:28:14 -0400 > > From: PICCORO McKAY Lenz > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Pre-release of Gambas 3.10.0 > > Message-ID: > > > GZZZqnSfBVcogAw at ...627...> > > Content-Type: text/plain; charset="UTF-8" > > > > i like it:! > > > > > but, alas, KDE and Ubuntu implementations are mutually incompatible! > Well > > done guys > > > > totally right!!, that's why i dont like such stupid thing and changes.. > > > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > > > 2017-07-19 16:19 GMT-04:00 Fabien Bodard : > > > > > you need to use the gb.gui.trayicon component > > > > > > http://gambaswiki.org/wiki/comp/gb.gui.trayicon > > > > > > witch support all the protocols > > > > > > 2017-07-19 18:40 GMT+02:00 PICCORO McKAY Lenz >: > > > > 2017-07-19 12:35 GMT-04:00 herberth guzman >: > > > > > > > >> I know that KDE 5 dropped the support for the old system tray > > protocol. > > > >> > > > > the gnome-puach also dropped some about it.. > > > > > > > > i think that this component must have a citation that oly works with > > > normal > > > > desktops.. like lxde and mate.. > > > > openbox+fbpanel and lxde still use the old/today behaviour.. why > follow > > > > those desktops that want to change everithig are working? > > > > > > > > > > > >> > > > >> It is possible to temporarily run the system tray, please. > > > >> > > > >> > > > >> Thanks > > > >> > > > >> > > > >> Herberth Guzman > > > >> ------------------------------------------------------------ > > > >> ------------------ > > > >> Check out the vibrant tech community on one of the world's most > > > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > >> _______________________________________________ > > > >> Gambas-user mailing list > > > >> Gambas-user at lists.sourceforge.net > > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > >> > > > > ------------------------------------------------------------ > > > ------------------ > > > > Check out the vibrant tech community on one of the world's most > > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > -- > > > Fabien Bodard > > > > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > ------------------------------ > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------ > > > > End of Gambas-user Digest, Vol 134, Issue 54 > > ******************************************** > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bugtracker at ...3416... Thu Jul 20 19:46:51 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Thu, 20 Jul 2017 17:46:51 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4- Comment #3 by PICCORO LENZ MCKAY: inside the ide you can click as if you are into a browser... and see documentation in message.question or whatever.. also remenber that some wiki's are not updated, by example i try to mantain the spanish wiki up to date.. but i can cover all the changes.. From tmorehen at ...3602... Thu Jul 20 20:27:22 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 20 Jul 2017 14:27:22 -0400 Subject: [Gambas-user] reading files In-Reply-To: References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> Message-ID: <377615dd-8bb9-defa-e90a-d919223b849f@...3602...> I've uploaded the class with a short command line demo to the software farm. On 2017-07-20 12:22 PM, Gianluigi wrote: > Hi Tony, > Sorry if i answered instead of you, but I did not understand who the > question was for :-( > > Regards > Gianluigi > > 2017-07-20 15:35 GMT+02:00 Tony Morehen : > >> It is my code. It started off life as part of a cd ripper program I wrote >> in 2010 in vb6. It was inspired by code provided by Steve McMahon ( >> steve at ...3671...) under an Apache style licence. The code has >> since been heavily rewritten, translated to vb.net and finally translated >> to gambas. >> >> >> On 2017-07-20 07:16 AM, Shane wrote: >> >>> with the code i was trying to adapt you can't >>> >>> i was getting strange values eg. >>> >>> a struct size of 208 when it was meant to be 128 and for some strange >>> reason get end of file >>> >>> when seeking to eof less header even if i backed up more than the 208 >>> bytes >>> >>> i can see that tony didn't right it i should of said did he convert it to >>> gambas ? >>> >>> i think this should be in the farm ? >>> >>> >>> >>> >>> On 20/07/17 21:04, Gianluigi wrote: >>> >>>> 2017-07-20 12:09 GMT+02:00 Shane : >>>> >>>> yep can't use structs have to do like tony's code works perfect thanks >>>>> again tony >>>>> >>>>> mmmmh are you sure? >>>> >>>> p.s is this your code ? >>>>> No, but you can easily see who wrote it :) >>>> >>>> >>>>> On 20/07/17 19:56, Gianluigi wrote: >>>>> >>>>> Right ... and a look here too [0] >>>>>> Ciao :) >>>>>> Gianluigi >>>>>> >>>>>> [0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#m >>>>>> sg41793 >>>>>> >>>>>> 2017-07-20 3:15 GMT+02:00 Shane : >>>>>> >>>>>> thanks tony sounds like just what i needed i will take a look >>>>>> >>>>>>> cheers >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 19/07/17 22:34, Tony Morehen wrote: >>>>>>> >>>>>>> I've attached an archive containing the code I use to read v1 and v2 >>>>>>> MP3 >>>>>>> >>>>>>>> tags and other MP3 info including bitrates (fixed and VBR), sampling >>>>>>>> rates >>>>>>>> and number of channels. v1 tags are pretty staightforward to read if >>>>>>>> you >>>>>>>> don't try to read the structure directly, but by each element of the >>>>>>>> structure at a time. Some tips: >>>>>>>> >>>>>>>> 1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can >>>>>>>> be >>>>>>>> read directly from the stream. ie (4 byte Integer) = Read #Stream As >>>>>>>> Integer. Gambas can handle little endian/big endian issues. >>>>>>>> >>>>>>>> 2) Fixed length strings must be handled in a two stage process. >>>>>>>> First, >>>>>>>> the required string length number of bytes is read into a byte array. >>>>>>>> This >>>>>>>> byte array is then converted to a string. Sample code: >>>>>>>> >>>>>>>> Dim Bytes As New Byte[StringLength] >>>>>>>> Bytes.Read(Stream) >>>>>>>> FixedString = Bytes.ToString() >>>>>>>> >>>>>>>> Note: Bytes.ToString stops the string conversion at the first null >>>>>>>> or at >>>>>>>> the end of the array. Therfore, you don't have to worry about >>>>>>>> null-terminated strings. >>>>>>>> >>>>>>>> v2 tags are more complicated, particularly since the tags can be >>>>>>>> ascii, >>>>>>>> either kind of utf16, or utf8 encoding. The code I sent has been >>>>>>>> tested >>>>>>>> with over 10,000 mp3 files has seems to have no issues. >>>>>>>> >>>>>>>> >>>>>>>> On 2017-07-19 12:33 AM, Shane wrote: >>>>>>>> >>>>>>>> thank you Gian i did take a rest and read but alas it did not help >>>>>>>> >>>>>>>>> as far as i see it he is saying don't use binary file for fixed >>>>>>>>> length >>>>>>>>> strings >>>>>>>>> >>>>>>>>> but as this is an mp3 file tag witch i have no control i am doomed >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 18/07/17 19:22, Gianluigi wrote: >>>>>>>>> >>>>>>>>> Why do not you take a moment of rest and read what Tobias Boege >>>>>>>>> >>>>>>>>>> recommend >>>>>>>>>> me in the discussion [0] I told you here [1]? >>>>>>>>>> >>>>>>>>>> [0] >>>>>>>>>> http://gambas.8142.n7.nabble.com/Random-access-files-with-fi >>>>>>>>>> xed-length-string-td50880.html >>>>>>>>>> [1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html >>>>>>>>>> >>>>>>>>>> 2017-07-18 9:04 GMT+02:00 Shane : >>>>>>>>>> >>>>>>>>>> I am very confused from the docs >>>>>>>>>> >>>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_ >>>>>>>>>>> _Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_ >>>>>>>>>>> >>>>>>>>>>> so wouldn't it be_ >>>>>>>>>>> _ >>>>>>>>>>> >>>>>>>>>>> IDtag = read #hfile as ID3v1_TAG ? >>>>>>>>>>> >>>>>>>>>>> with doesn't work by the way >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 18/07/17 12:44, nando_f at ...951... wrote: >>>>>>>>>>> >>>>>>>>>>> I think >>>>>>>>>>> >>>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>>>> should be >>>>>>>>>>>> Read #hfile, IDtag as ID3v1_TAG >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>>> From: Shane >>>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>>> Sent: Tue, 18 Jul 2017 10:50:43 +1000 >>>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>>> >>>>>>>>>>>> i don't know what i am doing wrong >>>>>>>>>>>> >>>>>>>>>>>> Public Struct ID3v1_TAG '(128 bytes) >>>>>>>>>>>> >>>>>>>>>>>>> Tag[3] As String 'always TAG >>>>>>>>>>>>> Title[30] As String 'title, 30 characters >>>>>>>>>>>>> Artist[30] As String 'artist, 30 characters >>>>>>>>>>>>> Album[30] As String 'album, 30 characters >>>>>>>>>>>>> Year[4] As String 'year, 4 characters >>>>>>>>>>>>> Comment[30] As String 'comment, 30 characters (or >>>>>>>>>>>>> 28 if >>>>>>>>>>>>> track# included) >>>>>>>>>>>>> Genre As Byte 'genre, 255 for none >>>>>>>>>>>>> defined >>>>>>>>>>>>> End Struct >>>>>>>>>>>>> >>>>>>>>>>>>> Private Sub GetID3v1(File As String) >>>>>>>>>>>>> Dim IDtag As ID3v1_TAG >>>>>>>>>>>>> Dim hfile As File >>>>>>>>>>>>> >>>>>>>>>>>>> hfile = Open File For Read >>>>>>>>>>>>> >>>>>>>>>>>>> ' >>>>>>>>>>>>> 'read the tag >>>>>>>>>>>>> ' seek to end of less tag size >>>>>>>>>>>>> >>>>>>>>>>>>> Read #hfile, IDtag, ID3v1_TAG >>>>>>>>>>>>> >>>>>>>>>>>>> here i get IDtag is NULL >>>>>>>>>>>>> >>>>>>>>>>>>> On 18/07/17 05:05, nando_f at ...951... wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> Yes it is possible, I do it. here is some code (incomplete) >>>>>>>>>>>>> >>>>>>>>>>>>> -Nando (Canada) >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> ' top of class file >>>>>>>>>>>>>> Public Struct recstruc >>>>>>>>>>>>>> _a as integer >>>>>>>>>>>>>> _b as integer >>>>>>>>>>>>>> _c as integer >>>>>>>>>>>>>> end struct >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> ' a function >>>>>>>>>>>>>> public function openAfile(filename as string) as file >>>>>>>>>>>>>> >>>>>>>>>>>>>> dim hfile as file >>>>>>>>>>>>>> dim arec as recstruc >>>>>>>>>>>>>> >>>>>>>>>>>>>> hfile = open filename for read write create >>>>>>>>>>>>>> >>>>>>>>>>>>>> with arec 'some values to write. >>>>>>>>>>>>>> ._a = 1 >>>>>>>>>>>>>> ._b = 22 >>>>>>>>>>>>>> ._c = 333 >>>>>>>>>>>>>> end with >>>>>>>>>>>>>> >>>>>>>>>>>>>> write #hfile, arec as recstruc >>>>>>>>>>>>>> >>>>>>>>>>>>>> 'if you position the hfile pointer back to zero, you can... >>>>>>>>>>>>>> read #hfile, arec as recstruc >>>>>>>>>>>>>> >>>>>>>>>>>>>> close #hfile >>>>>>>>>>>>>> >>>>>>>>>>>>>> end >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Open WebMail Project (http://openwebmail.org) >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> ---------- Original Message ----------- >>>>>>>>>>>>>> From: T Lee Davidson >>>>>>>>>>>>>> To: gambas-user at lists.sourceforge.net >>>>>>>>>>>>>> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >>>>>>>>>>>>>> Subject: Re: [Gambas-user] reading files >>>>>>>>>>>>>> >>>>>>>>>>>>>> On 07/16/2017 06:57 AM, Shane wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> given this example >>>>>>>>>>>>>> >>>>>>>>>>>>>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>>>>>>>>>>>>>> DIM binaryFile AS File >>>>>>>>>>>>>>>> DIM i AS Integer >>>>>>>>>>>>>>>> DIM b AS Byte >>>>>>>>>>>>>>>> DIM s AS Short >>>>>>>>>>>>>>>> DIM s1 AS String >>>>>>>>>>>>>>>> DIM s2 AS String >>>>>>>>>>>>>>>> ' Read binary file >>>>>>>>>>>>>>>> binaryFile = OPEN FilePath FOR READ >>>>>>>>>>>>>>>> READ #binaryFile, i >>>>>>>>>>>>>>>> READ #binaryFile, b >>>>>>>>>>>>>>>> READ #binaryFile, s >>>>>>>>>>>>>>>> READ #binaryFile, s1 >>>>>>>>>>>>>>>> READ #binaryFile, s2 >>>>>>>>>>>>>>>> CLOSE #binaryFile >>>>>>>>>>>>>>>> ' Display results >>>>>>>>>>>>>>>> PRINT i >>>>>>>>>>>>>>>> PRINT b >>>>>>>>>>>>>>>> PRINT s >>>>>>>>>>>>>>>> PRINT s1 >>>>>>>>>>>>>>>> PRINT s2 >>>>>>>>>>>>>>>> END >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> is there a way for gambas to read a struct of all these >>>>>>>>>>>>>>>> variables >>>>>>>>>>>>>>>> in one read ? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> You may have hinted at the solution within your question. >>>>>>>>>>>>>>>> Have >>>>>>>>>>>>>>>> you >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> considered >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> using a Structure? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/read : >>>>>>>>>>>>>>> "... reads the stream Stream as binary data whose type is >>>>>>>>>>>>>>> specified by >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>> Datatype argument." >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "The returned datatype can be one of the following: NULL, >>>>>>>>>>>>>>> Boolean, >>>>>>>>>>>>>>> Byte, Short, >>>>>>>>>>>>>>> Integer, Long, Pointer, Single, Float, Date, String, >>>>>>>>>>>>>>> Variant, >>>>>>>>>>>>>>> any >>>>>>>>>>>>>>> Array, >>>>>>>>>>>>>>> Collection or structure." >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> http://gambaswiki.org/wiki/lang/structdecl >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Lee >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>> Check out the vibrant tech community on one of the world's >>>>>>>>>>>>>>> most >>>>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>>> >>>>>>>>>>>>> ------- End of Original Message ------- >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>> ------------------ >>>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>>> ------------------ >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Gambas-user mailing list >>>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------ >>>>>>>>>>> ------------------ >>>>>>>>>>> >>>>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>>> _______________________________________________ >>>>>>>>>> Gambas-user mailing list >>>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------ >>>>>>>>> ------------------ >>>>>>>>> >>>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>>> >>>>>>>>> ------------------------------------------------------------ >>>>>>>> ------------------ >>>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Gambas-user mailing list >>>>>>>> Gambas-user at lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>> >>>>>>>> ------------------------------------------------------------ >>>>>>>> >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user at lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> ------------------------------------------------------------------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> ------------------------------------------------------------------------------ >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From hans at ...3219... Thu Jul 20 20:40:19 2017 From: hans at ...3219... (Hans Lehmann) Date: Thu, 20 Jul 2017 20:40:19 +0200 Subject: [Gambas-user] reading files In-Reply-To: <377615dd-8bb9-defa-e90a-d919223b849f@...3602...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> <377615dd-8bb9-defa-e90a-d919223b849f@...3602...> Message-ID: <2c62e3f4-895e-14c3-65b2-043bfb0d56a4@...3219...> Am 20.07.2017 um 20:27 schrieb Tony Morehen: > I've uploaded the class with a short command line demo to the software > farm. Hello Tony, under which heading can I find the class in the software farm? Honsek From tmorehen at ...3602... Thu Jul 20 20:50:55 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 20 Jul 2017 14:50:55 -0400 Subject: [Gambas-user] reading files In-Reply-To: <2c62e3f4-895e-14c3-65b2-043bfb0d56a4@...3219...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> <377615dd-8bb9-defa-e90a-d919223b849f@...3602...> <2c62e3f4-895e-14c3-65b2-043bfb0d56a4@...3219...> Message-ID: <166cdff1-0b18-3006-b544-5612795c3266@...3602...> Audio or development On 2017-07-20 02:40 PM, Hans Lehmann wrote: > Am 20.07.2017 um 20:27 schrieb Tony Morehen: >> I've uploaded the class with a short command line demo to the >> software farm. > > Hello Tony, > > under which heading can I find the class in the software farm? > > Honsek > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From chrisml at ...3340... Thu Jul 20 22:49:46 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Thu, 20 Jul 2017 22:49:46 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Hi, Am 18.07.2017 um 17:56 schrieb Beno?t Minisini via Gambas-user: > I have just uploaded the source tarball of Gambas 3.10 on Sourceforge: > > https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download > > Can people test it and report any problem before I make the release public? > > Thanks in advance! I will try it out at the weekend ... then I have time. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From olmec at ...3672... Fri Jul 21 01:01:47 2017 From: olmec at ...3672... (Olmec Sinclair - cleanweb) Date: Fri, 21 Jul 2017 11:01:47 +1200 Subject: [Gambas-user] basic web interactions Message-ID: <8e6a7595-0d2d-8c8b-f7ca-21412d5c8096@...3672...> Hi, I am developing a gambas application and I want to talk to a web server, passing some parameters and getting an XML response back. I have cobbled together a way of doing this by using the QT.WebView container and setting the URL with the request and catching the content when loading is complete but this feels like a messy way of doing it. What approach would others suggest? I see the Gambas development environment has a software farm that offers a user registration and login.... this is the type of thing I am trying to achieve. What approach is used here? Input much appreciated. Olmec -- *Olmec* Sinclair Web Design and Development Phone: 021 586 664 www.cleanweb.co.nz From adamnt42 at ...626... Fri Jul 21 03:19:00 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Fri, 21 Jul 2017 10:49:00 +0930 Subject: [Gambas-user] basic web interactions In-Reply-To: <8e6a7595-0d2d-8c8b-f7ca-21412d5c8096@...3672...> References: <8e6a7595-0d2d-8c8b-f7ca-21412d5c8096@...3672...> Message-ID: <20170721104900.62199e430cf7e2bbe5d6c97d@...626...> On Fri, 21 Jul 2017 11:01:47 +1200 Olmec Sinclair - cleanweb wrote: > Hi, > > I am developing a gambas application and I want to talk to a web server, > passing some parameters and getting an XML response back. > > I have cobbled together a way of doing this by using the QT.WebView > container and setting the URL with the request and catching the content > when loading is complete but this feels like a messy way of doing it. > > What approach would others suggest? > gb.net.curl - which has the advantage of being able to get the file either synchronously or asynchronously. b > > I see the Gambas development environment has a software farm that offers > a user registration and login.... this is the type of thing I am trying > to achieve. What approach is used here? > > Input much appreciated. > > > Olmec > > > -- > *Olmec* Sinclair Web Design and Development > Phone: 021 586 664 www.cleanweb.co.nz > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- B Bruen From rwe-sse at ...3629... Fri Jul 21 23:35:49 2017 From: rwe-sse at ...3629... (Rolf-Werner Eilert) Date: Fri, 21 Jul 2017 23:35:49 +0200 Subject: [Gambas-user] Dragging from one control to another Message-ID: Hello, Still having trouble with this: I have two GridViews. I want the user to drag and drop elements from one table to the other. When the mouse leaves the first GridView, the second doesn't register MouseUp. (It does run within one and the same GridView.) The GridView_Drop event doesn't fire at all. No idea why. Can someone point me to a simple way to manage this? Thanks for your help! Regards Rolf From gambas at ...1... Sat Jul 22 00:08:52 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 22 Jul 2017 00:08:52 +0200 Subject: [Gambas-user] Dragging from one control to another In-Reply-To: References: Message-ID: <798f98bd-87a0-6c2b-f364-ed11f274b613@...1...> Le 21/07/2017 ? 23:35, Rolf-Werner Eilert a ?crit : > Hello, > > Still having trouble with this: > > I have two GridViews. I want the user to drag and drop elements from one > table to the other. > > When the mouse leaves the first GridView, the second doesn't register > MouseUp. (It does run within one and the same GridView.) > > The GridView_Drop event doesn't fire at all. No idea why. > > Can someone point me to a simple way to manage this? > > Thanks for your help! > > Regards > Rolf > Please provide a project. -- Beno?t Minisini From buster6seven at ...626... Sat Jul 22 03:53:45 2017 From: buster6seven at ...626... (Shane) Date: Sat, 22 Jul 2017 11:53:45 +1000 Subject: [Gambas-user] reading files In-Reply-To: <166cdff1-0b18-3006-b544-5612795c3266@...3602...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> <20170718024145.M61248@...951...> <44f101a7-8b5b-9f3a-4e3a-95f7108f99c0@...626...> <536ff387-515c-b14e-18a1-b3c69d1ef05b@...626...> <86923985-7fbc-562b-49ee-b2710d6f5a1e@...3602...> <6046c860-9518-5e0f-63a7-53e071a90cd5@...626...> <010acc13-46dc-499e-9a1a-8bcffe3f6346@...626...> <377615dd-8bb9-defa-e90a-d919223b849f@...3602...> <2c62e3f4-895e-14c3-65b2-043bfb0d56a4@...3219...> <166cdff1-0b18-3006-b544-5612795c3266@...3602...> Message-ID: Hi tony I think i found a small bug in your code when reading mp3 files with no version 2 tag this function gets a end of stream error Public Function ReadBytes(Count As Integer) As Byte[] Dim res As New Byte[Count] res.Read($Stream) Return res End In the StreamReader Class don't know if you want to do any thing about it ? regards Shane On 21/07/17 04:50, Tony Morehen wrote: > Audio or development > > > On 2017-07-20 02:40 PM, Hans Lehmann wrote: >> Am 20.07.2017 um 20:27 schrieb Tony Morehen: >>> I've uploaded the class with a short command line demo to the >>> software farm. >> >> Hello Tony, >> >> under which heading can I find the class in the software farm? >> >> Honsek >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Sat Jul 22 03:55:13 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 22 Jul 2017 03:55:13 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Le 19/07/2017 ? 17:01, Sebasti?n Kulesz a ?crit : > Hi Beno?t, > > I wanted to ask you what were the component changes since the last release. > I am on an exchange in Germany and couldn't really follow the progress on > this development cycle. > Specifically, any added or removed components. And any changes of > dependencies. With that information, and as soon as I have time, I will > update the PPAs. > > Regards, > Sebastian > Mmm... I can tell you the new components: - gb.term : written in C, depends only on the libc. - gb.term.form : written in Gambas, depends on gb.term (because of Fabien's mistake, the dependency is missing. It is fixed in revision #8165, and I will regenerate a source package). - gb.web.feed : written in Gambas, depends on gb.xml. Anyway you have to check the dependencies of the binary packages with the component tables on that page: http://gambaswiki.org/wiki/howto/package It lists all dependencies dynamically from the component information files, so it is up to date. For dependencies on system libraries, I have updated the Ubuntu installation page: http://gambaswiki.org/wiki/install/ubuntu AFAIK, the only boring dependency is "postgresql-server-dev-X.Y", because there is the version inside the package name, so you have to change the package according to the Ubuntu version. Regards, -- Beno?t Minisini From gambas.fr at ...626... Sat Jul 22 08:12:25 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 22 Jul 2017 08:12:25 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: Le 22 juil. 2017 03:56, "Beno?t Minisini via Gambas-user" < gambas-user at lists.sourceforge.net> a ?crit : Le 19/07/2017 ? 17:01, Sebasti?n Kulesz a ?crit : > Hi Beno?t, > > I wanted to ask you what were the component changes since the last release. > I am on an exchange in Germany and couldn't really follow the progress on > this development cycle. > Specifically, any added or removed components. And any changes of > dependencies. With that information, and as soon as I have time, I will > update the PPAs. > > Regards, > Sebastian > > Mmm... I can tell you the new components: - gb.term : written in C, depends only on the libc. - gb.term.form : written in Gambas, depends on gb.term (because of Fabien's mistake, the dependency is missing. It is fixed in revision #8165, and I will regenerate a source package). I'm not sure this component is ready to do something interesting for the time. Maybe I can work on it on hollidays. - gb.web.feed : written in Gambas, depends on gb.xml. Anyway you have to check the dependencies of the binary packages with the component tables on that page: http://gambaswiki.org/wiki/howto/package It lists all dependencies dynamically from the component information files, so it is up to date. For dependencies on system libraries, I have updated the Ubuntu installation page: http://gambaswiki.org/wiki/install/ubuntu AFAIK, the only boring dependency is "postgresql-server-dev-X.Y", because there is the version inside the package name, so you have to change the package according to the Ubuntu version. Regards, -- Beno?t Minisini ------------------------------------------------------------ ------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From chrisml at ...3340... Sat Jul 22 10:38:18 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sat, 22 Jul 2017 10:38:18 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: <7b7789b2-19d2-2c3b-4727-cc0365d40583@...3340...> Am 20.07.2017 um 22:49 schrieb Christof Thalhofer: > I will try it out at the weekend ... then I have time. I just tested Gambas daily, it does some weird thing with indentation in the editor of the IDE when a string before an "If" goes over more than one line. I have installed: 3.9.90+svn8165+build3~ubuntu16.04.1 Attached there is a piece of code copied out of the editor. If you look at "If msg Then" This If has not the right indentation. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- ' Gambas class file Sub ShowBadIndentation() Dim msg as String If strusername = LocalSettings.Username And NoOwnDelete = False Then msg = "This is first line" & "this is second" If msg Then Print "ahh thats wrong indentation" End If End If End -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From chrisml at ...3340... Sat Jul 22 11:07:24 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sat, 22 Jul 2017 11:07:24 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: References: Message-ID: <3c2267da-12e7-03cb-0439-b1ecc764f6da@...3340...> Am 20.07.2017 um 22:49 schrieb Christof Thalhofer: > I will try it out at the weekend ... then I have time. Next problem I found: I have a query against a Postgresql function which returns the postgresql type "date". datum ----------- 2012-10-01 2012-11-01 If I query this in Gambas3 through a connection to the database and iterate through the result: For Each res str &= res!datum & gb.lf Next print str In Gambas 3.9.99 I get: 10/01/2012 02:00:00 11/01/2012 02:00:00 In Gambas 3.9 stable I got: 10/01/2012 11/01/2012 (All my statistics with gnuplot are fucked up now ...) (Yes I know, I should have to format the date) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From mckaygerhard at ...626... Sat Jul 22 13:08:49 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 22 Jul 2017 06:38:49 -0430 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 two confirme bug since 3.5 by Cristof Message-ID: i confirme the two bugs of Christof: > I just tested Gambas daily, it does some weird thing with indentation in > the editor of the IDE when a string before an "If" goes over more than > one line. the "weird!" IDE line hanglind are since gambas 3.5, the line has some strange behaviour.. 1) when a string before an "If" goes over more than one line. if the identation was set by user, when just push "intro" to make a new line, the identation always goes to 2 spaces, and the user set identation are not used. 2) when the ide has a large line that does not word wrap, the next last 8 chars of the line that are close to the limit of the screen are not showed, user must push/move more chars to the right to show complete and discover the left of the line, i mean if the line are too large, in the limits of the screen 8 chars are never showed 2017-07-22 4:37 GMT-04:30 Christof Thalhofer : > I have a query against a Postgresql function which returns the > postgresql type "date". > This its a well knowed "another bug" respect the databases support in gambas, reported by me some time ago, i can't find where, but was before new bugtraker , there many other .. due too much focus in mysql... In Gambas 3.9.99 I get: > > 10/01/2012 02:00:00 > 11/01/2012 02:00:00 > > In Gambas 3.9 stable I got: > > 10/01/2012 > 11/01/2012 > > (All my statistics with gnuplot are fucked up now ...) > (Yes I know, I should have to format the date) > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From gambas at ...1... Sat Jul 22 15:59:32 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 22 Jul 2017 15:59:32 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <7b7789b2-19d2-2c3b-4727-cc0365d40583@...3340...> References: <7b7789b2-19d2-2c3b-4727-cc0365d40583@...3340...> Message-ID: <12bb3c33-eb2f-408c-a661-06118a42a041@...1...> Le 22/07/2017 ? 10:38, Christof Thalhofer a ?crit : > Am 20.07.2017 um 22:49 schrieb Christof Thalhofer: > >> I will try it out at the weekend ... then I have time. > > I just tested Gambas daily, it does some weird thing with indentation in > the editor of the IDE when a string before an "If" goes over more than > one line. > > I have installed: > > 3.9.90+svn8165+build3~ubuntu16.04.1 > > Attached there is a piece of code copied out of the editor. If you look at > > "If msg Then" > > This If has not the right indentation. > > Alles Gute > > Christof Thalhofer > That bug should have been fixed in revision #8166. Regards, -- Beno?t Minisini From gambas at ...1... Sat Jul 22 16:19:16 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 22 Jul 2017 16:19:16 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <3c2267da-12e7-03cb-0439-b1ecc764f6da@...3340...> References: <3c2267da-12e7-03cb-0439-b1ecc764f6da@...3340...> Message-ID: Le 22/07/2017 ? 11:07, Christof Thalhofer a ?crit : > Am 20.07.2017 um 22:49 schrieb Christof Thalhofer: > >> I will try it out at the weekend ... then I have time. > > Next problem I found: > > I have a query against a Postgresql function which returns the > postgresql type "date". > > datum > ----------- > 2012-10-01 > 2012-11-01 > > If I query this in Gambas3 through a connection to the database and > iterate through the result: > > For Each res > str &= res!datum & gb.lf > Next > print str > > In Gambas 3.9.99 I get: > > 10/01/2012 02:00:00 > 11/01/2012 02:00:00 > > In Gambas 3.9 stable I got: > > 10/01/2012 > 11/01/2012 > > (All my statistics with gnuplot are fucked up now ...) > (Yes I know, I should have to format the date) > > > Alles Gute > > Christof Thalhofer > This is not a bug, this is a fix. The bug is in the behaviour of Gambas 3.9 whose CStr() function - which is implicitely used in the line "str &= res!datum & gb.lf" - was incorrectly converting using localization, whereas CStr() must not be localization-aware (i.e. it must use UTC). So the interpreter gets the date field contents from the database driver as a string. Then is assumes that string to be a local date, and converts it accordingly. Then CStr() converts that date back to a string, displaying it in UTC timezone (hence your two hours shift). The actual problem is in the database drivers that always assume that dates stored in the database are local dates. If your database dates are UTC (which should have been the default since the beginning, but fixing that would break the backward-compatibility), you have to write that: MyDate = CDate(res!datum + System.TimeZone / 86400) or MyDate = Date.ToUTC(res!datum) if you use the gb.util component from the latest revision. Regards, -- Beno?t Minisini From chrisml at ...3340... Sun Jul 23 11:32:19 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sun, 23 Jul 2017 11:32:19 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 two confirme bug since 3.5 by Cristof In-Reply-To: References: Message-ID: <79a21413-cf0f-8a2e-4f6d-2f3ad22d5d09@...3340...> Am 22.07.2017 um 13:08 schrieb PICCORO McKAY Lenz: > i confirme the two bugs of Christof: > > >> I just tested Gambas daily, it does some weird thing with indentation in >> the editor of the IDE when a string before an "If" goes over more than >> one line. > > the "weird!" IDE line hanglind are since gambas 3.5, the line has some > strange behaviour.. No. That what I reported was not in 3.9, and it is already fixed. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From chrisml at ...3340... Sun Jul 23 11:34:39 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sun, 23 Jul 2017 11:34:39 +0200 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 In-Reply-To: <12bb3c33-eb2f-408c-a661-06118a42a041@...1...> References: <7b7789b2-19d2-2c3b-4727-cc0365d40583@...3340...> <12bb3c33-eb2f-408c-a661-06118a42a041@...1...> Message-ID: <5177aa22-6161-f1e8-4077-c6a7bbd1ccc9@...3340...> Am 22.07.2017 um 15:59 schrieb Beno?t Minisini: >> This If has not the right indentation. > That bug should have been fixed in revision #8166. Ok, thanks! Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From mckaygerhard at ...626... Sun Jul 23 16:21:53 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 23 Jul 2017 09:51:53 -0430 Subject: [Gambas-user] Pre-release of Gambas 3.10.0 two confirme bug since 3.5 by Cristof In-Reply-To: <79a21413-cf0f-8a2e-4f6d-2f3ad22d5d09@...3340...> References: <79a21413-cf0f-8a2e-4f6d-2f3ad22d5d09@...3340...> Message-ID: ok i see it but there's still the problem of line handling, if the cursor go to the end.. i must still pulse 8 times more to ide show the rest of the line Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-23 5:02 GMT-04:30 Christof Thalhofer : > Am 22.07.2017 um 13:08 schrieb PICCORO McKAY Lenz: > > i confirme the two bugs of Christof: > > > > > >> I just tested Gambas daily, it does some weird thing with indentation in > >> the editor of the IDE when a string before an "If" goes over more than > >> one line. > > > > the "weird!" IDE line hanglind are since gambas 3.5, the line has some > > strange behaviour.. > > No. That what I reported was not in 3.9, and it is already fixed. > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From mikeB at ...3673... Sun Jul 23 18:50:33 2017 From: mikeB at ...3673... (mikeB) Date: Sun, 23 Jul 2017 10:50:33 -0600 Subject: [Gambas-user] make installation package Message-ID: <91f2487b-b91d-b504-b84c-22b844bea7c9@...3673...> Greetings all, I have created a Gambas project - after creating a "Make Executable" file it will run as expected on the development system BUT when I try to make a installation package it says that "makepkg" and "makeself" files are missing. Doing a system search - the "makepkg" is on the system but not the "makeself". It will go ahead and make the setup file but when you install it on another system it will not activate. I am assuming that missing the make file is the problem or maybe I don't understand if I need to add any "Extra Dependance" files (I.E. the runtime files or ???) From what I have read the "make Installation package" automatically includes the Gambas runtime files? By the way - this software is great for us old VB coders - if only I could figure out how to re-distribute a project. Thanks for any and all help and have a great day, mB From charlie at ...2793... Sun Jul 23 20:53:13 2017 From: charlie at ...2793... (Charlie) Date: Sun, 23 Jul 2017 11:53:13 -0700 (MST) Subject: [Gambas-user] Dragging from one control to another In-Reply-To: References: Message-ID: <1500835993278-59883.post@...3046...> Rolf-Werner Eilert-2 wrote > The GridView_Drop event doesn't fire at all. No idea why. I can get this to work either, as you say the '_Drop' does not seem to fire. I came up with a different way to do this that might be of interest, see attached. GUITest.tar ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Dragging-from-one-control-to-another-tp59857p59883.html Sent from the gambas-user mailing list archive at Nabble.com. From jussi.lahtinen at ...626... Mon Jul 24 21:49:55 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 24 Jul 2017 22:49:55 +0300 Subject: [Gambas-user] reading files In-Reply-To: <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> References: <1f5bdc79-9e14-3a70-73db-d79e208228e9@...626...> <20170717185859.M85377@...951...> <20c924d1-2e22-2539-64a9-57c17b4f9587@...626...> Message-ID: "Title[30] As String" does not declare 30 characters, but 30 strings. Jussi On Tue, Jul 18, 2017 at 3:50 AM, Shane wrote: > i don't know what i am doing wrong > > Public Struct ID3v1_TAG '(128 bytes) > Tag[3] As String 'always TAG > Title[30] As String 'title, 30 characters > Artist[30] As String 'artist, 30 characters > Album[30] As String 'album, 30 characters > Year[4] As String 'year, 4 characters > Comment[30] As String 'comment, 30 characters (or 28 if > track# included) > Genre As Byte 'genre, 255 for none defined > End Struct > > > Private Sub GetID3v1(File As String) > Dim IDtag As ID3v1_TAG > Dim hfile As File > > hfile = Open File For Read > > ' > 'read the tag > ' seek to end of less tag size > > Read #hfile, IDtag, ID3v1_TAG > > here i get IDtag is NULL > > > > On 18/07/17 05:05, nando_f at ...951... wrote: > >> Yes it is possible, I do it. here is some code (incomplete) >> >> -Nando (Canada) >> >> >> >> ' top of class file >> Public Struct recstruc >> _a as integer >> _b as integer >> _c as integer >> end struct >> >> >> ' a function >> public function openAfile(filename as string) as file >> >> dim hfile as file >> dim arec as recstruc >> >> hfile = open filename for read write create >> >> with arec 'some values to write. >> ._a = 1 >> ._b = 22 >> ._c = 333 >> end with >> >> write #hfile, arec as recstruc >> >> 'if you position the hfile pointer back to zero, you can... >> read #hfile, arec as recstruc >> >> close #hfile >> >> end >> >> >> >> >> >> >> -- >> Open WebMail Project (http://openwebmail.org) >> >> >> ---------- Original Message ----------- >> From: T Lee Davidson >> To: gambas-user at lists.sourceforge.net >> Sent: Sun, 16 Jul 2017 12:42:35 -0400 >> Subject: Re: [Gambas-user] reading files >> >> On 07/16/2017 06:57 AM, Shane wrote: >>> >>>> given this example >>>> >>>> PRIVATE SUB BinaryRead(FilePath AS String) >>>> DIM binaryFile AS File >>>> DIM i AS Integer >>>> DIM b AS Byte >>>> DIM s AS Short >>>> DIM s1 AS String >>>> DIM s2 AS String >>>> ' Read binary file >>>> binaryFile = OPEN FilePath FOR READ >>>> READ #binaryFile, i >>>> READ #binaryFile, b >>>> READ #binaryFile, s >>>> READ #binaryFile, s1 >>>> READ #binaryFile, s2 >>>> CLOSE #binaryFile >>>> ' Display results >>>> PRINT i >>>> PRINT b >>>> PRINT s >>>> PRINT s1 >>>> PRINT s2 >>>> END >>>> >>>> >>>> is there a way for gambas to read a struct of all these variables >>>> in one read ? >>>> >>>> You may have hinted at the solution within your question. Have you >>> considered >>> using a Structure? >>> >>> http://gambaswiki.org/wiki/lang/read : >>> "... reads the stream Stream as binary data whose type is specified by >>> the >>> Datatype argument." >>> >>> "The returned datatype can be one of the following: NULL, Boolean, Byte, >>> Short, >>> Integer, Long, Pointer, Single, Float, Date, String, Variant, any >>> Array, >>> Collection or structure." >>> >>> http://gambaswiki.org/wiki/lang/structdecl >>> >>> -- >>> Lee >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------- End of Original Message ------- >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From adamnt42 at ...626... Tue Jul 25 13:02:41 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Tue, 25 Jul 2017 20:32:41 +0930 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo Message-ID: <20170725203241.6e5572aefa75fccec1fed847@...626...> Help me out here guys. (If you are old enough to remember) I am sure that it was JP Belmondo. At the end of the film he wraps a string of explosive around his head. -- B Bruen From mckaygerhard at ...626... Tue Jul 25 13:31:59 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 25 Jul 2017 07:31:59 -0400 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <20170725203241.6e5572aefa75fccec1fed847@...626...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> Message-ID: well a way to find, see fiml list and see plot of each one.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-25 7:02 GMT-04:00 adamnt42 at ...626... : > Help me out here guys. (If you are old enough to remember) > I am sure that it was JP Belmondo. > > At the end of the film he wraps a string of explosive around his head. > > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From karl.reinl at ...9... Tue Jul 25 13:50:50 2017 From: karl.reinl at ...9... (Karl Reinl) Date: Tue, 25 Jul 2017 13:50:50 +0200 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <20170725203241.6e5572aefa75fccec1fed847@...626...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> Message-ID: <1500983450.13526.14.camel@...3609...> Am Dienstag, den 25.07.2017, 20:32 +0930 schrieb adamnt42 at ...626...: > Help me out here guys. (If you are old enough to remember) > I am sure that it was JP Belmondo. > > At the end of the film he wraps a string of explosive around his head. > > not Yves Montand. In The Wage of Fear (Lohn der Angst) (Le Salaire de la Peur), from 1953 But the end, I remember, he crashed on his way home, while 'dancing' with his truck. -- Amicalement Charlie From adamnt42 at ...626... Tue Jul 25 14:03:07 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Tue, 25 Jul 2017 21:33:07 +0930 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <1500983450.13526.14.camel@...3609...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> <1500983450.13526.14.camel@...3609...> Message-ID: <20170725213307.6772723de57a9eac8b7bfb83@...626...> On Tue, 25 Jul 2017 13:50:50 +0200 Karl Reinl wrote: > The Wage of Fear Damn, I thought you may have got it, but no. (p.s. folks, sorry about this but it is driving me mad) -- B Bruen From adamnt42 at ...626... Tue Jul 25 14:04:31 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Tue, 25 Jul 2017 21:34:31 +0930 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: References: <20170725203241.6e5572aefa75fccec1fed847@...626...> Message-ID: <20170725213431.a6fae86f165aaca7c23ae441@...626...> On Tue, 25 Jul 2017 07:31:59 -0400 PICCORO McKAY Lenz wrote: > well a way to find, see fiml list and see plot of each one.. do you know how many films this guy has done? -- B Bruen From adamnt42 at ...626... Tue Jul 25 14:11:22 2017 From: adamnt42 at ...626... (adamnt42 at ...626...) Date: Tue, 25 Jul 2017 21:41:22 +0930 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <1500983450.13526.14.camel@...3609...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> <1500983450.13526.14.camel@...3609...> Message-ID: <20170725214122.8732b6dffb27ffdbac428b3c@...626...> On Tue, 25 Jul 2017 13:50:50 +0200 Karl Reinl wrote: > not Yves Montand. In The Wage of Fear (Lohn der Angst) (Le Salaire de la > Peur), from 1953 but you are getting damned close. I thought it might have been Grand Prix (1966) but no. You are in the correct genre for sure ... I probably got onto Belmondo from Un Homme et une Femme (ah Anouke) but I am sure that it has something to do with cars? -- B Bruen From karl.reinl at ...9... Tue Jul 25 14:26:50 2017 From: karl.reinl at ...9... (Karl Reinl) Date: Tue, 25 Jul 2017 14:26:50 +0200 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <20170725214122.8732b6dffb27ffdbac428b3c@...626...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> <1500983450.13526.14.camel@...3609...> <20170725214122.8732b6dffb27ffdbac428b3c@...626...> Message-ID: <1500985610.13526.21.camel@...3609...> Am Dienstag, den 25.07.2017, 21:41 +0930 schrieb adamnt42 at ...626...: > On Tue, 25 Jul 2017 13:50:50 +0200 > Karl Reinl wrote: > > > not Yves Montand. In The Wage of Fear (Lohn der Angst) (Le Salaire de la > > Peur), from 1953 > > but you are getting damned close. I thought it might have been Grand Prix (1966) but no. You are in the correct genre for sure ... I probably got onto Belmondo from Un Homme et une Femme (ah Anouke) but I am sure that it has something to do with cars? Ok, Jean-Paul Belmondo in Pierrot le Fou (Elf Uhr nachts) from 1965 from Jean-Luc Godard after the book ?Obsession? from Lionel White. -- Amicalement Charlie From bagonergi at ...626... Tue Jul 25 15:24:38 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 25 Jul 2017 15:24:38 +0200 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <20170725203241.6e5572aefa75fccec1fed847@...626...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> Message-ID: Pierrot le fou? 2017-07-25 13:02 GMT+02:00 adamnt42 at ...626... : > Help me out here guys. (If you are old enough to remember) > I am sure that it was JP Belmondo. > > At the end of the film he wraps a string of explosive around his head. > > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Tue Jul 25 15:39:30 2017 From: bagonergi at ...626... (Gianluigi) Date: Tue, 25 Jul 2017 15:39:30 +0200 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: References: <20170725203241.6e5572aefa75fccec1fed847@...626...> Message-ID: Sorry I did not see Charlie's answer. Here you can see the movie [0] [0] https://www.youtube.com/watch?v=7e6VZDlAUtA 2017-07-25 15:24 GMT+02:00 Gianluigi : > Pierrot le fou? > > > 2017-07-25 13:02 GMT+02:00 adamnt42 at ...626... : > >> Help me out here guys. (If you are old enough to remember) >> I am sure that it was JP Belmondo. >> >> At the end of the film he wraps a string of explosive around his head. >> >> >> -- >> B Bruen >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From mckaygerhard at ...626... Tue Jul 25 16:36:03 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Tue, 25 Jul 2017 10:36:03 -0400 Subject: [Gambas-user] Totally off topic: Jean-Paul Belmondo In-Reply-To: <20170725213431.a6fae86f165aaca7c23ae441@...626...> References: <20170725203241.6e5572aefa75fccec1fed847@...626...> <20170725213431.a6fae86f165aaca7c23ae441@...626...> Message-ID: 2017-07-25 8:04 GMT-04:00 adamnt42 at ...626... : > On Tue, 25 Jul 2017 07:31:59 -0400 > PICCORO McKAY Lenz wrote: > > > well a way to find, see fiml list and see plot of each one.. > > do you know how many films this guy has done? > ok ok, was a way to do.. ! XD > > > -- > B Bruen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bagonergi at ...626... Wed Jul 26 15:12:29 2017 From: bagonergi at ...626... (Gianluigi) Date: Wed, 26 Jul 2017 15:12:29 +0200 Subject: [Gambas-user] Undo/Redo logic. In-Reply-To: References: Message-ID: Hi Julio, That's exactly what I was asking. I'm trying to put it into practice in a program that if I succeed, I will post in the Farm. Thank you very much Regards Gianluigi 2017-07-18 19:31 GMT+02:00 Julio Sanchez : > Gianluigi: > > I leave you an example where you can see the use of the Command pattern to > do and undo. Hope this can help you. > > http://jsbsan.blogspot.com.es/2013/11/patron-command- > implementar-deshacer-y.html > > > Regards > > Julio > > > > 2017-07-18 14:05 GMT+02:00 Gianluigi : > > > In addition to what Gambas already provides for some controls, I would > like > > to implement undo/redo on the whole project level. > > I tried to understand the logic of Gambas's IDE, unfortunately without > > success. > > Which is the right way forward. > > > > Regards > > Gianluigi > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bugtracker at ...3416... Thu Jul 27 08:18:44 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Thu, 27 Jul 2017 06:18:44 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1129: lybrary extern return illegal instruction Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1129&from=L21haW4- Philippe BIENVAULT reported a new bug. Summary ------- lybrary extern return illegal instruction Type : Bug Priority : Medium Gambas version : 3.9 Product : Unknown Description ----------- Private Extern factorielle(toto As Integer) As Integer In "libfact" Public Sub Main() Dim aVal As Integer aVal = factorielle(12) ' -> return illegal instruction End System information ------------------ [System] Gambas=3.9.2 OperatingSystem=Linux Kernel=4.4.0-71-generic Architecture=x86_64 Distribution=Ubuntu 16.04.2 LTS Desktop=UNITY Theme=Gtk Language=fr_FR.UTF-8 Memory=3624M [Libraries] Cairo=libcairo.so.2.11400.6 Curl=libcurl.so.4.4.0 DBus=libdbus-1.so.3.14.6 GStreamer=libgstreamer-1.0.so.0.803.0 GTK+2=libgtk-x11-2.0.so.0.2400.30 GTK+3=libgtk-3.so.0.1800.9 OpenGL=libGL.so.1.0.0 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.58.0.0 QT4=libQtCore.so.4.8.7 QT5=libQt5Core.so.5.5.1 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] CLUTTER_IM_MODULE=xim COMPIZ_BIN_PATH=/usr/bin/ COMPIZ_CONFIG_PROFILE=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-1SjanrYhNB DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path DESKTOP_SESSION=ubuntu DISPLAY=:0 GB_GUI=gb.qt4 GDMSESSION=ubuntu GDM_LANG=fr_FR GIO_LAUNCHED_DESKTOP_FILE=/.local/share/applications/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=11132 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_KEYRING_CONTROL= GNOME_KEYRING_PID= GPG_AGENT_INFO=/.gnupg/S.gpg-agent:0:1 GTK2_MODULES=overlay-scrollbar GTK_IM_MODULE=ibus GTK_MODULES=gail:atk-bridge:unity-gtk-module HOME= IM_CONFIG_PHASE=1 INSTANCE= JOB=unity-settings-daemon LANG=fr_FR.UTF-8 LANGUAGE=fr_FR LOGNAME= MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PWD= QT4_IM_MODULE=xim QT_ACCESSIBILITY=1 QT_IM_MODULE=ibus QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 QT_QPA_PLATFORMTHEME=appmenu-qt5 SESSION=ubuntu SESSIONTYPE=gnome-session SESSION_MANAGER=local/:@/tmp/.ICE-unix/1987,unix/:/tmp/.ICE-unix/1987 SHELL=/bin/bash SHLVL=0 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime UPSTART_EVENTS=xsession started UPSTART_INSTANCE= UPSTART_JOB=unity7 UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1771 USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg XDG_CURRENT_DESKTOP=Unity XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 XMODIFIERS=@...3498...=ibus From bugtracker at ...3416... Thu Jul 27 08:19:41 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Thu, 27 Jul 2017 06:19:41 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1129: lybrary extern return illegal instruction In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1129&from=L21haW4- Philippe BIENVAULT added an attachment: factorielle.tar.xz From charlie at ...2793... Thu Jul 27 19:01:33 2017 From: charlie at ...2793... (Charlie) Date: Thu, 27 Jul 2017 10:01:33 -0700 (MST) Subject: [Gambas-user] Weather app in Software Farm In-Reply-To: References: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> Message-ID: <1501174893208-59899.post@...3046...> I have tried out the latest version 0.1.9 and it worked on Mint 18 and the TryIcon is fine. I put in my location and it finds it but I notice that Line 98 in Config.class: - *Settings["Default/Location"] = Replace(txtLocation.Text, " ", "")* takes out any spaces so Saint Peter Port becomes SaintPeterPort and then it fails to load the weather. I changed the line to: - *Settings["Default/Location"] = Trim(txtLocation.Text)* and it works but is too large to fit on the Form:- I have had a look at OpenWeather Database and the largest 'location' is: - *Pos?lok Psikhonevrologicheskoy Bol?nitsy Imeni Karamzina* which seems an excessively long name but it is there! ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59899.html Sent from the gambas-user mailing list archive at Nabble.com. From tmorehen at ...3602... Thu Jul 27 21:21:10 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 27 Jul 2017 15:21:10 -0400 Subject: [Gambas-user] Weather app in Software Farm In-Reply-To: <1501174893208-59899.post@...3046...> References: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> <1501174893208-59899.post@...3046...> Message-ID: <2b038995-2db5-34a7-74d0-eade28247429@...3602...> Hi Charlie, I just published a new version of gbWeather. Changes include: 1) No editing is done to the location name, except for the Trim() you suggested. 2) LocationID is now used for both OpenWeather and Yahoo Weather lookups. That means changes to location after the locationid has been found don't matter any more. 3) To save space, "Weather" is no longer automatically appended to the title. 4) Config now includes a setting for a location nickname to be used as the title. This lets the user provide a name that fits. The user can also use the nickname to add back "Weather" (see 3.) The nickname defaults to everything to the left of the first comma in the location name. BTW, I may not have mentioned that you can drag the weather window around the screen by clicking on the title. It will remember the new position when started next. On 2017-07-27 01:01 PM, Charlie wrote: > I have tried out the latest version 0.1.9 and it worked on Mint 18 and the > TryIcon is fine. I put in my location and it finds it but I notice that Line > 98 in Config.class: - > > *Settings["Default/Location"] = Replace(txtLocation.Text, " ", "")* > > takes out any spaces so Saint Peter Port becomes SaintPeterPort and then it > fails to load the weather. I changed the line to: - > > *Settings["Default/Location"] = Trim(txtLocation.Text)* > and it works but is too large to fit on the Form:- > > > > I have had a look at OpenWeather Database and the largest 'location' is: - > *Pos?lok Psikhonevrologicheskoy Bol?nitsy Imeni Karamzina* > > which seems an excessively long name but it is there! > > > > > ----- > Check out www.gambas.one > -- > View this message in context: http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59899.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Thu Jul 27 21:33:45 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 27 Jul 2017 22:33:45 +0300 Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1129: lybrary extern return illegal instruction In-Reply-To: References: Message-ID: How is the function called in C? Jussi On Thu, Jul 27, 2017 at 9:18 AM, wrote: > http://gambaswiki.org/bugtracker/edit?object=BUG.1129&from=L21haW4- > > Philippe BIENVAULT reported a new bug. > > Summary > ------- > > lybrary extern return illegal instruction > > Type : Bug > Priority : Medium > Gambas version : 3.9 > Product : Unknown > > > Description > ----------- > > Private Extern factorielle(toto As Integer) As Integer In "libfact" > > > Public Sub Main() > > Dim aVal As Integer > > aVal = factorielle(12) ' -> return illegal instruction > > > End > > > System information > ------------------ > > [System] > Gambas=3.9.2 > OperatingSystem=Linux > Kernel=4.4.0-71-generic > Architecture=x86_64 > Distribution=Ubuntu 16.04.2 LTS > Desktop=UNITY > Theme=Gtk > Language=fr_FR.UTF-8 > Memory=3624M > > [Libraries] > Cairo=libcairo.so.2.11400.6 > Curl=libcurl.so.4.4.0 > DBus=libdbus-1.so.3.14.6 > GStreamer=libgstreamer-1.0.so.0.803.0 > GTK+2=libgtk-x11-2.0.so.0.2400.30 > GTK+3=libgtk-3.so.0.1800.9 > OpenGL=libGL.so.1.0.0 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.58.0.0 > QT4=libQtCore.so.4.8.7 > QT5=libQt5Core.so.5.5.1 > SDL=libSDL-1.2.so.0.11.4 > SQLite=libsqlite3.so.0.8.6 > > [Environment] > CLUTTER_IM_MODULE=xim > COMPIZ_BIN_PATH=/usr/bin/ > COMPIZ_CONFIG_PROFILE=ubuntu > DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-1SjanrYhNB > DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path > DESKTOP_SESSION=ubuntu > DISPLAY=:0 > GB_GUI=gb.qt4 > GDMSESSION=ubuntu > GDM_LANG=fr_FR > GIO_LAUNCHED_DESKTOP_FILE=/.local/share/applications/gambas3.desktop > GIO_LAUNCHED_DESKTOP_FILE_PID=11132 > GNOME_DESKTOP_SESSION_ID=this-is-deprecated > GNOME_KEYRING_CONTROL= > GNOME_KEYRING_PID= > GPG_AGENT_INFO=/.gnupg/S.gpg-agent:0:1 > GTK2_MODULES=overlay-scrollbar > GTK_IM_MODULE=ibus > GTK_MODULES=gail:atk-bridge:unity-gtk-module > HOME= > IM_CONFIG_PHASE=1 > INSTANCE= > JOB=unity-settings-daemon > LANG=fr_FR.UTF-8 > LANGUAGE=fr_FR > LOGNAME= > MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/ > sbin:/bin:/usr/games:/usr/local/games:/snap/bin > PWD= > QT4_IM_MODULE=xim > QT_ACCESSIBILITY=1 > QT_IM_MODULE=ibus > QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 > QT_QPA_PLATFORMTHEME=appmenu-qt5 > SESSION=ubuntu > SESSIONTYPE=gnome-session > SESSION_MANAGER=local/:@/tmp/.ICE-unix/ > 1987,unix/:/tmp/.ICE-unix/1987 > SHELL=/bin/bash > SHLVL=0 > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh > TZ=:/etc/localtime > UPSTART_EVENTS=xsession started > UPSTART_INSTANCE= > UPSTART_JOB=unity7 > UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1771 > USER= > XAUTHORITY=/.Xauthority > XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg > XDG_CURRENT_DESKTOP=Unity > XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/ > local/share/:/usr/share/:/var/lib/snapd/desktop > XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ > XDG_MENU_PREFIX=gnome- > XDG_RUNTIME_DIR=/run/user/1000 > XDG_SEAT=seat0 > XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 > XDG_SESSION_DESKTOP=ubuntu > XDG_SESSION_ID=c2 > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 > XDG_SESSION_TYPE=x11 > XDG_VTNR=7 > XMODIFIERS=@im=ibus > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Thu Jul 27 22:13:56 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 27 Jul 2017 16:13:56 -0400 Subject: [Gambas-user] sqlite connectin absolute path doe snto work!? Message-ID: if i used absolute path in con.host or con.name without define the other (by example, define con.name but not con.host) datbase connection does not opened for slite3 documentation said that only need to define one of those Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From mckaygerhard at ...626... Fri Jul 28 00:42:44 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Thu, 27 Jul 2017 18:12:44 -0430 Subject: [Gambas-user] since are available SQLrequest? Message-ID: i see that in wiki, http://gambaswiki.org/wiki/comp/gb.db/sqlrequest since are available that? there its available for gambas 3.1? -- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From markwalt at ...626... Fri Jul 28 01:10:06 2017 From: markwalt at ...626... (markwalt) Date: Thu, 27 Jul 2017 16:10:06 -0700 (MST) Subject: [Gambas-user] Trouble with CSVFile Component Message-ID: <1501197006652-59904.post@...3046...> Hi guys, I'm trying to write a very simple program that pulls in one CSV File, and spits out another, based on what's inside the file. I see from the Wiki that there's a function for that, in the db.utils component. However, using the very sparse example provided, I'm getting errors. I'm using 3.8.4, which is the "current" version in my distro (Xubuntu 16.04.2 LTS), and the documentation says the feature was available as of Gambas 3.7. Here's the code I'm using: Public Sub Main() Dim sCSVGrid As String Dim sCSVImport As String Dim hCSVFile As CsvFile Print "Enter the complete path and filename of the CSV file you are importing" Input sCSVImport Print "Enter the complete path and filename of the CSV file containing the grid you are creating" Input sCSVGrid hCSVFile = New CsvFile(sCSVImport) End Obviously, it's not doing anything yet, but this simple bit of code blows up at Dim hCSVFile As CsvFile saying CsvFile is an unknown identifier. Yet, this code was taken from the example, I just added a few lines. >From what I unerstand from the documentation, anything in db.util should be available, but I guess I'm missing something, probably something simple. As you can see, I'm a bit of a newb. Any tips on what I'm doing wrong? -- View this message in context: http://gambas.8142.n7.nabble.com/Trouble-with-CSVFile-Component-tp59904.html Sent from the gambas-user mailing list archive at Nabble.com. From tmorehen at ...3602... Fri Jul 28 03:43:49 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Thu, 27 Jul 2017 21:43:49 -0400 Subject: [Gambas-user] Trouble with CSVFile Component In-Reply-To: <1501197006652-59904.post@...3046...> References: <1501197006652-59904.post@...3046...> Message-ID: Did you add gb.utils component to your project? Project->Properties->Components & check gb.utils On 2017-07-27 07:10 PM, markwalt wrote: > Hi guys, > > I'm trying to write a very simple program that pulls in one CSV File, and > spits out another, based on what's inside the file. > > I see from the Wiki that there's a function for that, in the db.utils > component. However, using the very sparse example provided, I'm getting > errors. > > I'm using 3.8.4, which is the "current" version in my distro (Xubuntu > 16.04.2 LTS), and the documentation says the feature was available as of > Gambas 3.7. > > Here's the code I'm using: > > Public Sub Main() > > Dim sCSVGrid As String > Dim sCSVImport As String > Dim hCSVFile As CsvFile > > > > Print "Enter the complete path and filename of the CSV file you are > importing" > Input sCSVImport > Print "Enter the complete path and filename of the CSV file containing the > grid you are creating" > Input sCSVGrid > > > hCSVFile = New CsvFile(sCSVImport) > > > > End > > Obviously, it's not doing anything yet, but this simple bit of code blows up > at > > Dim hCSVFile As CsvFile > > saying CsvFile is an unknown identifier. > > Yet, this code was taken from the example, I just added a few lines. > > >From what I unerstand from the documentation, anything in db.util should be > available, but I guess I'm missing something, probably something simple. > > As you can see, I'm a bit of a newb. Any tips on what I'm doing wrong? > > > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/Trouble-with-CSVFile-Component-tp59904.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From markwalt at ...626... Fri Jul 28 03:48:27 2017 From: markwalt at ...626... (Mark Walters) Date: Thu, 27 Jul 2017 18:48:27 -0700 Subject: [Gambas-user] Trouble with CSVFile Component In-Reply-To: References: <1501197006652-59904.post@...3046...> Message-ID: Nope. Told ya I was a newb. 20+ years ago I used to do a lot of work in VB, and especially VBA. It's been a while, and my programming muscles have atrophied a bit. And while Gambas feels very familiar, it's also quite different, and I'm still acclimating to it. Thanks for your help :-) On Thu, Jul 27, 2017 at 6:43 PM, Tony Morehen wrote: > Did you add gb.utils component to your project? > > Project->Properties->Components & check gb.utils > > > > On 2017-07-27 07:10 PM, markwalt wrote: > >> Hi guys, >> >> I'm trying to write a very simple program that pulls in one CSV File, and >> spits out another, based on what's inside the file. >> >> I see from the Wiki that there's a function for that, in the db.utils >> component. However, using the very sparse example provided, I'm getting >> errors. >> >> I'm using 3.8.4, which is the "current" version in my distro (Xubuntu >> 16.04.2 LTS), and the documentation says the feature was available as of >> Gambas 3.7. >> >> Here's the code I'm using: >> >> Public Sub Main() >> >> Dim sCSVGrid As String >> Dim sCSVImport As String >> Dim hCSVFile As CsvFile >> Print "Enter the complete path and filename of the CSV file >> you are >> importing" >> Input sCSVImport >> Print "Enter the complete path and filename of the CSV file containing >> the >> grid you are creating" >> Input sCSVGrid >> hCSVFile = New CsvFile(sCSVImport) >> End >> >> Obviously, it's not doing anything yet, but this simple bit of code blows >> up >> at >> >> Dim hCSVFile As CsvFile >> >> saying CsvFile is an unknown identifier. >> >> Yet, this code was taken from the example, I just added a few lines. >> >> >From what I unerstand from the documentation, anything in db.util should >> be >> available, but I guess I'm missing something, probably something simple. >> >> As you can see, I'm a bit of a newb. Any tips on what I'm doing wrong? >> >> >> >> >> >> -- >> View this message in context: http://gambas.8142.n7.nabble.c >> om/Trouble-with-CSVFile-Component-tp59904.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > -- -Mark From mikeB at ...3673... Fri Jul 28 06:51:20 2017 From: mikeB at ...3673... (mikeB) Date: Thu, 27 Jul 2017 22:51:20 -0600 Subject: [Gambas-user] help with ListView code? Message-ID: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> Greetings all, I've got a Listview (set as Column view) with 2 columns that I'm using for testing so I might understand how all this works so can add it to a project. testCode.................................................. With listview1 .Clear .Resizable = True .Columns.Count = 2 .Columns[0].Text = "Site Name:" .Columns[1].Text = "Site URL:" End With .................................................................. I can add values to the 1st column: code.......................................................... listview1.add("1", "First var entry") listview1.add("2", "Second var entry to test the resize ability") listview1.add("3", "Third var entry") ................................................................... Have spent a lot of research time trying to figure out how to add values to the 2nd column (Site URL:) - got me stumped. Anyone got an example line of code to help me out? I can't seem to find the answer in the help docs. Would greatly appreciate any/ all help;-) mikeB From gambas.fr at ...626... Fri Jul 28 09:51:16 2017 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 28 Jul 2017 09:51:16 +0200 Subject: [Gambas-user] help with ListView code? In-Reply-To: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> References: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> Message-ID: Le 28 juil. 2017 07:12, "mikeB" a ?crit : Greetings all, I've got a Listview (set as Column view) with 2 columns that I'm using for testing so I might understand how all this works so can add it to a project. testCode.................................................. With listview1 .Clear .Resizable = True .Columns.Count = 2 .Columns[0].Text = "Site Name:" .Columns[1].Text = "Site URL:" End With .................................................................. I can add values to the 1st column: code.......................................................... listview1.add("1", "First var entry") listview1.add("2", "Second var entry to test the resize ability") listview1.add("3", "Third var entry") ................................................................... Have spent a lot of research time trying to figure out how to add values to the 2nd column (Site URL:) - got me stumped. Anyone got an example line of code to help me out? I can't seem to find the answer in the help docs. Would greatly appreciate any/ all help;-) mikeB ------------------------------------------------------------ ------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Simply : ListView ["1"]="myvalue" Where "1" is the key of the line value From taboege at ...626... Fri Jul 28 15:47:56 2017 From: taboege at ...626... (Tobias Boege) Date: Fri, 28 Jul 2017 15:47:56 +0200 Subject: [Gambas-user] help with ListView code? In-Reply-To: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> References: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> Message-ID: <20170728134756.GE602@...3600...> On Thu, 27 Jul 2017, mikeB wrote: > Greetings all, > I've got a Listview (set as Column view) with 2 columns that I'm using > > for testing so I might understand how all this works so can add it to a > project. > > testCode.................................................. > With listview1 > .Clear > .Resizable = True > .Columns.Count = 2 > .Columns[0].Text = "Site Name:" > .Columns[1].Text = "Site URL:" > End With > .................................................................. > I can add values to the 1st column: > code.......................................................... > listview1.add("1", "First var entry") > listview1.add("2", "Second var entry to test the resize ability") > listview1.add("3", "Third var entry") > ................................................................... > Have spent a lot of research time trying to figure out how to add > values to the 2nd column (Site URL:) - got me stumped. > > Anyone got an example line of code to help me out? > > I can't seem to find the answer in the help docs. > > Would greatly appreciate any/ all help;-) > mikeB > You don't really have a ListView but a ColumnView, do you? A ColumnView is a ColumnView and not "a Listview (set as Column view)". The ListView control doesn't have a Columns property. I have to say that when I tried to answer your question, I noticed that I had no clue how ListView, its sibling ColumnView or their mutual parent _TreeView work, so I read their source code (see gb.gui.base) -- and I still had no clue. And let me say that this happens rarely to me these days. I had to dig up an example (the FileView class in gb.form is very nice) to see what they actually do with their columns. Since I get it now, I want to give an explanation of these classes first, so bear with me. To understand ColumnView you have to understand _TreeView, because ColumnView is basically a _TreeView with some code added to manage columns, but the columns are already available from _TreeView. To add to the confusion, a _TreeView is internally basically a GridView, i.e. a square grid of cells in which you can put strings and pictures, but you can't access these cells /that/ freely from a _TreeView. The key information is that each _TreeView item is an entire *row* in the GridView. By calling ColumnView.Add("1", "First var entry") you create a new row in the GridView, identified by the key "1", and set the text of the first column of that row to "First var entry". The return value of the Add() method is a _TreeView_Item object which allows you to set the texts of all other columns: ColumnView.Add("1", "First var entry")[1] = "second column" Wrap it in a With or store it in a variable if you want to set many other columns: Dim hItem As _TreeView_Item hItem = ColumnView.Add("1", "First var entry") hItem[1] = "second column" hItem[2] = "third column" The asymmetric treatment of the first vs. the other columns is most likely because you always want to set at least the first column's text, and maybe of technical nature as the Add() method has optional parameters which make it uglier to add a variable argument list (Param in gb) to Add(). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bill-lancaster at ...2231... Fri Jul 28 16:08:49 2017 From: bill-lancaster at ...2231... (bill-lancaster) Date: Fri, 28 Jul 2017 07:08:49 -0700 (MST) Subject: [Gambas-user] textarea won't accept text Message-ID: <1501250929703-59911.post@...3046...> I'm obviously missing something here but have just added a textarea control to my form. I can display text in it from code but can only enter one character. Any ideas? -- View this message in context: http://gambas.8142.n7.nabble.com/textarea-won-t-accept-text-tp59911.html Sent from the gambas-user mailing list archive at Nabble.com. From charlie at ...2793... Fri Jul 28 16:32:11 2017 From: charlie at ...2793... (Charlie) Date: Fri, 28 Jul 2017 07:32:11 -0700 (MST) Subject: [Gambas-user] Trouble with CSVFile Component In-Reply-To: <1501197006652-59904.post@...3046...> References: <1501197006652-59904.post@...3046...> Message-ID: <1501252331703-59913.post@...3046...> markwalt wrote > Hi guys, > > I'm trying to write a very simple program that pulls in one CSV File, and > spits out another, based on what's inside the file. I use CSV files all the time. I find them easy and fast. Have a look at the attached example, hopefully it will help. CLIOnly1.tar ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Trouble-with-CSVFile-Component-tp59904p59913.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Fri Jul 28 16:32:16 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 28 Jul 2017 16:32:16 +0200 Subject: [Gambas-user] since are available SQLrequest? In-Reply-To: References: Message-ID: Le 28/07/2017 ? 00:42, PICCORO McKAY Lenz a ?crit : > i see that in wiki, http://gambaswiki.org/wiki/comp/gb.db/sqlrequest > > since are available that? there its available for gambas 3.1? > It's there since Gambas 3.8. -- Beno?t Minisini From adrien.prokopowicz at ...626... Fri Jul 28 16:32:58 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Fri, 28 Jul 2017 16:32:58 +0200 Subject: [Gambas-user] textarea won't accept text In-Reply-To: <1501250929703-59911.post@...3046...> References: <1501250929703-59911.post@...3046...> Message-ID: Le Fri, 28 Jul 2017 16:08:49 +0200, bill-lancaster via Gambas-user a ?crit: > I'm obviously missing something here but have just added a textarea > control > to my form. > I can display text in it from code but can only enter one character. > Any ideas? > That looks like a bug. Can you send a project we can use to test this ? And if its a bug, your system's configuration will probably be needed too. Regards, -- Adrien Prokopowicz From mckaygerhard at ...626... Fri Jul 28 16:38:53 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 10:38:53 -0400 Subject: [Gambas-user] since are available SQLrequest? In-Reply-To: References: Message-ID: grrr the wiki must have that! thanks! please care with wiki aditions! most distributions and gambas programers dont have time/patiente to compile lasted gambas release.. and the other more important lasted gambas release does not fit always the currentl stable linux distributions dependences.. i note the openssl patch i commited to support embebed linuxes was removed! why? does not affect any others.. property detect older and newer versions Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 10:32 GMT-04:00 Beno?t Minisini : > Le 28/07/2017 ? 00:42, PICCORO McKAY Lenz a ?crit : > >> i see that in wiki, http://gambaswiki.org/wiki/comp/gb.db/sqlrequest >> >> since are available that? there its available for gambas 3.1? >> >> > It's there since Gambas 3.8. > > -- > Beno?t Minisini > From mckaygerhard at ...626... Fri Jul 28 16:43:03 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 10:43:03 -0400 Subject: [Gambas-user] Trouble with CSVFile Component In-Reply-To: References: <1501197006652-59904.post@...3046...> Message-ID: 2017-07-27 21:48 GMT-04:00 Mark Walters : > And while Gambas feels very familiar, it's also quite different, and I'm > still acclimating to it. > always will be difference in any case, please dont assume any new artifac always want to emulate guindows.. > Thanks for your help :-) > in the IDE *there's a menu help, in that there's a entry about farm software, here there are a lot of example, that helps so much.. its recomended too* apart of the attached example of Charlie CLIOnly1.tar > > > On Thu, Jul 27, 2017 at 6:43 PM, Tony Morehen > wrote: > > > Did you add gb.utils component to your project? > > > > Project->Properties->Components & check gb.utils > > > > > > > > On 2017-07-27 07:10 PM, markwalt wrote: > > > >> Hi guys, > >> > >> I'm trying to write a very simple program that pulls in one CSV File, > and > >> spits out another, based on what's inside the file. > >> > >> I see from the Wiki that there's a function for that, in the db.utils > >> component. However, using the very sparse example provided, I'm getting > >> errors. > >> > >> I'm using 3.8.4, which is the "current" version in my distro (Xubuntu > >> 16.04.2 LTS), and the documentation says the feature was available as of > >> Gambas 3.7. > >> > >> Here's the code I'm using: > >> > >> Public Sub Main() > >> > >> Dim sCSVGrid As String > >> Dim sCSVImport As String > >> Dim hCSVFile As CsvFile > >> Print "Enter the complete path and filename of the CSV file > >> you are > >> importing" > >> Input sCSVImport > >> Print "Enter the complete path and filename of the CSV file > containing > >> the > >> grid you are creating" > >> Input sCSVGrid > >> hCSVFile = New CsvFile(sCSVImport) > >> End > >> > >> Obviously, it's not doing anything yet, but this simple bit of code > blows > >> up > >> at > >> > >> Dim hCSVFile As CsvFile > >> > >> saying CsvFile is an unknown identifier. > >> > >> Yet, this code was taken from the example, I just added a few lines. > >> > >> >From what I unerstand from the documentation, anything in db.util > should > >> be > >> available, but I guess I'm missing something, probably something simple. > >> > >> As you can see, I'm a bit of a newb. Any tips on what I'm doing wrong? > >> > >> > >> > >> > >> > >> -- > >> View this message in context: http://gambas.8142.n7.nabble.c > >> om/Trouble-with-CSVFile-Component-tp59904.html > >> Sent from the gambas-user mailing list archive at Nabble.com. > >> > >> ------------------------------------------------------------ > >> ------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > > > > > -- > -Mark > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Fri Jul 28 16:57:06 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 10:57:06 -0400 Subject: [Gambas-user] traslate grep expresion to detect COMMENT in line sql Message-ID: i have a sql file that hava also lines like : COMMENT " xxxx " , field f2 \n in console with this grep/sed can sustituye multilines or single lines sed -ne '/comment/{:;/\o47;\s*$/!{N;b};s/\n\s*/ /;p}' References: <56544f77-8143-fbfe-48b6-2fb4692088b4@...3602...> <1501174893208-59899.post@...3046...> <2b038995-2db5-34a7-74d0-eade28247429@...3602...> Message-ID: <1501254418870-59920.post@...3046...> Tony Morehen wrote > Hi Charlie, I just published a new version of gbWeather. Hi Tony, This seems to be working quite well though I don't always get 'Future' icons. I have been playing with this idea as well and if you look here you will see all the icons you need and you already have the name of the icon you need: - sIcon = colForecast["list"][0]["weather"][0]["icon"] You can download it with: - You could download them all or only when they are needed. They are only 3 to 4kb ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59920.html Sent from the gambas-user mailing list archive at Nabble.com. From charlie at ...2793... Fri Jul 28 17:16:55 2017 From: charlie at ...2793... (Charlie) Date: Fri, 28 Jul 2017 08:16:55 -0700 (MST) Subject: [Gambas-user] textarea won't accept text In-Reply-To: <1501250929703-59911.post@...3046...> References: <1501250929703-59911.post@...3046...> Message-ID: <1501255015026-59922.post@...3046...> bill-lancaster wrote > I'm obviously missing something here but have just added a textarea > control to my form. > I can display text in it from code but can only enter one character. > Any ideas? I have tried this and I can't find a fault. I can enter as much text as I like. Put text in with code and add more text with the keyboard. I have tested it with gb.gui, gb.gtk3 and gb.qt4 and all behave the same. An example, as Adrien said, might help. ----- Check out www.gambas.one -- View this message in context: http://gambas.8142.n7.nabble.com/textarea-won-t-accept-text-tp59911p59922.html Sent from the gambas-user mailing list archive at Nabble.com. From fernandojosecabral at ...626... Fri Jul 28 17:34:43 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 12:34:43 -0300 Subject: [Gambas-user] traslate grep expresion to detect COMMENT in line sql In-Reply-To: References: Message-ID: 2017-07-28 11:57 GMT-03:00 PICCORO McKAY Lenz : > > my target objetive it parse a text/line like this: > > fiel1 TEXT COMMENT "coment fiel1" , field2 TEXT, fiel3 TEXT > fiel4 NUMBER(10,2), fiel5 TEXT COMMENT "pepepeep", > fiel6 TEXT > > into this: > > fiel1 TEXT /* coment fiel1*/ , field2 TEXT, fiel3 TEXT > fiel4 NUMBER(10,2), fiel5 TEXT /*pepepeep*/, > fiel6 TEXT > Let me see if I have understood this well enough: a) find the word " COMMENT " (whitespace before and after), followed by whatever till you find a "," (comma) b) Delede " COMMENT " and put "whatever" between "/*" and "*/" c) Leave untouched whatever is after the first "," (comma) including the comma itself. Is that right? If it is, you should start by compiling this regular expression: "^(.*?) COMMENT +?(".*?")(,.*?)" And the replace by: "&1 \*&2*/&3" (scape as needed) and this should work. what it does: a) from the start of the line, find whatever exists until the expression " COMMENT " -- which should not be included. b) Save that firt part into the buffer number 1 c) Skip til after the last white space after " COMMENT " - throw that away d) save the next portion between double quotes and save into buffer number 2 e) Save next portion into buffer number 3 Put back the contents from buffer 1, add "\*", put back the contents of buffer 2, add "*/" and then put back the contents of buffer number 3. You may have to tinker around a little, but I think this contains the basic ideia. - fernando Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Fri Jul 28 17:37:14 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 12:37:14 -0300 Subject: [Gambas-user] textarea won't accept text In-Reply-To: <1501255015026-59922.post@...3046...> References: <1501250929703-59911.post@...3046...> <1501255015026-59922.post@...3046...> Message-ID: Perhaps Bill has met the same problem I have here. I can't use IDE in my regular machines because it will not take anything from the keyboard. I only can edit my source code using a virtual machine. Nevertheless - I must add - the textarea in my program is working fine. - fernando 2017-07-28 12:16 GMT-03:00 Charlie : > bill-lancaster wrote > > I'm obviously missing something here but have just added a textarea > > control to my form. > > I can display text in it from code but can only enter one character. > > Any ideas? > > I have tried this and I can't find a fault. I can enter as much text as I > like. Put text in with code and add more text with the keyboard. I have > tested it with gb.gui, gb.gtk3 and gb.qt4 and all behave the same. > > An example, as Adrien said, might help. > > > > ----- > Check out www.gambas.one > -- > View this message in context: http://gambas.8142.n7.nabble. > com/textarea-won-t-accept-text-tp59911p59922.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Fri Jul 28 17:50:35 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 11:50:35 -0400 Subject: [Gambas-user] traslate grep expresion to detect COMMENT in line sql In-Reply-To: References: Message-ID: wow! i must made a string search procedure until "comment" was find.. ! i think that but i also think that a reg expresion must be better with pcre component! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 11:34 GMT-04:00 Fernando Cabral : > 2017-07-28 11:57 GMT-03:00 PICCORO McKAY Lenz : > > > > > my target objetive it parse a text/line like this: > > > > fiel1 TEXT COMMENT "coment fiel1" , field2 TEXT, fiel3 TEXT > > fiel4 NUMBER(10,2), fiel5 TEXT COMMENT "pepepeep", > > fiel6 TEXT > > > > into this: > > > > fiel1 TEXT /* coment fiel1*/ , field2 TEXT, fiel3 TEXT > > fiel4 NUMBER(10,2), fiel5 TEXT /*pepepeep*/, > > fiel6 TEXT > > > > Let me see if I have understood this well enough: > a) find the word " COMMENT " (whitespace before and after), followed by > whatever till you find a "," (comma) > b) Delede " COMMENT " and put "whatever" between "/*" and "*/" > c) Leave untouched whatever is after the first "," (comma) including the > comma itself. > > Is that right? If it is, you should start by compiling this regular > expression: > > "^(.*?) COMMENT +?(".*?")(,.*?)" > > And the replace by: "&1 \*&2*/&3" (scape as needed) and this should work. > > what it does: > a) from the start of the line, find whatever exists until the expression " > COMMENT " -- which should not be included. > b) Save that firt part into the buffer number 1 > c) Skip til after the last white space after " COMMENT " - throw that away > d) save the next portion between double quotes and save into buffer number > 2 > e) Save next portion into buffer number 3 > > Put back the contents from buffer 1, add "\*", put back the contents of > buffer 2, add "*/" and then put back the contents of buffer number 3. > > You may have to tinker around a little, but I think this contains the basic > ideia. > > - fernando > > > > > Lenz McKAY Gerardo (PICCORO) > > > http://qgqlochekone.blogspot.com > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Fri Jul 28 18:11:52 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 12:11:52 -0400 Subject: [Gambas-user] replace beetween two strings Message-ID: i'v this cae, in a line i have: " string pepe pablo, data toto made thinker data2 \" and also a pizza" i what to remove all the string or extrac all the string beetween the "data" fist ocurrence and the next after that ocurrence.. i try to do but in the for each always replace twice.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From mckaygerhard at ...626... Fri Jul 28 18:47:07 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 12:47:07 -0400 Subject: [Gambas-user] gb.pcre regexp replace does not indicate since! Message-ID: http://gambaswiki.org/wiki/comp/gb.pcre/regexp/replace has a "since 3.9.X" but does not indicate what! the hole "replace" or only a part functionality? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From taboege at ...626... Fri Jul 28 18:56:29 2017 From: taboege at ...626... (Tobias Boege) Date: Fri, 28 Jul 2017 18:56:29 +0200 Subject: [Gambas-user] gb.pcre regexp replace does not indicate since! In-Reply-To: References: Message-ID: <20170728165629.GH602@...3600...> On Fri, 28 Jul 2017, PICCORO McKAY Lenz wrote: > http://gambaswiki.org/wiki/comp/gb.pcre/regexp/replace has a "since 3.9.X" > but does not indicate what! > > the hole "replace" or only a part functionality? > The note *below* the "Since 3.9.3" marker. The Replace() method exists since 3.5.0, as you could have found out by looking at the commit history by yourself. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at ...626... Fri Jul 28 19:00:26 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 13:00:26 -0400 Subject: [Gambas-user] gb.pcre regexp replace does not indicate since! In-Reply-To: <20170728165629.GH602@...3600...> References: <20170728165629.GH602@...3600...> Message-ID: ah! thanks! sorry for noise! its very confusing due the languaje Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 12:56 GMT-04:00 Tobias Boege : > On Fri, 28 Jul 2017, PICCORO McKAY Lenz wrote: > > http://gambaswiki.org/wiki/comp/gb.pcre/regexp/replace has a "since > 3.9.X" > > but does not indicate what! > > > > the hole "replace" or only a part functionality? > > > > The note *below* the "Since 3.9.3" marker. The Replace() method exists > since 3.5.0, as you could have found out by looking at the commit history > by yourself. > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bill-lancaster at ...2231... Fri Jul 28 19:14:06 2017 From: bill-lancaster at ...2231... (bill-lancaster) Date: Fri, 28 Jul 2017 10:14:06 -0700 (MST) Subject: [Gambas-user] textarea won't accept text In-Reply-To: References: <1501250929703-59911.post@...3046...> <1501255015026-59922.post@...3046...> Message-ID: <1501262046551-59933.post@...3046...> Thanks for the ideas, Textarea works in other projects. A copy of the the offending project is attached. MusicLibraryCreate-0.gz Meanwhile, I'll see if I can make a simpler version. -- View this message in context: http://gambas.8142.n7.nabble.com/textarea-won-t-accept-text-tp59911p59933.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Fri Jul 28 19:17:19 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 28 Jul 2017 19:17:19 +0200 Subject: [Gambas-user] since are available SQLrequest? In-Reply-To: References: Message-ID: Le 28/07/2017 ? 16:38, PICCORO McKAY Lenz a ?crit : > grrr the wiki must have that! thanks! please care with wiki aditions! > > most distributions and gambas programers dont have time/patiente to > compile lasted gambas release.. Yes, but you are supposed to read the release notes, or eventually search into them. Regards, -- Beno?t Minisini From gambas at ...1... Fri Jul 28 19:21:46 2017 From: gambas at ...1... (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 28 Jul 2017 19:21:46 +0200 Subject: [Gambas-user] textarea won't accept text In-Reply-To: References: <1501250929703-59911.post@...3046...> <1501255015026-59922.post@...3046...> Message-ID: <6d938947-ef08-d44e-6d0a-2d06ebf560a2@...1...> Le 28/07/2017 ? 17:37, Fernando Cabral a ?crit : > Perhaps Bill has met the same problem I have here. I can't use IDE in my > regular machines because it will not take anything from the keyboard. I > only can edit my source code using a virtual machine. > Nevertheless - I must add - the textarea in my program is working fine. > > - fernando > I'm almost sure this is a problem with the X11 input method used by Qt. Check if the IDE run with QT4 or QT5. If you don't use QT5, it will use QT4, unless it is not installed (i.e. no gb.qt4 on your system). Then run the QT4 qtconfig program to change the default input method. And run the IDE from a console to check if you are error messages printed by QT. Regards, -- Beno?t Minisini From mckaygerhard at ...626... Fri Jul 28 19:36:09 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 13:36:09 -0400 Subject: [Gambas-user] since are available SQLrequest? In-Reply-To: References: Message-ID: 2017-07-28 13:17 GMT-04:00 Beno?t Minisini : > Yes, but you are supposed to read the release notes, or eventually search > into them. > okok i understand benoit but i mean in case of more "normal mortal human users" that not read the release notes, not all are fashion way of the software updates! if gambas 3.5 are working for me, and its provided by vendor, i cannot update it! in any way thanks for the info.. > > Regards, > > -- > Beno?t Minisini > From fernandojosecabral at ...626... Fri Jul 28 19:43:04 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 14:43:04 -0300 Subject: [Gambas-user] replace beetween two strings In-Reply-To: References: Message-ID: 2017-07-28 13:11 GMT-03:00 PICCORO McKAY Lenz : > > " string pepe pablo, data toto made thinker data2 \" and also a pizza" > > i what to remove all the string or extrac all the string beetween the > "data" fist ocurrence and the next after that ocurrence.. > ".*?data (.*?) data2" saves the substring between "data" and "data2" to the first buffer. You can recover it with &1 (\1 in more traditional regex replace). - fernando > > i try to do but in the for each always replace twice.. > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Fri Jul 28 19:51:10 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 14:51:10 -0300 Subject: [Gambas-user] traslate grep expresion to detect COMMENT in line sql In-Reply-To: References: Message-ID: 2017-07-28 12:50 GMT-03:00 PICCORO McKAY Lenz : > wow! i must made a string search procedure until "comment" was find.. ! > > i think that but i also think that a reg expresion must be better with pcre > component! > My suggestion it to be used with pcre componte. I only gave you the search and replace regular expression. Something like NewLine = RegExp.Replace(OldLIne, "^(.*?) COMMENT +?(".*?")(,.*?)", "&1 \*&2*/&3", RegExp.UTF8) But, since I presume you'll be using it several times, then it will be more efficiente if you compile it first. - fernando Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-28 11:34 GMT-04:00 Fernando Cabral : > > > 2017-07-28 11:57 GMT-03:00 PICCORO McKAY Lenz : > > > > > > > > my target objetive it parse a text/line like this: > > > > > > fiel1 TEXT COMMENT "coment fiel1" , field2 TEXT, fiel3 TEXT > > > fiel4 NUMBER(10,2), fiel5 TEXT COMMENT "pepepeep", > > > fiel6 TEXT > > > > > > into this: > > > > > > fiel1 TEXT /* coment fiel1*/ , field2 TEXT, fiel3 TEXT > > > fiel4 NUMBER(10,2), fiel5 TEXT /*pepepeep*/, > > > fiel6 TEXT > > > > > > > Let me see if I have understood this well enough: > > a) find the word " COMMENT " (whitespace before and after), followed by > > whatever till you find a "," (comma) > > b) Delede " COMMENT " and put "whatever" between "/*" and "*/" > > c) Leave untouched whatever is after the first "," (comma) including the > > comma itself. > > > > Is that right? If it is, you should start by compiling this regular > > expression: > > > > "^(.*?) COMMENT +?(".*?")(,.*?)" > > > > And the replace by: "&1 \*&2*/&3" (scape as needed) and this should > work. > > > > what it does: > > a) from the start of the line, find whatever exists until the expression > " > > COMMENT " -- which should not be included. > > b) Save that firt part into the buffer number 1 > > c) Skip til after the last white space after " COMMENT " - throw that > away > > d) save the next portion between double quotes and save into buffer > number > > 2 > > e) Save next portion into buffer number 3 > > > > Put back the contents from buffer 1, add "\*", put back the contents of > > buffer 2, add "*/" and then put back the contents of buffer number 3. > > > > You may have to tinker around a little, but I think this contains the > basic > > ideia. > > > > - fernando > > > > > > > > > > Lenz McKAY Gerardo (PICCORO) > > > > > http://qgqlochekone.blogspot.com > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > -- > > Fernando Cabral > > Blogue: http://fernandocabral.org > > Twitter: http://twitter.com/fjcabral > > e-mail: fernandojosecabral at ...626... > > Facebook: f at ...3654... > > Telegram: +55 (37) 99988-8868 > > Wickr ID: fernandocabral > > WhatsApp: +55 (37) 99988-8868 > > Skype: fernandojosecabral > > Telefone fixo: +55 (37) 3521-2183 > > Telefone celular: +55 (37) 99988-8868 > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > nenhum pol?tico ou cientista poder? se gabar de nada. > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Fri Jul 28 21:04:39 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 15:04:39 -0400 Subject: [Gambas-user] traslate grep expresion to detect COMMENT in line sql In-Reply-To: References: Message-ID: umm RegExp.Replace are only since 3.5 .. searching for alternatives, due i have for now Debian wheeze and the gamgas (with supoport by vendor) are 3.1 any ideas? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 13:51 GMT-04:00 Fernando Cabral : > 2017-07-28 12:50 GMT-03:00 PICCORO McKAY Lenz : > > > wow! i must made a string search procedure until "comment" was find.. ! > > > > i think that but i also think that a reg expresion must be better with > pcre > > component! > > > > My suggestion it to be used with pcre componte. I only gave you the search > and replace regular expression. Something like > > NewLine = RegExp.Replace(OldLIne, > "^(.*?) COMMENT +?(".*?")(,.*?)", "&1 \*&2*/&3", RegExp.UTF8) > > But, since I presume you'll be using it several times, then it will be more > efficiente if you compile it first. > > - fernando > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > > > 2017-07-28 11:34 GMT-04:00 Fernando Cabral >: > > > > > 2017-07-28 11:57 GMT-03:00 PICCORO McKAY Lenz >: > > > > > > > > > > > my target objetive it parse a text/line like this: > > > > > > > > fiel1 TEXT COMMENT "coment fiel1" , field2 TEXT, fiel3 TEXT > > > > fiel4 NUMBER(10,2), fiel5 TEXT COMMENT "pepepeep", > > > > fiel6 TEXT > > > > > > > > into this: > > > > > > > > fiel1 TEXT /* coment fiel1*/ , field2 TEXT, fiel3 TEXT > > > > fiel4 NUMBER(10,2), fiel5 TEXT /*pepepeep*/, > > > > fiel6 TEXT > > > > > > > > > > Let me see if I have understood this well enough: > > > a) find the word " COMMENT " (whitespace before and after), followed by > > > whatever till you find a "," (comma) > > > b) Delede " COMMENT " and put "whatever" between "/*" and "*/" > > > c) Leave untouched whatever is after the first "," (comma) including > the > > > comma itself. > > > > > > Is that right? If it is, you should start by compiling this regular > > > expression: > > > > > > "^(.*?) COMMENT +?(".*?")(,.*?)" > > > > > > And the replace by: "&1 \*&2*/&3" (scape as needed) and this should > > work. > > > > > > what it does: > > > a) from the start of the line, find whatever exists until the > expression > > " > > > COMMENT " -- which should not be included. > > > b) Save that firt part into the buffer number 1 > > > c) Skip til after the last white space after " COMMENT " - throw that > > away > > > d) save the next portion between double quotes and save into buffer > > number > > > 2 > > > e) Save next portion into buffer number 3 > > > > > > Put back the contents from buffer 1, add "\*", put back the contents of > > > buffer 2, add "*/" and then put back the contents of buffer number 3. > > > > > > You may have to tinker around a little, but I think this contains the > > basic > > > ideia. > > > > > > - fernando > > > > > > > > > > > > > > > Lenz McKAY Gerardo (PICCORO) > > > > > > > http://qgqlochekone.blogspot.com > > > > ------------------------------------------------------------ > > > > ------------------ > > > > Check out the vibrant tech community on one of the world's most > > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > > > > -- > > > Fernando Cabral > > > Blogue: http://fernandocabral.org > > > Twitter: http://twitter.com/fjcabral > > > e-mail: fernandojosecabral at ...626... > > > Facebook: f at ...3654... > > > Telegram: +55 (37) 99988-8868 > > > Wickr ID: fernandocabral > > > WhatsApp: +55 (37) 99988-8868 > > > Skype: fernandojosecabral > > > Telefone fixo: +55 (37) 3521-2183 > > > Telefone celular: +55 (37) 99988-8868 > > > > > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > > > nenhum pol?tico ou cientista poder? se gabar de nada. > > > ------------------------------------------------------------ > > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Fri Jul 28 21:06:12 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 15:06:12 -0400 Subject: [Gambas-user] replace beetween two strings In-Reply-To: References: Message-ID: RegExp.Replace are since 3.5, but thanks for the sugestion fernando, the idea are usefully due i'll emulate the pattern with shell commands Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 13:43 GMT-04:00 Fernando Cabral : > 2017-07-28 13:11 GMT-03:00 PICCORO McKAY Lenz : > > > > > " string pepe pablo, data toto made thinker data2 \" and also a pizza" > > > > i what to remove all the string or extrac all the string beetween the > > "data" fist ocurrence and the next after that ocurrence.. > > > > ".*?data (.*?) data2" saves the substring between "data" and "data2" to the > first buffer. > > You can recover it with &1 (\1 in more traditional regex replace). > > - fernando > > > > > i try to do but in the for each always replace twice.. > > > > > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail: fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mckaygerhard at ...626... Fri Jul 28 22:55:09 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 16:55:09 -0400 Subject: [Gambas-user] why this could not be? error in runtime? Message-ID: in the following code: strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) IDE said error invalid argument, but if i do: psotionlen = InStr(strinchar, ")", -1) - 1 strinchar = Mid(strinchar, 1, psotionlen) works, why? i wnat to remove the last occurence of a char but bybass some possible spaces/chars at the end of string Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From fernandojosecabral at ...626... Fri Jul 28 23:17:13 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 18:17:13 -0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: 2017-07-28 17:55 GMT-03:00 PICCORO McKAY Lenz : > in the following code: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > What does inStr() returns if nothing is found? You may be passing an invalid argument to Mid(). Please, check it up. - fernando > IDE said error invalid argument, but if i do: > > psotionlen = InStr(strinchar, ")", -1) - 1 > strinchar = Mid(strinchar, 1, psotionlen) > > works, why? > > i wnat to remove the last occurence of a char but bybass some possible > spaces/chars at the end of string > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mckaygerhard at ...626... Sat Jul 29 01:46:19 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 19:46:19 -0400 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: 2017-07-28 17:17 GMT-04:00 Fernando Cabral : > > in the following code: > > > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > > > What does inStr() returns if nothing is found? You may be passing an > invalid argument to Mid(). > Please, check it up. > fernando check it up you, if i do the instr() -1 separately works... dou you see the code before answer: strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) ' does not work IDE said error invalid argument, but if i do: psotionlen = InStr(strinchar, ")", -1) - 1 ' separate the stolen and.. strinchar = Mid(strinchar, 1, psotionlen) ' put in here then works ?!?!?!!? works, why? > - fernando > > > IDE said error invalid argument, but if i do: > > > > psotionlen = InStr(strinchar, ")", -1) - 1 > > strinchar = Mid(strinchar, 1, psotionlen) > > > > works, why? > > > > i wnat to remove the last occurence of a char but bybass some possible > > spaces/chars at the end of string > > > > Lenz McKAY Gerardo (PICCORO) > > http://qgqlochekone.blogspot.com > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > Fernando Cabral > Blogue: http://fernandocabral.org > Twitter: http://twitter.com/fjcabral > e-mail : > fernandojosecabral at ...626... > Facebook: f at ...3654... > Telegram: +55 (37) 99988-8868 > Wickr ID: fernandocabral > WhatsApp: +55 (37) 99988-8868 > Skype: fernandojosecabral > Telefone fixo: +55 (37) 3521-2183 > Telefone celular: +55 (37) 99988-8868 > > Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, > nenhum pol?tico ou cientista poder? se gabar de nada. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Jul 29 02:33:00 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 29 Jul 2017 03:33:00 +0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: Because the line makes no sense at all. Try to remove ")". Jussi On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz wrote: > in the following code: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > IDE said error invalid argument, but if i do: > > psotionlen = InStr(strinchar, ")", -1) - 1 > strinchar = Mid(strinchar, 1, psotionlen) > > works, why? > > i wnat to remove the last occurence of a char but bybass some possible > spaces/chars at the end of string > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Sat Jul 29 02:33:58 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 29 Jul 2017 03:33:58 +0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: Hmmm... sorry, no mistake... I will look closer. Jussi On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen wrote: > Because the line makes no sense at all. Try to remove ")". > > > Jussi > > On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < > mckaygerhard at ...626...> wrote: > >> in the following code: >> >> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >> >> IDE said error invalid argument, but if i do: >> >> psotionlen = InStr(strinchar, ")", -1) - 1 >> strinchar = Mid(strinchar, 1, psotionlen) >> >> works, why? >> >> i wnat to remove the last occurence of a char but bybass some possible >> spaces/chars at the end of string >> >> Lenz McKAY Gerardo (PICCORO) >> http://qgqlochekone.blogspot.com >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From jussi.lahtinen at ...626... Sat Jul 29 02:40:44 2017 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 29 Jul 2017 03:40:44 +0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: No... again. My initial mail was correct. It should be: strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) But the IDE makes highlighting bug with the brackets. Jussi On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen wrote: > Hmmm... sorry, no mistake... I will look closer. > > > Jussi > > On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen > wrote: > >> Because the line makes no sense at all. Try to remove ")". >> >> >> Jussi >> >> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >> mckaygerhard at ...626...> wrote: >> >>> in the following code: >>> >>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>> >>> IDE said error invalid argument, but if i do: >>> >>> psotionlen = InStr(strinchar, ")", -1) - 1 >>> strinchar = Mid(strinchar, 1, psotionlen) >>> >>> works, why? >>> >>> i wnat to remove the last occurence of a char but bybass some possible >>> spaces/chars at the end of string >>> >>> Lenz McKAY Gerardo (PICCORO) >>> http://qgqlochekone.blogspot.com >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> > From adrien.prokopowicz at ...626... Sat Jul 29 03:02:17 2017 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Sat, 29 Jul 2017 03:02:17 +0200 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen a ?crit: > No... again. My initial mail was correct. It should be: > strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) > > But the IDE makes highlighting bug with the brackets. > > > Jussi > > On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen > > wrote: > >> Hmmm... sorry, no mistake... I will look closer. >> >> >> Jussi >> >> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen >> >> wrote: >> >>> Because the line makes no sense at all. Try to remove ")". >>> >>> >>> Jussi >>> >>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>> mckaygerhard at ...626...> wrote: >>> >>>> in the following code: >>>> >>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>> >>>> IDE said error invalid argument, but if i do: >>>> >>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>> strinchar = Mid(strinchar, 1, psotionlen) >>>> >>>> works, why? >>>> >>>> i wnat to remove the last occurence of a char but bybass some possible >>>> spaces/chars at the end of string >>>> >>>> Lenz McKAY Gerardo (PICCORO) >>>> http://qgqlochekone.blogspot.com Actually, his original code is correct. For me it runs without error in the IDE using the 3.10 development version, but the editor is indeed having trouble matching the parentheses. I also tried it on the playground (which also uses 3.10) and it works fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b68913025e5d2b83c . However the playground's editor does match the parentheses correctly. :) Which Gambas version are you using ? There may be an old bug here. -- Adrien Prokopowicz From fernandojosecabral at ...626... Sat Jul 29 03:23:33 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 22:23:33 -0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: 2017-07-28 20:46 GMT-03:00 PICCORO McKAY Lenz : > 2017-07-28 17:17 GMT-04:00 Fernando Cabral : > >> > in the following code: >> > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >> > What does inStr() returns if nothing is found? You may be passing an >> invalid argument to Mid(). >> Please, check it up. >> > > fernando check it up you, if i do the instr() -1 separately works... dou > you see the code before answer: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) ' does > not work > > IDE said error invalid argument, but if i do: > > psotionlen = InStr(strinchar, ")", -1) - 1 ' separate the stolen > and.. > strinchar = Mid(strinchar, 1, psotionlen) ' put in here then works > ?!?!?!!? > > works, why? > I did the following test. It did not work as expected, but it did work. I mean, I got no errors, but it did not work as expected in the sense that the search seems always to be done from left to right, not right to left, even if the third parameter is negative. Dim strinchar As String Dim positionlen As Integer strinchar = "test )after)r" positionlen = String.InStr(strinchar, ")", -1) - 1 Print strinchar Print positionlen strinchar = Mid(strinchar, 1, positionlen) Print strinchar strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) Print strinchar This prints: test )after)r 5 test test Regards - fernando > >> - fernando >> >> > IDE said error invalid argument, but if i do: >> > >> > psotionlen = InStr(strinchar, ")", -1) - 1 >> > strinchar = Mid(strinchar, 1, psotionlen) >> > >> > works, why? >> > >> > i wnat to remove the last occurence of a char but bybass some possible >> > spaces/chars at the end of string >> > >> > Lenz McKAY Gerardo (PICCORO) >> > http://qgqlochekone.blogspot.com >> > ------------------------------------------------------------ >> > ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> >> >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail : >> fernandojosecabral at ...626... >> Facebook: f at ...3654... >> Telegram: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 <%2837%29%203521-2183> >> Telefone celular: +55 (37) 99988-8868 <%2837%29%2099988-8868> >> >> Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, >> nenhum pol?tico ou cientista poder? se gabar de nada. >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From fernandojosecabral at ...626... Sat Jul 29 03:31:53 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Fri, 28 Jul 2017 22:31:53 -0300 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: Piccoro, sorry for my previous information. Something was missing. In fact, both versions work the same: * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", -1) - 1) Print strinchar Print positionlen strinchar = Mid(strinchar, 1, positionlen) Print strinchar strinchar = "test )after)r" strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print strinchar * Both print "test )after" - fernando 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz : > > Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < > jussi.lahtinen at ...626...> a ?crit: > > No... again. My initial mail was correct. It should be: >> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >> >> But the IDE makes highlighting bug with the brackets. >> >> >> Jussi >> >> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen > > >> wrote: >> >> Hmmm... sorry, no mistake... I will look closer. >>> >>> >>> Jussi >>> >>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>> jussi.lahtinen at ...626...> >>> wrote: >>> >>> Because the line makes no sense at all. Try to remove ")". >>>> >>>> >>>> Jussi >>>> >>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>> mckaygerhard at ...626...> wrote: >>>> >>>> in the following code: >>>>> >>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>> >>>>> IDE said error invalid argument, but if i do: >>>>> >>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>> >>>>> works, why? >>>>> >>>>> i wnat to remove the last occurence of a char but bybass some possible >>>>> spaces/chars at the end of string >>>>> >>>>> Lenz McKAY Gerardo (PICCORO) >>>>> http://qgqlochekone.blogspot.com >>>>> >>>> > Actually, his original code is correct. For me it runs without error in > the IDE using > the 3.10 development version, but the editor is indeed having trouble > matching the > parentheses. > > I also tried it on the playground (which also uses 3.10) and it works > fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 > 13025e5d2b83c . > > However the playground's editor does match the parentheses correctly. :) > > Which Gambas version are you using ? There may be an old bug here. > > -- > Adrien Prokopowicz > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From mikeB at ...3673... Sat Jul 29 05:02:24 2017 From: mikeB at ...3673... (mikeB) Date: Fri, 28 Jul 2017 21:02:24 -0600 Subject: [Gambas-user] help with ListView code? In-Reply-To: <20170728134756.GE602@...3600...> References: <805c1d0b-0467-4b18-408c-2a2ae25b9c29@...3673...> <20170728134756.GE602@...3600...> Message-ID: <841bea43-b496-fc00-3e24-88135e115762@...3673...> Greetings, I just want to give a BIG THANK YOU to all those that responded to help me solve this problem - special gratitude goes out to 'Tobias Boege' for his time and efforts to give me a better picture of whats going on with the "ColunmView" control. I've still got a few problems to solve but at least I now have what I might need to solve them;-) Without you experienced Gambas coders offering your time and knowledge = I don't see how any "newbie', to the language, would get much done - cuz, while it's true "Gambas is Almost Basic" there's a lot of difference (as you all know). I will publish the new Gambas GNU app I am writing so that other "newbies" might have a better time of using this control (Learn by Example). THANKS AGAIN and HAVE A GREAT DAY, mikeB On 07/28/2017 07:47 AM, Tobias Boege wrote: > On Thu, 27 Jul 2017, mikeB wrote: >> Greetings all, >> I've got a Listview (set as Column view) with 2 columns that I'm using >> >> for testing so I might understand how all this works so can add it to a >> project. >> >> testCode.................................................. >> With listview1 >> .Clear >> .Resizable = True >> .Columns.Count = 2 >> .Columns[0].Text = "Site Name:" >> .Columns[1].Text = "Site URL:" >> End With >> .................................................................. >> I can add values to the 1st column: >> code.......................................................... >> listview1.add("1", "First var entry") >> listview1.add("2", "Second var entry to test the resize ability") >> listview1.add("3", "Third var entry") >> ................................................................... >> Have spent a lot of research time trying to figure out how to add >> values to the 2nd column (Site URL:) - got me stumped. >> >> Anyone got an example line of code to help me out? >> >> I can't seem to find the answer in the help docs. >> >> Would greatly appreciate any/ all help;-) >> mikeB >> > You don't really have a ListView but a ColumnView, do you? A ColumnView is > a ColumnView and not "a Listview (set as Column view)". The ListView control > doesn't have a Columns property. > > I have to say that when I tried to answer your question, I noticed that > I had no clue how ListView, its sibling ColumnView or their mutual parent > _TreeView work, so I read their source code (see gb.gui.base) -- and I > still had no clue. And let me say that this happens rarely to me these days. > I had to dig up an example (the FileView class in gb.form is very nice) > to see what they actually do with their columns. Since I get it now, I want > to give an explanation of these classes first, so bear with me. > > To understand ColumnView you have to understand _TreeView, because > ColumnView is basically a _TreeView with some code added to manage columns, > but the columns are already available from _TreeView. > > To add to the confusion, a _TreeView is internally basically a GridView, > i.e. a square grid of cells in which you can put strings and pictures, > but you can't access these cells /that/ freely from a _TreeView. The key > information is that each _TreeView item is an entire *row* in the GridView. > > By calling ColumnView.Add("1", "First var entry") you create a new row > in the GridView, identified by the key "1", and set the text of the first > column of that row to "First var entry". The return value of the Add() > method is a _TreeView_Item object which allows you to set the texts of > all other columns: > > ColumnView.Add("1", "First var entry")[1] = "second column" > > Wrap it in a With or store it in a variable if you want to set many other > columns: > > Dim hItem As _TreeView_Item > > hItem = ColumnView.Add("1", "First var entry") > hItem[1] = "second column" > hItem[2] = "third column" > > The asymmetric treatment of the first vs. the other columns is most likely > because you always want to set at least the first column's text, and maybe > of technical nature as the Add() method has optional parameters which make > it uglier to add a variable argument list (Param in gb) to Add(). > > Regards, > Tobi > From tmorehen at ...3602... Sat Jul 29 05:46:32 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Fri, 28 Jul 2017 23:46:32 -0400 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> It's difficult to say for sure what's happening without Piccaro's test strings. However, 2 things do come to mind. First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to right search for ")", starting at -n characters from the end of strinchar. So if Instr doesn't find ")", it will return 0, which, in conjunction with the second -1, will cause mid to drop the last character of strinchar. So to get the answer you want, use RInstr(strinchar,")"). which will do a right to left search for ")", starting at the end of strinchar. Second, there may be a bug in gambas, or the documentation needs to make clear what end of string means. This is best explained by example: Instr("(foo)",")",-1) returns 5 Instr("(foo)f",")",-1) returns 5 Instr("(foo)ff",")",-1) returns 0 This means that Instr(s1,s2,-1) begins its search one character before the last character of the string. So end of string actually means last character of the string and the docs should make that explicit or there is a bug if the intended meaning of end of string is the position after the last character of the string. On 2017-07-28 09:31 PM, Fernando Cabral wrote: > Piccoro, sorry for my previous information. Something was missing. > In fact, both versions work the same: > > > > > > > > > > > > > * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", -1) > - 1) Print strinchar Print positionlen strinchar = Mid(strinchar, > 1, positionlen) Print strinchar strinchar = "test )after)r" > strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print > strinchar * > Both print "test )after" > > - fernando > > 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz > : > >> Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < >> jussi.lahtinen at ...626...> a ?crit: >> >> No... again. My initial mail was correct. It should be: >>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >>> >>> But the IDE makes highlighting bug with the brackets. >>> >>> >>> Jussi >>> >>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen >> wrote: >>> >>> Hmmm... sorry, no mistake... I will look closer. >>>> >>>> Jussi >>>> >>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>> jussi.lahtinen at ...626...> >>>> wrote: >>>> >>>> Because the line makes no sense at all. Try to remove ")". >>>>> >>>>> Jussi >>>>> >>>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>>> mckaygerhard at ...626...> wrote: >>>>> >>>>> in the following code: >>>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>>> >>>>>> IDE said error invalid argument, but if i do: >>>>>> >>>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>>> >>>>>> works, why? >>>>>> >>>>>> i wnat to remove the last occurence of a char but bybass some possible >>>>>> spaces/chars at the end of string >>>>>> >>>>>> Lenz McKAY Gerardo (PICCORO) >>>>>> http://qgqlochekone.blogspot.com >>>>>> >> Actually, his original code is correct. For me it runs without error in >> the IDE using >> the 3.10 development version, but the editor is indeed having trouble >> matching the >> parentheses. >> >> I also tried it on the playground (which also uses 3.10) and it works >> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >> 13025e5d2b83c . >> >> However the playground's editor does match the parentheses correctly. :) >> >> Which Gambas version are you using ? There may be an old bug here. >> >> -- >> Adrien Prokopowicz >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From mckaygerhard at ...626... Sat Jul 29 05:53:07 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Fri, 28 Jul 2017 23:53:07 -0400 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> References: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> Message-ID: HEY TONY; ITS PICCORO; NOT PICARO! GRRRRR in the playground wprks perfectly, i not have 3.10, but in the job i have 3.1 and at my home 3.5 its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze (very older but better)* 2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz : > Actually, his original code is correct. For me it runs without error in > the IDE using > the 3.10 development version, but the editor is indeed having trouble > matching the > parentheses. > me too, the edtor has some problems, when the ide made a word wrap, and i have thesame behaviour, parentheses does not matching correctly.. > I also tried it on the playground (which also uses 3.10) and it works > fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 > 13025e5d2b83c . > tested, me too.. > However the playground's editor does match the parentheses correctly. :) > jajaja excelent work! > > Which Gambas version are you using ? There may be an old bug here. > 3.9.1 with some git patches.. in the job i have 3.1 and at my home 3.5 its a bug in 3.9 and 3.8, with 3.1 works perfectly in debian squeeze (very older but better) Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-28 23:46 GMT-04:00 Tony Morehen : > It's difficult to say for sure what's happening without Piccaro's test > strings. However, 2 things do come to mind. > > First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to > right search for ")", starting at -n characters from the end of > strinchar. So if Instr doesn't find ")", it will return 0, which, in > conjunction with the second -1, will cause mid to drop the last character > of strinchar. So to get the answer you want, use RInstr(strinchar,")"). > which will do a right to left search for ")", starting at the end of > strinchar. > > Second, there may be a bug in gambas, or the documentation needs to make > clear what end of string means. This is best explained by example: > > Instr("(foo)",")",-1) returns 5 > Instr("(foo)f",")",-1) returns 5 > Instr("(foo)ff",")",-1) returns 0 > > This means that Instr(s1,s2,-1) begins its search one character before the > last character of the string. So end of string actually means last > character of the string and the docs should make that explicit or there is > a bug if the intended meaning of end of string is the position after the > last character of the string. > > > > On 2017-07-28 09:31 PM, Fernando Cabral wrote: > >> Piccoro, sorry for my previous information. Something was missing. >> In fact, both versions work the same: >> >> >> >> >> >> >> >> >> >> >> >> >> * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", -1) >> - 1) Print strinchar Print positionlen strinchar = Mid(strinchar, >> 1, positionlen) Print strinchar strinchar = "test )after)r" >> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print >> strinchar * >> Both print "test )after" >> >> - fernando >> >> 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz < >> adrien.prokopowicz at ...626...> >> : >> >> Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < >>> jussi.lahtinen at ...626...> a ?crit: >>> >>> No... again. My initial mail was correct. It should be: >>> >>>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >>>> >>>> But the IDE makes highlighting bug with the brackets. >>>> >>>> >>>> Jussi >>>> >>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>> jussi.lahtinen at ...626... >>>> wrote: >>>> >>>> Hmmm... sorry, no mistake... I will look closer. >>>> >>>>> >>>>> Jussi >>>>> >>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>> jussi.lahtinen at ...626...> >>>>> wrote: >>>>> >>>>> Because the line makes no sense at all. Try to remove ")". >>>>> >>>>>> >>>>>> Jussi >>>>>> >>>>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>>>> mckaygerhard at ...626...> wrote: >>>>>> >>>>>> in the following code: >>>>>> >>>>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>>>> >>>>>>> IDE said error invalid argument, but if i do: >>>>>>> >>>>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>>>> >>>>>>> works, why? >>>>>>> >>>>>>> i wnat to remove the last occurence of a char but bybass some >>>>>>> possible >>>>>>> spaces/chars at the end of string >>>>>>> >>>>>>> Lenz McKAY Gerardo (PICCORO) >>>>>>> http://qgqlochekone.blogspot.com >>>>>>> >>>>>>> Actually, his original code is correct. For me it runs without error >>> in >>> the IDE using >>> the 3.10 development version, but the editor is indeed having trouble >>> matching the >>> parentheses. >>> >>> I also tried it on the playground (which also uses 3.10) and it works >>> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >>> 13025e5d2b83c . >>> >>> However the playground's editor does match the parentheses correctly. :) >>> >>> Which Gambas version are you using ? There may be an old bug here. >>> >>> -- >>> Adrien Prokopowicz >>> >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tmorehen at ...3602... Sat Jul 29 06:15:32 2017 From: tmorehen at ...3602... (Tony Morehen) Date: Sat, 29 Jul 2017 00:15:32 -0400 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> Message-ID: Sorry about that, What strings are you using? What output do you want? For example: fn("(foo)") do you want "(foo)" or "(foo" yours returns "(foo" fn("(foo)x") do you want "(foo)" or "(foo" yours returns "(foo" fn("(foo)xx") do you want "(foo)" or "(foo" or "(foo)x" yours returns "(foo)x" fn("(foo)xxx") do you want "(foo)" or "(foo" or "(foo)x" or "(foo)xx" yours returns "(foo)xx" Let's get the algorithm right. Then worry about bugs. On 2017-07-28 11:53 PM, PICCORO McKAY Lenz wrote: > HEY TONY; ITS PICCORO; NOT PICARO! GRRRRR > > in the playground wprks perfectly, i not have 3.10, but in the job i have > 3.1 and at my home 3.5 > its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze (very > older but better)* > > 2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz > : > >> Actually, his original code is correct. For me it runs without error in >> the IDE using >> the 3.10 development version, but the editor is indeed having trouble >> matching the >> parentheses. >> > me too, the edtor has some problems, when the ide made a word wrap, and i > have thesame behaviour, parentheses does not matching correctly.. > > >> I also tried it on the playground (which also uses 3.10) and it works >> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >> 13025e5d2b83c . >> > tested, me too.. > > >> However the playground's editor does match the parentheses correctly. :) >> > jajaja excelent work! > > >> Which Gambas version are you using ? There may be an old bug here. >> > 3.9.1 with some git patches.. > > in the job i have 3.1 and at my home 3.5 > > its a bug in 3.9 and 3.8, with 3.1 works perfectly in debian squeeze (very > older but better) > > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-28 23:46 GMT-04:00 Tony Morehen : > >> It's difficult to say for sure what's happening without Piccaro's test >> strings. However, 2 things do come to mind. >> >> First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to >> right search for ")", starting at -n characters from the end of >> strinchar. So if Instr doesn't find ")", it will return 0, which, in >> conjunction with the second -1, will cause mid to drop the last character >> of strinchar. So to get the answer you want, use RInstr(strinchar,")"). >> which will do a right to left search for ")", starting at the end of >> strinchar. >> >> Second, there may be a bug in gambas, or the documentation needs to make >> clear what end of string means. This is best explained by example: >> >> Instr("(foo)",")",-1) returns 5 >> Instr("(foo)f",")",-1) returns 5 >> Instr("(foo)ff",")",-1) returns 0 >> >> This means that Instr(s1,s2,-1) begins its search one character before the >> last character of the string. So end of string actually means last >> character of the string and the docs should make that explicit or there is >> a bug if the intended meaning of end of string is the position after the >> last character of the string. >> >> >> >> On 2017-07-28 09:31 PM, Fernando Cabral wrote: >> >>> Piccoro, sorry for my previous information. Something was missing. >>> In fact, both versions work the same: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", -1) >>> - 1) Print strinchar Print positionlen strinchar = Mid(strinchar, >>> 1, positionlen) Print strinchar strinchar = "test )after)r" >>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print >>> strinchar * >>> Both print "test )after" >>> >>> - fernando >>> >>> 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz < >>> adrien.prokopowicz at ...626...> >>> : >>> >>> Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < >>>> jussi.lahtinen at ...626...> a ?crit: >>>> >>>> No... again. My initial mail was correct. It should be: >>>> >>>>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >>>>> >>>>> But the IDE makes highlighting bug with the brackets. >>>>> >>>>> >>>>> Jussi >>>>> >>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>> jussi.lahtinen at ...626... >>>>> wrote: >>>>> >>>>> Hmmm... sorry, no mistake... I will look closer. >>>>> >>>>>> Jussi >>>>>> >>>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>>> jussi.lahtinen at ...626...> >>>>>> wrote: >>>>>> >>>>>> Because the line makes no sense at all. Try to remove ")". >>>>>> >>>>>>> Jussi >>>>>>> >>>>>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>>>>> mckaygerhard at ...626...> wrote: >>>>>>> >>>>>>> in the following code: >>>>>>> >>>>>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>>>>> >>>>>>>> IDE said error invalid argument, but if i do: >>>>>>>> >>>>>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>>>>> >>>>>>>> works, why? >>>>>>>> >>>>>>>> i wnat to remove the last occurence of a char but bybass some >>>>>>>> possible >>>>>>>> spaces/chars at the end of string >>>>>>>> >>>>>>>> Lenz McKAY Gerardo (PICCORO) >>>>>>>> http://qgqlochekone.blogspot.com >>>>>>>> >>>>>>>> Actually, his original code is correct. For me it runs without error >>>> in >>>> the IDE using >>>> the 3.10 development version, but the editor is indeed having trouble >>>> matching the >>>> parentheses. >>>> >>>> I also tried it on the playground (which also uses 3.10) and it works >>>> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >>>> 13025e5d2b83c . >>>> >>>> However the playground's editor does match the parentheses correctly. :) >>>> >>>> Which Gambas version are you using ? There may be an old bug here. >>>> >>>> -- >>>> Adrien Prokopowicz >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> >>> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From mckaygerhard at ...626... Sat Jul 29 06:52:56 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sat, 29 Jul 2017 00:52:56 -0400 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> Message-ID: i not at the depot, and in my work i have gambas 3.1 (wheeze/squeeze), the "rare" behaviour are at the depot of my work with gambas 3.9 but as adrien said: works in playgroud and works at my home in gambas 3.1, in few hours i go to the depot and paste the code.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-29 0:15 GMT-04:00 Tony Morehen : > Sorry about that, > > What strings are you using? What output do you want? For example: > fn("(foo)") do you want "(foo)" or "(foo" yours returns "(foo" > fn("(foo)x") do you want "(foo)" or "(foo" yours returns "(foo" > fn("(foo)xx") do you want "(foo)" or "(foo" or "(foo)x" yours returns > "(foo)x" > fn("(foo)xxx") do you want "(foo)" or "(foo" or "(foo)x" or "(foo)xx" > yours returns "(foo)xx" > > Let's get the algorithm right. Then worry about bugs. > > On 2017-07-28 11:53 PM, PICCORO McKAY Lenz wrote: > >> HEY TONY; ITS PICCORO; NOT PICARO! GRRRRR >> >> in the playground wprks perfectly, i not have 3.10, but in the job i have >> 3.1 and at my home 3.5 >> its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze >> (very >> older but better)* >> >> >> 2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz < >> adrien.prokopowicz at ...626...> >> : >> >> Actually, his original code is correct. For me it runs without error in >>> the IDE using >>> the 3.10 development version, but the editor is indeed having trouble >>> matching the >>> parentheses. >>> >>> me too, the edtor has some problems, when the ide made a word wrap, and i >> have thesame behaviour, parentheses does not matching correctly.. >> >> >> I also tried it on the playground (which also uses 3.10) and it works >>> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >>> 13025e5d2b83c . >>> >>> tested, me too.. >> >> >> However the playground's editor does match the parentheses correctly. :) >>> >>> jajaja excelent work! >> >> >> Which Gambas version are you using ? There may be an old bug here. >>> >>> 3.9.1 with some git patches.. >> >> in the job i have 3.1 and at my home 3.5 >> >> its a bug in 3.9 and 3.8, with 3.1 works perfectly in debian squeeze (very >> older but better) >> >> >> >> Lenz McKAY Gerardo (PICCORO) >> http://qgqlochekone.blogspot.com >> >> 2017-07-28 23:46 GMT-04:00 Tony Morehen : >> >> It's difficult to say for sure what's happening without Piccaro's test >>> strings. However, 2 things do come to mind. >>> >>> First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to >>> right search for ")", starting at -n characters from the end of >>> strinchar. So if Instr doesn't find ")", it will return 0, which, in >>> conjunction with the second -1, will cause mid to drop the last character >>> of strinchar. So to get the answer you want, use RInstr(strinchar,")"). >>> which will do a right to left search for ")", starting at the end of >>> strinchar. >>> >>> Second, there may be a bug in gambas, or the documentation needs to make >>> clear what end of string means. This is best explained by example: >>> >>> Instr("(foo)",")",-1) returns 5 >>> Instr("(foo)f",")",-1) returns 5 >>> Instr("(foo)ff",")",-1) returns 0 >>> >>> This means that Instr(s1,s2,-1) begins its search one character before >>> the >>> last character of the string. So end of string actually means last >>> character of the string and the docs should make that explicit or there >>> is >>> a bug if the intended meaning of end of string is the position after the >>> last character of the string. >>> >>> >>> >>> On 2017-07-28 09:31 PM, Fernando Cabral wrote: >>> >>> Piccoro, sorry for my previous information. Something was missing. >>>> In fact, both versions work the same: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", >>>> -1) >>>> - 1) Print strinchar Print positionlen strinchar = >>>> Mid(strinchar, >>>> 1, positionlen) Print strinchar strinchar = "test )after)r" >>>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print >>>> strinchar * >>>> Both print "test )after" >>>> >>>> - fernando >>>> >>>> 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz < >>>> adrien.prokopowicz at ...626...> >>>> : >>>> >>>> Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < >>>> >>>>> jussi.lahtinen at ...626...> a ?crit: >>>>> >>>>> No... again. My initial mail was correct. It should be: >>>>> >>>>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >>>>>> >>>>>> But the IDE makes highlighting bug with the brackets. >>>>>> >>>>>> >>>>>> Jussi >>>>>> >>>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>>> jussi.lahtinen at ...626... >>>>>> wrote: >>>>>> >>>>>> Hmmm... sorry, no mistake... I will look closer. >>>>>> >>>>>> Jussi >>>>>>> >>>>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>>>> jussi.lahtinen at ...626...> >>>>>>> wrote: >>>>>>> >>>>>>> Because the line makes no sense at all. Try to remove ")". >>>>>>> >>>>>>> Jussi >>>>>>>> >>>>>>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>>>>>> mckaygerhard at ...626...> wrote: >>>>>>>> >>>>>>>> in the following code: >>>>>>>> >>>>>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>>>>>> >>>>>>>>> IDE said error invalid argument, but if i do: >>>>>>>>> >>>>>>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>>>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>>>>>> >>>>>>>>> works, why? >>>>>>>>> >>>>>>>>> i wnat to remove the last occurence of a char but bybass some >>>>>>>>> possible >>>>>>>>> spaces/chars at the end of string >>>>>>>>> >>>>>>>>> Lenz McKAY Gerardo (PICCORO) >>>>>>>>> http://qgqlochekone.blogspot.com >>>>>>>>> >>>>>>>>> Actually, his original code is correct. For me it runs without >>>>>>>>> error >>>>>>>>> >>>>>>>> in >>>>> the IDE using >>>>> the 3.10 development version, but the editor is indeed having trouble >>>>> matching the >>>>> parentheses. >>>>> >>>>> I also tried it on the playground (which also uses 3.10) and it works >>>>> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >>>>> 13025e5d2b83c . >>>>> >>>>> However the playground's editor does match the parentheses correctly. >>>>> :) >>>>> >>>>> Which Gambas version are you using ? There may be an old bug here. >>>>> >>>>> -- >>>>> Adrien Prokopowicz >>>>> >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> >>>>> >>>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > From bill-lancaster at ...2231... Sat Jul 29 08:52:32 2017 From: bill-lancaster at ...2231... (bill-lancaster) Date: Fri, 28 Jul 2017 23:52:32 -0700 (MST) Subject: [Gambas-user] textarea won't accept text In-Reply-To: <6d938947-ef08-d44e-6d0a-2d06ebf560a2@...1...> References: <1501250929703-59911.post@...3046...> <1501255015026-59922.post@...3046...> <6d938947-ef08-d44e-6d0a-2d06ebf560a2@...1...> Message-ID: <1501311152886-59961.post@...3046...> Sorry, my mistake. The textarea control works fine if I don't intercept key strokes. (Form_KeyPress()) Thanks again for the responses -- View this message in context: http://gambas.8142.n7.nabble.com/textarea-won-t-accept-text-tp59911p59961.html Sent from the gambas-user mailing list archive at Nabble.com. From bugtracker at ...3416... Sat Jul 29 14:15:52 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Sat, 29 Jul 2017 12:15:52 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1130: JSON.Encode serializes null objects as "undefined" Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1130&from=L21haW4- Adrien PROKOPOWICZ reported a new bug. Summary ------- JSON.Encode serializes null objects as "undefined" Type : Bug Priority : Medium Gambas version : 3.9.90 (TRUNK) Product : Web components Description ----------- See example code here : https://gambas-playground.proko.eu/?gist=b70e4b4d0d25d56ba10b1d1ddb6ebfea If I give JSON.Encode() a Null value (or Variant) it correctly serializes it as `null`. However if I give it a Null object reference, it gets serialized as `undefined`. Which is surprising, but more importantly it is incorrect as there is no `undefined` in JSON. System information ------------------ [System] Gambas=3.9.90 r8147 OperatingSystem=Linux Kernel=4.11.9-1-ARCH Architecture=x86_64 Distribution=Arch Linux Desktop=KDE5 Theme=Breeze Language=fr_FR.UTF-8 Memory=15965M [Libraries] Cairo=libcairo.so.2.11400.10 Curl=libcurl.so.4.0.0 Curl=libcurl.so.4.1.0 Curl=libcurl.so.4.2.0 Curl=libcurl.so.4.3.0 Curl=libcurl.so.4.4.0 DBus=libdbus-1.so.3.14.11 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.1202.0 GTK+2=libgtk-x11-2.0.so.0.2400.31 GTK+3=libgtk-3.so.0.2200.16 OpenGL=libGL.so.1.0.0 Poppler=libpoppler.so.67.0.0 QT4=libQtCore.so.4.8.7 QT5=libQt5Core.so.5.9.1 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] ANT_HOME=/usr/share/apache-ant COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=/usr/share/xsessions/plasma DISPLAY=:0 GB_GUI=gb.qt5 GEM_HOME=/.rvm/gems/ruby-2.3.3 GEM_PATH=/.rvm/gems/ruby-2.3.3:/.rvm/gems/ruby-2.3.3 at ...3675..... GRADLE_HOME=/usr/share/java/gradle GS_LIB=/.fonts GTK_MODULES=canberra-gtk-module HOME= IRBRC=/.rvm/rubies/ruby-2.3.3/.irbrc KDE_FULL_SESSION=true KDE_SESSION_UID=1000 KDE_SESSION_VERSION=5 LANG=fr_FR.UTF-8 LANGUAGE= LOGNAME= MAIL=/var/spool/mail/ MAVEN_OPTS=-Xmx512m MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins MY_RUBY_HOME=/.rvm/rubies/ruby-2.3.3 OLDPWD= PATH=/.rvm/gems/ruby-2.3.3/bin:/.rvm/gems/ruby-2.3.3 at ...3675...../bin:/.rvm/rubies/ruby-2.3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/.rvm/bin PT5HOME=/opt/pt PWD= QSG_RENDER_LOOP= QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_NO_GLIB=1 QT_QUICK_CONTROLS_STYLE=org.kde.desktop RUBY_VERSION=ruby-2.3.3 SESSION_MANAGER=local/:@/tmp/.ICE-unix/584,unix/:/tmp/.ICE-unix/584 SHELL=/usr/bin/zsh SHLVL=1 TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XCURSOR_SIZE=0 XCURSOR_THEME=breeze_cursors XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=KDE XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_SESSION_TYPE=x11 XDG_VTNR=1 _=/usr/bin/kwrapper5 __GL_SYNC_TO_VBLANK=1 _system_arch=x86_64 _system_name=Arch _system_type=Linux _system_version=libc-2.25 rvm_bin_path=/.rvm/bin rvm_path=/.rvm rvm_prefix= rvm_version=1.27.0 (latest) From matti.eber at ...3240... Sat Jul 29 15:12:14 2017 From: matti.eber at ...3240... (Matti) Date: Sat, 29 Jul 2017 15:12:14 +0200 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: <0b8835ac-13b5-6339-c044-0a6afb8a0390@...3602...> Message-ID: <82f7b6a8-4e0a-a72d-5a98-33b382da87cc@...3240...> YOU complainig-shouting about a typo! Am 29.07.2017 um 05:53 schrieb PICCORO McKAY Lenz: > HEY TONY; ITS PICCORO; NOT PICARO! GRRRRR > > in the playground wprks perfectly, i not have 3.10, but in the job i have > 3.1 and at my home 3.5 > its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze (very > older but better)* > > 2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz > : > >> Actually, his original code is correct. For me it runs without error in >> the IDE using >> the 3.10 development version, but the editor is indeed having trouble >> matching the >> parentheses. >> > me too, the edtor has some problems, when the ide made a word wrap, and i > have thesame behaviour, parentheses does not matching correctly.. > > >> I also tried it on the playground (which also uses 3.10) and it works >> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >> 13025e5d2b83c . >> > tested, me too.. > > >> However the playground's editor does match the parentheses correctly. :) >> > jajaja excelent work! > > >> Which Gambas version are you using ? There may be an old bug here. >> > 3.9.1 with some git patches.. > > in the job i have 3.1 and at my home 3.5 > > its a bug in 3.9 and 3.8, with 3.1 works perfectly in debian squeeze (very > older but better) > > > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-28 23:46 GMT-04:00 Tony Morehen : > >> It's difficult to say for sure what's happening without Piccaro's test >> strings. However, 2 things do come to mind. >> >> First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to >> right search for ")", starting at -n characters from the end of >> strinchar. So if Instr doesn't find ")", it will return 0, which, in >> conjunction with the second -1, will cause mid to drop the last character >> of strinchar. So to get the answer you want, use RInstr(strinchar,")"). >> which will do a right to left search for ")", starting at the end of >> strinchar. >> >> Second, there may be a bug in gambas, or the documentation needs to make >> clear what end of string means. This is best explained by example: >> >> Instr("(foo)",")",-1) returns 5 >> Instr("(foo)f",")",-1) returns 5 >> Instr("(foo)ff",")",-1) returns 0 >> >> This means that Instr(s1,s2,-1) begins its search one character before the >> last character of the string. So end of string actually means last >> character of the string and the docs should make that explicit or there is >> a bug if the intended meaning of end of string is the position after the >> last character of the string. >> >> >> >> On 2017-07-28 09:31 PM, Fernando Cabral wrote: >> >>> Piccoro, sorry for my previous information. Something was missing. >>> In fact, both versions work the same: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * strinchar = "test )after)r" positionlen = (InStr(strinchar, ")", -1) >>> - 1) Print strinchar Print positionlen strinchar = Mid(strinchar, >>> 1, positionlen) Print strinchar strinchar = "test )after)r" >>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) Print >>> strinchar * >>> Both print "test )after" >>> >>> - fernando >>> >>> 2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz < >>> adrien.prokopowicz at ...626...> >>> : >>> >>> Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen < >>>> jussi.lahtinen at ...626...> a ?crit: >>>> >>>> No... again. My initial mail was correct. It should be: >>>> >>>>> strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1)) >>>>> >>>>> But the IDE makes highlighting bug with the brackets. >>>>> >>>>> >>>>> Jussi >>>>> >>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>> jussi.lahtinen at ...626... >>>>> wrote: >>>>> >>>>> Hmmm... sorry, no mistake... I will look closer. >>>>> >>>>>> Jussi >>>>>> >>>>>> On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen < >>>>>> jussi.lahtinen at ...626...> >>>>>> wrote: >>>>>> >>>>>> Because the line makes no sense at all. Try to remove ")". >>>>>> >>>>>>> Jussi >>>>>>> >>>>>>> On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz < >>>>>>> mckaygerhard at ...626...> wrote: >>>>>>> >>>>>>> in the following code: >>>>>>> >>>>>>>> strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) >>>>>>>> >>>>>>>> IDE said error invalid argument, but if i do: >>>>>>>> >>>>>>>> psotionlen = InStr(strinchar, ")", -1) - 1 >>>>>>>> strinchar = Mid(strinchar, 1, psotionlen) >>>>>>>> >>>>>>>> works, why? >>>>>>>> >>>>>>>> i wnat to remove the last occurence of a char but bybass some >>>>>>>> possible >>>>>>>> spaces/chars at the end of string >>>>>>>> >>>>>>>> Lenz McKAY Gerardo (PICCORO) >>>>>>>> http://qgqlochekone.blogspot.com >>>>>>>> >>>>>>>> Actually, his original code is correct. For me it runs without error >>>> in >>>> the IDE using >>>> the 3.10 development version, but the editor is indeed having trouble >>>> matching the >>>> parentheses. >>>> >>>> I also tried it on the playground (which also uses 3.10) and it works >>>> fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689 >>>> 13025e5d2b83c . >>>> >>>> However the playground's editor does match the parentheses correctly. :) >>>> >>>> Which Gambas version are you using ? There may be an old bug here. >>>> >>>> -- >>>> Adrien Prokopowicz >>>> >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> >>> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From hans at ...3219... Sat Jul 29 20:28:42 2017 From: hans at ...3219... (Hans Lehmann) Date: Sat, 29 Jul 2017 20:28:42 +0200 Subject: [Gambas-user] Serialization Database query result In-Reply-To: References: Message-ID: <9ba9ccef-fe78-be63-0457-5a27cb7bdb72@...3219...> Hello. What is the possibility to serialize the result of a database query (data type result)? Every idea and approach is welcome. Sincerely Hans From chrisml at ...3340... Sun Jul 30 00:08:47 2017 From: chrisml at ...3340... (Christof Thalhofer) Date: Sun, 30 Jul 2017 00:08:47 +0200 Subject: [Gambas-user] why this could not be? error in runtime? In-Reply-To: References: Message-ID: <3ffd5054-3328-6e4d-72fc-4d9fc26f19bc@...3340...> Am 28.07.2017 um 22:55 schrieb PICCORO McKAY Lenz: > in the following code: > > strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1) > > IDE said error invalid argument, but if i do: No, the IDE says nothing: Public Sub Test() Dim strinchar As String Dim psotionlen As Integer ' ------------------------------------------------- 1 strinchar = "strat)edn1" strinchar = Mid(strinchar, 1, InStr(strinchar, "u", -1) - 1) Print strinchar ' ------------------------------------------------- 2 strinchar = "strat)edn1" psotionlen = InStr(strinchar, ")", -1) - 1 strinchar = Mid(strinchar, 1, psotionlen) Print strinchar ' ------------------------------------------------- 3 ' but the only thing this does is (AFAIK) strinchar = "strat)edn1" Print Left(strinchar, Len(strinchar) - 1) End Result is: strat)edn strat)edn strat)edn :-) Maybe you should write and code a little slower. ;-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From mckaygerhard at ...626... Sun Jul 30 14:17:29 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 30 Jul 2017 08:17:29 -0400 Subject: [Gambas-user] Serialization Database query result In-Reply-To: <9ba9ccef-fe78-be63-0457-5a27cb7bdb72@...3219...> References: <9ba9ccef-fe78-be63-0457-5a27cb7bdb72@...3219...> Message-ID: errr with json? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-07-29 14:28 GMT-04:00 Hans Lehmann : > Hello. > > What is the possibility to serialize the result of a database query (data > type result)? > Every idea and approach is welcome. > > Sincerely > Hans > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From alexchernoff at ...67... Sun Jul 30 14:44:53 2017 From: alexchernoff at ...67... (alexchernoff) Date: Sun, 30 Jul 2017 05:44:53 -0700 (MST) Subject: [Gambas-user] Webforms samples? Message-ID: <1501418693939-59969.post@...3046...> Peace to all! Webforms seem to be awesome but there's no examples and documentation is still quite poor. Controls on webforms do not go appear where they are placed in the form, tab completion of events crashes the IDE(e.g. webbutton _click event)... Does anyone have a sample of a web app which uses sessions to manage session data like a login, and a sample of how to format a webform with buttons and labels and a few text input controls? thanks! -- View this message in context: http://gambas.8142.n7.nabble.com/Webforms-samples-tp59969.html Sent from the gambas-user mailing list archive at Nabble.com. From mckaygerhard at ...626... Sun Jul 30 20:06:10 2017 From: mckaygerhard at ...626... (PICCORO McKAY Lenz) Date: Sun, 30 Jul 2017 14:06:10 -0400 Subject: [Gambas-user] about lang/like string ? and depends Message-ID: http://gambaswiki.org/wiki/lang/like since witch version are available? its available for gambas 3.1? depends of the pcre/ gb.pcre module? or not? i mean canuse same regular expressions as PCRE? (i know LIKE its only to deal with ASCII strings) Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From taboege at ...626... Sun Jul 30 20:20:27 2017 From: taboege at ...626... (Tobias Boege) Date: Sun, 30 Jul 2017 20:20:27 +0200 Subject: [Gambas-user] about lang/like string ? and depends In-Reply-To: References: Message-ID: <20170730182027.GD584@...3600...> On Sun, 30 Jul 2017, PICCORO McKAY Lenz wrote: > http://gambaswiki.org/wiki/lang/like > > since witch version are available? its available for gambas 3.1? > Since forever and ever. I found the function in Gambas 1.9.44 which is the oldest tag in the svn history, over 10 years ago, and its implementation /basically/ hasn't changed since then. > depends of the pcre/ gb.pcre module? or not? i mean canuse same regular > expressions as PCRE? (i know LIKE its only to deal with ASCII strings) It doesn't. The LIKE syntax is vastly less powerful and different from the pcre syntax. The page you linked even tells you the syntax of LIKE expressions. You can see for yourself that they are incompatible with pcre. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From fernandojosecabral at ...626... Sun Jul 30 21:57:34 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 30 Jul 2017 16:57:34 -0300 Subject: [Gambas-user] I need help to start drawing with Gambas Message-ID: Perhaps some of you have a little time available to point me the direction for this littledelineate project of mine. I like to play with sundials. Basically, it consists in calculating some lines and angles and then drawing them on the ground, marble, concrete, etc. Things are conceptually very easy. I have line lengths and angles. I can use either or both to delineate the sundial face. I would guess I will have to resort to cairo or chart, but I don't know where to start from. I'd appreciate a few hints. Thanks. - fernando -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From taboege at ...626... Sun Jul 30 22:51:23 2017 From: taboege at ...626... (Tobias Boege) Date: Sun, 30 Jul 2017 22:51:23 +0200 Subject: [Gambas-user] I need help to start drawing with Gambas In-Reply-To: References: Message-ID: <20170730205123.GE584@...3600...> On Sun, 30 Jul 2017, Fernando Cabral wrote: > Perhaps some of you have a little time available to point me the direction > for this littledelineate project of mine. > > I like to play with sundials. Basically, it consists in calculating some > lines and angles and then drawing them on the ground, marble, concrete, > etc. Things are conceptually very easy. I have line lengths and angles. I > can use either or both to delineate the sundial face. > > I would guess I will have to resort to cairo or chart, but I don't know > where to start from. I'd appreciate a few hints. > It doesn't have to be gb.cairo. You can use the Paint class of gb.qt4 if you use gb.qt4 anyway. The interfaces of both drawing classes are very similar either way. Use gb.cairo if you want to export your drawings to PDF or Postscript and Paint for everything else (it allows you to draw into windows of your Gambas process, to a printer, to svg or bitmap images). Something that may be confusing when you first encounter it is the path- based drawing that is used in Cairo and Paint. Most methods of the Paint class don't paint anything but create and manipulate paths (it memorises movements on the drawing surface). To create a drawing you have to call Stroke() or Fill() on the path, to realise the memorised movement on the paper, so to speak, e.g. Paint.Ellipse(0, 0, 10, 10) will give you a circle of diameter 10 centered around the origin -- and by that I mean a circle *path*. If you want a normal circle, you have to call Stroke() afterwards. If you want a solid disc, call Fill() on the path. To get you started, you can find the ancient AnalogWatch example on the software farm, which draws an analog wall clock. If you're proficient with trigonometry you can concentrate on the Paint bits of the source code. There is also a chapter on Cairo in the German Gambas-Buch [1] (with example projects) and many more in the Paint chapter [2]. And, as always, look into the source code of Gambas itself. Lots of graphical controls written in Gambas (gb.form and gb.gui.base) draw themselves with Paint. You can find examples of arbitrarily high complexity (gb.form.terminal and the GridView from gb.gui.base come to mind). There are also plenty of easier examples, like the Spinner class in gb.form. Regards, Tobi [1] https://gambas-buch.de/dw/doku.php?id=k25:k25.1:start [2] https://gambas-buch.de/dw/doku.php?id=k23:k23.3:start -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From fernandojosecabral at ...626... Mon Jul 31 01:01:39 2017 From: fernandojosecabral at ...626... (Fernando Cabral) Date: Sun, 30 Jul 2017 20:01:39 -0300 Subject: [Gambas-user] I need help to start drawing with Gambas In-Reply-To: <20170730205123.GE584@...3600...> References: <20170730205123.GE584@...3600...> Message-ID: 2017-07-30 17:51 GMT-03:00 Tobias Boege : > On Sun, 30 Jul 2017, Fernando Cabral wrote: > To get you started, you can find the ancient AnalogWatch example on the > software farm, which draws an analog wall clock. If you're proficient > with trigonometry you can concentrate on the Paint bits of the source > code. > Yes, I think this analogwatch will do for simple sundials (regular, horizontal sundials). I will only have to tinker with the angles to adapt them to the latitude. I'll leave more complex things for the future. Thank you. - fernando > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecabral at ...626... Facebook: f at ...3654... Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma s? pessoa sem casa ou sem alimentos, nenhum pol?tico ou cientista poder? se gabar de nada. From bugtracker at ...3416... Mon Jul 31 17:18:51 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 31 Jul 2017 15:18:51 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1131: Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1131&from=L21haW4- Adrien PROKOPOWICZ reported a new bug. Summary ------- Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression Type : Bug Priority : Medium Gambas version : 3.9.90 (TRUNK) Product : Language Description ----------- In less confused terms, it means the following construct will not work at runtime : With obj .A = 69 With .T2 .B = 42 End With End With It fails at the second With's declaration with the error : "#12: Not an object", although the expression "obj.T2.B = 42" alone is valid and works well. You can see the full code running here : https://gambas-playground.proko.eu/?gist=7404d762b30f40b129f8f6faa8fbe19e In the example the construct in the TestYes() function works, but the TestNo() fails with the above error. I also looked at the compiled code generated by the compiler (see attached), and it seems that the bad function tries to load the variable's value from a different stack location (see line 9), which could explain why the interpreter finds a bad value. (This is pure speculation since I know close to nothing about the Gambas bytecode, but I thought it might help) System information ------------------ [System] Gambas=3.10.90 git 4304011b0 OperatingSystem=Linux Kernel=4.12.3-1-ARCH Architecture=x86_64 Distribution=Arch Linux Desktop=KDE5 Theme=Breeze Language=fr_FR.UTF-8 Memory=15965M [Libraries] Cairo=libcairo.so.2.11400.10 Curl=libcurl.so.4.0.0 Curl=libcurl.so.4.1.0 Curl=libcurl.so.4.2.0 Curl=libcurl.so.4.3.0 Curl=libcurl.so.4.4.0 DBus=libdbus-1.so.3.14.11 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.1202.0 GTK+2=libgtk-x11-2.0.so.0.2400.31 GTK+3=libgtk-3.so.0.2200.17 OpenGL=libGL.so.1.0.0 Poppler=libpoppler.so.67.0.0 QT4=libQtCore.so.4.8.7 QT5=libQt5Core.so.5.9.1 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] ANT_HOME=/usr/share/apache-ant COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=/usr/share/xsessions/plasma DISPLAY=:0 GB_GUI=gb.qt5 GEM_HOME=/.rvm/gems/ruby-2.3.3 GEM_PATH=/.rvm/gems/ruby-2.3.3:/.rvm/gems/ruby-2.3.3 at ...3675..... GRADLE_HOME=/usr/share/java/gradle GS_LIB=/.fonts GTK_MODULES=canberra-gtk-module HOME= IRBRC=/.rvm/rubies/ruby-2.3.3/.irbrc KDE_FULL_SESSION=true KDE_SESSION_UID=1000 KDE_SESSION_VERSION=5 LANG=fr_FR.UTF-8 LANGUAGE= LOGNAME= MAIL=/var/spool/mail/ MAVEN_OPTS=-Xmx512m MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins MY_RUBY_HOME=/.rvm/rubies/ruby-2.3.3 OLDPWD= PATH=/.rvm/gems/ruby-2.3.3/bin:/.rvm/gems/ruby-2.3.3 at ...3675...../bin:/.rvm/rubies/ruby-2.3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/.rvm/bin PT5HOME=/opt/pt PWD= QSG_RENDER_LOOP= QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_NO_GLIB=1 QT_QUICK_CONTROLS_STYLE=org.kde.desktop RUBY_VERSION=ruby-2.3.3 SESSION_MANAGER=local/:@/tmp/.ICE-unix/623,unix/:/tmp/.ICE-unix/623 SHELL=/usr/bin/zsh SHLVL=1 TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XCURSOR_SIZE=0 XCURSOR_THEME=breeze_cursors XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=KDE XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_SESSION_TYPE=x11 XDG_VTNR=1 _=/usr/bin/kwrapper5 __GL_SYNC_TO_VBLANK=1 _system_arch=x86_64 _system_name=Arch _system_type=Linux _system_version=libc-2.25 rvm_bin_path=/.rvm/bin rvm_path=/.rvm rvm_prefix= rvm_version=1.27.0 (latest) From bugtracker at ...3416... Mon Jul 31 17:19:02 2017 From: bugtracker at ...3416... (bugtracker at ...3416...) Date: Mon, 31 Jul 2017 15:19:02 GMT Subject: [Gambas-user] [Gambas Bug Tracker] Bug #1131: Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression In-Reply-To: References: Message-ID: http://gambaswiki.org/bugtracker/edit?object=BUG.1131&from=L21haW4- Adrien PROKOPOWICZ added an attachment: gbc.out