From jussi.lahtinen at ...626... Mon Dec 1 02:31:28 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 1 Dec 2014 03:31:28 +0200 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: <547B9FAB.6070800@...1...> References: <547B9FAB.6070800@...1...> Message-ID: See attachment. Improved test with "watch" fails (error 248). Second read always fails, first read is always OK. This may well be my error... I'll look it more closely later. Jussi On Mon, Dec 1, 2014 at 12:52 AM, Beno?t Minisini < gambas at ...1...> wrote: > Hi, > > I'm trying to fix a problem in the Gambas process management that annoys > a lot of people for a long time. > > Sometimes, the output of the process is not entirely read. Some data is > lost. > > This is because I was using a way of detecting data availability that > was not reliable. I thought it was, but I was wrong. > > Concretely, the select() system call tells you if there is data > available to read, but, in some cases, it wakes up and there is actually > no data to read. > > So I tried to use a end-of-stream check by using various system calls > (it depends on the type of file descriptor: file, pipe, socket...). But > this routine sometimes fails. > > To change that, I now read data ahead by chunk of 1KB before actually > raising the Read event. > > Apparently, using select() + read() is the correct way of accurately > detecting end of stream, especially on pipes. > > Consequently, if the read ahead fails, I decide there is nothing to read > anymore and I close the stream. > > Hopefully, this was not a big job, as internally read ahead was already > implemented for optimizing the INPUT and LINE INPUT instruction. > > But this is a big change that may have side effects, so I ask people who > run Gambas projects that watch a lot of file descriptors, and read the > output of a lot of external processes, to use that revision and report > any problem. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > 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: GambasTestercmd-0.9.31.tar.gz Type: application/x-gzip Size: 16922 bytes Desc: not available URL: From gambas at ...1... Mon Dec 1 02:37:34 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 02:37:34 +0100 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: References: <547B9FAB.6070800@...1...> Message-ID: <547BC65E.4090902@...1...> Le 01/12/2014 02:31, Jussi Lahtinen a ?crit : > See attachment. Improved test with "watch" fails (error 248). Second read > always fails, first read is always OK. > This may well be my error... I'll look it more closely later. > > Jussi > I confirm. '/dev/urandom' is a special file that generate random-numbers when read, so I guess it does not like to be read ahead. I should remove the read ahead for such files. -- Beno?t Minisini From gambas at ...1... Mon Dec 1 03:51:07 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 03:51:07 +0100 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: <547BC65E.4090902@...1...> References: <547B9FAB.6070800@...1...> <547BC65E.4090902@...1...> Message-ID: <547BD79B.8090109@...1...> Le 01/12/2014 02:37, Beno?t Minisini a ?crit : > Le 01/12/2014 02:31, Jussi Lahtinen a ?crit : >> See attachment. Improved test with "watch" fails (error 248). Second read >> always fails, first read is always OK. >> This may well be my error... I'll look it more closely later. >> >> Jussi >> > > I confirm. '/dev/urandom' is a special file that generate random-numbers > when read, so I guess it does not like to be read ahead. I should remove > the read ahead for such files. > I was wrong! There is no read ahead for watches, only for processes. You found a big bug that should be fixed in revision #6693. Regards, -- Beno?t Minisini From lewis at ...3412... Mon Dec 1 14:00:44 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 07:00:44 -0600 Subject: [Gambas-user] DEMO gb.settings In-Reply-To: <547B3AC1.9010702@...1...> References: <5477B523.1020108@...1...> <5477CAF0.9010003@...1...> <5478D7FE.401@...1...> <5479DC57.2020206@...1...> <547B0CC0.90406@...1...> <547B2EC1.8090901@...1...> <547B3AC1.9010702@...1...> Message-ID: <547C667C.4010206@...3412...> I created a sample application for gb.settings as I worked through how to use this Gambas component. I decided that short and simple is probably better for new users. The project is released to the PUBLIC DOMAIN (without restrictions) and available at the following URL: ScreenShot: http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png Archive: http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz I hope that someone will find it useful. Comments and/or suggestions are welcomed. Very Best regards, Lewis Balentine lewis at ...3412... From gambas at ...1... Mon Dec 1 14:11:31 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 14:11:31 +0100 Subject: [Gambas-user] DEMO gb.settings In-Reply-To: <547C667C.4010206@...3412...> References: <5477B523.1020108@...1...> <5477CAF0.9010003@...1...> <5478D7FE.401@...1...> <5479DC57.2020206@...1...> <547B0CC0.90406@...1...> <547B2EC1.8090901@...1...> <547B3AC1.9010702@...1...> <547C667C.4010206@...3412...> Message-ID: <547C6903.9020002@...1...> Le 01/12/2014 14:00, Lewis Balentine a ?crit : > I created a sample application for gb.settings as I worked through how > to use this Gambas component. I decided that short and simple is > probably better for new users. The project is released to the PUBLIC > DOMAIN (without restrictions) and available at the following URL: > > ScreenShot: > http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png > Archive: > http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz > > I hope that someone will find it useful. Comments and/or suggestions are > welcomed. > > Very Best regards, > > Lewis Balentine > lewis at ...3412... > Why do you hijack the thread? You must create a new thread for a new topic, otherwise things become unreadable. Anyway, thanks for your example. If you use the development version, you can publish it on the Gambas farm server for testing it. Regards, -- Beno?t Minisini From lewis at ...3412... Mon Dec 1 14:26:42 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 07:26:42 -0600 Subject: [Gambas-user] DEMO gb.settings In-Reply-To: <547C6903.9020002@...1...> References: <5477B523.1020108@...1...> <5477CAF0.9010003@...1...> <5478D7FE.401@...1...> <5479DC57.2020206@...1...> <547B0CC0.90406@...1...> <547B2EC1.8090901@...1...> <547B3AC1.9010702@...1...> <547C667C.4010206@...3412...> <547C6903.9020002@...1...> Message-ID: <547C6C92.6040402@...3412...> >> Why do you hijack the thread? << My apologies. I hit the reply button and changed the subject line thinking that it would create a new thread. I will not make the same mistake in the future :-( I will probably make a different one). >> If you use the development version, you can publish it on the Gambas farm server for testing it. << I am very much in a learning curve having recently switched from Windows/VB6(decades) to Linux/Gambas(weeks/days). I prefer to run the released version on my main computer and have not yet created a virtual machine to load the developement version (and I have to figure out how, learn to deal with svn, etc). Again my sincere apologies. I will try to learn the proper protocols and etiquette. Very Best regards, Lewis On 12/01/2014 07:11 AM, Beno?t Minisini wrote: > Le 01/12/2014 14:00, Lewis Balentine a ?crit : >> I created a sample application for gb.settings as I worked through how >> to use this Gambas component. I decided that short and simple is >> probably better for new users. The project is released to the PUBLIC >> DOMAIN (without restrictions) and available at the following URL: >> >> ScreenShot: >> http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png >> Archive: >> http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz >> >> I hope that someone will find it useful. Comments and/or suggestions are >> welcomed. >> >> Very Best regards, >> >> Lewis Balentine >> lewis at ...3412... >> > Why do you hijack the thread? You must create a new thread for a new > topic, otherwise things become unreadable. > > Anyway, thanks for your example. If you use the development version, you > can publish it on the Gambas farm server for testing it. > > Regards, > From gambas at ...1... Mon Dec 1 14:31:26 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 14:31:26 +0100 Subject: [Gambas-user] DEMO gb.settings In-Reply-To: <547C6C92.6040402@...3412...> References: <5477B523.1020108@...1...> <5477CAF0.9010003@...1...> <5478D7FE.401@...1...> <5479DC57.2020206@...1...> <547B0CC0.90406@...1...> <547B2EC1.8090901@...1...> <547B3AC1.9010702@...1...> <547C667C.4010206@...3412...> <547C6903.9020002@...1...> <547C6C92.6040402@...3412...> Message-ID: <547C6DAE.5070302@...1...> Le 01/12/2014 14:26, Lewis Balentine a ?crit : >>> Why do you hijack the thread? << > > My apologies. > I hit the reply button and changed the subject line thinking that it > would create a new thread. I will not make the same mistake in the > future :-( I will probably make a different one). Alas, mailing-lists put magic numbers inside the e-mails to identify threads, so modifying the subject does nothing! It's not a bug, it's a feature! :-) -- Beno?t Minisini From gambas at ...1... Mon Dec 1 14:48:59 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 01 Dec 2014 14:48:59 +0100 Subject: [Gambas-user] An utility component for Gambas Message-ID: <547C71CB.5010208@...1...> Hi, I'd like to create a 'gb.util' component, written in Gambas, to collect useful non-GUI programming routines that can't go directly into the interpreter because it would make it too heavy. For example: - Creating a directory and all its parent. - Removing accents from an UTF-8 string. - A CsvFile class to read CSV files easily. - Removing a directory recursively. - Moving a file or a directory, whether source and destination are on the same device or not. ... If you have ideas, just drop them. And better, uf you have code, and are agree to share it, modify it, maintain it, you are welcome! The difficulty will be to find the best interface (class name, method name, where to put it) for that. For example, for the removing accents method, I extended the String class. Logical... For directory methods, I created a new Shell static class... I'm waiting for your comments! P.S. The gambas fram client is more and more polished. Don't hesitate to play with it. The more tests, the sooner it will be released. I want to release Gambas 3.7 as soon as it is ready, even if there is not a lot of other changes in Gambas. Regards, -- Beno?t Minisini From jusabejusabe at ...626... Mon Dec 1 15:33:08 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Mon, 1 Dec 2014 15:33:08 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547C71CB.5010208@...1...> References: <547C71CB.5010208@...1...> Message-ID: Hi, Beno?t: I think this function is interesting: Between Function Between(string_large as string, word_begin as string, word_end as string) as string DIM iinf AS Integer DIM isup AS Integer iinf = InStr(string_large,word_begin) + Len(word_begin) isup = InStr(string_large , word_end, iinf) RETURN Mid(string_large , iinf, isup - iinf) END The Between function is the one responsible for finding and extracting a part of a chain , this contained in a larger string between two words (or strings). example : string_large=" Hello Gambas [improvements] 3.6.9 [/improvements] :)" word1="[improvements]" word2="[/improvements]" text = Between(string_large,word1,word2) print text " 3.6.9 " Note: Ideally extend to extract parts of web pages ( "
" and "
" , and supports nested structures "
") text = "
Hello
bye
" content = between ( text , "
", "
") print content "
bye
" Regards Julio 2014-12-01 14:48 GMT+01:00 Beno?t Minisini : > Hi, > > I'd like to create a 'gb.util' component, written in Gambas, to collect > useful non-GUI programming routines that can't go directly into the > interpreter because it would make it too heavy. > > For example: > > - Creating a directory and all its parent. > > - Removing accents from an UTF-8 string. > > - A CsvFile class to read CSV files easily. > > - Removing a directory recursively. > > - Moving a file or a directory, whether source and destination are on > the same device or not. > > ... > > If you have ideas, just drop them. And better, uf you have code, and are > agree to share it, modify it, maintain it, you are welcome! > > The difficulty will be to find the best interface (class name, method > name, where to put it) for that. > > For example, for the removing accents method, I extended the String > class. Logical... For directory methods, I created a new Shell static > class... > > I'm waiting for your comments! > > P.S. The gambas fram client is more and more polished. Don't hesitate to > play with it. The more tests, the sooner it will be released. I want to > release Gambas 3.7 as soon as it is ready, even if there is not a lot of > other changes in Gambas. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Dec 1 15:41:46 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 01 Dec 2014 15:41:46 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> Message-ID: <547C7E2A.1080207@...1...> Le 01/12/2014 15:33, Julio Sanchez a ?crit : > Hi, Beno?t: > > I think this function is interesting: Between > > Function Between(string_large as string, word_begin as string, word_end as > string) as string > > DIM iinf AS Integer > DIM isup AS Integer > iinf = InStr(string_large,word_begin) + Len(word_begin) > isup = InStr(string_large , word_end, iinf) > RETURN Mid(string_large , iinf, isup - iinf) > > END > > The Between function is the one responsible for finding and extracting a > part of a chain , this contained in a larger string between two words (or > strings). > example : > > string_large=" Hello Gambas [improvements] 3.6.9 [/improvements] :)" > word1="[improvements]" > word2="[/improvements]" > > text = Between(string_large,word1,word2) > > print text > " 3.6.9" > > > Note: > Ideally extend to extract parts of web pages ( "
" and "
" , and > supports nested structures "
") > > text = "
Hello
bye
" > > content = between ( text , "
", "
") > > print content > "
bye
" > > Regards > > Julio > Maybe I'm wrong, but you can already do that: Try content = Scan(text, "*
*
*")[1] If Error Then '
not found Else ' Got it Endif -- Beno?t Minisini From taboege at ...626... Mon Dec 1 17:47:54 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 17:47:54 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <1417298013.3608.17.camel@...40...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> Message-ID: <20141201164754.GD1329@...2774...> On Sat, 29 Nov 2014, Charlie Reinl wrote: > Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: > > On Tue, 18 Nov 2014, Karl Reinl wrote: > > > Salut Tobi, > > > > > > played with you trie example (trietest) it crash if > > > p = h.GetPrefix("texte") find nothing (p=null), even when change > > > to p = h.GetPrefix("Texte") > > > > > > My change is h["texte"] to h["Texte"] (source attached) > > > > Can you run your tests with #6688? > > > > Indeed there were bit width errors (I think) but what caused your particular > > error here was that a TriePrefix object would erroneously drop reference > > counts of its parent Trie object if it couldn't be created. Total nonsense. > > > > Thanks for your report! > > > > As for the leak you showed in a follow-up, I couldn't reproduce that. I'll > > try harder if the problem persists with #6688. But I can tell you that this > > does not necessarily indicate a severe problem / corruption, as I don't > > terminate strings in my trie backend code and it could just be some length > > calculations that went wrong. (Most probably that is because the Gambas > > string functions automatically use strlen() to determine a string's length > > when I give 0 as a length parameter. However, strlen() must not be used on > > the strings from my trie.) > > > > Regards, > > Tobi > > > > Salut Tobi, > > yes, now no more crash, only an error raises, thats oK. > The leak shown, I can't reproduce any more now..... BUT > Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" > showed me "D" AND "d"entries, now only the "d", may be thats how trie > work normally, > It should be case-sensitive. If it wasn't before on your system, that was a bug (I can't imagine where it came from, though). > but for my behaves non case sensitive would be better (or > a switch to do like that) > And we talked about something like .Add(Value,Key) for simplifing > filling. > OK, you get an Add() and Remove() method in #6699, similar to what Collection has. As for the case-insensitivity: I can add an optional constructor argument, Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). (After writing about half an hour complaining how hard it would be to get case-insensitivity right and efficient) I just had a magnificent idea: I will extend the native Trie class in Gambas and do something like that: ' Written from scratch, may contain syntax, etc. errors Public Struct _Trie_Entry Key As String Value As Variant End Struct Public Sub Add(Value As Variant, Key As String) Dim hEntry As New _Trie_Entry Dim sKey As String = Key If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) hEntry.Key = Key hEntry.Value = Value Super.Add(Value, sKey) End Similarly I can augment _get, _put, etc. so that you won't notice that the _Trie_Entry structure exists at all. If you request a case-insensitive Trie, all keys are upper-case'd internally and the real keys are saved as part of the stored object. So you can get your original key back later in an enumeration and I don't have to add branches in the hot paths of the trie code to support case-insensitivity (which would make the whole thing slower -- I don't know if it would be noticeable, but...). I will see if I can do that (_next() may impose a little problem or maybe not). @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to implement case-insensitivity by internally converting all characters to upper-case, is it sufficient to use String.Upper() or are there hidden pitfalls? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Mon Dec 1 17:53:17 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 17:53:17 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201164754.GD1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> Message-ID: <20141201165317.GE1329@...2774...> On Mon, 01 Dec 2014, Tobias Boege wrote: > Public Sub Add(Value As Variant, Key As String) > Dim hEntry As New _Trie_Entry > Dim sKey As String = Key > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > hEntry.Key = Key > hEntry.Value = Value > Super.Add(Value, sKey) --> Super.Add(hEntry, sKey) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Dec 1 18:07:05 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 18:07:05 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201164754.GD1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> Message-ID: <547CA039.9020903@...1...> Le 01/12/2014 17:47, Tobias Boege a ?crit : > On Sat, 29 Nov 2014, Charlie Reinl wrote: >> Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: >>> On Tue, 18 Nov 2014, Karl Reinl wrote: >>>> Salut Tobi, >>>> >>>> played with you trie example (trietest) it crash if >>>> p = h.GetPrefix("texte") find nothing (p=null), even when change >>>> to p = h.GetPrefix("Texte") >>>> >>>> My change is h["texte"] to h["Texte"] (source attached) >>> >>> Can you run your tests with #6688? >>> >>> Indeed there were bit width errors (I think) but what caused your particular >>> error here was that a TriePrefix object would erroneously drop reference >>> counts of its parent Trie object if it couldn't be created. Total nonsense. >>> >>> Thanks for your report! >>> >>> As for the leak you showed in a follow-up, I couldn't reproduce that. I'll >>> try harder if the problem persists with #6688. But I can tell you that this >>> does not necessarily indicate a severe problem / corruption, as I don't >>> terminate strings in my trie backend code and it could just be some length >>> calculations that went wrong. (Most probably that is because the Gambas >>> string functions automatically use strlen() to determine a string's length >>> when I give 0 as a length parameter. However, strlen() must not be used on >>> the strings from my trie.) >>> >>> Regards, >>> Tobi >>> >> >> Salut Tobi, >> >> yes, now no more crash, only an error raises, thats oK. >> The leak shown, I can't reproduce any more now..... BUT >> Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" >> showed me "D" AND "d"entries, now only the "d", may be thats how trie >> work normally, >> > > It should be case-sensitive. If it wasn't before on your system, that was > a bug (I can't imagine where it came from, though). > >> but for my behaves non case sensitive would be better (or >> a switch to do like that) >> And we talked about something like .Add(Value,Key) for simplifing >> filling. >> > > OK, you get an Add() and Remove() method in #6699, similar to what > Collection has. > > As for the case-insensitivity: I can add an optional constructor argument, > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > (After writing about half an hour complaining how hard it would be to get > case-insensitivity right and efficient) I just had a magnificent idea: I > will extend the native Trie class in Gambas and do something like that: > > ' Written from scratch, may contain syntax, etc. errors > > Public Struct _Trie_Entry > Key As String > Value As Variant > End Struct > > Public Sub Add(Value As Variant, Key As String) > Dim hEntry As New _Trie_Entry > Dim sKey As String = Key > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > hEntry.Key = Key > hEntry.Value = Value > Super.Add(Value, sKey) > End > > Similarly I can augment _get, _put, etc. so that you won't notice that the > _Trie_Entry structure exists at all. > > If you request a case-insensitive Trie, all keys are upper-case'd internally > and the real keys are saved as part of the stored object. So you can get > your original key back later in an enumeration and I don't have to add > branches in the hot paths of the trie code to support case-insensitivity > (which would make the whole thing slower -- I don't know if it would be > noticeable, but...). I will see if I can do that (_next() may impose a > little problem or maybe not). > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > implement case-insensitivity by internally converting all characters to > upper-case, is it sufficient to use String.Upper() or are there hidden > pitfalls? > > Regards, > Tobi > If they are keys, they should be ASCII, not UTF-8, like with the Collection class. If case insensitive is really needed, you should really manage that inside the C code of the component. Regards, -- Beno?t Minisini From taboege at ...626... Mon Dec 1 18:28:44 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 18:28:44 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <547CA039.9020903@...1...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <547CA039.9020903@...1...> Message-ID: <20141201172844.GF1329@...2774...> On Mon, 01 Dec 2014, Beno?t Minisini wrote: > > (After writing about half an hour complaining how hard it would be to get > > case-insensitivity right and efficient) I just had a magnificent idea: I > > will extend the native Trie class in Gambas and do something like that: > > > > ' Written from scratch, may contain syntax, etc. errors > > > > Public Struct _Trie_Entry > > Key As String > > Value As Variant > > End Struct > > > > Public Sub Add(Value As Variant, Key As String) > > Dim hEntry As New _Trie_Entry > > Dim sKey As String = Key > > > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > > hEntry.Key = Key > > hEntry.Value = Value > > Super.Add(Value, sKey) > > End > > > > Similarly I can augment _get, _put, etc. so that you won't notice that the > > _Trie_Entry structure exists at all. > > > > If you request a case-insensitive Trie, all keys are upper-case'd internally > > and the real keys are saved as part of the stored object. So you can get > > your original key back later in an enumeration and I don't have to add > > branches in the hot paths of the trie code to support case-insensitivity > > (which would make the whole thing slower -- I don't know if it would be > > noticeable, but...). I will see if I can do that (_next() may impose a > > little problem or maybe not). > > > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > > implement case-insensitivity by internally converting all characters to > > upper-case, is it sufficient to use String.Upper() or are there hidden > > pitfalls? > > > > Regards, > > Tobi > > > > If they are keys, they should be ASCII, not UTF-8, like with the > Collection class. > Currently the Trie supports arbitrary sequences of bytes as keys. It would take some time to move the code back in that restricts the key space to ASCII sequences. Consequently I'd like to leave it as-is. > If case insensitive is really needed, you should really manage that > inside the C code of the component. > Why? With the above method I use some more space but avoid lots of if's in the more frequently used parts of the C code. Do you see any performance penalty I'm overlooking? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Mon Dec 1 19:05:41 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 19:05:41 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201172844.GF1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <547CA039.9020903@...1...> <20141201172844.GF1329@...2774...> Message-ID: <20141201180541.GG1329@...2774...> On Mon, 01 Dec 2014, Tobias Boege wrote: > > If they are keys, they should be ASCII, not UTF-8, like with the > > Collection class. > > > > Currently the Trie supports arbitrary sequences of bytes as keys. It would > take some time to move the code back in that restricts the key space to > ASCII sequences. Consequently I'd like to leave it as-is. > OTOH, I will save 16 bytes per trie node if I restrict the key space to ASCII. I'll put the restriction back in place sometime later. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From t.lee.davidson at ...626... Mon Dec 1 19:11:10 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Mon, 01 Dec 2014 13:11:10 -0500 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547C71CB.5010208@...1...> References: <547C71CB.5010208@...1...> Message-ID: <547CAF3E.1070707@...626...> On 12/01/2014 08:48 AM, Beno?t Minisini wrote: > Hi, > > I'd like to create a 'gb.util' component, written in Gambas, to collect > useful non-GUI programming routines that can't go directly into the > interpreter because it would make it too heavy. > > [snip] > > The difficulty will be to find the best interface (class name, method > name, where to put it) for that. > > For example, for the removing accents method, I extended the String > class. Logical... For directory methods, I created a new Shell static > class... > > [snip] I'm not sure if you are asking for thoughts on miscellaneous functions to put in a gb.Util component or thoughts on useful extensions to existing classes, or both. But... A. Format decimal numbers as octal: Public Sub Format(iDecimal as Integer) as String Dim digit as Byte Dim out as String While (iDecimal > 0) digit = iDecimal % 8 iDecimal /= 8 out = digit & out Wend Return out End B. It would be nice to be able to work with *nix-native timestamps. Perhaps this might be relatively easily accomplished by just a couple functions: 1. DateToTimestamp(dDate as Date) as Integer 2. TimestampToDate(iTimestamp as Integer) as Date Format$ should be able to take over from there. -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From jusabejusabe at ...626... Mon Dec 1 19:26:02 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Mon, 1 Dec 2014 19:26:02 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CAF3E.1070707@...626...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> Message-ID: Beno?t: >content = Scan(text, "*
*
*") Yes, function as a "simple" between. But would not work with nestings Example: Dim arrayStr As String[] Dim text As String text = "Hola
Bonito
gato
negro
" ArrayStr = Scan(text, "*
*
*") Print arrayStr[1] Return: "Bonito
gato " If you respect the nesting would return: "Bonito
gato
negro " Regards Julio 2014-12-01 19:11 GMT+01:00 T Lee Davidson : > On 12/01/2014 08:48 AM, Beno?t Minisini wrote: > > Hi, > > > > I'd like to create a 'gb.util' component, written in Gambas, to collect > > useful non-GUI programming routines that can't go directly into the > > interpreter because it would make it too heavy. > > > > [snip] > > > > The difficulty will be to find the best interface (class name, method > > name, where to put it) for that. > > > > For example, for the removing accents method, I extended the String > > class. Logical... For directory methods, I created a new Shell static > > class... > > > > [snip] > > I'm not sure if you are asking for thoughts on miscellaneous functions > to put in a gb.Util component or thoughts on useful extensions to > existing classes, or both. But... > > A. Format decimal numbers as octal: > Public Sub Format(iDecimal as Integer) as String > Dim digit as Byte > Dim out as String > While (iDecimal > 0) > digit = iDecimal % 8 > iDecimal /= 8 > out = digit & out > Wend > Return out > End > > B. It would be nice to be able to work with *nix-native timestamps. > Perhaps this might be relatively easily accomplished by just a couple > functions: > 1. DateToTimestamp(dDate as Date) as Integer > 2. TimestampToDate(iTimestamp as Integer) as Date > Format$ should be able to take over from there. > > > -- > Lee > __________ > > "Artificial Intelligence is no match for natural stupidity." > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From sbungay at ...3301... Mon Dec 1 19:51:09 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 01 Dec 2014 13:51:09 -0500 Subject: [Gambas-user] Project already open... but it isn't. Message-ID: <547CB89D.6020007@...3301...> What is GAMBAS looking at/for when it attempts to load a project in order to pop up the warning that it "seems to be already opened"? I've been hunting around for lock files and/or other flotsam that might have been left over from an IDE crash but see nothing *obvious*. -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site Information Systems From taboege at ...626... Mon Dec 1 19:55:40 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 19:55:40 +0100 Subject: [Gambas-user] Project already open... but it isn't. In-Reply-To: <547CB89D.6020007@...3301...> References: <547CB89D.6020007@...3301...> Message-ID: <20141201185540.GH1329@...2774...> On Mon, 01 Dec 2014, Stephen wrote: > What is GAMBAS looking at/for when it attempts to load a project in > order to pop up the warning that it "seems to be already opened"? I've > been hunting around for lock files and/or other flotsam that might have > been left over from an IDE crash but see nothing *obvious*. > I guess it's the file ".lock" in the project directory. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From sbungay at ...3301... Mon Dec 1 20:02:09 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 01 Dec 2014 14:02:09 -0500 Subject: [Gambas-user] Project already open... but it isn't. In-Reply-To: <20141201185540.GH1329@...2774...> References: <547CB89D.6020007@...3301...> <20141201185540.GH1329@...2774...> Message-ID: <547CBB31.5090903@...3301...> Yeah.. I thought it might be something like that.. but I don't see any file .lock in the project directory. Very strange. On 12/01/2014 01:55 PM, Tobias Boege wrote: > On Mon, 01 Dec 2014, Stephen wrote: >> What is GAMBAS looking at/for when it attempts to load a project in >> order to pop up the warning that it "seems to be already opened"? I've >> been hunting around for lock files and/or other flotsam that might have >> been left over from an IDE crash but see nothing *obvious*. >> > I guess it's the file ".lock" in the project directory. > -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site Information Systems From sbungay at ...3301... Mon Dec 1 20:04:46 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 01 Dec 2014 14:04:46 -0500 Subject: [Gambas-user] Project already open... but it isn't. In-Reply-To: <20141201185540.GH1329@...2774...> References: <547CB89D.6020007@...3301...> <20141201185540.GH1329@...2774...> Message-ID: <547CBBCE.6040408@...3301...> On 12/01/2014 01:55 PM, Tobias Boege wrote: > On Mon, 01 Dec 2014, Stephen wrote: >> What is GAMBAS looking at/for when it attempts to load a project in >> order to pop up the warning that it "seems to be already opened"? I've >> been hunting around for lock files and/or other flotsam that might have >> been left over from an IDE crash but see nothing *obvious*. >> > I guess it's the file ".lock" in the project directory. > I'm gonna restart the VM (gee... Linux is getting like Windoze). -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site Information Systems From sbungay at ...3301... Mon Dec 1 20:15:06 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 01 Dec 2014 14:15:06 -0500 Subject: [Gambas-user] Project already open... but it isn't. In-Reply-To: <547CBBCE.6040408@...3301...> References: <547CB89D.6020007@...3301...> <20141201185540.GH1329@...2774...> <547CBBCE.6040408@...3301...> Message-ID: <547CBE3A.3020307@...3301...> Restarted VM, now loads with no message... very strange... but OK, keep moving forward. On 12/01/2014 02:04 PM, Stephen wrote: > On 12/01/2014 01:55 PM, Tobias Boege wrote: >> On Mon, 01 Dec 2014, Stephen wrote: >>> What is GAMBAS looking at/for when it attempts to load a project in >>> order to pop up the warning that it "seems to be already opened"? I've >>> been hunting around for lock files and/or other flotsam that might have >>> been left over from an IDE crash but see nothing *obvious*. >>> >> I guess it's the file ".lock" in the project directory. >> > I'm gonna restart the VM (gee... Linux is getting like Windoze). > -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site Information Systems From gambas at ...1... Mon Dec 1 20:28:46 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 20:28:46 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201180541.GG1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <547CA039.9020903@...1...> <20141201172844.GF1329@...2774...> <20141201180541.GG1329@...2774...> Message-ID: <547CC16E.9050800@...1...> Le 01/12/2014 19:05, Tobias Boege a ?crit : > On Mon, 01 Dec 2014, Tobias Boege wrote: >>> If they are keys, they should be ASCII, not UTF-8, like with the >>> Collection class. >>> >> >> Currently the Trie supports arbitrary sequences of bytes as keys. It would >> take some time to move the code back in that restricts the key space to >> ASCII sequences. Consequently I'd like to leave it as-is. >> > > OTOH, I will save 16 bytes per trie node if I restrict the key space to > ASCII. I'll put the restriction back in place sometime later. > You have nothing to change. If you are case-sensitive, then your keys are automatically both ASCII and UTF-8. I'm speaking about charset only when case matters (because case depends on charset). So I mean that if you want to be case unsensitive, then you must be case unsensitive in the ASCII sense, not UTF-8, to be compatible with the Collection class, and because UTF-8 case support is slow as hell. Regards, -- Beno?t Minisini From gambas at ...1... Mon Dec 1 20:33:41 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 20:33:41 +0100 Subject: [Gambas-user] Project already open... but it isn't. In-Reply-To: <547CB89D.6020007@...3301...> References: <547CB89D.6020007@...3301...> Message-ID: <547CC295.3030605@...1...> Le 01/12/2014 19:51, Stephen a ?crit : > What is GAMBAS looking at/for when it attempts to load a project in > order to pop up the warning that it "seems to be already opened"? I've > been hunting around for lock files and/or other flotsam that might have > been left over from an IDE crash but see nothing *obvious*. > Unless you are converting a Gambas 2 project, you get this message if the IDE was unable to acquire a lock on the ".lock" file located in the project with the LOCK instruction (you can look at the source code if you want the detail). Several possible reasons: 1) Another IDE has already opened the project and acquired the lock. 2) Maybe some right problems. If you open the project the first time as root, I guess the .lock file is for root only. So if you open it again with a normal user, the lock fails. 3) Device is full, the lock file cannot be added. ... If I have time, I will write code to analyze the lock failure. At the moment, I print a message corresponding to the most common failure reason. Regards, -- Beno?t Minisini From gambas at ...1... Mon Dec 1 20:35:00 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 01 Dec 2014 20:35:00 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CAF3E.1070707@...626...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> Message-ID: <547CC2E4.6010805@...1...> Le 01/12/2014 19:11, T Lee Davidson a ?crit : > On 12/01/2014 08:48 AM, Beno?t Minisini wrote: >> Hi, >> >> I'd like to create a 'gb.util' component, written in Gambas, to collect >> useful non-GUI programming routines that can't go directly into the >> interpreter because it would make it too heavy. >> >> [snip] >> >> The difficulty will be to find the best interface (class name, method >> name, where to put it) for that. >> >> For example, for the removing accents method, I extended the String >> class. Logical... For directory methods, I created a new Shell static >> class... >> >> [snip] > > I'm not sure if you are asking for thoughts on miscellaneous functions > to put in a gb.Util component or thoughts on useful extensions to > existing classes, or both. But... > > A. Format decimal numbers as octal: > Public Sub Format(iDecimal as Integer) as String > Dim digit as Byte > Dim out as String > While (iDecimal > 0) > digit = iDecimal % 8 > iDecimal /= 8 > out = digit & out > Wend > Return out > End Maybe an Oct$() function inside the interpreter. Octal is normally not needed with Gambas. Do you have any use of that? > > B. It would be nice to be able to work with *nix-native timestamps. > Perhaps this might be relatively easily accomplished by just a couple > functions: > 1. DateToTimestamp(dDate as Date) as Integer > 2. TimestampToDate(iTimestamp as Integer) as Date > Format$ should be able to take over from there. > Noted! -- Beno?t Minisini From gambas at ...1... Mon Dec 1 20:36:19 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 01 Dec 2014 20:36:19 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> Message-ID: <547CC333.3010305@...1...> Le 01/12/2014 19:26, Julio Sanchez a ?crit : > Beno?t: > >> content = Scan(text, "*
*
*") > Yes, function as a "simple" between. But would not work with nestings > > Example: > Dim arrayStr As String[] > Dim text As String > > text = "Hola
Bonito
gato
negro
" > > ArrayStr = Scan(text, "*
*
*") > > Print arrayStr[1] > > Return: > "Bonito
gato" > > > If you respect the nesting would return: > "Bonito
gato
negro" > > > Regards > Julio > Your function does not respect the nesting too, doesn't it? -- Beno?t Minisini From jusabejusabe at ...626... Mon Dec 1 20:50:37 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Mon, 1 Dec 2014 20:50:37 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CC333.3010305@...1...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC333.3010305@...1...> Message-ID: Beno?t: Yes, my function does not :( I would like to be implemented Regards Julio 2014-12-01 20:36 GMT+01:00 Beno?t Minisini : > Le 01/12/2014 19:26, Julio Sanchez a ?crit : > > Beno?t: > > > >> content = Scan(text, "*
*
*") > > Yes, function as a "simple" between. But would not work with nestings > > > > Example: > > Dim arrayStr As String[] > > Dim text As String > > > > text = "Hola
Bonito
gato
negro
" > > > > ArrayStr = Scan(text, "*
*
*") > > > > Print arrayStr[1] > > > > Return: > > "Bonito
gato" > > > > > > If you respect the nesting would return: > > "Bonito
gato
negro" > > > > > > Regards > > Julio > > > > Your function does not respect the nesting too, doesn't it? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From lewis at ...3412... Mon Dec 1 21:26:22 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 14:26:22 -0600 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CC2E4.6010805@...1...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> Message-ID: <547CCEEE.3050106@...3412...> >> Octal is normally not needed with Gambas. Do you have any use of that? << Neither is "binary" best I can tell. It is still convenient to have these tools available. One may not always be dealing with numbers originating in Gambas or output targeting Gambas. Hex$(), Dec$(), Oct$(), Bin$() Some might consider the Dec$() function redundant but if the functions were written such that they would except any common string notation or value the Dec$() could be used to convert from Hexadecimal or Binary Strings as well as a integer or long value. The most challenging aspect might be determining all the various common notations used. I tried something similar recently for Hexadecimal: ' -------------------------------------- Private Function HexStrToVal(HexStr As String) As Long Dim i, v As Long Dim HexCharacters As String = "0123456789abcdef" Dim N As Long Dim C As String ' first we remove any white space and convert it to lower case HexStr = Trim(LCase(HexStr)) ' There are a number of other conventions. These are just a few.... If Left(HexStr, 4) = "hex:" Then HexStr = Mid(HexStr, 5) If Left(HexStr, 3) = "hex" Then HexStr = Mid(HexStr, 4) If Left(HexStr, 3) = "&#x" Then HexStr = Mid(HexStr, 4) If Left(HexStr, 2) = "%x" Then HexStr = Mid(HexStr, 3) If Left(HexStr, 2) = "0x" Then HexStr = Mid(HexStr, 3) If Left(HexStr, 2) = "0h" Then HexStr = Mid(HexStr, 3) If Left(HexStr, 2) = "&h" Then HexStr = Mid(HexStr, 3) If Left(HexStr, 2) = "U+" Then HexStr = Mid(HexStr, 3) If Left(HexStr, 1) = "x" Then HexStr = Mid(HexStr, 2) If Left(HexStr, 1) = "h" Then HexStr = Mid(HexStr, 2) If Left(HexStr, 1) = "$" Then HexStr = Mid(HexStr, 2) If Left(HexStr, 1) = "#" Then HexStr = Mid(HexStr, 2) If Left(HexStr, 1) = ":" Then HexStr = Mid(HexStr, 2) ' now just in case we have a space between the prefix and the hex number ' then we add a space to the end so that mid always has something to return HexStr = Trim(HexStr) & " " N = 0 While HexStr <> "" C = Left(HexStr, 1) v = InStr(HexCharacters, C) If v = 0 Then ' like the val function we stop at the first non-hex character HexStr = "" Else v = v - 1 N = (N * 16) + v HexStr = Mid(HexStr, 2) Endif Wend Return N End ' -------------------------------------- Someone can probably come up with a more efficient way to calculate the value. Regards, Lewis Balentine On 12/01/2014 01:35 PM, Beno?t Minisini wrote: > Le 01/12/2014 19:11, T Lee Davidson a ?crit : >> On 12/01/2014 08:48 AM, Beno?t Minisini wrote: >>> Hi, >>> >>> I'd like to create a 'gb.util' component, written in Gambas, to collect >>> useful non-GUI programming routines that can't go directly into the >>> interpreter because it would make it too heavy. >>> >>> [snip] >>> >>> The difficulty will be to find the best interface (class name, method >>> name, where to put it) for that. >>> >>> For example, for the removing accents method, I extended the String >>> class. Logical... For directory methods, I created a new Shell static >>> class... >>> >>> [snip] >> I'm not sure if you are asking for thoughts on miscellaneous functions >> to put in a gb.Util component or thoughts on useful extensions to >> existing classes, or both. But... >> >> A. Format decimal numbers as octal: >> Public Sub Format(iDecimal as Integer) as String >> Dim digit as Byte >> Dim out as String >> While (iDecimal > 0) >> digit = iDecimal % 8 >> iDecimal /= 8 >> out = digit & out >> Wend >> Return out >> End > Maybe an Oct$() function inside the interpreter. Octal is normally not > needed with Gambas. Do you have any use of that? > >> B. It would be nice to be able to work with *nix-native timestamps. >> Perhaps this might be relatively easily accomplished by just a couple >> functions: >> 1. DateToTimestamp(dDate as Date) as Integer >> 2. TimestampToDate(iTimestamp as Integer) as Date >> Format$ should be able to take over from there. >> > Noted! > From taboege at ...626... Mon Dec 1 21:29:13 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 21:29:13 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CCEEE.3050106@...3412...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CCEEE.3050106@...3412...> Message-ID: <20141201202913.GI1329@...2774...> On Mon, 01 Dec 2014, Lewis Balentine wrote: > >> Octal is normally not needed with Gambas. Do you have any use of > that? << > > Neither is "binary" best I can tell. It is still convenient to have > these tools available. One may not always be dealing with numbers > originating in Gambas or output targeting Gambas. > > Hex$(), Dec$(), Oct$(), Bin$() > Why not just mirror strtol() from the C library to Gambas then? It does these things for all bases from 2 to 36. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From t.lee.davidson at ...626... Mon Dec 1 21:32:49 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Mon, 01 Dec 2014 15:32:49 -0500 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CC2E4.6010805@...1...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> Message-ID: <547CD071.5020506@...626...> On 12/01/2014 02:35 PM, Beno?t Minisini wrote: > Maybe an Oct$() function inside the interpreter. Octal is normally not > needed with Gambas. Do you have any use of that? Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a file as a decimal integer which is not very intuitive for someone used to working with CHMOD with octal numbers. Oct$(420) --> 644 A while back I looked at the interpreter's source and it appeared that one conversion function (was it bin_hex?) was structured to allow for different conversions. But, it also looked as though there was no more room in the jump table. However, IIRC, those were actually conversion functions and not formatting functions. Perhaps Format$ could allow for eg. Format$(mode, gb.Octal), or to follow what you originally proposed: eg. "Util.Oct$(mode) As String". -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From taboege at ...626... Mon Dec 1 21:37:09 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 21:37:09 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CD071.5020506@...626...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CD071.5020506@...626...> Message-ID: <20141201203709.GJ1329@...2774...> On Mon, 01 Dec 2014, T Lee Davidson wrote: > On 12/01/2014 02:35 PM, Beno??t Minisini wrote: > > Maybe an Oct$() function inside the interpreter. Octal is normally not > > needed with Gambas. Do you have any use of that? > > Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a > file as a decimal integer which is not very intuitive for someone used > to working with CHMOD with octal numbers. Oct$(420) --> 644 > Stat.Mode is an Integer. An integer is a value. There is no such thing as a "decimal integer". It may be *stored* in a binary base in memory, it may be *displayed* in decimal base if you Print it, but per se it doesn't have any base attached to it. You only give an integer a base if you encode it to a string. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Dec 1 21:45:52 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 21:45:52 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <20141201202913.GI1329@...2774...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CCEEE.3050106@...3412...> <20141201202913.GI1329@...2774...> Message-ID: <547CD380.6040901@...1...> Le 01/12/2014 21:29, Tobias Boege a ?crit : > On Mon, 01 Dec 2014, Lewis Balentine wrote: >> >> Octal is normally not needed with Gambas. Do you have any use of >> that? << >> >> Neither is "binary" best I can tell. It is still convenient to have >> these tools available. One may not always be dealing with numbers >> originating in Gambas or output targeting Gambas. >> >> Hex$(), Dec$(), Oct$(), Bin$() >> > > Why not just mirror strtol() from the C library to Gambas then? It does > these things for all bases from 2 to 36. > Because strtol wants a zero-terminated string. -- Beno?t Minisini From gambas at ...1... Mon Dec 1 21:47:27 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 01 Dec 2014 21:47:27 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <20141201203709.GJ1329@...2774...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CD071.5020506@...626...> <20141201203709.GJ1329@...2774...> Message-ID: <547CD3DF.10907@...1...> Le 01/12/2014 21:37, Tobias Boege a ?crit : > On Mon, 01 Dec 2014, T Lee Davidson wrote: >> On 12/01/2014 02:35 PM, Beno??t Minisini wrote: >>> Maybe an Oct$() function inside the interpreter. Octal is normally not >>> needed with Gambas. Do you have any use of that? >> >> Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a >> file as a decimal integer which is not very intuitive for someone used >> to working with CHMOD with octal numbers. Oct$(420) --> 644 >> > > Stat.Mode is an Integer. An integer is a value. There is no such thing as > a "decimal integer". It may be *stored* in a binary base in memory, it may > be *displayed* in decimal base if you Print it, but per se it doesn't have > any base attached to it. You only give an integer a base if you encode it > to a string. > Moreover, you can use Stat.Auth that decodes the authorization into a "chmod-like" string. No need to deal with integer in any base. :-) -- Beno?t Minisini From lewis at ...3412... Mon Dec 1 21:48:15 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 14:48:15 -0600 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <20141201202913.GI1329@...2774...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CCEEE.3050106@...3412...> <20141201202913.GI1329@...2774...> Message-ID: <547CD40F.4010304@...3412...> As an individual who rarely deals with "C" or "C++" I can not comment in that regard.Consider the target audience. I believe the suggested syntax would be more intuitive to a "Basic" programmer. ....however and old dog can learn new tricks. Ref: http://www.cplusplus.com/reference/cstdlib/strtol/ It does seem like the strol() function is rather limited regards the notational convention. Perhaps mirroring the strol() function and then use it to implement the set of Hex$(), Dec$, Oct$(), Bin$() functions (noting that Hex$() is already implemented). On 12/01/2014 02:29 PM, Tobias Boege wrote: > On Mon, 01 Dec 2014, Lewis Balentine wrote: >> >> Octal is normally not needed with Gambas. Do you have any use of >> that? << >> >> Neither is "binary" best I can tell. It is still convenient to have >> these tools available. One may not always be dealing with numbers >> originating in Gambas or output targeting Gambas. >> >> Hex$(), Dec$(), Oct$(), Bin$() >> > Why not just mirror strtol() from the C library to Gambas then? It does > these things for all bases from 2 to 36. > From Karl.Reinl at ...2345... Mon Dec 1 22:54:35 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 01 Dec 2014 22:54:35 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201164754.GD1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> Message-ID: <1417470875.4788.7.camel@...40...> Am Montag, den 01.12.2014, 17:47 +0100 schrieb Tobias Boege: > On Sat, 29 Nov 2014, Charlie Reinl wrote: > > Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: > > > On Tue, 18 Nov 2014, Karl Reinl wrote: > > > > Salut Tobi, > > > > > > > > played with you trie example (trietest) it crash if > > > > p = h.GetPrefix("texte") find nothing (p=null), even when change > > > > to p = h.GetPrefix("Texte") > > > > > > > > My change is h["texte"] to h["Texte"] (source attached) > > > > > > Can you run your tests with #6688? > > > > > > Indeed there were bit width errors (I think) but what caused your particular > > > error here was that a TriePrefix object would erroneously drop reference > > > counts of its parent Trie object if it couldn't be created. Total nonsense. > > > > > > Thanks for your report! > > > > > > As for the leak you showed in a follow-up, I couldn't reproduce that. I'll > > > try harder if the problem persists with #6688. But I can tell you that this > > > does not necessarily indicate a severe problem / corruption, as I don't > > > terminate strings in my trie backend code and it could just be some length > > > calculations that went wrong. (Most probably that is because the Gambas > > > string functions automatically use strlen() to determine a string's length > > > when I give 0 as a length parameter. However, strlen() must not be used on > > > the strings from my trie.) > > > > > > Regards, > > > Tobi > > > > > > > Salut Tobi, > > > > yes, now no more crash, only an error raises, thats oK. > > The leak shown, I can't reproduce any more now..... BUT > > Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" > > showed me "D" AND "d"entries, now only the "d", may be thats how trie > > work normally, > > > > It should be case-sensitive. If it wasn't before on your system, that was > a bug (I can't imagine where it came from, though). > > > but for my behaves non case sensitive would be better (or > > a switch to do like that) > > And we talked about something like .Add(Value,Key) for simplifing > > filling. > > > > OK, you get an Add() and Remove() method in #6699, similar to what > Collection has. > > As for the case-insensitivity: I can add an optional constructor argument, > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > (After writing about half an hour complaining how hard it would be to get > case-insensitivity right and efficient) I just had a magnificent idea: I > will extend the native Trie class in Gambas and do something like that: > > ' Written from scratch, may contain syntax, etc. errors > > Public Struct _Trie_Entry > Key As String > Value As Variant > End Struct > > Public Sub Add(Value As Variant, Key As String) > Dim hEntry As New _Trie_Entry > Dim sKey As String = Key > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > hEntry.Key = Key > hEntry.Value = Value > Super.Add(Value, sKey) > End > > Similarly I can augment _get, _put, etc. so that you won't notice that the > _Trie_Entry structure exists at all. > > If you request a case-insensitive Trie, all keys are upper-case'd internally > and the real keys are saved as part of the stored object. So you can get > your original key back later in an enumeration and I don't have to add > branches in the hot paths of the trie code to support case-insensitivity > (which would make the whole thing slower -- I don't know if it would be > noticeable, but...). I will see if I can do that (_next() may impose a > little problem or maybe not). > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > implement case-insensitivity by internally converting all characters to > upper-case, is it sufficient to use String.Upper() or are there hidden > pitfalls? > > Regards, > Tobi > Salut Tobi, I think it would be best, to stay close to the original definition of trie..."should be case-sensitive". Every thing else, I can do by myself. It was just a question because off the first outputs. -- Amicalement Charlie From lewis at ...3412... Mon Dec 1 22:54:53 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 15:54:53 -0600 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547C71CB.5010208@...1...> References: <547C71CB.5010208@...1...> Message-ID: <547CE3AD.5090107@...3412...> >>Removing accents from an UTF-8 string.<< H'mmmm ..... Plan "A" is a loser. it seems the instr() function does not like accented characters: P = InStr("?", "???????????") Result: P=0 From Karl.Reinl at ...2345... Mon Dec 1 23:03:54 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 01 Dec 2014 23:03:54 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CE3AD.5090107@...3412...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> Message-ID: <1417471434.4788.9.camel@...40...> Am Montag, den 01.12.2014, 15:54 -0600 schrieb Lewis Balentine: > >>Removing accents from an UTF-8 string.<< > H'mmmm ..... Plan "A" is a loser. > > it seems the instr() function does not like accented characters: > P = InStr("?", "???????????") > Result: P=0 > Salut Lewis, for UTF-8 use "String." to deal with accented characters. -- Amicalement Charlie From gambas at ...1... Mon Dec 1 23:07:29 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 01 Dec 2014 23:07:29 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <1417471434.4788.9.camel@...40...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> Message-ID: <547CE6A1.4070906@...1...> Le 01/12/2014 23:03, Charlie Reinl a ?crit : > Am Montag, den 01.12.2014, 15:54 -0600 schrieb Lewis Balentine: >>>> Removing accents from an UTF-8 string.<< >> H'mmmm ..... Plan "A" is a loser. >> >> it seems the instr() function does not like accented characters: >> P = InStr("?", "???????????") >> Result: P=0 >> > Salut Lewis, > > for UTF-8 use "String." to deal with accented characters. > > ...and read the documentation of InStr carefully again. -- Beno?t Minisini From t.lee.davidson at ...626... Mon Dec 1 23:22:27 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Mon, 01 Dec 2014 17:22:27 -0500 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CD3DF.10907@...1...> References: <547C71CB.5010208@...1...> <547CAF3E.1070707@...626...> <547CC2E4.6010805@...1...> <547CD071.5020506@...626...> <20141201203709.GJ1329@...2774...> <547CD3DF.10907@...1...> Message-ID: <547CEA23.6060409@...626...> On 12/01/2014 03:47 PM, Beno?t Minisini wrote: > Le 01/12/2014 21:37, Tobias Boege a ?crit : >> On Mon, 01 Dec 2014, T Lee Davidson wrote: >>> On 12/01/2014 02:35 PM, Beno??t Minisini wrote: >>>> Maybe an Oct$() function inside the interpreter. Octal is normally not >>>> needed with Gambas. Do you have any use of that? >>> >>> Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a >>> file as a decimal integer which is not very intuitive for someone used >>> to working with CHMOD with octal numbers. Oct$(420) --> 644 >>> >> >> Stat.Mode is an Integer. An integer is a value. There is no such thing as >> a "decimal integer". It may be *stored* in a binary base in memory, it may >> be *displayed* in decimal base if you Print it, but per se it doesn't have >> any base attached to it. You only give an integer a base if you encode it >> to a string. >> > > Moreover, you can use Stat.Auth that decodes the authorization into a > "chmod-like" string. No need to deal with integer in any base. :-) Well yes, that's true. But, as you said, Stat.Auth represents the mode as a string in the form "rw-r--r--", not as a number. Not a real big deal, hence why I said, "Perhaps only occasional use." -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From lewis at ...3412... Mon Dec 1 23:27:40 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 16:27:40 -0600 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CE6A1.4070906@...1...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> <547CE6A1.4070906@...1...> Message-ID: <547CEB5C.5040309@...3412...> >>...and read the documentation of InStr carefully again.<< "This function only deal with ASCII strings. To manipulate UTF-8 strings, use the String class." P = String.InStr("?", "???????????", gb.Binary) P = String.InStr("?", "???????????", gb.IgnoreCase) P = String.InStr("?", "???????????") P = String.InStr("?", "xxxx???????????XXXX", gb.Binary) P = String.InStr("?", "xxxx???????????XXXX", gb.IgnoreCase) P = String.InStr("?", "xxxx???????????XXXX") same result ... P=0 On 12/01/2014 04:07 PM, Beno?t Minisini wrote: > Le 01/12/2014 23:03, Charlie Reinl a ?crit : >> Am Montag, den 01.12.2014, 15:54 -0600 schrieb Lewis Balentine: >>>>> Removing accents from an UTF-8 string.<< >>> H'mmmm ..... Plan "A" is a loser. >>> >>> it seems the instr() function does not like accented characters: >>> P = InStr("?", "???????????") >>> Result: P=0 >>> >> Salut Lewis, >> >> for UTF-8 use "String." to deal with accented characters. >> >> > ...and read the documentation of InStr carefully again. > From Karl.Reinl at ...2345... Mon Dec 1 23:42:11 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 01 Dec 2014 23:42:11 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547CEB5C.5040309@...3412...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> <547CE6A1.4070906@...1...> <547CEB5C.5040309@...3412...> Message-ID: <1417473731.4788.14.camel@...40...> Am Montag, den 01.12.2014, 16:27 -0600 schrieb Lewis Balentine: > >>...and read the documentation of InStr carefully again.<< > "This function only deal with ASCII strings. To manipulate UTF-8 > strings, use the String class." > > P = String.InStr("?", "???????????", gb.Binary) > P = String.InStr("?", "???????????", gb.IgnoreCase) > P = String.InStr("?", "???????????") > P = String.InStr("?", "xxxx???????????XXXX", gb.Binary) > P = String.InStr("?", "xxxx???????????XXXX", gb.IgnoreCase) > P = String.InStr("?", "xxxx???????????XXXX") > > same result ... P=0 > Salut Lewis, Beno?t said : and read the documentation of InStr carefully again. Me too re-read http://gambaswiki.org/wiki/comp/gb/string/instr , (inverse your arguments). InStr(String As String, Pattern As String ) -- Amicalement Charlie From taboege at ...626... Mon Dec 1 23:39:26 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 1 Dec 2014 23:39:26 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <1417470875.4788.7.camel@...40...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <1417470875.4788.7.camel@...40...> Message-ID: <20141201223926.GL1329@...2774...> On Mon, 01 Dec 2014, Charlie Reinl wrote: > Am Montag, den 01.12.2014, 17:47 +0100 schrieb Tobias Boege: > > On Sat, 29 Nov 2014, Charlie Reinl wrote: > > > Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: > > > > On Tue, 18 Nov 2014, Karl Reinl wrote: > > > > > Salut Tobi, > > > > > > > > > > played with you trie example (trietest) it crash if > > > > > p = h.GetPrefix("texte") find nothing (p=null), even when change > > > > > to p = h.GetPrefix("Texte") > > > > > > > > > > My change is h["texte"] to h["Texte"] (source attached) > > > > > > > > Can you run your tests with #6688? > > > > > > > > Indeed there were bit width errors (I think) but what caused your particular > > > > error here was that a TriePrefix object would erroneously drop reference > > > > counts of its parent Trie object if it couldn't be created. Total nonsense. > > > > > > > > Thanks for your report! > > > > > > > > As for the leak you showed in a follow-up, I couldn't reproduce that. I'll > > > > try harder if the problem persists with #6688. But I can tell you that this > > > > does not necessarily indicate a severe problem / corruption, as I don't > > > > terminate strings in my trie backend code and it could just be some length > > > > calculations that went wrong. (Most probably that is because the Gambas > > > > string functions automatically use strlen() to determine a string's length > > > > when I give 0 as a length parameter. However, strlen() must not be used on > > > > the strings from my trie.) > > > > > > > > Regards, > > > > Tobi > > > > > > > > > > Salut Tobi, > > > > > > yes, now no more crash, only an error raises, thats oK. > > > The leak shown, I can't reproduce any more now..... BUT > > > Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" > > > showed me "D" AND "d"entries, now only the "d", may be thats how trie > > > work normally, > > > > > > > It should be case-sensitive. If it wasn't before on your system, that was > > a bug (I can't imagine where it came from, though). > > > > > but for my behaves non case sensitive would be better (or > > > a switch to do like that) > > > And we talked about something like .Add(Value,Key) for simplifing > > > filling. > > > > > > > OK, you get an Add() and Remove() method in #6699, similar to what > > Collection has. > > > > As for the case-insensitivity: I can add an optional constructor argument, > > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > > > (After writing about half an hour complaining how hard it would be to get > > case-insensitivity right and efficient) I just had a magnificent idea: I > > will extend the native Trie class in Gambas and do something like that: > > > > ' Written from scratch, may contain syntax, etc. errors > > > > Public Struct _Trie_Entry > > Key As String > > Value As Variant > > End Struct > > > > Public Sub Add(Value As Variant, Key As String) > > Dim hEntry As New _Trie_Entry > > Dim sKey As String = Key > > > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > > hEntry.Key = Key > > hEntry.Value = Value > > Super.Add(Value, sKey) > > End > > > > Similarly I can augment _get, _put, etc. so that you won't notice that the > > _Trie_Entry structure exists at all. > > > > If you request a case-insensitive Trie, all keys are upper-case'd internally > > and the real keys are saved as part of the stored object. So you can get > > your original key back later in an enumeration and I don't have to add > > branches in the hot paths of the trie code to support case-insensitivity > > (which would make the whole thing slower -- I don't know if it would be > > noticeable, but...). I will see if I can do that (_next() may impose a > > little problem or maybe not). > > > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > > implement case-insensitivity by internally converting all characters to > > upper-case, is it sufficient to use String.Upper() or are there hidden > > pitfalls? > > > > Regards, > > Tobi > > > > Salut Tobi, > > I think it would be best, to stay close to the original definition of > trie..."should be case-sensitive". > Every thing else, I can do by myself. > It was just a question because off the first outputs. > Attached is a project that does this. It should be a complete case- insensitive version of the Trie class. Should work properly with the latest revision (the Trie had a memory leak when objects were replaced until a few minutes ago). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: InsensitiveTrie-0.0.1.tar.gz Type: application/octet-stream Size: 5232 bytes Desc: not available URL: From bbruen at ...2308... Tue Dec 2 00:25:49 2014 From: bbruen at ...2308... (B Bruen) Date: Tue, 2 Dec 2014 09:55:49 +1030 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547C71CB.5010208@...1...> References: <547C71CB.5010208@...1...> Message-ID: <20141202095549.f27003a3c0735c095a8cce6e@...2308...> On Mon, 01 Dec 2014 14:48:59 +0100 Beno?t Minisini wrote: > Hi, > > I'd like to create a 'gb.util' component, written in Gambas, to collect > useful non-GUI programming routines that can't go directly into the > interpreter because it would make it too heavy. > > For example: > > - Creating a directory and all its parent. > > - Removing accents from an UTF-8 string. > > - A CsvFile class to read CSV files easily. > > - Removing a directory recursively. > > - Moving a file or a directory, whether source and destination are on > the same device or not. > > ... > > If you have ideas, just drop them. And better, uf you have code, and are > agree to share it, modify it, maintain it, you are welcome! > > The difficulty will be to find the best interface (class name, method > name, where to put it) for that. > > For example, for the removing accents method, I extended the String > class. Logical... For directory methods, I created a new Shell static > class... > > I'm waiting for your comments! > > P.S. The gambas fram client is more and more polished. Don't hesitate to > play with it. The more tests, the sooner it will be released. I want to > release Gambas 3.7 as soon as it is ready, even if there is not a lot of > other changes in Gambas. > > Regards, > > -- > Beno?t Minisini > Attached our GenUtil module source, use what you like. My "favorites" are DateUtil.StrToDate and StrUtil.Proper and StrUtil.NormName regads Bruce -- B Bruen -------------- next part -------------- A non-text attachment was scrubbed... Name: genutil-0.0.52.tar.gz Type: application/octet-stream Size: 18148 bytes Desc: not available URL: From lewis at ...3412... Tue Dec 2 00:28:56 2014 From: lewis at ...3412... (Lewis Balentine) Date: Mon, 01 Dec 2014 17:28:56 -0600 Subject: [Gambas-user] An utility component for Gambas, Accented characters In-Reply-To: <1417473731.4788.14.camel@...40...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> <547CE6A1.4070906@...1...> <547CEB5C.5040309@...3412...> <1417473731.4788.14.camel@...40...> Message-ID: <547CF9B8.9090707@...3412...> UGH, another stupid mistake on my part. Well that having been corrected I offer the following: '------------------------ ' Gambas module file ' The problem I have as an ignorant, narrow minded, English speaking ' American is that I do not know of many accented characters .... :>( Private Const AccentInFilter As String = "???????????" Private Const AccentOutFilter As String = "yYuUeEiIoas" Public Sub Main() Dim S As String S = "This is a test: ???????????" Print S S = StripAccentCharacters(S) Print S End Public Function StripAccentCharacters(InputString As String) As String Return StringFilter(InputString, AccentInFilter, AccentOutFilter) End Private Function StringFilter(InputString As String, InFilter As String, OutFilter As String) As String ' This would be much more efficent in "C" with single byte ASCII characters ' but with UTF-8 there are 1,2,3 and 4 byte characters. Thus we need a higher ' level functions to deal with variable size characters anyway. Dim P, I As Integer Dim C As String Dim R As String = "" If InputString = "" Then Return R For I = 1 To String.Len(InputString) ' get the next character C = String.Mid(InputString, I, 1) ' try to locate the character in the input filter string P = String.InStr(InFilter, C) ' if found then If P > 0 Then ' use the character from the output filter string R = R & Mid(OutFilter, P, 1) Else ' otherwise the character from the input string R = R & C Endif Next Return R End '------------------------------------------------------ This is a test: ??????????? This is a test: yYuUeEiIoas '------------------------------------------------------ The advantage to this approach is that that different Filter Strings and Functions can be quickly constructed as needed for the desired modifications. You could also use it to build a "one-timepad" encryption algorithm (which is where I extracted it from --- some of my old VB6 code). On 12/01/2014 04:42 PM, Charlie Reinl wrote: > Am Montag, den 01.12.2014, 16:27 -0600 schrieb Lewis Balentine: >>>> ...and read the documentation of InStr carefully again.<< >> "This function only deal with ASCII strings. To manipulate UTF-8 >> strings, use the String class." >> >> P = String.InStr("?", "???????????", gb.Binary) >> P = String.InStr("?", "???????????", gb.IgnoreCase) >> P = String.InStr("?", "???????????") >> P = String.InStr("?", "xxxx???????????XXXX", gb.Binary) >> P = String.InStr("?", "xxxx???????????XXXX", gb.IgnoreCase) >> P = String.InStr("?", "xxxx???????????XXXX") >> >> same result ... P=0 >> > Salut Lewis, > > Beno?t said : and read the documentation of InStr carefully again. > Me too re-read http://gambaswiki.org/wiki/comp/gb/string/instr , > (inverse your arguments). > > InStr(String As String, Pattern As String ) > From sebikul at ...626... Tue Dec 2 00:30:19 2014 From: sebikul at ...626... (Sebastian Kulesz) Date: Mon, 1 Dec 2014 20:30:19 -0300 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <20141202095549.f27003a3c0735c095a8cce6e@...2308...> References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> Message-ID: Would it be okay to include this component inside the gambas3-runtime package or should I create a new one for it? On Mon, Dec 1, 2014 at 8:25 PM, B Bruen wrote: > On Mon, 01 Dec 2014 14:48:59 +0100 > Beno?t Minisini wrote: > > > Hi, > > > > I'd like to create a 'gb.util' component, written in Gambas, to collect > > useful non-GUI programming routines that can't go directly into the > > interpreter because it would make it too heavy. > > > > For example: > > > > - Creating a directory and all its parent. > > > > - Removing accents from an UTF-8 string. > > > > - A CsvFile class to read CSV files easily. > > > > - Removing a directory recursively. > > > > - Moving a file or a directory, whether source and destination are on > > the same device or not. > > > > ... > > > > If you have ideas, just drop them. And better, uf you have code, and are > > agree to share it, modify it, maintain it, you are welcome! > > > > The difficulty will be to find the best interface (class name, method > > name, where to put it) for that. > > > > For example, for the removing accents method, I extended the String > > class. Logical... For directory methods, I created a new Shell static > > class... > > > > I'm waiting for your comments! > > > > P.S. The gambas fram client is more and more polished. Don't hesitate to > > play with it. The more tests, the sooner it will be released. I want to > > release Gambas 3.7 as soon as it is ready, even if there is not a lot of > > other changes in Gambas. > > > > Regards, > > > > -- > > Beno?t Minisini > > > Attached our GenUtil module source, use what you like. > > My "favorites" are DateUtil.StrToDate and StrUtil.Proper and > StrUtil.NormName > > regads > Bruce > > -- > B Bruen > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From bbruen at ...2308... Tue Dec 2 00:37:57 2014 From: bbruen at ...2308... (B Bruen) Date: Tue, 2 Dec 2014 10:07:57 +1030 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> Message-ID: <20141202100757.4411d2904177121305feada8@...2308...> On Mon, 1 Dec 2014 20:30:19 -0300 Sebastian Kulesz wrote: > Would it be okay to include this component inside the gambas3-runtime > package or should I create a new one for it? > > Not sure what you are talking about? B -- B Bruen From gambas at ...1... Tue Dec 2 00:42:59 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 02 Dec 2014 00:42:59 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> Message-ID: <547CFD03.6050405@...1...> Le 02/12/2014 00:30, Sebastian Kulesz a ?crit : > Would it be okay to include this component inside the gambas3-runtime > package or should I create a new one for it? > I think you should create a new one, as it is completely optional. Regards, -- Beno?t Minisini From sebikul at ...626... Tue Dec 2 00:43:15 2014 From: sebikul at ...626... (Sebastian Kulesz) Date: Mon, 1 Dec 2014 20:43:15 -0300 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <20141202100757.4411d2904177121305feada8@...2308...> References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> <20141202100757.4411d2904177121305feada8@...2308...> Message-ID: It's about how should I proceed to add this new component to the PPAs. Not sure if it should be a separate component or distributed with the runtime. On Dec 1, 2014 8:38 PM, "B Bruen" wrote: > On Mon, 1 Dec 2014 20:30:19 -0300 > Sebastian Kulesz wrote: > > > Would it be okay to include this component inside the gambas3-runtime > > package or should I create a new one for it? > > > > > Not sure what you are talking about? > > B > > -- > B Bruen > From bbruen at ...2308... Tue Dec 2 08:01:10 2014 From: bbruen at ...2308... (B Bruen) Date: Tue, 2 Dec 2014 17:31:10 +1030 Subject: [Gambas-user] IDE silent crash with Connections Message-ID: <20141202173110.076f793cffd362a89870a376@...2308...> It seems that if the underlying sqlite database file for a defined connection has been deleted then when you click on the IDE Connections entry for that database the IDE will silently crash. Create an sqlite datdbase. Create a connection for it in the IDE. Delete the database file. Double click on the Connections entry for it. Poof! IDE gone. Not confirmed against native IDE, but certainly happens here. regards Bruce -- B Bruen From gambas at ...1... Tue Dec 2 09:17:37 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 02 Dec 2014 09:17:37 +0100 Subject: [Gambas-user] IDE silent crash with Connections In-Reply-To: <20141202173110.076f793cffd362a89870a376@...2308...> References: <20141202173110.076f793cffd362a89870a376@...2308...> Message-ID: <547D75A1.3070506@...1...> Le 02/12/2014 08:01, B Bruen a ?crit : > It seems that if the underlying sqlite database file for a defined connection has been deleted then when you click on the IDE Connections entry for that database the IDE will silently crash. > > Create an sqlite datdbase. > Create a connection for it in the IDE. > Delete the database file. > Double click on the Connections entry for it. > Poof! IDE gone. > > Not confirmed against native IDE, but certainly happens here. > > regards > Bruce > Gasp... Nice one. -- Beno?t Minisini From gambas at ...1... Tue Dec 2 09:28:42 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 02 Dec 2014 09:28:42 +0100 Subject: [Gambas-user] IDE silent crash with Connections In-Reply-To: <547D75A1.3070506@...1...> References: <20141202173110.076f793cffd362a89870a376@...2308...> <547D75A1.3070506@...1...> Message-ID: <547D783A.7090104@...1...> Le 02/12/2014 09:17, Beno?t Minisini a ?crit : > Le 02/12/2014 08:01, B Bruen a ?crit : >> It seems that if the underlying sqlite database file for a defined >> connection has been deleted then when you click on the IDE Connections >> entry for that database the IDE will silently crash. >> >> Create an sqlite datdbase. >> Create a connection for it in the IDE. >> Delete the database file. >> Double click on the Connections entry for it. >> Poof! IDE gone. >> >> Not confirmed against native IDE, but certainly happens here. >> >> regards >> Bruce >> > > Gasp... Nice one. > Fixed in revision #6705. Regards, -- Beno?t Minisini From jusabejusabe at ...626... Tue Dec 2 10:28:02 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Tue, 2 Dec 2014 10:28:02 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> <20141202100757.4411d2904177121305feada8@...2308...> Message-ID: Beno?t: New function for add: Copy Objects Code Source: http://www.gambasforge.org/code-62-copier-un-controle-ou-un-conteneur-et-ses-enfants.html Regards, Julio 2014-12-02 0:43 GMT+01:00 Sebastian Kulesz : > It's about how should I proceed to add this new component to the PPAs. Not > sure if it should be a separate component or distributed with the runtime. > On Dec 1, 2014 8:38 PM, "B Bruen" wrote: > > > On Mon, 1 Dec 2014 20:30:19 -0300 > > Sebastian Kulesz wrote: > > > > > Would it be okay to include this component inside the gambas3-runtime > > > package or should I create a new one for it? > > > > > > > > Not sure what you are talking about? > > > > B > > > > -- > > B Bruen > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Dec 2 10:37:19 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 02 Dec 2014 10:37:19 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> <20141202100757.4411d2904177121305feada8@...2308...> Message-ID: <547D884F.1070302@...1...> Le 02/12/2014 10:28, Julio Sanchez a ?crit : > Beno?t: > > New function for add: Copy Objects > > Code Source: > http://www.gambasforge.org/code-62-copier-un-controle-ou-un-conteneur-et-ses-enfants.html > > Regards, > > Julio > Alas this is not reliable at all. The state of a control is internal, copying its properties is not enough. It may work, or not... -- Beno?t Minisini From jusabejusabe at ...626... Tue Dec 2 11:01:21 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Tue, 2 Dec 2014 11:01:21 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: <547D884F.1070302@...1...> References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> <20141202100757.4411d2904177121305feada8@...2308...> <547D884F.1070302@...1...> Message-ID: Beno?t: Well... what if only create an object of the same class of "original" object (no controls) and copy the values of the properties? ( Return a shallow copy of object. ) Comment: In other languages, there _copy() method which can be declared as must back https://docs.python.org/2/library/copy.html http://www.elclubdelprogramador.com/2014/08/13/pyhton-crea-una-copia-rapida-de-un-objeto-en-python/ (maybe that add a new _copy () method is beyond what you ask for gb.util) Regards Julio 2014-12-02 10:37 GMT+01:00 Beno?t Minisini : > Le 02/12/2014 10:28, Julio Sanchez a ?crit : > > Beno?t: > > > > New function for add: Copy Objects > > > > Code Source: > > > http://www.gambasforge.org/code-62-copier-un-controle-ou-un-conteneur-et-ses-enfants.html > > > > Regards, > > > > Julio > > > > Alas this is not reliable at all. The state of a control is internal, > copying its properties is not enough. It may work, or not... > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From lewis at ...3412... Tue Dec 2 20:06:38 2014 From: lewis at ...3412... (Lewis Balentine) Date: Tue, 02 Dec 2014 13:06:38 -0600 Subject: [Gambas-user] An utility component for Gambas, Accented characters In-Reply-To: <547CF9B8.9090707@...3412...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> <547CE6A1.4070906@...1...> <547CEB5C.5040309@...3412...> <1417473731.4788.14.camel@...40...> <547CF9B8.9090707@...3412...> Message-ID: <547E0DBE.5040709@...3412...> I believe that these may be the characters of interest: Private Const AccentInFilter As String = "?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" Private Const AccentOutFilter As String = "AAAAAAAAAaaaaaaaaaCCCCCcccccDDddEEEEEEEEEEdeeeeeeeeeGGGGggggHHhhIIIIIIIIIiiiiiiiiiJjKkkLlllllllllNNNNnnnnnnnOOOOOOOOOooooooooooRRRrrrSSSSssssTTTtttUUUUUUUUUUuuuuuuuuuuWwYYYyyyZZZzzz" Each string is 181 characters in length. On 12/01/2014 05:28 PM, Lewis Balentine wrote: > UGH, another stupid mistake on my part. > Well that having been corrected I offer the following: > > '------------------------ > ' Gambas module file > > ' The problem I have as an ignorant, narrow minded, English speaking > ' American is that I do not know of many accented characters .... :>( > Private Const AccentInFilter As String = "???????????" > Private Const AccentOutFilter As String = "yYuUeEiIoas" > > Public Sub Main() > Dim S As String > S = "This is a test: ???????????" > Print S > S = StripAccentCharacters(S) > Print S > End > > Public Function StripAccentCharacters(InputString As String) As String > Return StringFilter(InputString, AccentInFilter, AccentOutFilter) > End > > Private Function StringFilter(InputString As String, InFilter As String, > OutFilter As String) As String > ' This would be much more efficent in "C" with single byte ASCII > characters > ' but with UTF-8 there are 1,2,3 and 4 byte characters. Thus we need > a higher > ' level functions to deal with variable size characters anyway. > Dim P, I As Integer > Dim C As String > Dim R As String = "" > > If InputString = "" Then Return R > For I = 1 To String.Len(InputString) > ' get the next character > C = String.Mid(InputString, I, 1) > ' try to locate the character in the input filter string > P = String.InStr(InFilter, C) > ' if found then > If P > 0 Then > ' use the character from the output filter string > R = R & Mid(OutFilter, P, 1) > Else > ' otherwise the character from the input string > R = R & C > Endif > Next > Return R > End > '------------------------------------------------------ > > This is a test: ??????????? > This is a test: yYuUeEiIoas > '------------------------------------------------------ > > The advantage to this approach is that that different Filter Strings and > Functions can be quickly constructed as needed for the desired > modifications. You could also use it to build a "one-timepad" encryption > algorithm (which is where I extracted it from --- some of my old VB6 code). > > > On 12/01/2014 04:42 PM, Charlie Reinl wrote: >> Am Montag, den 01.12.2014, 16:27 -0600 schrieb Lewis Balentine: >>>>> ...and read the documentation of InStr carefully again.<< >>> "This function only deal with ASCII strings. To manipulate UTF-8 >>> strings, use the String class." >>> >>> P = String.InStr("?", "???????????", gb.Binary) >>> P = String.InStr("?", "???????????", gb.IgnoreCase) >>> P = String.InStr("?", "???????????") >>> P = String.InStr("?", "xxxx???????????XXXX", gb.Binary) >>> P = String.InStr("?", "xxxx???????????XXXX", gb.IgnoreCase) >>> P = String.InStr("?", "xxxx???????????XXXX") >>> >>> same result ... P=0 >>> >> Salut Lewis, >> >> Beno?t said : and read the documentation of InStr carefully again. >> Me too re-read http://gambaswiki.org/wiki/comp/gb/string/instr , >> (inverse your arguments). >> >> InStr(String As String, Pattern As String ) >> > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Tue Dec 2 20:26:03 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 02 Dec 2014 20:26:03 +0100 Subject: [Gambas-user] An utility component for Gambas, Accented characters In-Reply-To: <547E0DBE.5040709@...3412...> References: <547C71CB.5010208@...1...> <547CE3AD.5090107@...3412...> <1417471434.4788.9.camel@...40...> <547CE6A1.4070906@...1...> <547CEB5C.5040309@...3412...> <1417473731.4788.14.camel@...40...> <547CF9B8.9090707@...3412...> <547E0DBE.5040709@...3412...> Message-ID: <547E124B.60505@...1...> Le 02/12/2014 20:06, Lewis Balentine a ?crit : > I believe that these may be the characters of interest: > Private Const AccentInFilter As String = > "?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" > Private Const AccentOutFilter As String = > "AAAAAAAAAaaaaaaaaaCCCCCcccccDDddEEEEEEEEEEdeeeeeeeeeGGGGggggHHhhIIIIIIIIIiiiiiiiiiJjKkkLlllllllllNNNNnnnnnnnOOOOOOOOOooooooooooRRRrrrSSSSssssTTTtttUUUUUUUUUUuuuuuuuuuuWwYYYyyyZZZzzz" > Each string is 181 characters in length. > String.RemoveDiacritics() has already been implemented in gb.util. I don't think I have forgotten any characters with diacritics, but it should be checked with more eyes. But diacritics are only removed, not transformed. That would depend on the language (for exemple, ? -> o whereas german wants ? -> oe) Regards, -- Beno?t Minisini From gambas at ...1... Tue Dec 2 20:26:53 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 02 Dec 2014 20:26:53 +0100 Subject: [Gambas-user] An utility component for Gambas In-Reply-To: References: <547C71CB.5010208@...1...> <20141202095549.f27003a3c0735c095a8cce6e@...2308...> <20141202100757.4411d2904177121305feada8@...2308...> <547D884F.1070302@...1...> Message-ID: <547E127D.6070801@...1...> Le 02/12/2014 11:01, Julio Sanchez a ?crit : > Beno?t: > > Well... > > what if only create an object of the same class of "original" object (no > controls) and copy the values of the properties? > ( Return a shallow copy of object. ) > > Comment: > In other languages, there _copy() method which can be declared as must back > > https://docs.python.org/2/library/copy.html > http://www.elclubdelprogramador.com/2014/08/13/pyhton-crea-una-copia-rapida-de-un-objeto-en-python/ > > > (maybe that add a new _copy () method is beyond what you ask for gb.util) > > Regards > Julio > Anyway gb.util is not for GUI, so a routine that would copy a control cannot be placed in it. Regards, -- Beno?t Minisini From mmcg29440 at ...3163... Tue Dec 2 22:42:55 2014 From: mmcg29440 at ...3163... (Martin McGlensey) Date: Tue, 2 Dec 2014 16:42:55 -0500 Subject: [Gambas-user] how to capture click event on a popup menu. Message-ID: Hello, I've used the menu to create menus on my main form. Those that I want to see on the tool bar are marked visible. Those that I want to use as popups are not visible on the tool bar. These two menus are attached to individual text boxes in the graphic form designer. When I right click on the textbox the popup appears but, when I click on it nothing happens. In the form code I have the sub: Private Sub mnuA_Click() FForm.Open End The form FForm does not open. In the debugger I can see the click event is not captured. What did I miss? Thanks, Marty From taboege at ...626... Tue Dec 2 22:44:04 2014 From: taboege at ...626... (Tobias Boege) Date: Tue, 2 Dec 2014 22:44:04 +0100 Subject: [Gambas-user] how to capture click event on a popup menu. In-Reply-To: References: Message-ID: <20141202214404.GG1883@...2774...> On Tue, 02 Dec 2014, Martin McGlensey wrote: > Hello, > > > > I've used the menu to create menus on my main form. Those that I want to see > on the tool bar are marked visible. Those that I want to use as popups are > not visible on the tool bar. These two menus are attached to individual text > boxes in the graphic form designer. When I right click on the textbox the > popup appears but, when I click on it nothing happens. In the form code I > have the sub: > > > > Private Sub mnuA_Click() > > FForm.Open > > End > > > > The form FForm does not open. In the debugger I can see the click event is > not captured. What did I miss? > Well, what's the event name of your menu? Or if you don't want us to guess around: Can you send the project? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bbruen at ...2308... Tue Dec 2 23:53:38 2014 From: bbruen at ...2308... (B Bruen) Date: Wed, 3 Dec 2014 09:23:38 +1030 Subject: [Gambas-user] how to capture click event on a popup menu. In-Reply-To: <20141202214404.GG1883@...2774...> References: <20141202214404.GG1883@...2774...> Message-ID: <20141203092338.970b8bd57daae2370c56f5d3@...2308...> On Tue, 2 Dec 2014 22:44:04 +0100 Tobias Boege wrote: > On Tue, 02 Dec 2014, Martin McGlensey wrote: > > Hello, > > > > > > > > I've used the menu to create menus on my main form. Those that I want to see > > on the tool bar are marked visible. Those that I want to use as popups are > > not visible on the tool bar. These two menus are attached to individual text > > boxes in the graphic form designer. When I right click on the textbox the > > popup appears but, when I click on it nothing happens. In the form code I > > have the sub: > > > > > > > > Private Sub mnuA_Click() > > > > FForm.Open > > > > End > > > > > > > > The form FForm does not open. In the debugger I can see the click event is > > not captured. What did I miss? > > > > Well, what's the event name of your menu? > > Or if you don't want us to guess around: Can you send the project? > > Regards, > Tobi > I can guess :-) PUBLIC Sub mnuA_Click() regards Bruce From taboege at ...626... Wed Dec 3 00:18:44 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 3 Dec 2014 00:18:44 +0100 Subject: [Gambas-user] how to capture click event on a popup menu. In-Reply-To: <20141203092338.970b8bd57daae2370c56f5d3@...2308...> References: <20141202214404.GG1883@...2774...> <20141203092338.970b8bd57daae2370c56f5d3@...2308...> Message-ID: <20141202231844.GH1883@...2774...> On Wed, 03 Dec 2014, B Bruen wrote: > On Tue, 2 Dec 2014 22:44:04 +0100 > Tobias Boege wrote: > > > On Tue, 02 Dec 2014, Martin McGlensey wrote: > > > Hello, > > > > > > > > > > > > I've used the menu to create menus on my main form. Those that I want to see > > > on the tool bar are marked visible. Those that I want to use as popups are > > > not visible on the tool bar. These two menus are attached to individual text > > > boxes in the graphic form designer. When I right click on the textbox the > > > popup appears but, when I click on it nothing happens. In the form code I > > > have the sub: > > > > > > > > > > > > Private Sub mnuA_Click() > > > > > > FForm.Open > > > > > > End > > > > > > > > > > > > The form FForm does not open. In the debugger I can see the click event is > > > not captured. What did I miss? > > > > > > > Well, what's the event name of your menu? > > > > Or if you don't want us to guess around: Can you send the project? > > > > Regards, > > Tobi > > > > I can guess :-) > > PUBLIC Sub mnuA_Click() > Don't encourage this behaviour :-) To elaborate: event handlers must be declared Public (not Private) so that the interpreter can find them when an event fires. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at ...626... Wed Dec 3 01:04:48 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 3 Dec 2014 02:04:48 +0200 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: <547B9FAB.6070800@...1...> References: <547B9FAB.6070800@...1...> Message-ID: Watch seems to raise read event for empty file, is this correct behavior? >From the documentation ( http://gambaswiki.org/wiki/lang/open ) I would say it shouldn't. See the attachment. Jussi On Mon, Dec 1, 2014 at 12:52 AM, Beno?t Minisini < gambas at ...1...> wrote: > Hi, > > I'm trying to fix a problem in the Gambas process management that annoys > a lot of people for a long time. > > Sometimes, the output of the process is not entirely read. Some data is > lost. > > This is because I was using a way of detecting data availability that > was not reliable. I thought it was, but I was wrong. > > Concretely, the select() system call tells you if there is data > available to read, but, in some cases, it wakes up and there is actually > no data to read. > > So I tried to use a end-of-stream check by using various system calls > (it depends on the type of file descriptor: file, pipe, socket...). But > this routine sometimes fails. > > To change that, I now read data ahead by chunk of 1KB before actually > raising the Read event. > > Apparently, using select() + read() is the correct way of accurately > detecting end of stream, especially on pipes. > > Consequently, if the read ahead fails, I decide there is nothing to read > anymore and I close the stream. > > Hopefully, this was not a big job, as internally read ahead was already > implemented for optimizing the INPUT and LINE INPUT instruction. > > But this is a big change that may have side effects, so I ask people who > run Gambas projects that watch a lot of file descriptors, and read the > output of a lot of external processes, to use that revision and report > any problem. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > 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: GambasTestercmd-0.9.41.tar.gz Type: application/x-gzip Size: 17211 bytes Desc: not available URL: From mmcg29440 at ...3163... Wed Dec 3 02:35:01 2014 From: mmcg29440 at ...3163... (Martin McGlensey) Date: Tue, 2 Dec 2014 20:35:01 -0500 Subject: [Gambas-user] how to capture click event on a popup menu. Message-ID: Thanks for the responses. Remember I'm still climbing that steep learning curve. The sub to catch the click event is Public Sub mnuAdvanced_Click() but that does not catch the event. I do not know how declare or find the event name. The menu was created in the form menu editor, so how do I define an event name? Thanks, Marty From bbruen at ...2308... Wed Dec 3 02:43:48 2014 From: bbruen at ...2308... (B Bruen) Date: Wed, 3 Dec 2014 12:13:48 +1030 Subject: [Gambas-user] Class.Symbols - local, inherited, overridden ???? Bah! Message-ID: <20141203121348.f8ef061460f19748f9e27eec@...2308...> I am trying to work out whether a .Symbol as returned by Class.Symbols (or more correctly Classes["someclass"].["somesymbolname"]) is local, inherited or overridden. (Don't ask, "Why?".) In my naive days back in Gambas 2 I had the following routine that seemed to go a far way there: Public Sub btnCopyOwnProps_Click() Dim sList As New String[] Dim symName As String For Each symName In $currControl.Symbols If $currControl[symName].kind = Class.Property Then Try IsNull($currParent[symName]) If Error Then sList.Add(MakeProp(symName)) Endif Endif Next sList.Sort Clipboard.Copy(sList.Join("\n")) End This was, as far as I can recall, supposed to copy the names of property symbols declared in the subject $currControl class onto the clipboard that are not declared in the $currControl's parent class($currParent), i.e. they are local properties. This still appears to work for detecting whether a property is local or inherited. However, what is driving me mad is trying to detect whether the current class actually overrides the inherited property...... Is there any way to detect this? The IDE help browser "seems" to do so somehow, but I think it is doing it some other way. (If you r e a l l y want to know why, it's for a custom control code generator. ... ... ... I didn't think so...) tia Bruce -- B Bruen From bbruen at ...2308... Wed Dec 3 03:01:46 2014 From: bbruen at ...2308... (B Bruen) Date: Wed, 3 Dec 2014 12:31:46 +1030 Subject: [Gambas-user] how to capture click event on a popup menu. In-Reply-To: References: Message-ID: <20141203123146.ddc103a8e20274f44a8c983f@...2308...> On Tue, 2 Dec 2014 20:35:01 -0500 "Martin McGlensey" wrote: > Thanks for the responses. Remember I'm still climbing that steep learning > curve. The sub to catch the click event is Public Sub mnuAdvanced_Click() > but that does not catch the event. I do not know how declare or find the > event name. The menu was created in the form menu editor, so how do I define > an event name? > > > > Thanks, > > Marty > OK, try studying the attached project. It has a displayed and a hidden menu that is attached to a textbox. If it doesn't enlighten then we'd better go back to Tobi's "send the project" suggestion. hth Bruce -------------- next part -------------- A non-text attachment was scrubbed... Name: demoMenus-0.0.1.tar.gz Type: application/octet-stream Size: 4046 bytes Desc: not available URL: From mmcg29440 at ...3163... Wed Dec 3 03:19:58 2014 From: mmcg29440 at ...3163... (Martin McGlensey) Date: Tue, 2 Dec 2014 21:19:58 -0500 Subject: [Gambas-user] how to capture click event on a popup menu. Message-ID: Thanks Bruce, I study it tomorrow when my mind is clearer. It's late here and I need to get some rest. Regards, Marty From gambas at ...2524... Wed Dec 3 04:26:23 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 03 Dec 2014 03:26:23 +0000 Subject: [Gambas-user] Issue 587 in gambas: If DateBox1.Value And DateBox2.Value Then Error Message-ID: <0-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version-3.6.2 Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 587 by isaf... at ...626...: If DateBox1.Value And DateBox2.Value Then Error https://code.google.com/p/gambas/issues/detail?id=587 ____________________________________________________________ / \ | IMPORTANT NOTE #1 | | | | Don't create an issue if you have a compilation problem on | | the development version. Send a mail to the mailing-list | | instead, thanks! | \____________________________________________________________/ ____________________________________________________________ / \ | IMPORTANT NOTE #2 | | | | If you encounter several different problems or bugs, (for | | example, a bug in your project, and an interpreter crash | | while debugging it), please create distinct issues! | \____________________________________________________________/ 1) I use "If Valuebox1.value And ValueBox2.Value Then" to check if both valuebox has numbers. When I use datebox "If DateBox1.Value And DateBox2.Value Then" I got message "Type mismatch: wanted number got date instead" 2) Give information about your system. [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=3.13.0-40-generic Architecture=x86 Distribution=Ubuntu 14.04.1 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=1945M [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+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 3) gambas version 3.6.2 4) Provide a little project Attached 5) If your project needs a database, try to provide it, or part of it. 6) Explain clearly how to reproduce the bug or the crash. ____________________________________________________________ / \ | IMPORTANT NOTE #3 | | | | By doing that carefully, you have done 50% of the bug fix | | job. Often even more! | \____________________________________________________________/ ____________________________________________________________ / \ | IMPORTANT NOTE #4 | | | | Google automatically replaces references to Gambas | | development revision with links to its own source code | | repository, which Gambas does not use at all. So ignore | | these links with disdain. | \____________________________________________________________/ -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Wed Dec 3 04:29:14 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 03 Dec 2014 03:29:14 +0000 Subject: [Gambas-user] Issue 587 in gambas: If DateBox1.Value And DateBox2.Value Then Error In-Reply-To: <0-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> Comment #1 on issue 587 by isaf... at ...626...: If DateBox1.Value And DateBox2.Value Then Error https://code.google.com/p/gambas/issues/detail?id=587 Attached a project file Attachments: test.tar.gz 4.5 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas.fr at ...626... Wed Dec 3 06:46:34 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 3 Dec 2014 06:46:34 +0100 Subject: [Gambas-user] how to capture click event on a popup menu. In-Reply-To: References: Message-ID: The event name is the control name or the group name ... In the ide. You can redirect an event name (handler )with object.attach(...) You can detach too Le 3 d?c. 2014 03:20, "Martin McGlensey" a ?crit : > Thanks Bruce, I study it tomorrow when my mind is clearer. It's late here > and I need to get some rest. > > > > Regards, > > Marty > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Wed Dec 3 08:58:07 2014 From: shordi at ...626... (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Wed, 3 Dec 2014 08:58:07 +0100 Subject: [Gambas-user] What use the .info file? Message-ID: I've found a .info(1), .info(2), files etc. in my proyect folder. I know that the copies of .info file are generated for Copy (a Dropbox like application) but looking into that files I've realized that I have no idea about this file is for... It contains some lines of my own code and lines with a single character... I guess it's some kind of debug info... Regards From gambas at ...1... Wed Dec 3 09:03:28 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 03 Dec 2014 09:03:28 +0100 Subject: [Gambas-user] What use the .info file? In-Reply-To: References: Message-ID: <547EC3D0.8080803@...1...> Le 03/12/2014 08:58, Jorge Carri?n a ?crit : > I've found a .info(1), .info(2), files etc. in my proyect folder. > I know that the copies of .info file are generated for Copy (a Dropbox like > application) but looking into that files I've realized that I have no idea > about this file is for... > > It contains some lines of my own code and lines with a single character... > I guess it's some kind of debug info... > > Regards It's a Gambas file that describes the public interface of all exported classes defined in your project. Regards, -- Beno?t Minisini From gambas at ...1... Wed Dec 3 09:16:36 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Wed, 03 Dec 2014 09:16:36 +0100 Subject: [Gambas-user] Farm server reset on gambaswiki.org Message-ID: <547EC6E4.3010502@...1...> Hi, Because of internal database changes, I had to reset and clear the farm server database on gambaswiki.org. If you want to test it, you have to register again, and upload your projects again. Regards, -- Beno?t Minisini From Karl.Reinl at ...2345... Wed Dec 3 11:30:30 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 03 Dec 2014 11:30:30 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <20141201223926.GL1329@...2774...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <1417470875.4788.7.camel@...40...> <20141201223926.GL1329@...2774...> Message-ID: <1417602630.3602.7.camel@...40...> Am Montag, den 01.12.2014, 23:39 +0100 schrieb Tobias Boege: > On Mon, 01 Dec 2014, Charlie Reinl wrote: > > Am Montag, den 01.12.2014, 17:47 +0100 schrieb Tobias Boege: > > > On Sat, 29 Nov 2014, Charlie Reinl wrote: > > > > Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: > > > > > On Tue, 18 Nov 2014, Karl Reinl wrote: > > > > > > Salut Tobi, > > > > > > > > > > > > played with you trie example (trietest) it crash if > > > > > > p = h.GetPrefix("texte") find nothing (p=null), even when change > > > > > > to p = h.GetPrefix("Texte") > > > > > > > > > > > > My change is h["texte"] to h["Texte"] (source attached) > > > > > > > > > > Can you run your tests with #6688? > > > > > > > > > > Indeed there were bit width errors (I think) but what caused your particular > > > > > error here was that a TriePrefix object would erroneously drop reference > > > > > counts of its parent Trie object if it couldn't be created. Total nonsense. > > > > > > > > > > Thanks for your report! > > > > > > > > > > As for the leak you showed in a follow-up, I couldn't reproduce that. I'll > > > > > try harder if the problem persists with #6688. But I can tell you that this > > > > > does not necessarily indicate a severe problem / corruption, as I don't > > > > > terminate strings in my trie backend code and it could just be some length > > > > > calculations that went wrong. (Most probably that is because the Gambas > > > > > string functions automatically use strlen() to determine a string's length > > > > > when I give 0 as a length parameter. However, strlen() must not be used on > > > > > the strings from my trie.) > > > > > > > > > > Regards, > > > > > Tobi > > > > > > > > > > > > > Salut Tobi, > > > > > > > > yes, now no more crash, only an error raises, thats oK. > > > > The leak shown, I can't reproduce any more now..... BUT > > > > Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" > > > > showed me "D" AND "d"entries, now only the "d", may be thats how trie > > > > work normally, > > > > > > > > > > It should be case-sensitive. If it wasn't before on your system, that was > > > a bug (I can't imagine where it came from, though). > > > > > > > but for my behaves non case sensitive would be better (or > > > > a switch to do like that) > > > > And we talked about something like .Add(Value,Key) for simplifing > > > > filling. > > > > > > > > > > OK, you get an Add() and Remove() method in #6699, similar to what > > > Collection has. > > > > > > As for the case-insensitivity: I can add an optional constructor argument, > > > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > > > > > (After writing about half an hour complaining how hard it would be to get > > > case-insensitivity right and efficient) I just had a magnificent idea: I > > > will extend the native Trie class in Gambas and do something like that: > > > > > > ' Written from scratch, may contain syntax, etc. errors > > > > > > Public Struct _Trie_Entry > > > Key As String > > > Value As Variant > > > End Struct > > > > > > Public Sub Add(Value As Variant, Key As String) > > > Dim hEntry As New _Trie_Entry > > > Dim sKey As String = Key > > > > > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > > > hEntry.Key = Key > > > hEntry.Value = Value > > > Super.Add(Value, sKey) > > > End > > > > > > Similarly I can augment _get, _put, etc. so that you won't notice that the > > > _Trie_Entry structure exists at all. > > > > > > If you request a case-insensitive Trie, all keys are upper-case'd internally > > > and the real keys are saved as part of the stored object. So you can get > > > your original key back later in an enumeration and I don't have to add > > > branches in the hot paths of the trie code to support case-insensitivity > > > (which would make the whole thing slower -- I don't know if it would be > > > noticeable, but...). I will see if I can do that (_next() may impose a > > > little problem or maybe not). > > > > > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > > > implement case-insensitivity by internally converting all characters to > > > upper-case, is it sufficient to use String.Upper() or are there hidden > > > pitfalls? > > > > > > Regards, > > > Tobi > > > > > > > Salut Tobi, > > > > I think it would be best, to stay close to the original definition of > > trie..."should be case-sensitive". > > Every thing else, I can do by myself. > > It was just a question because off the first outputs. > > > > Attached is a project that does this. It should be a complete case- > insensitive version of the Trie class. Should work properly with the > latest revision (the Trie had a memory leak when objects were replaced > until a few minutes ago). > > Regards, > Tobi Thanks Tobi, I haven't tested yet, but it looks like a wonderful example, how you can extend a gambas class. For my case, KEY and VALUE will have the same entry, I use the key in Uppercase. -- Amicalement Charlie From shordi at ...626... Wed Dec 3 11:37:46 2014 From: shordi at ...626... (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Wed, 3 Dec 2014 11:37:46 +0100 Subject: [Gambas-user] What use the .info file? In-Reply-To: <547EC3D0.8080803@...1...> References: <547EC3D0.8080803@...1...> Message-ID: Ok. I understand. Thanks Benoit Regards 2014-12-03 9:03 GMT+01:00 Beno?t Minisini : > Le 03/12/2014 08:58, Jorge Carri?n a ?crit : > > I've found a .info(1), .info(2), files etc. in my proyect folder. > > I know that the copies of .info file are generated for Copy (a Dropbox > like > > application) but looking into that files I've realized that I have no > idea > > about this file is for... > > > > It contains some lines of my own code and lines with a single > character... > > I guess it's some kind of debug info... > > > > Regards > > It's a Gambas file that describes the public interface of all exported > classes defined in your project. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mmcg29440 at ...3163... Wed Dec 3 14:17:42 2014 From: mmcg29440 at ...3163... (Martin McGlensey) Date: Wed, 3 Dec 2014 08:17:42 -0500 Subject: [Gambas-user] how to capture click event on a popup menu Message-ID: Good Morning all, I found the problem with the popups. Looking at the project that Bruce sent I found that my syntax was exactly the same as he used in the example project. Since his project worked and mine did not the problem had to be something other than syntax. Looking at the project properties I found that Bruce used the qt4 and qt4extended components. I had gb.gui. When I changed to qt4 components in my project the popups worked. They do not work using gb.gui. Without Bruce's project I probably would never have found the problem and given up on popups. Perhaps little details like this should be included in the documentation. Thanks to all who responded especially Bruce. Regards, Marty From gambas at ...1... Wed Dec 3 15:30:30 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 03 Dec 2014 15:30:30 +0100 Subject: [Gambas-user] how to capture click event on a popup menu In-Reply-To: References: Message-ID: <547F1E86.2080202@...1...> Le 03/12/2014 14:17, Martin McGlensey a ?crit : > Good Morning all, > > > > I found the problem with the popups. Looking at the project that Bruce sent > I found that my syntax was exactly the same as he used in the example > project. Since his project worked and mine did not the problem had to be > something other than syntax. Looking at the project properties I found that > Bruce used the qt4 and qt4extended components. I had gb.gui. When I changed > to qt4 components in my project the popups worked. They do not work using > gb.gui. Without Bruce's project I probably would never have found the > problem and given up on popups. > > > > Perhaps little details like this should be included in the documentation. > > > > Thanks to all who responded especially Bruce. > > > > Regards, > > Marty > It was a bug, and it has been fixed in revision #6709. Regards, -- Beno?t Minisini From lewis at ...3412... Wed Dec 3 17:20:29 2014 From: lewis at ...3412... (Lewis Balentine) Date: Wed, 03 Dec 2014 10:20:29 -0600 Subject: [Gambas-user] CDATE Message-ID: <547F384D.9080404@...3412...> Ref: http://gambaswiki.org/wiki/lang/cdate Date = CDate ( Expression AS Variant ) AS Date Converts an expression (numerical Float or String) into a Date / Time. Be careful! The current localization is not used by this function. Is there a reference for what string formats CDATE recognizes. The input date I have is in form "ccyymmdd". Changing it to to "ccyy/mm/dd"did not work. Reversing it to "dd/mm/ccyy"did not work. Error is type mismatch: wanted date, got string instead. Date is "20141215" (aka 15 Dec 2014). Thank you, Lewis From taboege at ...626... Wed Dec 3 17:36:21 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 3 Dec 2014 17:36:21 +0100 Subject: [Gambas-user] CDATE In-Reply-To: <547F384D.9080404@...3412...> References: <547F384D.9080404@...3412...> Message-ID: <20141203163621.GA1538@...2774...> On Wed, 03 Dec 2014, Lewis Balentine wrote: > Ref: http://gambaswiki.org/wiki/lang/cdate > > Date = CDate ( Expression AS Variant ) AS Date > Converts an expression (numerical Float or String) into a Date / Time. > Be careful! The current localization is not used by this function. > > Is there a reference for what string formats CDATE recognizes. > The input date I have is in form "ccyymmdd". > Changing it to to "ccyy/mm/dd"did not work. > Reversing it to "dd/mm/ccyy"did not work. > > Error is type mismatch: wanted date, got string instead. > Date is "20141215" (aka 15 Dec 2014). > I couldn't find a place where that's documented but you can safely assume that the non-localised conversion functions (i.e. the "C()" ones) are compatible. If you want to know the format of a string to put into CDate(), try to put a date into CStr() and see what it gives you: $ gbx3 -e "CStr(Now)" 12/03/2014 17:27:48.308 and I bet the date or time part is optional and the milliseconds part alone is also optional (didn't test). You can implement a simple parser for your custom date formats using Scan() and the Date() function... I'll leave that to you ;-) Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From lewis at ...3412... Wed Dec 3 18:50:32 2014 From: lewis at ...3412... (Lewis Balentine) Date: Wed, 03 Dec 2014 11:50:32 -0600 Subject: [Gambas-user] CDATE In-Reply-To: <20141203163621.GA1538@...2774...> References: <547F384D.9080404@...3412...> <20141203163621.GA1538@...2774...> Message-ID: <547F4D68.7000208@...3412...> Thank you Tobi, I went thought the international formats I knew and fell back to "mm/dd/ccyyy". I thought the US were the only ones that use that format (excluding the military). Old lesson: Never Assume. >> $ gbx3 -e "Cstr(Now)"<< One might use that to embed some basic syntax in a shell script. Regards, Lewis On 12/03/2014 10:36 AM, Tobias Boege wrote: > On Wed, 03 Dec 2014, Lewis Balentine wrote: >> Ref: http://gambaswiki.org/wiki/lang/cdate >> >> Date = CDate ( Expression AS Variant ) AS Date >> Converts an expression (numerical Float or String) into a Date / Time. >> Be careful! The current localization is not used by this function. >> >> Is there a reference for what string formats CDATE recognizes. >> The input date I have is in form "ccyymmdd". >> Changing it to to "ccyy/mm/dd"did not work. >> Reversing it to "dd/mm/ccyy"did not work. >> >> Error is type mismatch: wanted date, got string instead. >> Date is "20141215" (aka 15 Dec 2014). >> > I couldn't find a place where that's documented but you can safely assume > that the non-localised conversion functions (i.e. the "C()" ones) are > compatible. If you want to know the format of a string to put into CDate(), > try to put a date into CStr() and see what it gives you: > > $ gbx3 -e "CStr(Now)" > 12/03/2014 17:27:48.308 > > and I bet the date or time part is optional and the milliseconds part alone > is also optional (didn't test). > > You can implement a simple parser for your custom date formats using Scan() > and the Date() function... I'll leave that to you ;-) > > Regards, > Tobi > From jussi.lahtinen at ...626... Wed Dec 3 19:04:39 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 3 Dec 2014 20:04:39 +0200 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: References: <547B9FAB.6070800@...1...> Message-ID: Thanks for all the hard work!!! Poking some more of watch... is my method flawed or is there bug to prevent watch to call read event? See attachment. Jussi On Wed, Dec 3, 2014 at 2:04 AM, Jussi Lahtinen wrote: > Watch seems to raise read event for empty file, is this correct behavior? > From the documentation ( http://gambaswiki.org/wiki/lang/open ) I would > say it shouldn't. > See the attachment. > > > Jussi > > On Mon, Dec 1, 2014 at 12:52 AM, Beno?t Minisini < > gambas at ...1...> wrote: > >> Hi, >> >> I'm trying to fix a problem in the Gambas process management that annoys >> a lot of people for a long time. >> >> Sometimes, the output of the process is not entirely read. Some data is >> lost. >> >> This is because I was using a way of detecting data availability that >> was not reliable. I thought it was, but I was wrong. >> >> Concretely, the select() system call tells you if there is data >> available to read, but, in some cases, it wakes up and there is actually >> no data to read. >> >> So I tried to use a end-of-stream check by using various system calls >> (it depends on the type of file descriptor: file, pipe, socket...). But >> this routine sometimes fails. >> >> To change that, I now read data ahead by chunk of 1KB before actually >> raising the Read event. >> >> Apparently, using select() + read() is the correct way of accurately >> detecting end of stream, especially on pipes. >> >> Consequently, if the read ahead fails, I decide there is nothing to read >> anymore and I close the stream. >> >> Hopefully, this was not a big job, as internally read ahead was already >> implemented for optimizing the INPUT and LINE INPUT instruction. >> >> But this is a big change that may have side effects, so I ask people who >> run Gambas projects that watch a lot of file descriptors, and read the >> output of a lot of external processes, to use that revision and report >> any problem. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> 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: GambasTestercmd-0.9.42.tar.gz Type: application/x-gzip Size: 17254 bytes Desc: not available URL: From jussi.lahtinen at ...626... Wed Dec 3 19:35:15 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 3 Dec 2014 20:35:15 +0200 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: References: <547B9FAB.6070800@...1...> Message-ID: /dev/full should never be writable, is it possible for watch to know whether there is space left in disk? Or is this job for an other function? See attachment. I'll remove that test if it is not applicable. Jussi On Wed, Dec 3, 2014 at 8:04 PM, Jussi Lahtinen wrote: > Thanks for all the hard work!!! > > Poking some more of watch... is my method flawed or is there bug to > prevent watch to call read event? > See attachment. > > > Jussi > > On Wed, Dec 3, 2014 at 2:04 AM, Jussi Lahtinen > wrote: > >> Watch seems to raise read event for empty file, is this correct behavior? >> From the documentation ( http://gambaswiki.org/wiki/lang/open ) I would >> say it shouldn't. >> See the attachment. >> >> >> Jussi >> >> On Mon, Dec 1, 2014 at 12:52 AM, Beno?t Minisini < >> gambas at ...1...> wrote: >> >>> Hi, >>> >>> I'm trying to fix a problem in the Gambas process management that annoys >>> a lot of people for a long time. >>> >>> Sometimes, the output of the process is not entirely read. Some data is >>> lost. >>> >>> This is because I was using a way of detecting data availability that >>> was not reliable. I thought it was, but I was wrong. >>> >>> Concretely, the select() system call tells you if there is data >>> available to read, but, in some cases, it wakes up and there is actually >>> no data to read. >>> >>> So I tried to use a end-of-stream check by using various system calls >>> (it depends on the type of file descriptor: file, pipe, socket...). But >>> this routine sometimes fails. >>> >>> To change that, I now read data ahead by chunk of 1KB before actually >>> raising the Read event. >>> >>> Apparently, using select() + read() is the correct way of accurately >>> detecting end of stream, especially on pipes. >>> >>> Consequently, if the read ahead fails, I decide there is nothing to read >>> anymore and I close the stream. >>> >>> Hopefully, this was not a big job, as internally read ahead was already >>> implemented for optimizing the INPUT and LINE INPUT instruction. >>> >>> But this is a big change that may have side effects, so I ask people who >>> run Gambas projects that watch a lot of file descriptors, and read the >>> output of a lot of external processes, to use that revision and report >>> any problem. >>> >>> Regards, >>> >>> -- >>> Beno?t Minisini >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> 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: GambasTestercmd-0.9.44.tar.gz Type: application/x-gzip Size: 17615 bytes Desc: not available URL: From Karl.Reinl at ...2345... Wed Dec 3 21:50:21 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 03 Dec 2014 21:50:21 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <1417602630.3602.7.camel@...40...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <1417470875.4788.7.camel@...40...> <20141201223926.GL1329@...2774...> <1417602630.3602.7.camel@...40...> Message-ID: <1417639821.3667.5.camel@...40...> Am Mittwoch, den 03.12.2014, 11:30 +0100 schrieb Charlie Reinl: > Am Montag, den 01.12.2014, 23:39 +0100 schrieb Tobias Boege: > > On Mon, 01 Dec 2014, Charlie Reinl wrote: > > > Am Montag, den 01.12.2014, 17:47 +0100 schrieb Tobias Boege: > > > > On Sat, 29 Nov 2014, Charlie Reinl wrote: > > > > > Am Samstag, den 29.11.2014, 20:05 +0100 schrieb Tobias Boege: > > > > > > On Tue, 18 Nov 2014, Karl Reinl wrote: > > > > > > > Salut Tobi, > > > > > > > > > > > > > > played with you trie example (trietest) it crash if > > > > > > > p = h.GetPrefix("texte") find nothing (p=null), even when change > > > > > > > to p = h.GetPrefix("Texte") > > > > > > > > > > > > > > My change is h["texte"] to h["Texte"] (source attached) > > > > > > > > > > > > Can you run your tests with #6688? > > > > > > > > > > > > Indeed there were bit width errors (I think) but what caused your particular > > > > > > error here was that a TriePrefix object would erroneously drop reference > > > > > > counts of its parent Trie object if it couldn't be created. Total nonsense. > > > > > > > > > > > > Thanks for your report! > > > > > > > > > > > > As for the leak you showed in a follow-up, I couldn't reproduce that. I'll > > > > > > try harder if the problem persists with #6688. But I can tell you that this > > > > > > does not necessarily indicate a severe problem / corruption, as I don't > > > > > > terminate strings in my trie backend code and it could just be some length > > > > > > calculations that went wrong. (Most probably that is because the Gambas > > > > > > string functions automatically use strlen() to determine a string's length > > > > > > when I give 0 as a length parameter. However, strlen() must not be used on > > > > > > the strings from my trie.) > > > > > > > > > > > > Regards, > > > > > > Tobi > > > > > > > > > > > > > > > > Salut Tobi, > > > > > > > > > > yes, now no more crash, only an error raises, thats oK. > > > > > The leak shown, I can't reproduce any more now..... BUT > > > > > Now TriePrefix is case sensitive, in my follow-up the TriePrefix "d" > > > > > showed me "D" AND "d"entries, now only the "d", may be thats how trie > > > > > work normally, > > > > > > > > > > > > > It should be case-sensitive. If it wasn't before on your system, that was > > > > a bug (I can't imagine where it came from, though). > > > > > > > > > but for my behaves non case sensitive would be better (or > > > > > a switch to do like that) > > > > > And we talked about something like .Add(Value,Key) for simplifing > > > > > filling. > > > > > > > > > > > > > OK, you get an Add() and Remove() method in #6699, similar to what > > > > Collection has. > > > > > > > > As for the case-insensitivity: I can add an optional constructor argument, > > > > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > > > > > > > (After writing about half an hour complaining how hard it would be to get > > > > case-insensitivity right and efficient) I just had a magnificent idea: I > > > > will extend the native Trie class in Gambas and do something like that: > > > > > > > > ' Written from scratch, may contain syntax, etc. errors > > > > > > > > Public Struct _Trie_Entry > > > > Key As String > > > > Value As Variant > > > > End Struct > > > > > > > > Public Sub Add(Value As Variant, Key As String) > > > > Dim hEntry As New _Trie_Entry > > > > Dim sKey As String = Key > > > > > > > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > > > > hEntry.Key = Key > > > > hEntry.Value = Value > > > > Super.Add(Value, sKey) > > > > End > > > > > > > > Similarly I can augment _get, _put, etc. so that you won't notice that the > > > > _Trie_Entry structure exists at all. > > > > > > > > If you request a case-insensitive Trie, all keys are upper-case'd internally > > > > and the real keys are saved as part of the stored object. So you can get > > > > your original key back later in an enumeration and I don't have to add > > > > branches in the hot paths of the trie code to support case-insensitivity > > > > (which would make the whole thing slower -- I don't know if it would be > > > > noticeable, but...). I will see if I can do that (_next() may impose a > > > > little problem or maybe not). > > > > > > > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > > > > implement case-insensitivity by internally converting all characters to > > > > upper-case, is it sufficient to use String.Upper() or are there hidden > > > > pitfalls? > > > > > > > > Regards, > > > > Tobi > > > > > > > > > > Salut Tobi, > > > > > > I think it would be best, to stay close to the original definition of > > > trie..."should be case-sensitive". > > > Every thing else, I can do by myself. > > > It was just a question because off the first outputs. > > > > > > > Attached is a project that does this. It should be a complete case- > > insensitive version of the Trie class. Should work properly with the > > latest revision (the Trie had a memory leak when objects were replaced > > until a few minutes ago). > > > > Regards, > > Tobi > > Thanks Tobi, > > I haven't tested yet, but it looks like a wonderful example, how you can > extend a gambas class. > For my case, KEY and VALUE will have the same entry, I use the key in > Uppercase. > Salut Tobi, now I've one last question, about this case-insensitive version of the Trie class. Do you plan to release this case-insensitive version to gambas or is it a case study for you? -- Amicalement Charlie From taboege at ...626... Wed Dec 3 21:53:32 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 3 Dec 2014 21:53:32 +0100 Subject: [Gambas-user] problems in trie class In-Reply-To: <1417639821.3667.5.camel@...40...> References: <1416341201.3515.8.camel@...40...> <20141129190528.GC501@...2774...> <1417298013.3608.17.camel@...40...> <20141201164754.GD1329@...2774...> <1417470875.4788.7.camel@...40...> <20141201223926.GL1329@...2774...> <1417602630.3602.7.camel@...40...> <1417639821.3667.5.camel@...40...> Message-ID: <20141203205332.GB1538@...2774...> On Wed, 03 Dec 2014, Charlie Reinl wrote: > > > > > It should be case-sensitive. If it wasn't before on your system, that was > > > > > a bug (I can't imagine where it came from, though). > > > > > > > > > > > but for my behaves non case sensitive would be better (or > > > > > > a switch to do like that) > > > > > > And we talked about something like .Add(Value,Key) for simplifing > > > > > > filling. > > > > > > > > > > > > > > > > OK, you get an Add() and Remove() method in #6699, similar to what > > > > > Collection has. > > > > > > > > > > As for the case-insensitivity: I can add an optional constructor argument, > > > > > Mode, which can be gb.Binary or gb.IgnoreCase (just as Collection has). > > > > > > > > > > (After writing about half an hour complaining how hard it would be to get > > > > > case-insensitivity right and efficient) I just had a magnificent idea: I > > > > > will extend the native Trie class in Gambas and do something like that: > > > > > > > > > > ' Written from scratch, may contain syntax, etc. errors > > > > > > > > > > Public Struct _Trie_Entry > > > > > Key As String > > > > > Value As Variant > > > > > End Struct > > > > > > > > > > Public Sub Add(Value As Variant, Key As String) > > > > > Dim hEntry As New _Trie_Entry > > > > > Dim sKey As String = Key > > > > > > > > > > If $iMode = gb.IgnoreCase Then sKey = String.Upper(Key) > > > > > hEntry.Key = Key > > > > > hEntry.Value = Value > > > > > Super.Add(Value, sKey) > > > > > End > > > > > > > > > > Similarly I can augment _get, _put, etc. so that you won't notice that the > > > > > _Trie_Entry structure exists at all. > > > > > > > > > > If you request a case-insensitive Trie, all keys are upper-case'd internally > > > > > and the real keys are saved as part of the stored object. So you can get > > > > > your original key back later in an enumeration and I don't have to add > > > > > branches in the hot paths of the trie code to support case-insensitivity > > > > > (which would make the whole thing slower -- I don't know if it would be > > > > > noticeable, but...). I will see if I can do that (_next() may impose a > > > > > little problem or maybe not). > > > > > > > > > > @Benoit: I am not familiar with the caveats of UTF-8 strings. If I want to > > > > > implement case-insensitivity by internally converting all characters to > > > > > upper-case, is it sufficient to use String.Upper() or are there hidden > > > > > pitfalls? > > > > > > > > > > Regards, > > > > > Tobi > > > > > > > > > > > > > Salut Tobi, > > > > > > > > I think it would be best, to stay close to the original definition of > > > > trie..."should be case-sensitive". > > > > Every thing else, I can do by myself. > > > > It was just a question because off the first outputs. > > > > > > > > > > Attached is a project that does this. It should be a complete case- > > > insensitive version of the Trie class. Should work properly with the > > > latest revision (the Trie had a memory leak when objects were replaced > > > until a few minutes ago). > > > > > > Regards, > > > Tobi > > > > Thanks Tobi, > > > > I haven't tested yet, but it looks like a wonderful example, how you can > > extend a gambas class. > > For my case, KEY and VALUE will have the same entry, I use the key in > > Uppercase. > > > > Salut Tobi, > > now I've one last question, about this case-insensitive version of the > Trie class. > Do you plan to release this case-insensitive version to gambas or is it > a case study for you? > You tell me :-) If it behaves well (I haven't tried much), I'll include it. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From t.lee.davidson at ...626... Wed Dec 3 22:05:35 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Wed, 03 Dec 2014 16:05:35 -0500 Subject: [Gambas-user] Bug: Mageia packages made by IDE do not install application icon in distro menu In-Reply-To: <1409486087.3303.8.camel@...3024...> References: <1409486087.3303.8.camel@...3024...> Message-ID: <547F7B1F.4040903@...626...> On 08/31/2014 07:54 AM, Willy Raets wrote: > Hi all, > > Lee (also on this mailinglist) did some testing of an application of > mine. > He reported that when installing the rpm he had script errors. > The application did install and had a menu entry, but no icon was > present for the entry. > > When I run the .deb files on Mint icon are properly made for the distro > menu entry. > > So the problem seems to be in the mageia package as made by the IDE. I believe, with the help of gbWilly who did testing on Linux Mint 13 (which is based on Ubuntu 12.04), I have determined the cause of the script errors and the icon installation issue (and a temporary "fix"). The SPEC file generated by Gambas relies on build macros that may not be defined on a Ubuntu-based system. These macros are defined in '20build.macros' which, at least on Willy's system, does not exist. So, here is my suggestion to fix this, Beno?t. In the SPEC file, define the _iconsdir, _miconsdir, and _liconsdir macros as follows: %define _iconsdir %{_datadir}/icons %define _miconsdir %{_datadir}/icons/mini %define _liconsdir %{_datadir}/icons/large Then, simply remove "%{update_menus}" and "%{clean_menus}". They, on my system, expand to "%{nil}" anyway. I renamed '20build.macros' so these macros would not be available, modified a Gambas-generated package SPEC file as suggested above, and rebuilt the package. It built and installed with no errors and correctly attributed the application icon to the menu entry. If and until this is fixed in Gambas, I have attached a project file that users with Ubuntu-based systems may be able to use to "fix" their systems (ie. add the macro definitions) to facilitate making no-error RPM-based packages on their systems. -- Lee __________ "Artificial Intelligence is no match for natural stupidity." -------------- next part -------------- A non-text attachment was scrubbed... Name: PackageBuildConfigurationTest-0.0.1.tar.gz Type: application/x-gzip Size: 6755 bytes Desc: not available URL: From t.lee.davidson at ...626... Wed Dec 3 23:16:04 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Wed, 03 Dec 2014 17:16:04 -0500 Subject: [Gambas-user] HttpClient Example #2 ? Message-ID: <547F8BA4.2010709@...626...> At http://gambaswiki.org/wiki/comp/gb.net.curl/httpclient, under Example #2, in: Public Sub DownloadAsync(URL As String) sDownloadBuffer = "" hAsyncClient.URL = URL hAsyncClient.TimeOut = 20 hClient.Async = TRUE hAsyncClient.Get() End Should the line "hClient.Async = TRUE" be "hAsyncClient.Async = TRUE"? -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From gambas at ...1... Thu Dec 4 01:28:51 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 04 Dec 2014 01:28:51 +0100 Subject: [Gambas-user] Important change in revision #6691 In-Reply-To: References: <547B9FAB.6070800@...1...> Message-ID: <547FAAC3.4060203@...1...> Le 03/12/2014 01:04, Jussi Lahtinen a ?crit : > Watch seems to raise read event for empty file, is this correct behavior? >>From the documentation ( http://gambaswiki.org/wiki/lang/open ) I would say > it shouldn't. > See the attachment. > > > Jussi > This has been fixed in revision #6708. Regards, -- Beno?t Minisini From t.lee.davidson at ...626... Thu Dec 4 01:41:15 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Wed, 03 Dec 2014 19:41:15 -0500 Subject: [Gambas-user] String[].Extract not behaving as expected Message-ID: <547FADAB.3050909@...626...> http://gambaswiki.org/wiki/comp/gb/string[]/extract says: [edited-quote] Function Extract (Start As Integer [, Length As Integer ]) As String[] If Length is negative, then Length elements counting backwards from the specified Start are removed. [/edited-quote] But this does not appear to be the manner in which it behaves. (I am also unsure what "counting backwards" means. Would that be toward the beginning or the end of the array?) Public Sub Main() Dim myStrings As String[] = ["s1", "s2", "s3", "s4", "s5", "s6", "s7"] Dim sString As String myStrings = myStrings.Extract(2, -1) Print "Number of extracted elements: " & myStrings.Count For Each sString In myStrings Print sString Next End produces: Number of extracted elements: 5 s3 s4 s5 s6 s7 Obviously, "myStrings.Extract(2, -1)" extracted all elements from the specified Start to the end of the array, not just one element from the specified Start. "myStrings.Extract(2, -2)" gives an "Out of bounds" error. So, I guess my question should be, what is the intended behavior? -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From gambas at ...1... Thu Dec 4 01:59:37 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 04 Dec 2014 01:59:37 +0100 Subject: [Gambas-user] String[].Extract not behaving as expected In-Reply-To: <547FADAB.3050909@...626...> References: <547FADAB.3050909@...626...> Message-ID: <547FB1F9.2050301@...1...> Le 04/12/2014 01:41, T Lee Davidson a ?crit : > http://gambaswiki.org/wiki/comp/gb/string[]/extract says: > > [edited-quote] > Function Extract (Start As Integer [, Length As Integer ]) As String[] > > If Length is negative, then Length elements counting backwards from the > specified Start are removed. > [/edited-quote] > > But this does not appear to be the manner in which it behaves. (I am > also unsure what "counting backwards" means. Would that be toward the > beginning or the end of the array?) > > Public Sub Main() > Dim myStrings As String[] = ["s1", "s2", "s3", "s4", "s5", "s6", "s7"] > Dim sString As String > > myStrings = myStrings.Extract(2, -1) > Print "Number of extracted elements: " & myStrings.Count > For Each sString In myStrings > Print sString > Next > End > > produces: > Number of extracted elements: 5 > s3 > s4 > s5 > s6 > s7 > > Obviously, "myStrings.Extract(2, -1)" extracted all elements from the > specified Start to the end of the array, not just one element from the > specified Start. > > "myStrings.Extract(2, -2)" gives an "Out of bounds" error. > > So, I guess my question should be, what is the intended behavior? > > The doc is false. -1 means all elements until the end, and other negative values have no meaning. Regards, -- Beno?t Minisini From gambas at ...1... Thu Dec 4 01:59:57 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 04 Dec 2014 01:59:57 +0100 Subject: [Gambas-user] HttpClient Example #2 ? In-Reply-To: <547F8BA4.2010709@...626...> References: <547F8BA4.2010709@...626...> Message-ID: <547FB20D.6010701@...1...> Le 03/12/2014 23:16, T Lee Davidson a ?crit : > At http://gambaswiki.org/wiki/comp/gb.net.curl/httpclient, under Example > #2, in: > > Public Sub DownloadAsync(URL As String) > > sDownloadBuffer = "" > hAsyncClient.URL = URL > hAsyncClient.TimeOut = 20 > hClient.Async = TRUE > hAsyncClient.Get() > > End > > Should the line "hClient.Async = TRUE" be "hAsyncClient.Async = TRUE"? > > Obviously. -- Beno?t Minisini From gambas at ...2524... Thu Dec 4 02:19:59 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 04 Dec 2014 01:19:59 +0000 Subject: [Gambas-user] Issue 587 in gambas: If DateBox1.Value And DateBox2.Value Then Error In-Reply-To: <1-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> <0-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-7855060830270854430-gambas=googlecode.com@...2524...> Updates: Status: WontFix Comment #2 on issue 587 by benoit.m... at ...626...: If DateBox1.Value And DateBox2.Value Then Error https://code.google.com/p/gambas/issues/detail?id=587 And is a boolean operator, not a logical operator. Use AND IF for that, and read the documentation about AND and AND IF. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Dec 4 02:20:59 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 04 Dec 2014 01:20:59 +0000 Subject: [Gambas-user] Issue 584 in gambas: Button has wrong underscored letter In-Reply-To: <0-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> Updates: Status: NeedsInfo Comment #1 on issue 584 by benoit.m... at ...626...: Button has wrong underscored letter https://code.google.com/p/gambas/issues/detail?id=584 Is it really a problem? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Dec 4 02:25:22 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 04 Dec 2014 01:25:22 +0000 Subject: [Gambas-user] Issue 580 in gambas: Menu bar background color seems wrong. In-Reply-To: <0-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> Updates: Status: Accepted Labels: -Version Version-3.6.0 Comment #1 on issue 580 by benoit.m... at ...626...: Menu bar background color seems wrong. https://code.google.com/p/gambas/issues/detail?id=580 Indeed... But I have no idea why at the moment! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Dec 4 02:31:05 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 04 Dec 2014 01:31:05 +0000 Subject: [Gambas-user] Issue 580 in gambas: Menu bar background color seems wrong. In-Reply-To: <1-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> <0-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-7815319398573939980-gambas=googlecode.com@...2524...> Updates: Status: Fixed Comment #2 on issue 580 by benoit.m... at ...626...: Menu bar background color seems wrong. https://code.google.com/p/gambas/issues/detail?id=580 OK, I found why, and fixed that in revision #6710. I was filling the background of the menu bar, no idea why. Maybe it was needed to fix another visual bug, I don't remember. We will see... -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From t.lee.davidson at ...626... Thu Dec 4 02:42:38 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Wed, 03 Dec 2014 20:42:38 -0500 Subject: [Gambas-user] HttpClient Example #2 ? In-Reply-To: <547FB20D.6010701@...1...> References: <547F8BA4.2010709@...626...> <547FB20D.6010701@...1...> Message-ID: <547FBC0E.1060605@...626...> On 12/03/2014 07:59 PM, Beno?t Minisini wrote: > Le 03/12/2014 23:16, T Lee Davidson a ?crit : >> At http://gambaswiki.org/wiki/comp/gb.net.curl/httpclient, under Example >> #2, in: >> >> Public Sub DownloadAsync(URL As String) >> >> sDownloadBuffer = "" >> hAsyncClient.URL = URL >> hAsyncClient.TimeOut = 20 >> hClient.Async = TRUE >> hAsyncClient.Get() >> >> End >> >> Should the line "hClient.Async = TRUE" be "hAsyncClient.Async = TRUE"? >> >> > > Obviously. > Well that's what I thought. But, I didn't want to "correct" that if it was done intentionally for some reason I may not be aware of. Fixed :-) -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From t.lee.davidson at ...626... Thu Dec 4 02:50:08 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Wed, 03 Dec 2014 20:50:08 -0500 Subject: [Gambas-user] String[].Extract not behaving as expected In-Reply-To: <547FB1F9.2050301@...1...> References: <547FADAB.3050909@...626...> <547FB1F9.2050301@...1...> Message-ID: <547FBDD0.8070605@...626...> On 12/03/2014 07:59 PM, Beno?t Minisini wrote: >> Obviously, "myStrings.Extract(2, -1)" extracted all elements from the >> >specified Start to the end of the array, not just one element from the >> >specified Start. >> > >> >"myStrings.Extract(2, -2)" gives an "Out of bounds" error. >> > >> >So, I guess my question should be, what is the intended behavior? >> > >> > > The doc is false. -1 means all elements until the end, and other > negative values have no meaning. That makes sense. Thank you for confirming. But, I cannot correct the documentation. The only Markdown Syntax I see for that page is, "--> /comp/gb/boolean[]/extract", and I have no idea what to do with that. -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From gambas at ...1... Thu Dec 4 03:01:53 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 04 Dec 2014 03:01:53 +0100 Subject: [Gambas-user] String[].Extract not behaving as expected In-Reply-To: <547FBDD0.8070605@...626...> References: <547FADAB.3050909@...626...> <547FB1F9.2050301@...1...> <547FBDD0.8070605@...626...> Message-ID: <547FC091.2060106@...1...> Le 04/12/2014 02:50, T Lee Davidson a ?crit : > On 12/03/2014 07:59 PM, Beno?t Minisini wrote: >>> Obviously, "myStrings.Extract(2, -1)" extracted all elements from the >>>> specified Start to the end of the array, not just one element from the >>>> specified Start. >>>> >>>> "myStrings.Extract(2, -2)" gives an "Out of bounds" error. >>>> >>>> So, I guess my question should be, what is the intended behavior? >>>> >>>> >> The doc is false. -1 means all elements until the end, and other >> negative values have no meaning. > > That makes sense. Thank you for confirming. > > But, I cannot correct the documentation. The only Markdown Syntax I see > for that page is, "--> /comp/gb/boolean[]/extract", and I have no idea > what to do with that. > It's a symbolic link to another page. Yes, the wiki can have symbolic links! In other words, all Extract() documentation pages point at the Boolean[] one. This is that page that must be fixed. Regards, -- Beno?t Minisini From gambas at ...2524... Thu Dec 4 19:01:02 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 04 Dec 2014 18:01:02 +0000 Subject: [Gambas-user] Issue 584 in gambas: Button has wrong underscored letter In-Reply-To: <1-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> <0-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-9166914594436289454-gambas=googlecode.com@...2524...> Comment #2 on issue 584 by martin.k... at ...626...: Button has wrong underscored letter https://code.google.com/p/gambas/issues/detail?id=584 I'm not sure if it is a bug or just an anomaly. It is annoying, to me at least, that the IDE displays one thing during development and then something different is displayed at run time. However the workround is simple so you can probably close this off. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From lewis at ...3412... Fri Dec 5 11:43:04 2014 From: lewis at ...3412... (Lewis Balentine) Date: Fri, 05 Dec 2014 04:43:04 -0600 Subject: [Gambas-user] Try not catching XmlDocument Error Message-ID: <54818C38.4080708@...3412...> The problem is that the ".xml" file in question is malformed. It happens to have some lines after the end of the root element end tag. I was trying to add code to handle the exception however Gambas terminates before entering the "If Error" code. This behavior is consistent. Error message: terminate called after throwing an instance of 'XMLParseException*' Begin Sample code:--------------------------------------- Private Sub ProcessOneTitanFile(TitanFileName As String) Dim TitanXML As New XmlDocument Print TitanFileName ' needed to find offending file. Try TitanXML.Open(TitanFileName) If Error Then Print "*** FATAL ERROR *** SUB ProcessOneTitanFile." Print "*** FATAL ERROR *** trying to open XML file." Quit Endif ' other code follows End End Sample code:--------------------------------------- regards, Lewis Balentine [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=3.13.0-24-generic Architecture=x86_64 Distribution=Linux Mint 17 Qiana Desktop=MATE Theme=QGtk Language=en_US.UTF-8 Memory=15994M [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+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 From lewis at ...3412... Fri Dec 5 12:07:18 2014 From: lewis at ...3412... (Lewis Balentine) Date: Fri, 05 Dec 2014 05:07:18 -0600 Subject: [Gambas-user] gb.settings comments deleted Message-ID: <548191E6.4060408@...3412...> When settings are written back to the ".conf" file all comments/remarks are stripped from the file. Should not the documentation include a warning to this effect? Better yet would be to keep those comments/remarks intact. example incoming: [slot] ; remark # remark ; comment Value0ne =1 ValueTwo =2 ValueThree =3 # end of file example outgoing: [slot] Value0ne =1 ValueTwo =2 ValueThree =3 regards, Lewis [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=3.13.0-24-generic Architecture=x86_64 Distribution=Linux Mint 17 Qiana Desktop=MATE Theme=QGtk Language=en_US.UTF-8 Memory=15994M [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+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 From gambas at ...1... Fri Dec 5 12:11:51 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 05 Dec 2014 12:11:51 +0100 Subject: [Gambas-user] gb.settings comments deleted In-Reply-To: <548191E6.4060408@...3412...> References: <548191E6.4060408@...3412...> Message-ID: <548192F7.8060901@...1...> Le 05/12/2014 12:07, Lewis Balentine a ?crit : > When settings are written back to the ".conf" file all comments/remarks > are stripped from the file. > Should not the documentation include a warning to this effect? Yes. > Better yet would be to keep those comments/remarks intact. It's not really possible. Regards, -- Beno?t Minisini From mmcg29440 at ...3163... Fri Dec 5 13:42:42 2014 From: mmcg29440 at ...3163... (Martin McGlensey) Date: Fri, 5 Dec 2014 07:42:42 -0500 Subject: [Gambas-user] How do I remove an element of a multidimensional array Message-ID: Hello, I need to remove one element of a multidimensional array. The dimensions are [10, 4]. I want to delete, for example, all elements of array row 1. Can I do this? Marty From bagoneo at ...69... Fri Dec 5 14:10:15 2014 From: bagoneo at ...69... (Gian) Date: Fri, 05 Dec 2014 14:10:15 +0100 Subject: [Gambas-user] How do I remove an element of a multidimensional array In-Reply-To: References: Message-ID: <5481AEB7.2050505@...69...> Il 05/12/2014 13:42, Martin McGlensey ha scritto: > Hello, > > > > I need to remove one element of a multidimensional array. The dimensions > are [10, 4]. I want to delete, for example, all elements of array row 1. Can > I do this? > > > > Marty > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > A way not particulary clever? Copy your array in another with one row less. Hi Gianluigi From taboege at ...626... Fri Dec 5 15:18:13 2014 From: taboege at ...626... (Tobias Boege) Date: Fri, 5 Dec 2014 15:18:13 +0100 Subject: [Gambas-user] gb.settings comments deleted In-Reply-To: <548192F7.8060901@...1...> References: <548191E6.4060408@...3412...> <548192F7.8060901@...1...> Message-ID: <20141205141813.GA843@...2774...> On Fri, 05 Dec 2014, Beno?t Minisini wrote: > Le 05/12/2014 12:07, Lewis Balentine a ?crit : > > When settings are written back to the ".conf" file all comments/remarks > > are stripped from the file. > > Should not the documentation include a warning to this effect? > > Yes. > > > Better yet would be to keep those comments/remarks intact. > > It's not really possible. > I didn't even know that comments were allowed. The wiki states it, yes, but the class interface doesn't offer it. How about a Settings.Comments As Collection property which can associate to a (valid) key in the Settings a few lines to put before that item in the settings file? This can be parsed correctly and later written to the file in order again. One may even imagine that the empty key can receive a comment which is put at the beginning of the comment file. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Fri Dec 5 15:36:25 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 05 Dec 2014 15:36:25 +0100 Subject: [Gambas-user] gb.settings comments deleted In-Reply-To: <20141205141813.GA843@...2774...> References: <548191E6.4060408@...3412...> <548192F7.8060901@...1...> <20141205141813.GA843@...2774...> Message-ID: <5481C2E9.6020804@...1...> Le 05/12/2014 15:18, Tobias Boege a ?crit : > On Fri, 05 Dec 2014, Beno?t Minisini wrote: >> Le 05/12/2014 12:07, Lewis Balentine a ?crit : >>> When settings are written back to the ".conf" file all comments/remarks >>> are stripped from the file. >>> Should not the documentation include a warning to this effect? >> >> Yes. >> >>> Better yet would be to keep those comments/remarks intact. >> >> It's not really possible. >> > > I didn't even know that comments were allowed. The wiki states it, yes, but > the class interface doesn't offer it. > > How about a Settings.Comments As Collection property which can associate to > a (valid) key in the Settings a few lines to put before that item in the > settings file? This can be parsed correctly and later written to the file in > order again. One may even imagine that the empty key can receive a comment > which is put at the beginning of the comment file. > > Regards, > Tobi > Pfff. I would say that if you need comments to edit a settings file by hand, you shouldn't do that. :-) -- Beno?t Minisini From gambas at ...1... Fri Dec 5 15:37:37 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Fri, 05 Dec 2014 15:37:37 +0100 Subject: [Gambas-user] Leaving Paris for the week-end... Message-ID: <5481C331.1000606@...1...> ...going to Frankfurt. So no internet until Thursday, no bug fixes! -- Beno?t Minisini From gambas.fr at ...626... Fri Dec 5 15:48:45 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Dec 2014 15:48:45 +0100 Subject: [Gambas-user] Leaving Paris for the week-end... In-Reply-To: <5481C331.1000606@...1...> References: <5481C331.1000606@...1...> Message-ID: Bon voyage ! 2014-12-05 15:37 GMT+01:00 Beno?t Minisini : > ...going to Frankfurt. So no internet until Thursday, no bug fixes! > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From taboege at ...626... Fri Dec 5 15:47:46 2014 From: taboege at ...626... (Tobias Boege) Date: Fri, 5 Dec 2014 15:47:46 +0100 Subject: [Gambas-user] How do I remove an element of a multidimensional array In-Reply-To: <5481AEB7.2050505@...69...> References: <5481AEB7.2050505@...69...> Message-ID: <20141205144746.GC843@...2774...> On Fri, 05 Dec 2014, Gian wrote: > Il 05/12/2014 13:42, Martin McGlensey ha scritto: > > Hello, > > > > > > > > I need to remove one element of a multidimensional array. The dimensions > > are [10, 4]. I want to delete, for example, all elements of array row 1. Can > > I do this? > > > > > > > > Marty > > > > A way not particulary clever? Copy your array in another with one row less. > Hi > Gianluigi > And it doesn't get better than this if you stick to what I call "real multi- dimensional (m-d) arrays". Their bounds (i.e. the number of dimensions and the size of each dimension) are fixed after you created them. A typical real m-d array declaration looks like this Dim myArray As Integer[Dim1, Dim2, ..., DimN] If that's the way you declared your array, you can only solve your problem by copying the wanted data into another, smaller array. However, there is a second kind of m-d arrays in Gambas which I call "derived m-d arrays". These are classes constructed by the interpreter at runtime out of other classes. If you let it create array classes from array classes (and so forth), you can achieve a m-d layout of your data BUT by using only 1-d arrays over which you have more operations available, as you know. An example of a declaration of a derived m-d array is Dim myArray As Integer[][]...[] ' As many brackets as you want dimensions For the rest I must refer you to this thread[0] because the explanation is a bit lengthy and I don't want to repeat it. Anyway, it turns out that the derived m-d arrays are *way* more flexible and that you can delete rows, columns and whatever you call their higher-dimensional analogues more easily. If there are questions left, don't hesitate. Regards, Tobi [0] http://sourceforge.net/p/gambas/mailman/message/32228140/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Fri Dec 5 15:49:01 2014 From: taboege at ...626... (Tobias Boege) Date: Fri, 5 Dec 2014 15:49:01 +0100 Subject: [Gambas-user] Leaving Paris for the week-end... In-Reply-To: <5481C331.1000606@...1...> References: <5481C331.1000606@...1...> Message-ID: <20141205144901.GD843@...2774...> On Fri, 05 Dec 2014, Beno??t Minisini wrote: > ...going to Frankfurt. So no internet until Thursday, no bug fixes! > I believe there is internet in Frankfurt, too ;-) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From shordi at ...626... Fri Dec 5 18:27:42 2014 From: shordi at ...626... (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Fri, 5 Dec 2014 18:27:42 +0100 Subject: [Gambas-user] Leaving Paris for the week-end... In-Reply-To: <5481C331.1000606@...1...> References: <5481C331.1000606@...1...> Message-ID: Enjoy! 2014-12-05 15:37 GMT+01:00 Beno?t Minisini : > ...going to Frankfurt. So no internet until Thursday, no bug fixes! > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From lewis at ...3412... Fri Dec 5 21:42:40 2014 From: lewis at ...3412... (Lewis Balentine) Date: Fri, 05 Dec 2014 14:42:40 -0600 Subject: [Gambas-user] gb.settings comments deleted In-Reply-To: <5481C2E9.6020804@...1...> References: <548191E6.4060408@...3412...> <548192F7.8060901@...1...> <20141205141813.GA843@...2774...> <5481C2E9.6020804@...1...> Message-ID: <548218C0.6020006@...3412...> *.conf appears to be similar to *.ini files found for decades on the the ms windows platform. I have always preferred them in that environment rather than the newfangled and nearly unmanageable windows registry. They allow one to modify the operation of a program without having to go change the source code. It is handy to be able to modify these configuration files with a plane text editor to meet requirements of a change in the environment (i.e. that critical shared network directory has been moved to another location). After number of years not touching a particular ini/conf file it may be useful to have a few comment in the file to refresh one memory cells. Another unusual feature of the conf files is that gb.setting reorders the order of the slots ... interestingly enough it maintains the order of the keys under the slots. One needs to be adaptable. In the case in question I have inserted a few remarks as : [0-kvpr] remark0 = "all comment lines are stripped from this file by the application" remark1 = "these directory paths must be terminated with a forward slash '/'." ... [1-job control] remark0 = "job 001 is a template, do not delete it." ... Problem (at least mine) solved :-) regards, Lewis On 12/05/2014 08:36 AM, Beno?t Minisini wrote: > Le 05/12/2014 15:18, Tobias Boege a ?crit : >> On Fri, 05 Dec 2014, Beno?t Minisini wrote: >>> Le 05/12/2014 12:07, Lewis Balentine a ?crit : >>>> When settings are written back to the ".conf" file all comments/remarks >>>> are stripped from the file. >>>> Should not the documentation include a warning to this effect? >>> Yes. >>> >>>> Better yet would be to keep those comments/remarks intact. >>> It's not really possible. >>> >> I didn't even know that comments were allowed. The wiki states it, yes, but >> the class interface doesn't offer it. >> >> How about a Settings.Comments As Collection property which can associate to >> a (valid) key in the Settings a few lines to put before that item in the >> settings file? This can be parsed correctly and later written to the file in >> order again. One may even imagine that the empty key can receive a comment >> which is put at the beginning of the comment file. >> >> Regards, >> Tobi >> > Pfff. I would say that if you need comments to edit a settings file by > hand, you shouldn't do that. :-) > From adrien.prokopowicz at ...626... Sat Dec 6 04:21:15 2014 From: adrien.prokopowicz at ...626... (Adrien Prokopowicz) Date: Sat, 06 Dec 2014 04:21:15 +0100 Subject: [Gambas-user] Try not catching XmlDocument Error In-Reply-To: <54818C38.4080708@...3412...> References: <54818C38.4080708@...3412...> Message-ID: Le Fri, 05 Dec 2014 11:43:04 +0100, Lewis Balentine a ?crit: > The problem is that the ".xml" file in question is malformed. It happens > to have some lines after the end of the root element end tag. I was > trying to add code to handle the exception however Gambas terminates > before entering the "If Error" code. This behavior is consistent. > > Error message: terminate called after throwing an instance of > 'XMLParseException*' > > Begin Sample code:--------------------------------------- > Private Sub ProcessOneTitanFile(TitanFileName As String) > Dim TitanXML As New XmlDocument > > Print TitanFileName ' needed to find offending file. > Try TitanXML.Open(TitanFileName) > If Error Then > Print "*** FATAL ERROR *** SUB ProcessOneTitanFile." > Print "*** FATAL ERROR *** trying to open XML file." > Quit > Endif > ' other code follows > End > End Sample code:--------------------------------------- > > regards, > > Lewis Balentine > [...] Hello Lewis, Revision #6711 should fix this problem. Can you confirm ? Regards, -- Adrien Prokopowicz From lewis at ...3412... Sat Dec 6 04:57:50 2014 From: lewis at ...3412... (Lewis Balentine) Date: Fri, 05 Dec 2014 21:57:50 -0600 Subject: [Gambas-user] Try not catching XmlDocument Error In-Reply-To: References: <54818C38.4080708@...3412...> Message-ID: <54827EBE.2020402@...3412...> I can not. I assume that I would have to download, build/compile and install that particular or later version. I am just a month into the land of Linux and less than half of that into Gambas. I have not advanced that far yet (still on baby steps). I worked around the problem. As of about 6 hours ago I have my first Gambas application running (if somewhat crudely). Lewis On 12/05/2014 09:21 PM, Adrien Prokopowicz wrote: > Le Fri, 05 Dec 2014 11:43:04 +0100, Lewis Balentine a > ?crit: > >> The problem is that the ".xml" file in question is malformed. It happens >> to have some lines after the end of the root element end tag. I was >> trying to add code to handle the exception however Gambas terminates >> before entering the "If Error" code. This behavior is consistent. >> >> Error message: terminate called after throwing an instance of >> 'XMLParseException*' >> >> Begin Sample code:--------------------------------------- >> Private Sub ProcessOneTitanFile(TitanFileName As String) >> Dim TitanXML As New XmlDocument >> >> Print TitanFileName ' needed to find offending file. >> Try TitanXML.Open(TitanFileName) >> If Error Then >> Print "*** FATAL ERROR *** SUB ProcessOneTitanFile." >> Print "*** FATAL ERROR *** trying to open XML file." >> Quit >> Endif >> ' other code follows >> End >> End Sample code:--------------------------------------- >> >> regards, >> >> Lewis Balentine >> [...] > Hello Lewis, > > Revision #6711 should fix this problem. Can you confirm ? > > Regards, From taboege at ...626... Sat Dec 6 10:23:34 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 6 Dec 2014 10:23:34 +0100 Subject: [Gambas-user] Try not catching XmlDocument Error In-Reply-To: <54827EBE.2020402@...3412...> References: <54818C38.4080708@...3412...> <54827EBE.2020402@...3412...> Message-ID: <20141206092334.GA543@...2774...> On Fri, 05 Dec 2014, Lewis Balentine wrote: > I can not. I assume that I would have to download, build/compile and > install that particular or later version. I am just a month into the > land of Linux and less than half of that into Gambas. I have not > advanced that far yet (still on baby steps). > Your assumption is correct... normally. If you are using Ubuntu, there is a PPA which compiles and packages the latest development version for you on a daily basis. If you want to try that (if you are on Ubuntu), there are people here who can walk you through that process (and switch your Gambas back to the stable version afterwards). > I worked around the problem. As of about 6 hours ago I have my first > Gambas application running (if somewhat crudely). > Don't make me think about my first Gambas program... At that time I did not even know what variables were so I had a lot of hidden TextBoxes on the form to temporarily save values, and I used the Clipboard a lot to pass values around :-) However, the program did run and it did what I wanted it to do. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Sat Dec 6 14:25:41 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 6 Dec 2014 14:25:41 +0100 Subject: [Gambas-user] New features on the wiki In-Reply-To: <20141113201800.GB1544@...2774...> References: <545F5D8F.8040107@...1...> <20141112123922.GA1878@...2774...> <54635CE4.4020304@...1...> <20141112230753.GD1878@...2774...> <5464D1B7.9020204@...1...> <20141113201800.GB1544@...2774...> Message-ID: <20141206132541.GD543@...2774...> On Thu, 13 Nov 2014, Tobias Boege wrote: > > No, the source tree may not beavailable on the wiki, only the *.info files. > > > > Why not adding an optional "*.help" file that would come with the *.info > > file? > > > > This file could have almost the same format as the *.info file, except > > that it includes only the help. Your script would have to generate that > > file - I don't know what it does exactly at the moment... > > > > The format is: > > > > # > > > > ' > > ' > > '... > > > > ... > > # > > ... > > > > Then either you keep your script, and you send me the *.help files so > > that I put them on the wiki server. > > > > Better would be having your script inside the source tree, and let it > > run automatically on the C/C++ sources with specific Makefile.am rules. > > > > That script can be written in Gambas. But then it will be run at "make > > install" stage, once the interpreter has been compiled. > > > > What do you think? > > > > Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4 > different languages!) piping into one another. The first four preprocess > the C/C++ comments and the last is a really hackish C program which takes > these help lines and merges them to the right place in a given .info file. > When I wrote these, I was all about (development) speed. It may be cool to > have all that in one program (and one language only). > > The above format (and an extra file for it!) would be really good because > that's information the program can gather from the C/C++ source files alone. > No need to mess with the .info files then. > > Weekend... > Of course I meant this weekend, not the one 3 weeks ago... The scripts are in the c2help directory in the source tree root since #6712. Try them on gb.openssl: $ c2help/c2help.sh gb.openssl 2>/dev/null #Digest List ' Return a list of all digests present in the local OpenSSL crypto library. _get ' Return a virtual object representing a digest algorithm by giving its ' name. Valid names can be looked up from Digest.List. IsSupported ' Check whether the named digest algorithm is valid. #.Digest.Method Hash ' Hash the given string using this digest algorithm. _call ' A synonym for Hash. #Cipher List ' Return a list of all ciphers present in the local OpenSSL crypto library. [...] One script is a gbs3 one, so all that needs to take place at "make install", as you said. Apart from that I need bash (with read and exit builtins), gawk, grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list. Shouldn't be too exotic. But in case someone doesn't have egrep, sed or gawk, the help generation stage should be omitted since it's optional. I see no need to reduce the dependencies on my side. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From lewis at ...3412... Sat Dec 6 17:04:06 2014 From: lewis at ...3412... (Lewis Balentine) Date: Sat, 06 Dec 2014 10:04:06 -0600 Subject: [Gambas-user] What is the Gambas equivalent of Inkey ? Message-ID: <548328F6.3090902@...3412...> For a console application I want to issue a prompt: "Press any key to continue ..." or "Press 'X' to exit or 'C' to continue:" and then wait for the user to press a key. I can find no equivalent for the Basic "inkey" function. I have tried using wait/read but it seems one must press the "enter" key. Private Function InKey(Prompt As String) As Byte Dim n As Byte If Prompt <> "" Then Print Prompt n = 0 While n = 0 Wait 0.01 ' n = Read As Byte n = Read 1 Wend Return n End Suggestions ? Lewis From taboege at ...626... Sun Dec 7 20:52:30 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 7 Dec 2014 20:52:30 +0100 Subject: [Gambas-user] What is the Gambas equivalent of Inkey ? In-Reply-To: <548328F6.3090902@...3412...> References: <548328F6.3090902@...3412...> Message-ID: <20141207195230.GA916@...2774...> On Sat, 06 Dec 2014, Lewis Balentine wrote: > For a console application I want to issue a prompt: > "Press any key to continue ..." > or > "Press 'X' to exit or 'C' to continue:" > and then wait for the user to press a key. > > I can find no equivalent for the Basic "inkey" function. I have tried > using wait/read but it seems one must press the "enter" key. > Private Function InKey(Prompt As String) As Byte > Dim n As Byte > If Prompt <> "" Then Print Prompt > n = 0 > While n = 0 > Wait 0.01 > ' n = Read As Byte > n = Read 1 > Wend > Return n > End > > Suggestions ? > Yes, terminals operate line-buffered by default, that is a newline must be typed by the user before the whole line even leaves the terminal driver. In this mode, Gambas can't do anything to help you. Good news is that you can change the mode of the terminal. There are several ways to do that: - use gb.ncurses (this will make your whole Gambas program into an interactive "terminal-GUI" program; that *may* be too intervening for you), - use the C library's tcsetattr() function -- just the thought of it is so painful to me that I didn't try it until today, - beg Benoit to implement it in Gambas (I don't know about portability issues with that), - use stty. The last option is the only one that worked for me (although I didn't try options 2 and 3). stty is a little utility that comes with the coreutils package (on my Arch Linux it says so at least) that knows how to talk to terminals portably. You would want to do Dim sState As String Exec ["stty", "-g"] To sState ' Save the current state of the terminal Exec ["stty", "cbreak"] Wait ' The input mode you want is called "cbreak" ' Do your thing here ... Exec ["stty", Trim$(sState)] Wait ' Restore the terminal In general you want to restore the state as soon as possible. I attach you a script which you can use as a basis. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- #!/usr/bin/gbs3 Public Sub Main() Dim sState, sChar As String Exec ["stty", "-g"] To sState Exec ["stty", "cbreak"] Wait Do sChar = Read 1 If sChar = "q" Then Break Print "You typed";; sChar Loop Exec ["stty", Trim$(sState)] Wait End From t.lee.davidson at ...626... Mon Dec 8 01:45:31 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Sun, 07 Dec 2014 19:45:31 -0500 Subject: [Gambas-user] Bug: Mageia packages made by IDE do not install application icon in distro menu In-Reply-To: <547F7B1F.4040903@...626...> References: <1409486087.3303.8.camel@...3024...> <547F7B1F.4040903@...626...> Message-ID: <5484F4AB.9020202@...626...> On 12/03/2014 04:05 PM, T Lee Davidson wrote: > On 08/31/2014 07:54 AM, Willy Raets wrote: >> Hi all, >> >> Lee (also on this mailinglist) did some testing of an application of >> mine. >> He reported that when installing the rpm he had script errors. >> The application did install and had a menu entry, but no icon was >> present for the entry. >> >> When I run the .deb files on Mint icon are properly made for the distro >> menu entry. >> >> So the problem seems to be in the mageia package as made by the IDE. > > I believe, with the help of gbWilly who did testing on Linux Mint 13 > (which is based on Ubuntu 12.04), I have determined the cause of the > script errors and the icon installation issue (and a temporary "fix"). > > The SPEC file generated by Gambas relies on build macros that may not be > defined on a Ubuntu-based system. These macros are defined in > '20build.macros' which, at least on Willy's system, does not exist. > > So, here is my suggestion to fix this, Beno?t. > > In the SPEC file, define the _iconsdir, _miconsdir, and _liconsdir > macros as follows: > %define _iconsdir %{_datadir}/icons > %define _miconsdir %{_datadir}/icons/mini > %define _liconsdir %{_datadir}/icons/large > > Then, simply remove "%{update_menus}" and "%{clean_menus}". They, on my > system, expand to "%{nil}" anyway. > > I renamed '20build.macros' so these macros would not be available, > modified a Gambas-generated package SPEC file as suggested above, and > rebuilt the package. It built and installed with no errors and correctly > attributed the application icon to the menu entry. > > > If and until this is fixed in Gambas, I have attached a project file > that users with Ubuntu-based systems may be able to use to "fix" their > systems (ie. add the macro definitions) to facilitate making no-error > RPM-based packages on their systems. Well I was mistaken. The project I created modifies the user's ~/.rpmmacros file to define the macros that are used by the Gambas packager. However, a look at the gambas3 Package.module shows that the ~./rpmmacros file is set aside during the packaging process. The project I attached won't fix anything. The required macros will need to be fully defined in the Package.module. -- Lee __________ "Artificial Intelligence is no match for natural stupidity." From chriseana at ...626... Mon Dec 8 02:55:24 2014 From: chriseana at ...626... (Christian e Ana Luiza Britto) Date: Sun, 7 Dec 2014 23:55:24 -0200 Subject: [Gambas-user] Graphviz for Gambas Message-ID: Hi, I would like to know if there is a way to integrate Graphviz library directly to Gambas. Thanks a lot. Christian Brazil From jscops at ...11... Mon Dec 8 09:25:50 2014 From: jscops at ...11... (Jack) Date: Mon, 08 Dec 2014 09:25:50 +0100 Subject: [Gambas-user] Noel Message-ID: <5485608E.2050404@...11...> Hello, Soon it's Christmas so for this occasion I made a little demo http://www.gambasforge.org/code-134-noel.html turn up the sound and Father Christmas will come Jack From gambas.fr at ...626... Mon Dec 8 12:18:03 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 12:18:03 +0100 Subject: [Gambas-user] Graphviz for Gambas In-Reply-To: References: Message-ID: Graphviz library unfortunately is under EPL licence whitch is incompatible with GLP :-/ 2014-12-08 2:55 GMT+01:00 Christian e Ana Luiza Britto : > Hi, > I would like to know if there is a way to integrate Graphviz library > directly to Gambas. > Thanks a lot. > Christian > Brazil > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From taboege at ...626... Mon Dec 8 13:20:27 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 8 Dec 2014 13:20:27 +0100 Subject: [Gambas-user] Graphviz for Gambas In-Reply-To: References: Message-ID: <20141208122027.GA548@...2774...> On Mon, 08 Dec 2014, Fabien Bodard wrote: > Graphviz library unfortunately is under EPL licence whitch is > incompatible with GLP :-/ > > 2014-12-08 2:55 GMT+01:00 Christian e Ana Luiza Britto : > > Hi, > > I would like to know if there is a way to integrate Graphviz library > > directly to Gambas. > > Thanks a lot. > > Christian > > Brazil > > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > There is a Graph class in gb.data and I wanted to write a small GraphViz class which calls "dot" to produce a PNG out of a graph. Now that I hear about this licensing problem, I need to verify: I can still call the dot program from the GraphViz project from inside a Gambas process, right? So, yes, Christian, there is at least thought about a GraphViz class. But it will only be there to produce PNGs out of graphs using "dot". I don't care ATM about what GraphViz can do else. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas.fr at ...626... Mon Dec 8 15:27:15 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 15:27:15 +0100 Subject: [Gambas-user] Accessor Message-ID: What about let the class ME accessor the possibility to access to the class private global value. Private toto as integer Public sub _New (Toto as integer) me.toto = Toto end Actually i can't use the name Toto in the _New param because Toto = Toto only work on the local variable. -- Fabien Bodard From gambas.fr at ...626... Mon Dec 8 15:28:19 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 15:28:19 +0100 Subject: [Gambas-user] Accessor In-Reply-To: References: Message-ID: I think i have used the term accessor in a bad way ... arf i've a so bad english :-/ 2014-12-08 15:27 GMT+01:00 Fabien Bodard : > What about let the class ME accessor the possibility to access to the > class private global value. > > > Private toto as integer > > Public sub _New (Toto as integer) > > me.toto = Toto > > end > > > > Actually i can't use the name Toto in the _New param because > > Toto = Toto only work on the local variable. > > -- > Fabien Bodard -- Fabien Bodard From gambas.fr at ...626... Mon Dec 8 17:29:25 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 17:29:25 +0100 Subject: [Gambas-user] Something i do not understand Message-ID: Dim grad As Float[][][] grad = New Float[][width, height] grad[x][y] = [0.2, 0.2] give me a 'bad number of dimention error' .. why ???? -- Fabien Bodard From taboege at ...626... Mon Dec 8 17:44:07 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 8 Dec 2014 17:44:07 +0100 Subject: [Gambas-user] Something i do not understand In-Reply-To: References: Message-ID: <20141208164407.GC548@...2774...> On Mon, 08 Dec 2014, Fabien Bodard wrote: > Dim grad As Float[][][] > > grad = New Float[][width, height] > grad[x][y] = [0.2, 0.2] > > give me a 'bad number of dimention error' .. why ???? > The syntax Float[][width, height] does not exist in Gambas. Multi-dimensional arrays are only implemented for native datatypes (Float, etc.), not for classes like Float[]. Even if it was implemented, Float[][A, B] would still yield a 2-dimensional array of Float[] objects whereas Float[][][] would be a 1-d array of Float[][] objects. Those two things are different / incompatible. If you want to use Dim grad As Float[][][] you must do grad = New Float[][][](size1) ' size1 so that x < size1 grad[x] = New Float[][](size2) ' size2 so that y < size2 grad[x][y] = [0.2, 0.2] See attached script. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- #!/usr/bin/gbs3 Public Sub Main() Dim grad As Float[][][] Dim x, y As Integer x = 2 y = 1 ' Ensure that no "out of bounds" is raised grad = New Float[][][](x + 1) grad[x] = New Float[][](y + 1) grad[x][y] = [0.2, 0.2] End From taboege at ...626... Mon Dec 8 17:49:43 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 8 Dec 2014 17:49:43 +0100 Subject: [Gambas-user] Something i do not understand In-Reply-To: <20141208164407.GC548@...2774...> References: <20141208164407.GC548@...2774...> Message-ID: <20141208164943.GD548@...2774...> On Mon, 08 Dec 2014, Tobias Boege wrote: > On Mon, 08 Dec 2014, Fabien Bodard wrote: > > Dim grad As Float[][][] > > > > grad = New Float[][width, height] > > grad[x][y] = [0.2, 0.2] > > > > give me a 'bad number of dimention error' .. why ???? > > > > The syntax > > Float[][width, height] > > does not exist in Gambas. Multi-dimensional arrays are only implemented > for native datatypes (Float, etc.), not for classes like Float[]. Oops, scratch that. I made a mistake. Still the error comes from the incompatible layout of your two arrays, i.e. the one (Float[][][]) is 1-d and the other (Float[][A, B]) is 2-d. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas.fr at ...626... Mon Dec 8 18:47:34 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 18:47:34 +0100 Subject: [Gambas-user] Something i do not understand In-Reply-To: <20141208164943.GD548@...2774...> References: <20141208164407.GC548@...2774...> <20141208164943.GD548@...2774...> Message-ID: well in fact i've found my error myself :-) i need a too dimentional array of float[]... so myvar as Float[][dim1,dim2] 2014-12-08 17:49 GMT+01:00 Tobias Boege : > On Mon, 08 Dec 2014, Tobias Boege wrote: >> On Mon, 08 Dec 2014, Fabien Bodard wrote: >> > Dim grad As Float[][][] >> > >> > grad = New Float[][width, height] >> > grad[x][y] = [0.2, 0.2] >> > >> > give me a 'bad number of dimention error' .. why ???? >> > >> >> The syntax >> >> Float[][width, height] >> >> does not exist in Gambas. Multi-dimensional arrays are only implemented >> for native datatypes (Float, etc.), not for classes like Float[]. > > Oops, scratch that. I made a mistake. > > Still the error comes from the incompatible layout of your two arrays, i.e. > the one (Float[][][]) is 1-d and the other (Float[][A, B]) is 2-d. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From gambas at ...1... Mon Dec 8 19:53:14 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 08 Dec 2014 19:53:14 +0100 Subject: [Gambas-user] New features on the wiki In-Reply-To: <20141206132541.GD543@...2774...> References: <545F5D8F.8040107@...1...> <20141112123922.GA1878@...2774...> <54635CE4.4020304@...1...> <20141112230753.GD1878@...2774...> <5464D1B7.9020204@...1...> <20141113201800.GB1544@...2774...> <20141206132541.GD543@...2774...> Message-ID: <5485F39A.7010906@...1...> Le 06/12/2014 14:25, Tobias Boege a ?crit : > On Thu, 13 Nov 2014, Tobias Boege wrote: >>> No, the source tree may not beavailable on the wiki, only the *.info files. >>> >>> Why not adding an optional "*.help" file that would come with the *.info >>> file? >>> >>> This file could have almost the same format as the *.info file, except >>> that it includes only the help. Your script would have to generate that >>> file - I don't know what it does exactly at the moment... >>> >>> The format is: >>> >>> # >>> >>> ' >>> ' >>> '... >>> >>> ... >>> # >>> ... >>> >>> Then either you keep your script, and you send me the *.help files so >>> that I put them on the wiki server. >>> >>> Better would be having your script inside the source tree, and let it >>> run automatically on the C/C++ sources with specific Makefile.am rules. >>> >>> That script can be written in Gambas. But then it will be run at "make >>> install" stage, once the interpreter has been compiled. >>> >>> What do you think? >>> >> >> Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4 >> different languages!) piping into one another. The first four preprocess >> the C/C++ comments and the last is a really hackish C program which takes >> these help lines and merges them to the right place in a given .info file. >> When I wrote these, I was all about (development) speed. It may be cool to >> have all that in one program (and one language only). >> >> The above format (and an extra file for it!) would be really good because >> that's information the program can gather from the C/C++ source files alone. >> No need to mess with the .info files then. >> >> Weekend... >> > > Of course I meant this weekend, not the one 3 weeks ago... > > The scripts are in the c2help directory in the source tree root since #6712. > Try them on gb.openssl: > > $ c2help/c2help.sh gb.openssl 2>/dev/null > #Digest > List > ' Return a list of all digests present in the local OpenSSL crypto library. > _get > ' Return a virtual object representing a digest algorithm by giving its > ' name. Valid names can be looked up from Digest.List. > IsSupported > ' Check whether the named digest algorithm is valid. > #.Digest.Method > Hash > ' Hash the given string using this digest algorithm. > _call > ' A synonym for Hash. > #Cipher > List > ' Return a list of all ciphers present in the local OpenSSL crypto library. > [...] > > One script is a gbs3 one, so all that needs to take place at "make install", > as you said. Apart from that I need bash (with read and exit builtins), gawk, > grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list. > Shouldn't be too exotic. But in case someone doesn't have egrep, sed or gawk, > the help generation stage should be omitted since it's optional. I see no > need to reduce the dependencies on my side. > > Regards, > Tobi > The way you did is not really useful. You should have written a pure Gambas program with no dependencies, so that it can be run at "make install" stage automatically. You have introduce many dependencies, which means a lot of problems if in the future Gambas is ported on a non-GNU system (Android, for example). Moreover, /trunk is not the location for a compilation tool. You should have put it in /trunk/app/src for example. Regards, -- Beno?t Minisini From gambas at ...1... Mon Dec 8 19:57:54 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 08 Dec 2014 19:57:54 +0100 Subject: [Gambas-user] Accessor In-Reply-To: References: Message-ID: <5485F4B2.7060302@...1...> Le 08/12/2014 15:28, Fabien Bodard a ?crit : > I think i have used the term accessor in a bad way ... arf i've a so > bad english :-/ > > 2014-12-08 15:27 GMT+01:00 Fabien Bodard : >> What about let the class ME accessor the possibility to access to the >> class private global value. >> >> >> Private toto as integer >> >> Public sub _New (Toto as integer) >> >> me.toto = Toto >> >> end >> >> >> >> Actually i can't use the name Toto in the _New param because >> >> Toto = Toto only work on the local variable. >> >> -- >> Fabien Bodard > > > Don't use 'Toto' twice. This is the good solution, instead of letting weird syntaxes break the language. Regards, -- Beno?t Minisini From taboege at ...626... Mon Dec 8 20:04:39 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 8 Dec 2014 20:04:39 +0100 Subject: [Gambas-user] New features on the wiki In-Reply-To: <5485F39A.7010906@...1...> References: <545F5D8F.8040107@...1...> <20141112123922.GA1878@...2774...> <54635CE4.4020304@...1...> <20141112230753.GD1878@...2774...> <5464D1B7.9020204@...1...> <20141113201800.GB1544@...2774...> <20141206132541.GD543@...2774...> <5485F39A.7010906@...1...> Message-ID: <20141208190439.GG548@...2774...> On Mon, 08 Dec 2014, Beno?t Minisini wrote: > Le 06/12/2014 14:25, Tobias Boege a ?crit : > > On Thu, 13 Nov 2014, Tobias Boege wrote: > >>> No, the source tree may not beavailable on the wiki, only the *.info files. > >>> > >>> Why not adding an optional "*.help" file that would come with the *.info > >>> file? > >>> > >>> This file could have almost the same format as the *.info file, except > >>> that it includes only the help. Your script would have to generate that > >>> file - I don't know what it does exactly at the moment... > >>> > >>> The format is: > >>> > >>> # > >>> > >>> ' > >>> ' > >>> '... > >>> > >>> ... > >>> # > >>> ... > >>> > >>> Then either you keep your script, and you send me the *.help files so > >>> that I put them on the wiki server. > >>> > >>> Better would be having your script inside the source tree, and let it > >>> run automatically on the C/C++ sources with specific Makefile.am rules. > >>> > >>> That script can be written in Gambas. But then it will be run at "make > >>> install" stage, once the interpreter has been compiled. > >>> > >>> What do you think? > >>> > >> > >> Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4 > >> different languages!) piping into one another. The first four preprocess > >> the C/C++ comments and the last is a really hackish C program which takes > >> these help lines and merges them to the right place in a given .info file. > >> When I wrote these, I was all about (development) speed. It may be cool to > >> have all that in one program (and one language only). > >> > >> The above format (and an extra file for it!) would be really good because > >> that's information the program can gather from the C/C++ source files alone. > >> No need to mess with the .info files then. > >> > >> Weekend... > >> > > > > Of course I meant this weekend, not the one 3 weeks ago... > > > > The scripts are in the c2help directory in the source tree root since #6712. > > Try them on gb.openssl: > > > > $ c2help/c2help.sh gb.openssl 2>/dev/null > > #Digest > > List > > ' Return a list of all digests present in the local OpenSSL crypto library. > > _get > > ' Return a virtual object representing a digest algorithm by giving its > > ' name. Valid names can be looked up from Digest.List. > > IsSupported > > ' Check whether the named digest algorithm is valid. > > #.Digest.Method > > Hash > > ' Hash the given string using this digest algorithm. > > _call > > ' A synonym for Hash. > > #Cipher > > List > > ' Return a list of all ciphers present in the local OpenSSL crypto library. > > [...] > > > > One script is a gbs3 one, so all that needs to take place at "make install", > > as you said. Apart from that I need bash (with read and exit builtins), gawk, > > grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list. > > Shouldn't be too exotic. But in case someone doesn't have egrep, sed or gawk, > > the help generation stage should be omitted since it's optional. I see no > > need to reduce the dependencies on my side. > > > > Regards, > > Tobi > > > > The way you did is not really useful. You should have written a pure > Gambas program with no dependencies, so that it can be run at "make > install" stage automatically. > > You have introduce many dependencies, which means a lot of problems if > in the future Gambas is ported on a non-GNU system (Android, for example). > I didn't know; I committed the scripts I had lying around for a year or so, just replaced the program that merged help comments into .info files with the script that outputs .help files. To reinvent the gawk- and sed-wheels should be the complicated part here but it doesn't seem to be too hard... > Moreover, /trunk is not the location for a compilation tool. You should > have put it in /trunk/app/src for example. > I will do that on my next commit, when the thing will become a single script. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Dec 8 20:49:30 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 08 Dec 2014 20:49:30 +0100 Subject: [Gambas-user] New features on the wiki In-Reply-To: <20141208190439.GG548@...2774...> References: <545F5D8F.8040107@...1...> <20141112123922.GA1878@...2774...> <54635CE4.4020304@...1...> <20141112230753.GD1878@...2774...> <5464D1B7.9020204@...1...> <20141113201800.GB1544@...2774...> <20141206132541.GD543@...2774...> <5485F39A.7010906@...1...> <20141208190439.GG548@...2774...> Message-ID: <548600CA.20107@...1...> Le 08/12/2014 20:04, Tobias Boege a ?crit : > On Mon, 08 Dec 2014, Beno?t Minisini wrote: >> Le 06/12/2014 14:25, Tobias Boege a ?crit : >>> On Thu, 13 Nov 2014, Tobias Boege wrote: >>>>> No, the source tree may not beavailable on the wiki, only the *.info files. >>>>> >>>>> Why not adding an optional "*.help" file that would come with the *.info >>>>> file? >>>>> >>>>> This file could have almost the same format as the *.info file, except >>>>> that it includes only the help. Your script would have to generate that >>>>> file - I don't know what it does exactly at the moment... >>>>> >>>>> The format is: >>>>> >>>>> # >>>>> >>>>> ' >>>>> ' >>>>> '... >>>>> >>>>> ... >>>>> # >>>>> ... >>>>> >>>>> Then either you keep your script, and you send me the *.help files so >>>>> that I put them on the wiki server. >>>>> >>>>> Better would be having your script inside the source tree, and let it >>>>> run automatically on the C/C++ sources with specific Makefile.am rules. >>>>> >>>>> That script can be written in Gambas. But then it will be run at "make >>>>> install" stage, once the interpreter has been compiled. >>>>> >>>>> What do you think? >>>>> >>>> >>>> Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4 >>>> different languages!) piping into one another. The first four preprocess >>>> the C/C++ comments and the last is a really hackish C program which takes >>>> these help lines and merges them to the right place in a given .info file. >>>> When I wrote these, I was all about (development) speed. It may be cool to >>>> have all that in one program (and one language only). >>>> >>>> The above format (and an extra file for it!) would be really good because >>>> that's information the program can gather from the C/C++ source files alone. >>>> No need to mess with the .info files then. >>>> >>>> Weekend... >>>> >>> >>> Of course I meant this weekend, not the one 3 weeks ago... >>> >>> The scripts are in the c2help directory in the source tree root since #6712. >>> Try them on gb.openssl: >>> >>> $ c2help/c2help.sh gb.openssl 2>/dev/null >>> #Digest >>> List >>> ' Return a list of all digests present in the local OpenSSL crypto library. >>> _get >>> ' Return a virtual object representing a digest algorithm by giving its >>> ' name. Valid names can be looked up from Digest.List. >>> IsSupported >>> ' Check whether the named digest algorithm is valid. >>> #.Digest.Method >>> Hash >>> ' Hash the given string using this digest algorithm. >>> _call >>> ' A synonym for Hash. >>> #Cipher >>> List >>> ' Return a list of all ciphers present in the local OpenSSL crypto library. >>> [...] >>> >>> One script is a gbs3 one, so all that needs to take place at "make install", >>> as you said. Apart from that I need bash (with read and exit builtins), gawk, >>> grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list. >>> Shouldn't be too exotic. But in case someone doesn't have egrep, sed or gawk, >>> the help generation stage should be omitted since it's optional. I see no >>> need to reduce the dependencies on my side. >>> >>> Regards, >>> Tobi >>> >> >> The way you did is not really useful. You should have written a pure >> Gambas program with no dependencies, so that it can be run at "make >> install" stage automatically. >> >> You have introduce many dependencies, which means a lot of problems if >> in the future Gambas is ported on a non-GNU system (Android, for example). >> > > I didn't know; I committed the scripts I had lying around for a year or so, > just replaced the program that merged help comments into .info files with > the script that outputs .help files. > > To reinvent the gawk- and sed-wheels should be the complicated part here but > it doesn't seem to be too hard... Is it so hard to extract help comments? I have never thought about that, so I guess it should no be too hard to extract them with a Gambas program... -- Beno?t Minisini From gambas.fr at ...626... Mon Dec 8 22:01:41 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 8 Dec 2014 22:01:41 +0100 Subject: [Gambas-user] Accessor In-Reply-To: <5485F4B2.7060302@...1...> References: <5485F4B2.7060302@...1...> Message-ID: 2014-12-08 19:57 GMT+01:00 Beno?t Minisini : > Le 08/12/2014 15:28, Fabien Bodard a ?crit : >> I think i have used the term accessor in a bad way ... arf i've a so >> bad english :-/ >> >> 2014-12-08 15:27 GMT+01:00 Fabien Bodard : >>> What about let the class ME accessor the possibility to access to the >>> class private global value. >>> >>> >>> Private toto as integer >>> >>> Public sub _New (Toto as integer) >>> >>> me.toto = Toto >>> >>> end >>> >>> >>> >>> Actually i can't use the name Toto in the _New param because >>> >>> Toto = Toto only work on the local variable. >>> >>> -- >>> Fabien Bodard >> >> >> > > Don't use 'Toto' twice. This is the good solution, instead of letting > weird syntaxes break the language. :-P > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From horechuk at ...981... Mon Dec 8 22:34:15 2014 From: horechuk at ...981... (Paul Horechuk) Date: Mon, 08 Dec 2014 16:34:15 -0500 Subject: [Gambas-user] Bad Image format Message-ID: <54861957.1090805@...981...> Kubuntu 14.04 LTS x86_64 Gambas 3.6.2 --------------------------------------------------- Dim PageImage as Image ... Public Sub Preview() PageImage = New Image As "PageImage" Paint.Begin(PageImage) ' Bad Format PageImage.Load("picture.jpg", 0, 0, 100, 100) Paint.End End --------------------------------------------------- Could someone please explain? -- Think Free ... Use Open Source Software From jussi.lahtinen at ...626... Tue Dec 9 00:02:08 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 9 Dec 2014 01:02:08 +0200 Subject: [Gambas-user] Bad Image format In-Reply-To: <54861957.1090805@...981...> References: <54861957.1090805@...981...> Message-ID: The image must have some size, example: PageImage = New Image(10, 10) As "PageImage" Jussi On Mon, Dec 8, 2014 at 11:34 PM, Paul Horechuk wrote: > Kubuntu 14.04 LTS x86_64 > Gambas 3.6.2 > --------------------------------------------------- > Dim PageImage as Image > > ... > > Public Sub Preview() > PageImage = New Image As "PageImage" > Paint.Begin(PageImage) ' Bad Format > PageImage.Load("picture.jpg", 0, 0, 100, 100) > Paint.End > End > > --------------------------------------------------- > > Could someone please explain? > > -- > Think Free ... > Use Open Source Software > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From phorechuk at ...626... Tue Dec 9 01:08:16 2014 From: phorechuk at ...626... (Paul Horechuk) Date: Mon, 08 Dec 2014 19:08:16 -0500 Subject: [Gambas-user] Bad Image format Message-ID: Thank you. I wasn't aware of the dimension option. I will give that a try. Sent from my ASUS Pad Jussi Lahtinen wrote: >The image must have some size, example: >PageImage = New Image(10, 10) As "PageImage" > > >Jussi > >On Mon, Dec 8, 2014 at 11:34 PM, Paul Horechuk wrote: > >> Kubuntu 14.04 LTS x86_64 >> Gambas 3.6.2 >> --------------------------------------------------- >> Dim PageImage as Image >> >> ... >> >> Public Sub Preview() >> PageImage = New Image As "PageImage" >> Paint.Begin(PageImage) ' Bad Format >> PageImage.Load("picture.jpg", 0, 0, 100, 100) >> Paint.End >> End >> >> --------------------------------------------------- >> >> Could someone please explain? >> >> -- >> Think Free ... >> Use Open Source Software >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >------------------------------------------------------------------------------ >Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >from Actuate! Instantly Supercharge Your Business Reports and Dashboards >with Interactivity, Sharing, Native Excel Exports, App Integration & more >Get technology previously reserved for billion-dollar corporations, FREE >http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >_______________________________________________ >Gambas-user mailing list >Gambas-user at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Tue Dec 9 11:40:49 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 9 Dec 2014 11:40:49 +0100 Subject: [Gambas-user] Bad Image format In-Reply-To: <54861957.1090805@...981...> References: <54861957.1090805@...981...> Message-ID: Le 8 d?c. 2014 22:35, "Paul Horechuk" a ?crit : > > Kubuntu 14.04 LTS x86_64 > Gambas 3.6.2 > --------------------------------------------------- > Dim PageImage as Image > > ... > > Public Sub Preview() > PageImage = New Image As "PageImage" > Paint.Begin(PageImage) ' Bad Format > PageImage.Load("picture.jpg", 0, 0, 100, 100) > Paint.End > End > This code is all bad... Sorry Pageimage= image.load("picture.jpg") In drawingarea_draw Public sub drawingarea1_draw() Paint.drawimage(paintimage,0,0) End I hope that is what you want to achieve.... In other case give us more code please Regards > --------------------------------------------------- > > Could someone please explain? > > -- > Think Free ... > Use Open Source Software > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...2524... Tue Dec 9 13:30:00 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Tue, 09 Dec 2014 12:30:00 +0000 Subject: [Gambas-user] Issue 588 in gambas: Online documentation wiki error for listview Items. Message-ID: <0-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 588 by r... at ...1740...: Online documentation wiki error for listview Items. https://code.google.com/p/gambas/issues/detail?id=588 1) Describe the problem. Wiki displays error when trying to fetch documentation for listview items. Null object at line #1: Stack backtrace: Wiki._PrintPage.94 Wiki.Wiki.0 WebPage.__Render.31 WebPage.Render.56 Main.Main.587 gb.qt4 / _treeview.item / children 2) Give information about your system. Use the 'System information' menu in the Gambas IDE, and paste the result there. [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=3.13.0-40-generic Architecture=x86_64 Distribution=Ubuntu 14.04.1 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=7953M [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+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 3) Indicate the Gambas version in the issue labels, and if it is a bug, a crash, or an enhancement request. 4) Provide a little project that reproduces the bug or the crash. 5) If your project needs a database, try to provide it, or part of it. 6) Explain clearly how to reproduce the bug or the crash. Over over code with line with listviewName.Item. See attachement. Attachments: Screenshot from 2014-12-09 13:25:59.png 40.1 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From phorechuk at ...626... Tue Dec 9 15:00:48 2014 From: phorechuk at ...626... (Paul Horechuk) Date: Tue, 09 Dec 2014 09:00:48 -0500 Subject: [Gambas-user] Bad Image format Message-ID: The actual purpose of the code is to get rid of the DrawingArea. I have a program that currently prints an area (not an image/Picture/DrawingArea). It uses Begin(MyPrinter), various Paint commands, and Image.Load to position text and graphics, directly to the printer. The routine does work. Then I decided to add a print preview process. Using Begin(MyImage) and the same commands as before, save the new image to disk, and then use the Image.Load in the printer section. So following a similar process as before, I encountered the Bad Image Format error. Is there a working way to build a Picture/Image so that it can be saved? Sent from my ASUS Pad Fabien Bodard wrote: >Le 8 d?c. 2014 22:35, "Paul Horechuk" a ?crit : >> >> Kubuntu 14.04 LTS x86_64 >> Gambas 3.6.2 >> --------------------------------------------------- >> Dim PageImage as Image >> >> ... >> >> Public Sub Preview() >> PageImage = New Image As "PageImage" >> Paint.Begin(PageImage) ' Bad Format >> PageImage.Load("picture.jpg", 0, 0, 100, 100) >> Paint.End >> End >> > >This code is all bad... Sorry >Pageimage= image.load("picture.jpg") > >In drawingarea_draw > >Public sub drawingarea1_draw() >Paint.drawimage(paintimage,0,0) > >End >I hope that is what you want to achieve.... In other case give us more code >please > >Regards > >> --------------------------------------------------- >> >> Could someone please explain? >> >> -- >> Think Free ... >> Use Open Source Software >> >> >> >------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >------------------------------------------------------------------------------ >Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >from Actuate! Instantly Supercharge Your Business Reports and Dashboards >with Interactivity, Sharing, Native Excel Exports, App Integration & more >Get technology previously reserved for billion-dollar corporations, FREE >http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >_______________________________________________ >Gambas-user mailing list >Gambas-user at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Tue Dec 9 15:16:46 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 9 Dec 2014 15:16:46 +0100 Subject: [Gambas-user] Bad Image format In-Reply-To: References: Message-ID: yes in pseudo code : myimage = new image(with, height, backcolor) paint.begin(myimage) paint.whatyouwant paint.end myimage.save("myfile.ext") 2014-12-09 15:00 GMT+01:00 Paul Horechuk : > The actual purpose of the code is to get rid of the DrawingArea. I have a program that currently prints an area (not an image/Picture/DrawingArea). It uses Begin(MyPrinter), various Paint commands, and Image.Load to position text and graphics, directly to the printer. The routine does work. > > Then I decided to add a print preview process. Using Begin(MyImage) and the same commands as before, save the new image to disk, and then use the Image.Load in the printer section. So following a similar process as before, I encountered the Bad Image Format error. > > Is there a working way to build a Picture/Image so that it can be saved? > > Sent from my ASUS Pad > > Fabien Bodard wrote: > >>Le 8 d?c. 2014 22:35, "Paul Horechuk" a ?crit : >>> >>> Kubuntu 14.04 LTS x86_64 >>> Gambas 3.6.2 >>> --------------------------------------------------- >>> Dim PageImage as Image >>> >>> ... >>> >>> Public Sub Preview() >>> PageImage = New Image As "PageImage" >>> Paint.Begin(PageImage) ' Bad Format >>> PageImage.Load("picture.jpg", 0, 0, 100, 100) >>> Paint.End >>> End >>> >> >>This code is all bad... Sorry >>Pageimage= image.load("picture.jpg") >> >>In drawingarea_draw >> >>Public sub drawingarea1_draw() >>Paint.drawimage(paintimage,0,0) >> >>End >>I hope that is what you want to achieve.... In other case give us more code >>please >> >>Regards >> >>> --------------------------------------------------- >>> >>> Could someone please explain? >>> >>> -- >>> Think Free ... >>> Use Open Source Software >>> >>> >>> >>------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>------------------------------------------------------------------------------ >>Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>with Interactivity, Sharing, Native Excel Exports, App Integration & more >>Get technology previously reserved for billion-dollar corporations, FREE >>http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>_______________________________________________ >>Gambas-user mailing list >>Gambas-user at lists.sourceforge.net >>https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From taboege at ...626... Tue Dec 9 16:26:10 2014 From: taboege at ...626... (Tobias Boege) Date: Tue, 9 Dec 2014 16:26:10 +0100 Subject: [Gambas-user] Make -> Installation package: Visual problem Message-ID: <20141209152610.GE2486@...2774...> Hi, there is a visual bug in the Make -> Installation package dialog. The line numbers are covered by the text in the Editor. See attached screenshot from a Ubuntu system. It happens on my Arch Linux, too. Anything else needed? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto vom 2014-12-07 14:57:55.png Type: image/png Size: 95090 bytes Desc: not available URL: From horechuk at ...981... Tue Dec 9 16:43:01 2014 From: horechuk at ...981... (Paul Horechuk) Date: Tue, 09 Dec 2014 10:43:01 -0500 Subject: [Gambas-user] Bad Image format In-Reply-To: References: Message-ID: <54871885.20102@...981...> Thank you. Specifying the image dimensions did the trick. Now that I have a saved image, I can isolate it from the printer requirements. On 14-12-09 09:16 AM, Fabien Bodard wrote: > yes > > in pseudo code : > > myimage = new image(with, height, backcolor) > > paint.begin(myimage) > > paint.whatyouwant > > paint.end > > myimage.save("myfile.ext") > > > 2014-12-09 15:00 GMT+01:00 Paul Horechuk : >> The actual purpose of the code is to get rid of the DrawingArea. I have a program that currently prints an area (not an image/Picture/DrawingArea). It uses Begin(MyPrinter), various Paint commands, and Image.Load to position text and graphics, directly to the printer. The routine does work. >> >> Then I decided to add a print preview process. Using Begin(MyImage) and the same commands as before, save the new image to disk, and then use the Image.Load in the printer section. So following a similar process as before, I encountered the Bad Image Format error. >> >> Is there a working way to build a Picture/Image so that it can be saved? >> >> Sent from my ASUS Pad >> >> Fabien Bodard wrote: >> >>> Le 8 d?c. 2014 22:35, "Paul Horechuk" a ?crit : >>>> Kubuntu 14.04 LTS x86_64 >>>> Gambas 3.6.2 >>>> --------------------------------------------------- >>>> Dim PageImage as Image >>>> >>>> ... >>>> >>>> Public Sub Preview() >>>> PageImage = New Image As "PageImage" >>>> Paint.Begin(PageImage) ' Bad Format >>>> PageImage.Load("picture.jpg", 0, 0, 100, 100) >>>> Paint.End >>>> End >>>> >>> This code is all bad... Sorry >>> Pageimage= image.load("picture.jpg") >>> >>> In drawingarea_draw >>> >>> Public sub drawingarea1_draw() >>> Paint.drawimage(paintimage,0,0) >>> >>> End >>> I hope that is what you want to achieve.... In other case give us more code >>> please >>> >>> Regards >>> >>>> --------------------------------------------------- >>>> >>>> Could someone please explain? >>>> >>>> -- >>>> Think Free ... >>>> Use Open Source Software >>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>>> Get technology previously reserved for billion-dollar corporations, FREE >>>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> >from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- Think Free ... Use Open Source Software From jussi.lahtinen at ...626... Tue Dec 9 17:30:42 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 9 Dec 2014 18:30:42 +0200 Subject: [Gambas-user] Questions about compiler options Message-ID: What "define the 'Exec' preprocessor constant" means? Is there some undocumented Exec constant? Also there seems to be "add debugging information" option, but it seems debugging information is added by default. Is there command line option to remove the debugging information? Jussi From gambas at ...1... Tue Dec 9 18:40:03 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 09 Dec 2014 18:40:03 +0100 Subject: [Gambas-user] Questions about compiler options In-Reply-To: References: Message-ID: <548733F3.7030106@...1...> Le 09/12/2014 17:30, Jussi Lahtinen a ?crit : > What "define the 'Exec' preprocessor constant" means? Is there some > undocumented Exec constant? Yes. This is used by the IDE when compiling the entire project to make an executable. Don't use it in your programs. > > Also there seems to be "add debugging information" option, but it seems > debugging information is added by default. Is there command line option to > remove the debugging information? No, because by default there is no debugging information. When you compile from the IDE, the '-g' option is automatically added, unless when making an executable where you have an option to not generate them. But then you lose detailed backtraces when an error occurs. Regards, -- Beno?t Minisini From gambas at ...1... Tue Dec 9 19:45:51 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 09 Dec 2014 19:45:51 +0100 Subject: [Gambas-user] Make -> Installation package: Visual problem In-Reply-To: <20141209152610.GE2486@...2774...> References: <20141209152610.GE2486@...2774...> Message-ID: <5487435F.1060908@...1...> Le 09/12/2014 16:26, Tobias Boege a ?crit : > Hi, > > there is a visual bug in the Make -> Installation package dialog. The line > numbers are covered by the text in the Editor. See attached screenshot from > a Ubuntu system. It happens on my Arch Linux, too. Anything else needed? > > Regards, > Tobi > Fixed in revision #6714. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Dec 9 21:32:19 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 9 Dec 2014 22:32:19 +0200 Subject: [Gambas-user] Questions about compiler options In-Reply-To: <548733F3.7030106@...1...> References: <548733F3.7030106@...1...> Message-ID: > > What "define the 'Exec' preprocessor constant" means? Is there some > > undocumented Exec constant? > > Yes. This is used by the IDE when compiling the entire project to make > an executable. Don't use it in your programs. > OK. I'm trying to figure out easy way to test JIT with my GambasTester. But I would need to exclude some code when JIT is in use. > No, because by default there is no debugging information. When you > compile from the IDE, the '-g' option is automatically added, unless > when making an executable where you have an option to not generate them. > But then you lose detailed backtraces when an error occurs. > I tested this with following code: #If Debug Print "Test!!" #Endif $ gbc3 OK $ gbx3 Test!! Something wrong with the code I used to test this? Jussi From gambas at ...2524... Wed Dec 10 00:10:50 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Tue, 09 Dec 2014 23:10:50 +0000 Subject: [Gambas-user] Issue 257 in gambas: Database password retrieval error and abort in IDE In-Reply-To: <18-6813199134517018827-17207463185108027121-gambas=googlecode.com@...2524...> References: <18-6813199134517018827-17207463185108027121-gambas=googlecode.com@...2524...> <0-6813199134517018827-17207463185108027121-gambas=googlecode.com@...2524...> Message-ID: <19-6813199134517018827-17207463185108027121-gambas=googlecode.com@...2524...> Comment #19 on issue 257 by eofficec... at ...626...: Database password retrieval error and abort in IDE https://code.google.com/p/gambas/issues/detail?id=257 hi guy i have the same problem (use gambas 3 ) , common.checkdb.34 i use lubuntu 14 and i add component gb.desktop , and gb.desktop.gnome , but have the same problem , somthing have some idea'' -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From kevinfishburne at ...1887... Thu Dec 11 08:54:32 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Thu, 11 Dec 2014 02:54:32 -0500 Subject: [Gambas-user] IDE CR/LF bug with improperly indented comment line after If...Then...Else...Endif Message-ID: <54894DB8.10004@...1887...> If you have an If...Then...Else...Endif block where there is an improperly indented comment line after the initial If, pressing Enter at the end of the If line will mistakenly insert and Endifbelow it.Example: ' Check if ship is player ship. If Ship[ShipIndex].Type = 0 Then ' Play player ship firing sound effect. AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) Else ' Play NPC ship firing sound effect. AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) Endif Becomes this when pressing Enter after the initial "Then": ' Check if ship is player ship. If Ship[ShipIndex].Type = 0 Then Endif ' Play player ship firing sound effect. AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) Else ' Play NPC ship firing sound effect. AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) Endif Minor issue, but every time a bug dies an angel gets its wings. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From greg.raffaelle at ...2755... Thu Dec 11 20:32:53 2014 From: greg.raffaelle at ...2755... (Greg Raffaelle) Date: Thu, 11 Dec 2014 13:32:53 -0600 Subject: [Gambas-user] Display svg and tabstrip use questions Message-ID: <5489F165.6000903@...2755...> I have two programming questions I hope someone can help me with. 1) What are the programming statements to load a .svg file and display the image in a drawing area? 2) In a tabstrip with multiple tabs I have a different named drawing area on each tab. I am trying to display different images on each tab. But when I use Draw.Image to place the image in the drawing area of the first tab the image appears on all tabs. Is there a way to place different images on each tab? I am using Gambas3 on Ubuntu 12.04. I appreciate the assistance. Thanks, Greg From gambas.fr at ...626... Thu Dec 11 17:29:59 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 11 Dec 2014 17:29:59 +0100 Subject: [Gambas-user] Display svg and tabstrip use questions In-Reply-To: <5489F165.6000903@...2755...> References: <5489F165.6000903@...2755...> Message-ID: You need to use a SVGImage variable dim hImage as svgImage hImage = svgImage.Load("mysvg.svg") in the _draw event hImage.Paint To resize the svgimage draw you need to use the paint matrix transformation such as scale and others. 2014-12-11 20:32 GMT+01:00 Greg Raffaelle : > I have two programming questions I hope someone can help me with. > > 1) What are the programming statements to load a .svg file and display > the image in a drawing area? > > 2) In a tabstrip with multiple tabs I have a different named drawing > area on each tab. I am trying to display different images on each tab. > But when I use Draw.Image to place the image in the drawing area of > the first tab the image appears on all tabs. Is there a way to place > different images on each tab? > > I am using Gambas3 on Ubuntu 12.04. > > I appreciate the assistance. > > Thanks, > Greg > > > > > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From gambas at ...1... Thu Dec 11 21:27:27 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 11 Dec 2014 21:27:27 +0100 Subject: [Gambas-user] Bug: Mageia packages made by IDE do not install application icon in distro menu In-Reply-To: <5484F4AB.9020202@...626...> References: <1409486087.3303.8.camel@...3024...> <547F7B1F.4040903@...626...> <5484F4AB.9020202@...626...> Message-ID: <5489FE2F.2000602@...1...> Le 08/12/2014 01:45, T Lee Davidson a ?crit : > On 12/03/2014 04:05 PM, T Lee Davidson wrote: >> On 08/31/2014 07:54 AM, Willy Raets wrote: >>> Hi all, >>> >>> Lee (also on this mailinglist) did some testing of an application of >>> mine. >>> He reported that when installing the rpm he had script errors. >>> The application did install and had a menu entry, but no icon was >>> present for the entry. >>> >>> When I run the .deb files on Mint icon are properly made for the distro >>> menu entry. >>> >>> So the problem seems to be in the mageia package as made by the IDE. >> >> I believe, with the help of gbWilly who did testing on Linux Mint 13 >> (which is based on Ubuntu 12.04), I have determined the cause of the >> script errors and the icon installation issue (and a temporary "fix"). >> >> The SPEC file generated by Gambas relies on build macros that may not be >> defined on a Ubuntu-based system. These macros are defined in >> '20build.macros' which, at least on Willy's system, does not exist. >> >> So, here is my suggestion to fix this, Beno?t. >> >> In the SPEC file, define the _iconsdir, _miconsdir, and _liconsdir >> macros as follows: >> %define _iconsdir %{_datadir}/icons >> %define _miconsdir %{_datadir}/icons/mini >> %define _liconsdir %{_datadir}/icons/large >> >> Then, simply remove "%{update_menus}" and "%{clean_menus}". They, on my >> system, expand to "%{nil}" anyway. >> >> I renamed '20build.macros' so these macros would not be available, >> modified a Gambas-generated package SPEC file as suggested above, and >> rebuilt the package. It built and installed with no errors and correctly >> attributed the application icon to the menu entry. >> >> >> If and until this is fixed in Gambas, I have attached a project file >> that users with Ubuntu-based systems may be able to use to "fix" their >> systems (ie. add the macro definitions) to facilitate making no-error >> RPM-based packages on their systems. > > Well I was mistaken. The project I created modifies the user's > ~/.rpmmacros file to define the macros that are used by the Gambas > packager. However, a look at the gambas3 Package.module shows that the > ~./rpmmacros file is set aside during the packaging process. > > The project I attached won't fix anything. The required macros will need > to be fully defined in the Package.module. > > OK, it should be fixed in revision #6716. Regards, -- Beno?t Minisini From gambas at ...2524... Thu Dec 11 21:48:50 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 11 Dec 2014 20:48:50 +0000 Subject: [Gambas-user] Issue 588 in gambas: Online documentation wiki error for listview Items. In-Reply-To: <0-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> Updates: Status: Accepted Labels: -Version Version-3.6.0 Comment #1 on issue 588 by benoit.m... at ...626...: Online documentation wiki error for listview Items. https://code.google.com/p/gambas/issues/detail?id=588 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Dec 11 22:00:23 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 11 Dec 2014 21:00:23 +0000 Subject: [Gambas-user] Issue 588 in gambas: Online documentation wiki error for listview Items. In-Reply-To: <1-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> <0-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-12634578265956418388-gambas=googlecode.com@...2524...> Updates: Status: Fixed Comment #2 on issue 588 by benoit.m... at ...626...: Online documentation wiki error for listview Items. https://code.google.com/p/gambas/issues/detail?id=588 Fixed in revision #6717. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...1... Thu Dec 11 22:42:40 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Thu, 11 Dec 2014 22:42:40 +0100 Subject: [Gambas-user] IDE CR/LF bug with improperly indented comment line after If...Then...Else...Endif In-Reply-To: <54894DB8.10004@...1887...> References: <54894DB8.10004@...1887...> Message-ID: <548A0FD0.3030505@...1...> Le 11/12/2014 08:54, Kevin Fishburne a ?crit : > If you have an If...Then...Else...Endif block where there is an > improperly indented comment line after the initial If, pressing Enter at > the end of the If line will mistakenly insert and Endifbelow it.Example: > > ' Check if ship is player ship. > If Ship[ShipIndex].Type = 0 Then > ' Play player ship firing sound effect. > AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, > Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) > Else > ' Play NPC ship firing sound effect. > AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, > Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) > Endif > > Becomes this when pressing Enter after the initial "Then": > > ' Check if ship is player ship. > If Ship[ShipIndex].Type = 0 Then > > Endif > ' Play player ship firing sound effect. > AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, > Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) > Else > ' Play NPC ship firing sound effect. > AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, > Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) > Endif > > Minor issue, but every time a bug dies an angel gets its wings. > It's not really a bug. Anyway I fix it in revision #6719 by ignoring comment lines when analysing the indentation to decide if the control structure must be completed or not. Regards, -- Beno?t Minisini From kevinfishburne at ...1887... Fri Dec 12 11:08:18 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Fri, 12 Dec 2014 05:08:18 -0500 Subject: [Gambas-user] IDE CR/LF bug with improperly indented comment line after If...Then...Else...Endif In-Reply-To: <548A0FD0.3030505@...1...> References: <54894DB8.10004@...1887...> <548A0FD0.3030505@...1...> Message-ID: <548ABE92.8020209@...1887...> On 12/11/2014 04:42 PM, Beno?t Minisini wrote: > Le 11/12/2014 08:54, Kevin Fishburne a ?crit : >> If you have an If...Then...Else...Endif block where there is an >> improperly indented comment line after the initial If, pressing Enter at >> the end of the If line will mistakenly insert and Endifbelow it.Example: >> >> ' Check if ship is player ship. >> If Ship[ShipIndex].Type = 0 Then >> ' Play player ship firing sound effect. >> AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, >> Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) >> Else >> ' Play NPC ship firing sound effect. >> AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, >> Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) >> Endif >> >> Becomes this when pressing Enter after the initial "Then": >> >> ' Check if ship is player ship. >> If Ship[ShipIndex].Type = 0 Then >> >> Endif >> ' Play player ship firing sound effect. >> AudioCreate("laser_3.wav", Bullet[BulletIndex].PositionX, >> Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.15, 0, 0) >> Else >> ' Play NPC ship firing sound effect. >> AudioCreate("laser_2.wav", Bullet[BulletIndex].PositionX, >> Bullet[BulletIndex].PositionY, Bullet[BulletIndex].PositionZ, 0.5, 0, 0) >> Endif >> >> Minor issue, but every time a bug dies an angel gets its wings. >> > It's not really a bug. Anyway I fix it in revision #6719 by ignoring > comment lines when analysing the indentation to decide if the control > structure must be completed or not. > Thanks. I assumed GAMBAS recursed through subsequent If...Then..Else..EndIf's to determine whether code should be autocreated as a convenience. I didn't realize it was indentation-based. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From jussi.lahtinen at ...626... Fri Dec 12 14:07:43 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Dec 2014 15:07:43 +0200 Subject: [Gambas-user] Software farm Message-ID: How do I see all the examples in Software Farm? Option show all? Maybe not all of them are there yet... Jussi From gambas at ...1... Fri Dec 12 14:19:22 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 12 Dec 2014 14:19:22 +0100 Subject: [Gambas-user] Software farm In-Reply-To: References: Message-ID: <548AEB5A.9090807@...1...> Le 12/12/2014 14:07, Jussi Lahtinen a ?crit : > How do I see all the examples in Software Farm? Option show all? > Maybe not all of them are there yet... > > > Jussi It's not finished yet. The idea is that each software has a vendor, and that all examples are under the vendor named "Example". So "Example" is a "reserved" vendor name. "Gambas" will be another reserved vendor name. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Dec 12 14:28:35 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Dec 2014 15:28:35 +0200 Subject: [Gambas-user] Software farm In-Reply-To: <548AEB5A.9090807@...1...> References: <548AEB5A.9090807@...1...> Message-ID: OK. Maybe show "Most recent" etc should be "Most recent first". Because now it's not clear the option is merely for sorting. Of course option "Installed" is different thing... Also, maybe vendors could be offered instead of freely written in the field? Jussi On Fri, Dec 12, 2014 at 3:19 PM, Beno?t Minisini < gambas at ...1...> wrote: > > Le 12/12/2014 14:07, Jussi Lahtinen a ?crit : > > How do I see all the examples in Software Farm? Option show all? > > Maybe not all of them are there yet... > > > > > > Jussi > > It's not finished yet. > > The idea is that each software has a vendor, and that all examples are > under the vendor named "Example". > > So "Example" is a "reserved" vendor name. "Gambas" will be another > reserved vendor name. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Fri Dec 12 14:38:58 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Fri, 12 Dec 2014 14:38:58 +0100 Subject: [Gambas-user] Software farm In-Reply-To: References: <548AEB5A.9090807@...1...> Message-ID: <548AEFF2.5060903@...1...> Le 12/12/2014 14:28, Jussi Lahtinen a ?crit : > OK. Maybe show "Most recent" etc should be "Most recent first". Because now > it's not clear the option is merely for sorting. Of course option > "Installed" is different thing... > Also, maybe vendors could be offered instead of freely written in the field? > > > Jussi > Vendor name is a free string, they are not listed by the database. -- Beno?t Minisini From gambas at ...1... Fri Dec 12 14:39:54 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Fri, 12 Dec 2014 14:39:54 +0100 Subject: [Gambas-user] Software farm In-Reply-To: <548AEFF2.5060903@...1...> References: <548AEB5A.9090807@...1...> <548AEFF2.5060903@...1...> Message-ID: <548AF02A.6080503@...1...> Le 12/12/2014 14:38, Beno?t Minisini a ?crit : > Le 12/12/2014 14:28, Jussi Lahtinen a ?crit : >> OK. Maybe show "Most recent" etc should be "Most recent first". >> Because now >> it's not clear the option is merely for sorting. Of course option >> "Installed" is different thing... >> Also, maybe vendors could be offered instead of freely written in the >> field? >> >> >> Jussi >> > > Vendor name is a free string, they are not listed by the database. > I just had an idea: making a tag from the vendor name. -- Beno?t Minisini From lvdave at ...626... Fri Dec 12 14:54:58 2014 From: lvdave at ...626... (LVDave) Date: Fri, 12 Dec 2014 05:54:58 -0800 Subject: [Gambas-user] Install from Ubuntu repo - several issues Message-ID: Having used to use MSVisualBasic many moons ago, I wanted to see how close Gambas was to VB. Since I'm on Ubuntu 14.04, I installed Gambas from the Ubuntu repository. Everything installed with no errors, but when I attempt to open any one of the sample projects, I get a dialog box saying "this project seems to be already opened, opening the same project twice can lead to data loss"...If I go ahead and "reopen" the sample, it appears to load ok, but then if I try to run it, I get a dialog box saying "the program has returned the value of 1"... As I said this occurs with all of the sample programs.. What am I doing wrong?? Dave From willy at ...2734... Fri Dec 12 15:22:51 2014 From: willy at ...2734... (Willy Raets) Date: Fri, 12 Dec 2014 15:22:51 +0100 Subject: [Gambas-user] Install from Ubuntu repo - several issues In-Reply-To: References: Message-ID: <1418394171.5240.6.camel@...3024...> On vr, 2014-12-12 at 05:54 -0800, LVDave wrote: > Having used to use MSVisualBasic many moons ago, I wanted to see how close > Gambas was to VB. Since I'm on Ubuntu 14.04, I installed Gambas from the > Ubuntu repository. Everything installed with no errors, but when I attempt > to open any one of the sample projects, I get a dialog box saying "this > project seems to be already opened, opening the same project twice can lead > to data loss"...If I go ahead and "reopen" the sample, it appears to load > ok, but then if I try to run it, I get a dialog box saying "the program has > returned the value of 1"... As I said this occurs with all of the sample > programs.. > > What am I doing wrong?? As far as I know Ubuntu 14.04 official repository has a very outdated Gambas 3.1.1. Since Gambas 3.1.1, many bugs have been fixed and the latest stable version is Gambas 3.6.2 I suggest you first remove the current install (if it is Gambas 3.1.1) and next install the most recent stable Gambas 3.6.2 from the Gambas-team PPA. The instructions to install latest stable from binaries (PPA) are in the Gambas wiki: http://gambaswiki.org/wiki/install/ubuntu#t2 If after all this you still have problems with the examples just let us know. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From bagoneo at ...69... Fri Dec 12 16:34:58 2014 From: bagoneo at ...69... (Gian) Date: Fri, 12 Dec 2014 16:34:58 +0100 Subject: [Gambas-user] Install from Ubuntu repo - several issues In-Reply-To: <1418394171.5240.6.camel@...3024...> References: <1418394171.5240.6.camel@...3024...> Message-ID: <548B0B22.3040104@...69...> Il 12/12/2014 15:22, Willy Raets ha scritto: > On vr, 2014-12-12 at 05:54 -0800, LVDave wrote: >> Having used to use MSVisualBasic many moons ago, I wanted to see how close >> Gambas was to VB. Since I'm on Ubuntu 14.04, I installed Gambas from the >> Ubuntu repository. Everything installed with no errors, but when I attempt >> to open any one of the sample projects, I get a dialog box saying "this >> project seems to be already opened, opening the same project twice can lead >> to data loss"...If I go ahead and "reopen" the sample, it appears to load >> ok, but then if I try to run it, I get a dialog box saying "the program has >> returned the value of 1"... As I said this occurs with all of the sample >> programs.. >> >> What am I doing wrong?? > > As far as I know Ubuntu 14.04 official repository has a very outdated > Gambas 3.1.1. > > Since Gambas 3.1.1, many bugs have been fixed and the latest stable > version is Gambas 3.6.2 > > I suggest you first remove the current install (if it is Gambas 3.1.1) > and next install the most recent stable Gambas 3.6.2 from the > Gambas-team PPA. > > The instructions to install latest stable from binaries (PPA) are in the > Gambas wiki: > http://gambaswiki.org/wiki/install/ubuntu#t2 > > If after all this you still have problems with the examples just let us > know. > > Follow the good advice of Willy, then secondly open the terminal and type: sudo chmod -R 777 /usr/share/gambas3 to take full examples. Regards Gianluigi From dosida at ...626... Fri Dec 12 16:36:18 2014 From: dosida at ...626... (Dimitris Anogiatis) Date: Fri, 12 Dec 2014 08:36:18 -0700 Subject: [Gambas-user] Install from Ubuntu repo - several issues In-Reply-To: <1418394171.5240.6.camel@...3024...> References: <1418394171.5240.6.camel@...3024...> Message-ID: Dave, The examples stored are in a folder with different permissions. You need to save the example you're trying to a different location, ie to your home directory. After you do that the example will compile and run properly. I hope this helps Dimitris On Fri, Dec 12, 2014 at 7:22 AM, Willy Raets wrote: > > On vr, 2014-12-12 at 05:54 -0800, LVDave wrote: > > Having used to use MSVisualBasic many moons ago, I wanted to see how > close > > Gambas was to VB. Since I'm on Ubuntu 14.04, I installed Gambas from the > > Ubuntu repository. Everything installed with no errors, but when I > attempt > > to open any one of the sample projects, I get a dialog box saying "this > > project seems to be already opened, opening the same project twice can > lead > > to data loss"...If I go ahead and "reopen" the sample, it appears to load > > ok, but then if I try to run it, I get a dialog box saying "the program > has > > returned the value of 1"... As I said this occurs with all of the sample > > programs.. > > > > What am I doing wrong?? > > As far as I know Ubuntu 14.04 official repository has a very outdated > Gambas 3.1.1. > > Since Gambas 3.1.1, many bugs have been fixed and the latest stable > version is Gambas 3.6.2 > > I suggest you first remove the current install (if it is Gambas 3.1.1) > and next install the most recent stable Gambas 3.6.2 from the > Gambas-team PPA. > > The instructions to install latest stable from binaries (PPA) are in the > Gambas wiki: > http://gambaswiki.org/wiki/install/ubuntu#t2 > > If after all this you still have problems with the examples just let us > know. > > > -- > Kind regards, > > Willy (aka gbWilly) > > http://gambasshowcase.org/ > http://howtogambas.org > http://gambos.org > > > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Fri Dec 12 17:02:41 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 17:02:41 +0100 Subject: [Gambas-user] Software farm In-Reply-To: <548AF02A.6080503@...1...> References: <548AEB5A.9090807@...1...> <548AEFF2.5060903@...1...> <548AF02A.6080503@...1...> Message-ID: I have a stupide query ... and when i have dowload the file how do i open it ???? Maybe it miss a button on the software list plus in the software detail... 2014-12-12 14:39 GMT+01:00 Beno?t Minisini : > Le 12/12/2014 14:38, Beno?t Minisini a ?crit : >> Le 12/12/2014 14:28, Jussi Lahtinen a ?crit : >>> OK. Maybe show "Most recent" etc should be "Most recent first". >>> Because now >>> it's not clear the option is merely for sorting. Of course option >>> "Installed" is different thing... >>> Also, maybe vendors could be offered instead of freely written in the >>> field? >>> >>> >>> Jussi >>> >> >> Vendor name is a free string, they are not listed by the database. >> > > I just had an idea: making a tag from the vendor name. > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > 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... Fri Dec 12 17:04:41 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 17:04:41 +0100 Subject: [Gambas-user] Software farm In-Reply-To: References: <548AEB5A.9090807@...1...> <548AEFF2.5060903@...1...> <548AF02A.6080503@...1...> Message-ID: Maybe a tab in the open project... or a fixed favoris for locaed the dowload sources. 2014-12-12 17:02 GMT+01:00 Fabien Bodard : > I have a stupide query ... and when i have dowload the file how do i > open it ???? Maybe it miss a button on the software list plus in the > software detail... > > 2014-12-12 14:39 GMT+01:00 Beno?t Minisini : >> Le 12/12/2014 14:38, Beno?t Minisini a ?crit : >>> Le 12/12/2014 14:28, Jussi Lahtinen a ?crit : >>>> OK. Maybe show "Most recent" etc should be "Most recent first". >>>> Because now >>>> it's not clear the option is merely for sorting. Of course option >>>> "Installed" is different thing... >>>> Also, maybe vendors could be offered instead of freely written in the >>>> field? >>>> >>>> >>>> Jussi >>>> >>> >>> Vendor name is a free string, they are not listed by the database. >>> >> >> I just had an idea: making a tag from the vendor name. >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard -- Fabien Bodard From seany at ...3224... Fri Dec 12 17:32:25 2014 From: seany at ...3224... (Sean Sayandeep Khan) Date: Fri, 12 Dec 2014 17:32:25 +0100 Subject: [Gambas-user] Drawing a Line in openGL Message-ID: Hello I would expect the attached code to draw a line in the opengl viewer. However, the attempt to do the same is failing - the viewer is empty. Please advise. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: gl_line-0.0.1.tar.gz Type: application/gzip Size: 4605 bytes Desc: not available URL: From jussi.lahtinen at ...626... Fri Dec 12 19:04:38 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Dec 2014 20:04:38 +0200 Subject: [Gambas-user] Software farm In-Reply-To: References: <548AEB5A.9090807@...1...> <548AEFF2.5060903@...1...> <548AF02A.6080503@...1...> Message-ID: Open project --> drop down menu above directory tree view --> Installed Softwares I agree it would be nice if it would be more visible. Jussi On Fri, Dec 12, 2014 at 6:04 PM, Fabien Bodard wrote: > > Maybe a tab in the open project... or a fixed favoris for locaed the > dowload sources. > > > > 2014-12-12 17:02 GMT+01:00 Fabien Bodard : > > I have a stupide query ... and when i have dowload the file how do i > > open it ???? Maybe it miss a button on the software list plus in the > > software detail... > > > > 2014-12-12 14:39 GMT+01:00 Beno?t Minisini >: > >> Le 12/12/2014 14:38, Beno?t Minisini a ?crit : > >>> Le 12/12/2014 14:28, Jussi Lahtinen a ?crit : > >>>> OK. Maybe show "Most recent" etc should be "Most recent first". > >>>> Because now > >>>> it's not clear the option is merely for sorting. Of course option > >>>> "Installed" is different thing... > >>>> Also, maybe vendors could be offered instead of freely written in the > >>>> field? > >>>> > >>>> > >>>> Jussi > >>>> > >>> > >>> Vendor name is a free string, they are not listed by the database. > >>> > >> > >> I just had an idea: making a tag from the vendor name. > >> > >> -- > >> Beno?t Minisini > >> > >> > ------------------------------------------------------------------------------ > >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards > >> with Interactivity, Sharing, Native Excel Exports, App Integration & > more > >> Get technology previously reserved for billion-dollar corporations, FREE > >> > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > -- > > Fabien Bodard > > > > -- > Fabien Bodard > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Fri Dec 12 22:03:43 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 22:03:43 +0100 Subject: [Gambas-user] bug on farm Message-ID: Install beast scroll ... open it ... try to launch (there is a bug on firework.png) ... close it... remove from the farm installed... reinstall ... give an error file already exist -- Fabien Bodard From gambas at ...1... Fri Dec 12 22:21:40 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 12 Dec 2014 22:21:40 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: References: Message-ID: <548B5C64.8090602@...1...> Le 12/12/2014 22:03, Fabien Bodard a ?crit : > Install beast scroll ... open it ... try to launch (there is a bug on > firework.png) ... close it... remove from the farm installed... > reinstall ... give an error file already exist > It should work now with revision #6727. I have a strange behaviour when displaying the softwares: the 'GnuBoxWorld' example is far longer to appear than the other softwares. Do you have the same behaviour? -- Beno?t Minisini From gambas.fr at ...626... Fri Dec 12 22:32:29 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 22:32:29 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: <548B5C64.8090602@...1...> References: <548B5C64.8090602@...1...> Message-ID: 2014-12-12 22:21 GMT+01:00 Beno?t Minisini : > Le 12/12/2014 22:03, Fabien Bodard a ?crit : >> Install beast scroll ... open it ... try to launch (there is a bug on >> firework.png) ... close it... remove from the farm installed... >> reinstall ... give an error file already exist >> > > It should work now with revision #6727. > > I have a strange behaviour when displaying the softwares: the > 'GnuBoxWorld' example is far longer to appear than the other softwares. > Do you have the same behaviour? yes i've this behaviour too... strange > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > 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... Fri Dec 12 22:36:37 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 22:36:37 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: References: <548B5C64.8090602@...1...> Message-ID: and when you go to the app desc and then back the label remain empty. i've an error on beastscroll ... see the attached screenshot. 2014-12-12 22:32 GMT+01:00 Fabien Bodard : > 2014-12-12 22:21 GMT+01:00 Beno?t Minisini : >> Le 12/12/2014 22:03, Fabien Bodard a ?crit : >>> Install beast scroll ... open it ... try to launch (there is a bug on >>> firework.png) ... close it... remove from the farm installed... >>> reinstall ... give an error file already exist >>> >> >> It should work now with revision #6727. >> >> I have a strange behaviour when displaying the softwares: the >> 'GnuBoxWorld' example is far longer to appear than the other softwares. >> Do you have the same behaviour? > > yes i've this behaviour too... strange > >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard -- Fabien Bodard -------------- next part -------------- A non-text attachment was scrubbed... Name: capture11.png Type: image/png Size: 29865 bytes Desc: not available URL: From gambas at ...1... Fri Dec 12 22:54:04 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 12 Dec 2014 22:54:04 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: References: <548B5C64.8090602@...1...> Message-ID: <548B63FC.8070507@...1...> Le 12/12/2014 22:36, Fabien Bodard a ?crit : > and when you go to the app desc and then back the label remain empty. > > i've an error on beastscroll ... see the attached screenshot. > Did you try to uninstall and reload the package? Anyway, the checksum is checked when downloading, so maybe there is a problem on your machine... Can you open the png file with a GTK+ program? -- Beno?t Minisini From gambas.fr at ...626... Fri Dec 12 23:25:24 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 12 Dec 2014 23:25:24 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: <548B63FC.8070507@...1...> References: <548B5C64.8090602@...1...> <548B63FC.8070507@...1...> Message-ID: Le fichier est d?fectueux aussi bien dans les dossiers exemples que dans la ferme !!... il faut un backup 2014-12-12 22:54 GMT+01:00 Beno?t Minisini : > Le 12/12/2014 22:36, Fabien Bodard a ?crit : >> and when you go to the app desc and then back the label remain empty. >> >> i've an error on beastscroll ... see the attached screenshot. >> > > Did you try to uninstall and reload the package? Anyway, the checksum is > checked when downloading, so maybe there is a problem on your machine... > Can you open the png file with a GTK+ program? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From gambas at ...1... Fri Dec 12 23:33:34 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Fri, 12 Dec 2014 23:33:34 +0100 Subject: [Gambas-user] bug on farm In-Reply-To: References: <548B5C64.8090602@...1...> <548B63FC.8070507@...1...> Message-ID: <548B6D3E.1060509@...1...> Le 12/12/2014 23:25, Fabien Bodard a ?crit : > Le fichier est d?fectueux aussi bien dans les dossiers exemples > que dans la ferme !!... il faut un backup > It works perfectly there... Install, run, uninstall, re-install, run again. No problem. -- Beno?t Minisini From gambas at ...2524... Sat Dec 13 02:22:02 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Sat, 13 Dec 2014 01:22:02 +0000 Subject: [Gambas-user] Issue 579 in gambas: Sqlite Conn.Exec failure with a CTE query In-Reply-To: <0-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Comment #1 on issue 579 by benoit.m... at ...626...: Sqlite Conn.Exec failure with a CTE query https://code.google.com/p/gambas/issues/detail?id=579 Sorry, I can't test yet, my sqlite version is too old. I will check when I have upgraded my system. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Sat Dec 13 15:57:31 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Sat, 13 Dec 2014 14:57:31 +0000 Subject: [Gambas-user] Issue 579 in gambas: Sqlite Conn.Exec failure with a CTE query In-Reply-To: <1-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> <0-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Updates: Status: Accepted Comment #2 on issue 579 by benoit.m... at ...626...: Sqlite Conn.Exec failure with a CTE query https://code.google.com/p/gambas/issues/detail?id=579 OK, I have upgraded my system. Now I see that the CTE examples provided by the SQLite documentation work, but not yours. Still investigating... -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From jussi.lahtinen at ...626... Sat Dec 13 19:31:28 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 13 Dec 2014 20:31:28 +0200 Subject: [Gambas-user] JIT and IDE Message-ID: Hi! Is it possible to have bit better integration with JIT and IDE? Now when you try to run project with JIT enabled, you may not get line number of offending code, only the error message. So I have to debug the project in terminal: $ LANG=en GB_JIT=info gbx3 Which gives: mTest.DoTests.1586: #6: Type mismatch: wanted Float, got Process instead mTest.DoTests.1586 mTest.Main.2061 For Emil, this seems to be bug in JIT, not in the project. See attachment. Maybe "GB_JIT=less" could give only the final error message. Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTestercmd-0.9.45.tar.gz Type: application/x-gzip Size: 17676 bytes Desc: not available URL: From emil.lenngren at ...626... Sat Dec 13 19:35:05 2014 From: emil.lenngren at ...626... (Emil Lenngren) Date: Sat, 13 Dec 2014 19:35:05 +0100 Subject: [Gambas-user] JIT and IDE In-Reply-To: References: Message-ID: Can you send a screenshot of how the error message looks like in the ide? Den 13 dec 2014 19:31 skrev "Jussi Lahtinen" : > Hi! > Is it possible to have bit better integration with JIT and IDE? > Now when you try to run project with JIT enabled, you may not get line > number of offending code, only the error message. > > So I have to debug the project in terminal: > $ LANG=en GB_JIT=info gbx3 > > Which gives: > mTest.DoTests.1586: #6: Type mismatch: wanted Float, got Process instead > mTest.DoTests.1586 mTest.Main.2061 > > For Emil, > this seems to be bug in JIT, not in the project. See attachment. > > Maybe "GB_JIT=less" could give only the final error message. > > > > Jussi > > From jussi.lahtinen at ...626... Sat Dec 13 20:00:39 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 13 Dec 2014 21:00:39 +0200 Subject: [Gambas-user] JIT and IDE In-Reply-To: References: Message-ID: I will see only this: ? Jussi On Sat, Dec 13, 2014 at 8:35 PM, Emil Lenngren wrote: > > Can you send a screenshot of how the error message looks like in the ide? > Den 13 dec 2014 19:31 skrev "Jussi Lahtinen" : > > Hi! >> Is it possible to have bit better integration with JIT and IDE? >> Now when you try to run project with JIT enabled, you may not get line >> number of offending code, only the error message. >> >> So I have to debug the project in terminal: >> $ LANG=en GB_JIT=info gbx3 >> >> Which gives: >> mTest.DoTests.1586: #6: Type mismatch: wanted Float, got Process instead >> mTest.DoTests.1586 mTest.Main.2061 >> >> For Emil, >> this seems to be bug in JIT, not in the project. See attachment. >> >> Maybe "GB_JIT=less" could give only the final error message. >> >> >> >> Jussi >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.jpg Type: image/jpeg Size: 10403 bytes Desc: not available URL: From chrisml at ...3340... Sat Dec 13 23:59:58 2014 From: chrisml at ...3340... (Christof Thalhofer) Date: Sat, 13 Dec 2014 23:59:58 +0100 Subject: [Gambas-user] [GambasMag] Articles for Feb 2015 issue In-Reply-To: (sfid-) References: <20141122215908.GC888@...2774...> <54780E51.1090202@...1887...> (sfid-) Message-ID: <548CC4EE.1050804@...3340...> Hi Randall, Am 30.11.2014 um 17:20 schrieb Randall Morgan: > The site was down on and off the last few days as my isp was updating > equipment. This next week the power company will be working in the area and > that may effect connectivity at some point. I'm associate in a hosting cooperative in Germany. We offer high availability hosting with backup and standby servers and for me it would be no serious problem to donate some webspace and traffic to the Gambas community or GambasMag. Maybe also our cooperative community could help to support you. I like Gambas very much and would like to support any form of promotion. If you have problems with an unreliable ISP maybe we could help you out. Feel free to contact me. 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 phorechuk at ...626... Sun Dec 14 01:01:57 2014 From: phorechuk at ...626... (Paul Horechuk) Date: Sat, 13 Dec 2014 19:01:57 -0500 Subject: [Gambas-user] [gambas-user] Possible bug in gb.gui Message-ID: <548CD375.2020801@...626...> I finally nailed down a bug in my environment. During development using Ubuntu 14.04 with the KDE/Plasma desktop and Gambas 3.5.4 up to 3.6.2, everything works. Problems were encountered when I installed a source archive on Fedora 20. This Fedora was with the default Gnome desktop. Gambas was using the gb.gui component, which should have produced the same results for gtk or qt4. It doesn't. After testing with Fedora 21 default and Fedora 21 KDE spin, I discovered that the KDE spin worked. I installed MATE on the KDE spin and was able to select either on login. Now I had both sets of libraries. I have determined that gb.gui is NOT doing its job. By disabling gb.gui and using gb.qt4, my program works under gnome and KDE. The problem manifests in the Paint.Text as it produces the attached picture with gb.gui. This has been confirmed on other releases and desktops as well. -- Think Free ... Use Open Source Software -------------- next part -------------- A non-text attachment was scrubbed... Name: QRcards-bug.png Type: image/png Size: 58916 bytes Desc: not available URL: From gambas at ...1... Sun Dec 14 01:16:11 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 01:16:11 +0100 Subject: [Gambas-user] [gambas-user] Possible bug in gb.gui In-Reply-To: <548CD375.2020801@...626...> References: <548CD375.2020801@...626...> Message-ID: <548CD6CB.5070405@...1...> Le 14/12/2014 01:01, Paul Horechuk a ?crit : > I finally nailed down a bug in my environment. > > During development using Ubuntu 14.04 with the KDE/Plasma desktop and > Gambas 3.5.4 up to 3.6.2, everything works. Problems were encountered > when I installed a source archive on Fedora 20. This Fedora was with the > default Gnome desktop. Gambas was using the gb.gui component, which > should have produced the same results for gtk or qt4. It doesn't. > > After testing with Fedora 21 default and Fedora 21 KDE spin, I > discovered that the KDE spin worked. I installed MATE on the KDE spin > and was able to select either on login. Now I had both sets of libraries. > > I have determined that gb.gui is NOT doing its job. By disabling gb.gui > and using gb.qt4, my program works under gnome and KDE. > > The problem manifests in the Paint.Text as it produces the attached > picture with gb.gui. > > This has been confirmed on other releases and desktops as well. > gb.gui does nothing by itself: it just loads gb.qt4 if your desktop is KDE4 (i.e. the KDE_FULL_SESSION environmental variable is defined, and the KDE_SESSION_VERSION environmental variable is "4"), and gb.gtk in all other cases. Please provide the contents of the IDE system information dialog, the last version of your project and how to reproduce the bug. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sun Dec 14 03:34:17 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 14 Dec 2014 04:34:17 +0200 Subject: [Gambas-user] Bug with GTK+ Message-ID: Textbox's event is fired twice if the box is disabled, enabled and put in focus. See attachment. Everything work as expected with Qt4. Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: GTKEventBug-0.0.1.tar.gz Type: application/x-gzip Size: 3928 bytes Desc: not available URL: From chriseana at ...626... Sun Dec 14 13:34:21 2014 From: chriseana at ...626... (Christian e Ana Luiza Britto) Date: Sun, 14 Dec 2014 10:34:21 -0200 Subject: [Gambas-user] DataBrowser Help Message-ID: Hi, I'm trying to make a form with a DataBrowser to edit fields in a SqLite 3 table. I've tryed everything... I made a connection, put the datasource container in a form with the Databrowser within with the columns and labels names but nothing happen. It doesn't work. Please, someone can share with me the correct coding to make the connection, create the DataSource and make the Databrowser to work? I'm trying for a few days now... :( Best regards from Brazil, Chrisian De Britto From gambas at ...1... Sun Dec 14 13:45:46 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 13:45:46 +0100 Subject: [Gambas-user] DataBrowser Help In-Reply-To: References: Message-ID: <548D867A.3080402@...1...> Le 14/12/2014 13:34, Christian e Ana Luiza Britto a ?crit : > Hi, > I'm trying to make a form with a DataBrowser to edit fields in a > SqLite 3 table. I've tryed everything... I made a connection, put the > datasource container in a form with the Databrowser within with the > columns and labels names but nothing happen. It doesn't work. > > Please, someone can share with me the correct coding to make the > connection, create the DataSource and make the Databrowser to work? > I'm trying for a few days now... :( > Best regards from Brazil, > Chrisian De Britto > Did you look at the 'Database' example? -- Beno?t Minisini From gambas at ...2524... Sun Dec 14 13:53:19 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Sun, 14 Dec 2014 12:53:19 +0000 Subject: [Gambas-user] Issue 579 in gambas: Sqlite Conn.Exec failure with a CTE query In-Reply-To: <2-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> References: <2-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> <0-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Message-ID: <3-6813199134517018827-8462259086410782777-gambas=googlecode.com@...2524...> Updates: Status: Fixed Comment #3 on issue 579 by benoit.m... at ...626...: Sqlite Conn.Exec failure with a CTE query https://code.google.com/p/gambas/issues/detail?id=579 It should be fixed in revision #6737. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...1... Sun Dec 14 14:39:17 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 14:39:17 +0100 Subject: [Gambas-user] Possible sqlite3 component error In-Reply-To: <20141113093421.eb3688366981e1a02333aa79@...2308...> References: <20141113093421.eb3688366981e1a02333aa79@...2308...> Message-ID: <548D9305.20504@...1...> Le 13/11/2014 00:04, B Bruen a ?crit : > The following query is a "standard" CTE based query to return the > contents of a hierarchical table (i.e. columns are id, parentid, > data): WITH RECURSIVE tmp AS ( SELECT *, 0 AS depth FROM pages p > WHERE p.parent = 0 UNION ALL SELECT p.*, tmp.depth + 1 FROM pages p > JOIN tmp ON (p.parent=tmp.id) ) SELECT id, title, parent, category, > indexed, htmlsrc, depth FROM tmp ORDER BY depth; > > I use the following method in Gambas: Private Sub LoadTOC() > '' Build the index tree > > Dim rslt As Result Dim pnode As String Dim sQry As String = "WITH > RECURSIVE tmp AS ( SELECT *, 0 AS depth FROM pages p WHERE p.parent = > 0 UNION ALL SELECT p.*, tmp.depth + 1 FROM pages p JOIN tmp ON > (p.parent=tmp.id)) SELECT id, title, parent, category, indexed, > htmlsrc, depth FROM tmp ORDER BY depth" > > tvwIndex.Clear > > db.Debug = True rslt = $conn.Exec(sQry) 'Find("pages") db.Debug = > False > > For Each rslt pnode = rslt!parent If Not pnode Then Continue If Not > rslt!indexed Then Continue tvwIndex.Add(rslt!id, rslt!title,, > IIf(pnode = 0, "", pnode)) Next > > tvwIndex["1"].Expanded = True tvwIndex["1"].Text = "Index" > tvwIndex["1"].Picture = Picture["icon:/32/book"] > > Catch Error Subst("&1\nERR: &2 (&3)\n&4\n&1\n", String$(40, "-"), > Error.Text, Error.Code, Error.Backtrace.Join("\n")) Error db.Error > Stop > > End > > When this is executed it fails at the rslt=$conn.Exec line with ERR: > Query failed: SQL error or missing database (-1) and db.Error is "1" > the $conn connection is valid and is open. > > Similarly when I try to execute that query in the connection browser > in the IDE I get the same error. > > However, when I run the same query in the sqlite3 cli tool it works > faultlessly. > > The output produced by the db.debug is: sqlite3: 0x8551560: WITH > RECURSIVE tmp AS ( SELECT *, 0 AS depth FROM pages p WHERE p.parent = > 0 UNION ALL SELECT p.*, tmp.depth + 1 FROM pages p JOIN tmp ON > (p.parent=tmp.id)) SELECT id, title, parent, category, indexed, > htmlsrc, depth FROM tmp ORDER BY d epth > > apart from the line break in the ORDER BY clause (which I dont think > is the problem) I cannot see any corruption of the query string. > > I am not sure but have a suspicion that this has arisen after the > recent changes for db collations etc. > > regards Bruce > This is fixed in revision #6737. Regards, -- Beno?t Minisini From gambas at ...1... Sun Dec 14 14:40:16 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 14:40:16 +0100 Subject: [Gambas-user] Collapsable In-Reply-To: <547FC1AF.8060602@...1...> References: <20141125153423.f36c08e749d361a02b79ee26@...2308...> <547FC1AF.8060602@...1...> Message-ID: <548D9340.3030905@...1...> Le 04/12/2014 03:06, Beno?t Minisini a ?crit : > Le 25/11/2014 06:04, B Bruen a ?crit : >> Beno?t, >> >> Is there any reason why the form controls hierarchy treeview in the >> IDE (FFormStack) cancels out the collapse event? >> I have commented out the code in my local copy and can see no >> disadvantage? >> >> Public Sub tvwControl_Collapse() >> >> ' tvwControl.Item.Expanded = True >> >> End >> >> regards >> Bruce >> > > Mmm... I don't know why indeed. On the other hand, I don't know why it > should be collapsable. :-) > This is fixed in revision #6739. Regards, -- Beno?t Minisini From gambas at ...1... Sun Dec 14 17:01:21 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 17:01:21 +0100 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: References: Message-ID: <548DB451.9070200@...1...> Le 14/12/2014 03:34, Jussi Lahtinen a ?crit : > Textbox's event is fired twice if the box is disabled, enabled and put in > focus. > See attachment. > > Everything work as expected with Qt4. > > > Jussi > Not really. It behaves badly too with gb.qt4, but just less. Disabling a control, then re-enabling it, then giving it focus back inside a keypress event is not a good idea. I can prevent the event to be raised twice with GTK+, but it will still behave strangely. -- Beno?t Minisini From lewis at ...3412... Sun Dec 14 17:54:09 2014 From: lewis at ...3412... (Lewis Balentine) Date: Sun, 14 Dec 2014 10:54:09 -0600 Subject: [Gambas-user] File & Directory Functions: PWD, cd Message-ID: <548DC0B1.6050308@...3412...> I can find out what the current directory is with: Print Application.Env["PWD"] However there does not seem to be anything to change the present working directory within the "File & Directory Functions". I did try using the shell function. It did not seem to have the desired effect. Print Application.Env["PWD"] Shell ("cd /mnt/Data/videos") Wait 0.1 Print Application.Env["PWD"] ---------- /home/lewis /home/lewis So I guess that I have missed something obvious again. How does one change the current directory in a Gambas console based program ? Thank you, Lewis From taboege at ...626... Sun Dec 14 18:00:49 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 14 Dec 2014 18:00:49 +0100 Subject: [Gambas-user] File & Directory Functions: PWD, cd In-Reply-To: <548DC0B1.6050308@...3412...> References: <548DC0B1.6050308@...3412...> Message-ID: <20141214170049.GB699@...2774...> On Sun, 14 Dec 2014, Lewis Balentine wrote: > I can find out what the current directory is with: > Print Application.Env["PWD"] > > However there does not seem to be anything to change the present working > directory within the "File & Directory Functions". > I did try using the shell function. It did not seem to have the desired > effect. > Print Application.Env["PWD"] > Shell ("cd /mnt/Data/videos") > Wait 0.1 > Print Application.Env["PWD"] > ---------- > /home/lewis > /home/lewis > > So I guess that I have missed something obvious again. Yes, using Shell "cd /another/directory" spawns a new process (the shell) which changes its directory (using the cd built-in) to /another/directory and then dies. Since the CWD is local to a process, this does nothing with your Gambas process. > How does one change the current directory in a Gambas console based > program ? > There is no concept of a current working directory in Gambas, as stated here[0]. If you want to change the CWD of your process nevertheless, I guess you can use Extern[1] and access the chdir() function in the C library but I don't know what consequences that will have. A cleaner solution is to use absolute paths throughout. The CWD from process startup time is found in Application.Dir. If you didn't call chdir() since then, it will give you your CWD and any relative path sRel can be made into an absolute path via Application.Dir &/ sRel Regards, Tobi [0] http://gambaswiki.org/wiki/lang/path [1] http://gambaswiki.org/wiki/lang/extdecl -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From lewis at ...3412... Sun Dec 14 18:37:27 2014 From: lewis at ...3412... (Lewis Balentine) Date: Sun, 14 Dec 2014 11:37:27 -0600 Subject: [Gambas-user] File & Directory Functions: PWD, cd In-Reply-To: <20141214170049.GB699@...2774...> References: <548DC0B1.6050308@...3412...> <20141214170049.GB699@...2774...> Message-ID: <548DCAD7.4050807@...3412...> >> spawns a new process (the shell) which changes its directory (using the cd built-in) to /another/directory and then dies. << That is what I expected but I wanted to verify it to before I asked the question. >> If you want to change the CWD of your process nevertheless, I guess you can use Extern[1] and access the chdir() function in the C library. << I suspect that might be a bit beyond my level of competence at this point. >> There is no concept of a current working directory in Gambas << >> A cleaner solution is to use absolute paths throughout. << That is tad inconvenient for what I am trying to do. I want to write a console based application to process a number of files in the directory from which the application is run with no concept of what that directory might be at design time. I was going to use the 'cd' command to change to a target directory for development/testing --- then comment it out afterwards. >> The CWD from process startup time is found in Application.Dir. << I think that can be used as an alternative solution to my problem. Thank you Tobias. Lewis From jussi.lahtinen at ...626... Sun Dec 14 18:46:00 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 14 Dec 2014 19:46:00 +0200 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: <548DB451.9070200@...1...> References: <548DB451.9070200@...1...> Message-ID: > > Disabling a control, then re-enabling it, then giving it focus back > inside a keypress event is not a good idea. The keypress event waits for enter key as sign of end of user input. Then the idea is to disable user input while data is shown in other control. This was first thing in my mind how to do it. Jussi From jussi.lahtinen at ...626... Sun Dec 14 18:52:34 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 14 Dec 2014 19:52:34 +0200 Subject: [Gambas-user] File & Directory Functions: PWD, cd In-Reply-To: <548DCAD7.4050807@...3412...> References: <548DC0B1.6050308@...3412...> <20141214170049.GB699@...2774...> <548DCAD7.4050807@...3412...> Message-ID: Just write: Private sThePath As String = "/mnt/Data/videos" And use that variable everywhere as path. That way it is easy to change when needed. DoSomething(sThePath &/ "file.ext") Jussi On Sun, Dec 14, 2014 at 7:37 PM, Lewis Balentine wrote: > > >> spawns a new process (the shell) which changes its directory (using the > cd built-in) to /another/directory and then dies. << > That is what I expected but I wanted to verify it to before I asked the > question. > > >> If you want to change the CWD of your process nevertheless, I guess you > can use Extern[1] and access the chdir() function in the C > library. << > I suspect that might be a bit beyond my level of competence at this point. > > >> There is no concept of a current working directory in Gambas << > >> A cleaner solution is to use absolute paths throughout. << > That is tad inconvenient for what I am trying to do. I want to write a > console based application to process a number of files in the directory > from which the application is run with no concept of what that directory > might be at design time. I was going to use the 'cd' command to change to a > target directory for development/testing --- then comment it out afterwards. > > >> The CWD from process startup time is found in Application.Dir. << > I think that can be used as an alternative solution to my problem. > > Thank you Tobias. > > Lewis > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From lewis at ...3412... Sun Dec 14 19:05:38 2014 From: lewis at ...3412... (Lewis Balentine) Date: Sun, 14 Dec 2014 12:05:38 -0600 Subject: [Gambas-user] File & Directory Functions: PWD, cd In-Reply-To: References: <548DC0B1.6050308@...3412...> <20141214170049.GB699@...2774...> <548DCAD7.4050807@...3412...> Message-ID: <548DD172.3040704@...3412...> Private WorkDir As String Public Sub Main() WorkDir = Application.Dir ' for development and change path to our sample directory ' comment out next line for actual runtime program WorkDir = "/mnt/Data/videos" ... End Thank you gentlemen From gambas at ...1... Sun Dec 14 19:09:45 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 19:09:45 +0100 Subject: [Gambas-user] File & Directory Functions: PWD, cd In-Reply-To: <548DC0B1.6050308@...3412...> References: <548DC0B1.6050308@...3412...> Message-ID: <548DD269.9080502@...1...> Le 14/12/2014 17:54, Lewis Balentine a ?crit : > I can find out what the current directory is with: > Print Application.Env["PWD"] > > However there does not seem to be anything to change the present working > directory within the "File & Directory Functions". > I did try using the shell function. It did not seem to have the desired > effect. > Print Application.Env["PWD"] > Shell ("cd /mnt/Data/videos") > Wait 0.1 > Print Application.Env["PWD"] > ---------- > /home/lewis > /home/lewis > > So I guess that I have missed something obvious again. > How does one change the current directory in a Gambas console based > program ? > > Thank you, > > Lewis > To run a child process in a specific working directory, do that: EXEC [ ... ] WITH [ "PWD=/the/directory" ] Regards, -- Beno?t Minisini From phorechuk at ...626... Sun Dec 14 21:10:06 2014 From: phorechuk at ...626... (Paul Horechuk) Date: Sun, 14 Dec 2014 15:10:06 -0500 Subject: [Gambas-user] [gambas-user] Possible bug in gb.gui In-Reply-To: <548CD6CB.5070405@...1...> References: <548CD375.2020801@...626...> <548CD6CB.5070405@...1...> Message-ID: <548DEE9E.5030608@...626...> OK, then let's rephrase that slightly. The gb.gtk component does not behave the same as the gb.qt4 component. If I disable the capability to autodetect the environment and force the use of gb.qt4, then everything works. Hence, the problem is within gb.gtk. As part of setting the taget environment then I have to install the base qt4 libraries as a minimum, or install perhaps a full KDE desktop. The attached file is a source archive. Don't worry about the database option. Fill in the /Issued To/ field, the /Job #/, the two dates, and set the count to something like 3 or 5 so that you get an odd number of labels. You will need external access to qrencode and phpcli. When the fields are being filled, the on-screen QRcode will update. When complete, click the OK button and either Preview or Print. Preview is recommended. Open a file manager and navigate to the QRcard directory and open QRpicture.png. Card #3 is correct and the others have valid QRcodes, but bad text. As mentioned, it works under several desktop environments with gb.qt4, but using gb.gui and allowing the auto selection of gb.gtk fails. There is nothing fancy in the components, except for gb.qt4. I do use gb.db, gb.mysql, and gb.odbc, but these should not be an issue without the /Use Database/ option selected. On 14-12-13 07:16 PM, Beno?t Minisini wrote: > Le 14/12/2014 01:01, Paul Horechuk a ?crit : >> I finally nailed down a bug in my environment. >> >> During development using Ubuntu 14.04 with the KDE/Plasma desktop and >> Gambas 3.5.4 up to 3.6.2, everything works. Problems were encountered >> when I installed a source archive on Fedora 20. This Fedora was with the >> default Gnome desktop. Gambas was using the gb.gui component, which >> should have produced the same results for gtk or qt4. It doesn't. >> >> After testing with Fedora 21 default and Fedora 21 KDE spin, I >> discovered that the KDE spin worked. I installed MATE on the KDE spin >> and was able to select either on login. Now I had both sets of libraries. >> >> I have determined that gb.gui is NOT doing its job. By disabling gb.gui >> and using gb.qt4, my program works under gnome and KDE. >> >> The problem manifests in the Paint.Text as it produces the attached >> picture with gb.gui. >> >> This has been confirmed on other releases and desktops as well. >> > gb.gui does nothing by itself: it just loads gb.qt4 if your desktop is > KDE4 (i.e. the KDE_FULL_SESSION environmental variable is defined, and > the KDE_SESSION_VERSION environmental variable is "4"), and gb.gtk in > all other cases. > > Please provide the contents of the IDE system information dialog, the > last version of your project and how to reproduce the bug. > > Regards, > -- Think Free ... Use Open Source Software -------------- next part -------------- A non-text attachment was scrubbed... Name: QRCards-0.5.2.tar.gz Type: application/gzip Size: 101230 bytes Desc: not available URL: From chriseana at ...626... Sun Dec 14 21:31:40 2014 From: chriseana at ...626... (Christian e Ana Luiza Britto) Date: Sun, 14 Dec 2014 18:31:40 -0200 Subject: [Gambas-user] DataBrowser Help Again Message-ID: Hi Beno?t Minisini and everybody Yes, I've tried to follow the Database example. If I run it it works, but my app still doesn't work. I'm using Gambas version 3.6.90. When I try to inform the Datasource connection name property via IDE the database connection I inform is not maintained, when I click in other place the name I just typed before just disappear... :( Please, can you send me a very simple code sample for me to try to follow? There's something very obvious that I'm not understanding... Christian Le 14/12/2014 13:34, Christian e Ana Luiza Britto a ?crit : > Hi, > I'm trying to make a form with a DataBrowser to edit fields in a > SqLite 3 table. I've tryed everything... I made a connection, put the > datasource container in a form with the Databrowser within with the > columns and labels names but nothing happen. It doesn't work. > > Please, someone can share with me the correct coding to make the > connection, create the DataSource and make the Databrowser to work? > I'm trying for a few days now... :( > Best regards from Brazil, > Chrisian De Britto > Did you look at the 'Database' example? -- Beno?t Minisini From gambas.fr at ...626... Sun Dec 14 21:52:25 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 14 Dec 2014 21:52:25 +0100 Subject: [Gambas-user] Colors Message-ID: Hi, How can i extract the integer color 0-255 of a grayscale image ? -- Fabien Bodard From gambas at ...1... Sun Dec 14 21:57:58 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 21:57:58 +0100 Subject: [Gambas-user] Colors In-Reply-To: References: Message-ID: <548DF9D6.6030903@...1...> Le 14/12/2014 21:52, Fabien Bodard a ?crit : > Hi, > > How can i extract the integer color 0-255 of a grayscale image ? > What for? -- Beno?t Minisini From gambas.fr at ...626... Sun Dec 14 22:20:03 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 14 Dec 2014 22:20:03 +0100 Subject: [Gambas-user] Colors In-Reply-To: <548DF9D6.6030903@...1...> References: <548DF9D6.6030903@...1...> Message-ID: i want to make an array[imgWidth,ImgHeight] with value 0-255 representing the grayscale color of an image. I hope to accelerate my keycorner procedure this way. Actually the values of colors even in after a .grayscale are far upper. 2014-12-14 21:57 GMT+01:00 Beno?t Minisini : > Le 14/12/2014 21:52, Fabien Bodard a ?crit : >> Hi, >> >> How can i extract the integer color 0-255 of a grayscale image ? >> > > What for? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > 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... Sun Dec 14 22:29:58 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 14 Dec 2014 22:29:58 +0100 Subject: [Gambas-user] Colors In-Reply-To: References: <548DF9D6.6030903@...1...> Message-ID: J'ai mal cherch? ... d?sol? http://fr.wikipedia.org/wiki/Niveau_de_gris je vais utiliser le canal vert 2014-12-14 22:20 GMT+01:00 Fabien Bodard : > i want to make an array[imgWidth,ImgHeight] with value 0-255 > representing the grayscale color of an image. > I hope to accelerate my keycorner procedure this way. Actually the > values of colors even in after a .grayscale are far upper. > > 2014-12-14 21:57 GMT+01:00 Beno?t Minisini : >> Le 14/12/2014 21:52, Fabien Bodard a ?crit : >>> Hi, >>> >>> How can i extract the integer color 0-255 of a grayscale image ? >>> >> >> What for? >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Fabien Bodard -- Fabien Bodard From gambas.fr at ...626... Sun Dec 14 22:33:32 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 14 Dec 2014 22:33:32 +0100 Subject: [Gambas-user] Colors In-Reply-To: References: <548DF9D6.6030903@...1...> Message-ID: et en plus ?a marche :-) !!! 2014-12-14 22:29 GMT+01:00 Fabien Bodard : > J'ai mal cherch? ... d?sol? http://fr.wikipedia.org/wiki/Niveau_de_gris > > je vais utiliser le canal vert > > 2014-12-14 22:20 GMT+01:00 Fabien Bodard : >> i want to make an array[imgWidth,ImgHeight] with value 0-255 >> representing the grayscale color of an image. >> I hope to accelerate my keycorner procedure this way. Actually the >> values of colors even in after a .grayscale are far upper. >> >> 2014-12-14 21:57 GMT+01:00 Beno?t Minisini : >>> Le 14/12/2014 21:52, Fabien Bodard a ?crit : >>>> Hi, >>>> >>>> How can i extract the integer color 0-255 of a grayscale image ? >>>> >>> >>> What for? >>> >>> -- >>> Beno?t Minisini >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> >> -- >> Fabien Bodard > > > > -- > Fabien Bodard -- Fabien Bodard From gambas at ...1... Sun Dec 14 22:42:09 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 14 Dec 2014 22:42:09 +0100 Subject: [Gambas-user] [gambas-user] Possible bug in gb.gui In-Reply-To: <548DEE9E.5030608@...626...> References: <548CD375.2020801@...626...> <548CD6CB.5070405@...1...> <548DEE9E.5030608@...626...> Message-ID: <548E0431.8080607@...1...> Le 14/12/2014 21:10, Paul Horechuk a ?crit : > OK, then let's rephrase that slightly. The gb.gtk component does not > behave the same as the gb.qt4 component. If I disable the capability to > autodetect the environment and force the use of gb.qt4, then everything > works. Hence, the problem is within gb.gtk. As part of setting the taget > environment then I have to install the base qt4 libraries as a minimum, > or install perhaps a full KDE desktop. > ... OK, I understood: the gb.gtk paint library (cairo) does not support painting images while the current path has not be stroke or filled, which is what you are doing. You create the path of all your labels, and then you call Paint.Stroke once at the end. But you mix calls to Paint.DrawImage in the middle, and Paint.DrawImage will fill the current path with the drawn image (so the strange patterns in the text). 1) You must call Paint.Stroke before (in the time, not in the code) calling Paint.DrawImage. 2) Why do you call Paint.Stroke? You should call Paint.Fill, shouldn't you? Qt4 does not have that problem, as the image drawing routine is completely separated from the path drawing routines. Regards, -- Beno?t Minisini From rolf.frogs at ...221... Mon Dec 15 10:13:21 2014 From: rolf.frogs at ...221... (rolf) Date: Mon, 15 Dec 2014 10:13:21 +0100 Subject: [Gambas-user] Colors In-Reply-To: References: Message-ID: <201412151013.23010.rolf.frogs@...221...> Danke Fabien, von diesen Mails haben nun alle was Rolf From gambas.fr at ...626... Mon Dec 15 10:51:37 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 15 Dec 2014 10:51:37 +0100 Subject: [Gambas-user] Colors In-Reply-To: <201412151013.23010.rolf.frogs@...221...> References: <201412151013.23010.rolf.frogs@...221...> Message-ID: well rolf i don't really understand Duch and neither google visibly 2014-12-15 10:13 GMT+01:00 rolf : > Danke Fabien, > > von diesen Mails haben nun alle was > > Rolf > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > 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... Mon Dec 15 11:16:10 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 15 Dec 2014 11:16:10 +0100 Subject: [Gambas-user] A suggestion Message-ID: Why not having a Math tool component that can provide some basics things such as geometry area routine, and many other daily usefull things... ? -- Fabien Bodard From rolf.frogs at ...221... Mon Dec 15 11:32:39 2014 From: rolf.frogs at ...221... (rolf) Date: Mon, 15 Dec 2014 11:32:39 +0100 Subject: [Gambas-user] Colors In-Reply-To: References: <201412151013.23010.rolf.frogs@...221...> Message-ID: <201412151132.41263.rolf.frogs@...221...> Hi Fabien, > well rolf i don't really understand Duch and neither google visibly so do I with your french communication. The mail should remind you that not everybody speaks french on this mail list (btw. the mail was in German). Rolf From gambas.fr at ...626... Mon Dec 15 12:18:15 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 15 Dec 2014 12:18:15 +0100 Subject: [Gambas-user] Colors In-Reply-To: <201412151132.41263.rolf.frogs@...221...> References: <201412151013.23010.rolf.frogs@...221...> <201412151132.41263.rolf.frogs@...221...> Message-ID: well yes i'm sorry for that... the mail just say that i've found my things at http://fr.wikipedia.org/wiki/Niveau_de_gris that explain how to obtain the gray computed colors. 2014-12-15 11:32 GMT+01:00 rolf : > Hi Fabien, > >> well rolf i don't really understand Duch and neither google visibly > > so do I with your french communication. > > The mail should remind you that not everybody speaks french on this mail list > (btw. the mail was in German). > > Rolf > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard From olivier.cruilles at ...614... Mon Dec 15 16:01:12 2014 From: olivier.cruilles at ...614... (Yahoo) Date: Mon, 15 Dec 2014 10:01:12 -0500 Subject: [Gambas-user] A suggestion In-Reply-To: References: Message-ID: Hello, It will be Nice that, yes. Cordialement, Olivier Cruilles Email: olivier.cruilles at ...614... > Le 15 d?c. 2014 ? 05:16, Fabien Bodard a ?crit : > > Why not having a Math tool component that can provide some basics > things such as geometry area routine, and many other daily usefull > things... ? > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From Karl.Reinl at ...2345... Mon Dec 15 18:23:06 2014 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 15 Dec 2014 18:23:06 +0100 Subject: [Gambas-user] Software Farm : Authentication failed. Message-ID: <1418664186.3778.28.camel@...40...> Salut Beno?t, version r6741, I'm logged in to the GSF and open the Configuration by pushing the button Configure... No way back (maybe with register, I didn't try), I can't leave the Configuration. A messagebox with Authentication failed.stops me. [System] Gambas=3.6.90 OperatingSystem=Linux Kernel=3.2.0-74-generic Architecture=x86 Distribution=Ubuntu 12.04.5 LTS Desktop=GNOME Theme=QPlastique Language=de_DE.UTF-8 Memory=3025M [Libraries] Cairo=libcairo.so.2.11000.2 Curl=libcurl.so.4.2.0 DBus=libdbus-1.so.3.5.8 GStreamer=libgstreamer-0.10.so.0.30.0 GTK+3=libgtk-3.so.0.400.2 GTK+=libgtk-x11-2.0.so.0.2400.10 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 -- Amicalement Charlie From chriseana at ...626... Mon Dec 15 19:10:49 2014 From: chriseana at ...626... (Christian e Ana Luiza Britto) Date: Mon, 15 Dec 2014 16:10:49 -0200 Subject: [Gambas-user] Two Databases at the same time... Message-ID: Hi, I need to work with 2 different databases at the same time, each one with his own tables. So, what I have to do to setup up the "Result" variables for each database? I wanna write a module that will read data from one database to update the another. Thanks, Christian From phorechuk at ...626... Mon Dec 15 21:15:51 2014 From: phorechuk at ...626... (Paul Horechuk) Date: Mon, 15 Dec 2014 15:15:51 -0500 Subject: [Gambas-user] [gambas-user] Possible bug in gb.gui In-Reply-To: <548E0431.8080607@...1...> References: <548CD375.2020801@...626...> <548CD6CB.5070405@...1...> <548DEE9E.5030608@...626...> <548E0431.8080607@...1...> Message-ID: <548F4177.90904@...626...> OK, fine, but another problem has popped up. During testing, I switched the gb.qt4 to qb.gtk and I was unable to type anything into the TextBoxes. This was seen before while using gb.gui and other environments, such as fxce and Ubuntu Studio. Is there another component(s) I have to activate in the project to allow keyboard access in non-gb.qt4 components? This implies that there are multiple components that are required to be included as part of the project to make it functional across a variety of available desktops/spins. On 14-12-14 04:42 PM, Beno?t Minisini wrote: > Le 14/12/2014 21:10, Paul Horechuk a ?crit : >> OK, then let's rephrase that slightly. The gb.gtk component does not >> behave the same as the gb.qt4 component. If I disable the capability to >> autodetect the environment and force the use of gb.qt4, then everything >> works. Hence, the problem is within gb.gtk. As part of setting the taget >> environment then I have to install the base qt4 libraries as a minimum, >> or install perhaps a full KDE desktop. >> ... > OK, I understood: the gb.gtk paint library (cairo) does not support > painting images while the current path has not be stroke or filled, > which is what you are doing. > > You create the path of all your labels, and then you call Paint.Stroke > once at the end. But you mix calls to Paint.DrawImage in the middle, and > Paint.DrawImage will fill the current path with the drawn image (so the > strange patterns in the text). > > 1) You must call Paint.Stroke before (in the time, not in the code) > calling Paint.DrawImage. > > 2) Why do you call Paint.Stroke? You should call Paint.Fill, shouldn't you? > > Qt4 does not have that problem, as the image drawing routine is > completely separated from the path drawing routines. > > Regards, > -- Think Free ... Use Open Source Software From t.lee.davidson at ...626... Mon Dec 15 22:23:18 2014 From: t.lee.davidson at ...626... (T Lee Davidson) Date: Mon, 15 Dec 2014 16:23:18 -0500 Subject: [Gambas-user] DataBrowser Help Again In-Reply-To: References: Message-ID: <548F5146.9000709@...626...> Hello Christian, I did not have any success getting the IDE to give me any options for the Connection property. (The list was always blank.) So, I set it programmatically. With your app, on the form, make sure the DataSource control is the parent of the DataBrowser. Sample project attached. -- Lee __________ "Artificial Intelligence is no match for natural stupidity." On 12/14/2014 03:31 PM, Christian e Ana Luiza Britto wrote: > Hi Beno?t Minisini and everybody > > Yes, I've tried to follow the Database example. If I run it it works, > but my app still doesn't work. I'm using Gambas version 3.6.90. > > When I try to inform the Datasource connection name property via IDE > the database connection I inform is not maintained, when I click in > other place the name I just typed before just disappear... :( > > Please, can you send me a very simple code sample for me to try to follow? > There's something very obvious that I'm not understanding... > > Christian > > > Le 14/12/2014 13:34, Christian e Ana Luiza Britto a ?crit : >> Hi, >> I'm trying to make a form with a DataBrowser to edit fields in a >> SqLite 3 table. I've tryed everything... I made a connection, put the >> datasource container in a form with the Databrowser within with the >> columns and labels names but nothing happen. It doesn't work. >> >> Please, someone can share with me the correct coding to make the >> connection, create the DataSource and make the Databrowser to work? >> I'm trying for a few days now... :( >> Best regards from Brazil, >> Chrisian De Britto >> > > Did you look at the 'Database' example? > -------------- next part -------------- A non-text attachment was scrubbed... Name: DatabaseSample-1.0.1.tar.gz Type: application/x-gzip Size: 11769 bytes Desc: not available URL: From gambas at ...1... Tue Dec 16 03:10:51 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 16 Dec 2014 03:10:51 +0100 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: References: <548DB451.9070200@...1...> Message-ID: <548F94AB.5050805@...1...> Le 14/12/2014 18:46, Jussi Lahtinen a ?crit : >> >> Disabling a control, then re-enabling it, then giving it focus back >> inside a keypress event is not a good idea. > > > The keypress event waits for enter key as sign of end of user input. > Then the idea is to disable user input while data is shown in other control. > This was first thing in my mind how to do it. > > > Jussi But there is no need to disable the control, re-enabling it, then giving it focus back. What for? Just disable it when enter is hit. -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Dec 16 03:29:56 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 16 Dec 2014 04:29:56 +0200 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: <548F94AB.5050805@...1...> References: <548DB451.9070200@...1...> <548F94AB.5050805@...1...> Message-ID: > But there is no need to disable the control, re-enabling it, then giving > it focus back. What for? Just disable it when enter is hit. > The code you see is only isolation for demonstration of the problem. There is really code (call of sub) between disabling and enabling the control. It's not enough to just disable the control when I hit enter, because the program ask more input when it is done showing some data. Thus re-enabling. I think I added the focus because in some cases, the focus went to the control displaying the data (or somewhere else?). Jussi From jussi.lahtinen at ...626... Tue Dec 16 03:37:45 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 16 Dec 2014 04:37:45 +0200 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: References: <548DB451.9070200@...1...> <548F94AB.5050805@...1...> Message-ID: This is what I mean: TextBox1.Enabled = False 'Prevent user messing while showing the data. ShowSomeData() TextBox1.Enabled = True 'Enable user to give new input... TextBox1.SetFocus() '...without need to click on the textbox. Jussi On Tue, Dec 16, 2014 at 4:29 AM, Jussi Lahtinen wrote: > > > But there is no need to disable the control, re-enabling it, then giving >> it focus back. What for? Just disable it when enter is hit. >> > > The code you see is only isolation for demonstration of the problem. There > is really code (call of sub) between disabling and enabling the control. > It's not enough to just disable the control when I hit enter, because the > program ask more input when it is done showing some data. Thus re-enabling. > I think I added the focus because in some cases, the focus went to the > control displaying the data (or somewhere else?). > > > Jussi > From gambas at ...1... Tue Dec 16 03:44:38 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 16 Dec 2014 03:44:38 +0100 Subject: [Gambas-user] Bug with GTK+ In-Reply-To: References: <548DB451.9070200@...1...> <548F94AB.5050805@...1...> Message-ID: <548F9C96.3030601@...1...> Le 16/12/2014 03:29, Jussi Lahtinen a ?crit : >> But there is no need to disable the control, re-enabling it, then giving >> it focus back. What for? Just disable it when enter is hit. >> > > The code you see is only isolation for demonstration of the problem. There > is really code (call of sub) between disabling and enabling the control. > It's not enough to just disable the control when I hit enter, because the > program ask more input when it is done showing some data. Thus re-enabling. > I think I added the focus because in some cases, the focus went to the > control displaying the data (or somewhere else?). > > > Jussi I'm not clear enough: you should not have to disable and re-enabling a control inside an event handler, because you are not supposed to call event loop (WAIT