[Gambas-user] (Main) Form won't close - how to tell the user why

2017-06-19 Thread adamn...@gmail.com
I have a main form that has a lot of ways that the user can start other 
processes from, some with wait and some without.
When they attempt to close the main form, the event loop won't terminate. Which 
is proper. However, I need to be able to tell the user to close the "such and 
such window". How can I find out which process is blocking the end of the event 
loop?

regards
b

-- 
B Bruen 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] missing wiki gridview.rows.selection

2017-06-19 Thread adamn...@gmail.com
Piccoro, 
The documentation is there, it took me 4 clicks to get to it from the gb.qt4 
page.  I'll change my previous comment to "Read AND LOOK AT EVERY word on the 
Gambas help page.
gridview.Rows is a property that returns an object of the **virtual class** 
_GridView_Rows type.  So  you have to go there to see the description of that 
class. IOW in the syntax box notice that the _GridView_Rows word is a hyperlink 
to the page describing that class.
b


On Mon, 19 Jun 2017 23:04:51 -0430
PICCORO McKAY Lenz  wrote:

> the documentation for Rows.Selection i cannot found in wiki.. ide does not
> show any documentation..
> 
> i found that piede of code in the recet upload of the wGridfilter and no
> doc its raised in ide:
> 
> For n = 0 To $Grid.columns.Count - 1
> valor = IIf($Grid[$Grid.Rows.Selection[c], n].text = "",
> $Grid[$Grid.Rows.Selection[c], n].richText, $Grid[$Grid.Rows.Selection[c],
> n].text)
> clave = $Grid.rslt.Fields[n].Name
> actual.Add(valor, clave)
> Next
> 
> any information about that symbol please!
> 
> 
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


-- 
B Bruen 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] missing wiki gridview.rows.selection

2017-06-19 Thread PICCORO McKAY Lenz
the documentation for Rows.Selection i cannot found in wiki.. ide does not
show any documentation..

i found that piede of code in the recet upload of the wGridfilter and no
doc its raised in ide:

For n = 0 To $Grid.columns.Count - 1
valor = IIf($Grid[$Grid.Rows.Selection[c], n].text = "",
$Grid[$Grid.Rows.Selection[c], n].richText, $Grid[$Grid.Rows.Selection[c],
n].text)
clave = $Grid.rslt.Fields[n].Name
actual.Add(valor, clave)
Next

any information about that symbol please!


Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] wiki pages related to row count partially incorrect

2017-06-19 Thread PICCORO McKAY Lenz
the gambas wiki about rows count are partially incorrect..

http://gambaswiki.org/wiki/comp/gb.db/result/count?l=en

the problem its that the cursor in most drivers return a Forwad Only and
due tat the count implementation couln not be...

the specification are better describe in the odbc related bugs in
gambaswiki please read it

and yeah, i'm too concentrate in wiki documentation, due causes too many
headaches to non-english speaker users.. due translations problems

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112=L21haW4-

Comment #5 by Olivier CRUILLES:

I will test it soon. Thank you
Olivier



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1115: Segmentation Fault STREAM_write - gbr3

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1115=L21haW4-

Comment #3 by Olivier CRUILLES:

I will sent the source code soon.
Olivier



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112=L21haW4-

Comment #3 by Benoît MINISINI:

Done in revision #8144.

Benoît MINISINI changed the state of the bug to: Fixed.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1116: Error when a project has both gb.qt4 and gb.web.form

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1116=L21haW4-

Comment #2 by Benoît MINISINI:

Fixed in revision #8143.

Benoît MINISINI changed the state of the bug to: Fixed.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1110: Error trying to add event on menu complete

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1110=L21haW4-

Comment #4 by Benoît MINISINI:

I have no error at all on the development version, so I think the bug is 
already fixed.

Is it possible for you to try the development version?

Benoît MINISINI changed the state of the bug to: Working.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1115: Segmentation Fault STREAM_write - gbr3

2017-06-19 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1115=L21haW4-

Benoît MINISINI changed the state of the bug to: NeedsInfo.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help needed from regexp gurus

2017-06-19 Thread Fernando Cabral
This is mostly to thank Tobi and Jussi for their help in solving some
issues that were making me unhappy.

With three lines of code I have solved what used to take me twenty or so.
What is better yet: execution time
fell down from 2min 30 sec to 1,5 seconds. And the code is much more
transparent, The three lines bellow are the heart and brain of the program:

MatchedWords = Split(RawText, " \"'`[]{}+-_:#$%&.!?:(),;-\n", "", True)
MatchedSentences = Split(RegExp.Replace(RawText,
"([.])|([!])|([?])|(;\n)|([:]\n)", "&1&2&3&4&5\x00", RegExp.UTF8), "\x00",
"", True)
MatchedParagraphs = Split(RawText, "\n", "", True)

These three lines will take an entire text file (read into the variable
RawText) and split it into words, sentences and paragraphs. They ONE SECOND
to process a 150-page long text file with  414,961 bytes, tallying 69,196
words, 4,626 sentences and 2,409 paragraphs.

I am impressed!

In this last (and fast) version I have depended very little on RegExp. But
I still have used it to do some massaging on the original text. The line
"MatchedSentences = " above shows an example. The characters ".?!",
and the strings ";\n" and ":\n" signal the end of a sentence. Nevertheless,
I can not use them as separators for Split(). I can' t because Split ()
would drop them as it does with separators. Nevertheless, I need them
later. So I used RegExpl.Replace () to insert a \x00 after each of them and
then I used \x00 as the only sentence separator. This preserved the
punctuation marks I needed at the end of each sentence.

After running those three lines I still need to do some additional
processing with the resulting arrays, but that only consumes another half a
second for the same 150-page long document.

Now I am happy and I feel stimulated to complete the code and do some
polishing.

Thank you, Tobi and Jussi. You have helped a lot.

2017-06-17 18:06 GMT-03:00 Tobias Boege :

> On Sat, 17 Jun 2017, Fernando Cabral wrote:
> > Still beating my head against the wall due to my lack of knowledge about
> > the PCRE methods and properties... Because of this, I have progressed not
> > only very slowly but also -- I fell -- in a very inelegant way. So
> perhaps
> > you guys who are more acquainted with PCRE might be able to hint me on a
> > better solution.
> >
> > I want to search a long string that can contain a sentence, a paragraph
> or
> > even a full text. I wanna find and isolate every word it contains. A word
> > is defined as any sequence of alphabetic characters followed by a
> > non-alphatetic character.
> >
>
> The Mathematician in me can't resist to point this out: you hopefully
> wanted
> to define "word in a string" as "a *longest* sequence of alphabetic
> characters
> followed by a non-alphabetic character (or the end of the string)". Using
> your
> definition above, the words in "abc:" would be "c", "bc" and "abc", whereas
> you probably only wanted "abc" (the longest of those).
>
> > The sample code bellow does work, but I don't feel it is as elegant and
> as
> > fast as it could and should be.  Especially the way I am traversing the
> > string from the beginning to the end. It looks awkward and slow. There
> must
> > be a more efficient way, like working only with offsets and lengths
> instead
> > of copying the string again and again.
> >
>
> You think worse of String.Mid() than it deserves, IMHO. Gambas strings
> are triples of a pointer to some data, a start index and a length, and
> the built-in string functions take care not to copy a string when it's
> not necessary. The plain Mid$() function (dealing with ASCII strings only)
> is implemented as a constant-time operation which simply takes your input
> string and adjusts the start index and length to give you the requested
> portion of the string. The string doesn't even have to be read, much less
> copied, to do this.
>
> Now, the String.Mid() function is somewhat more complicated, because
> UTF-8 strings have variable-width characters, which makes it difficult
> to map byte indices to character positions. To implement String.Mid(),
> your string has to be read, but, again, not copied.
>
> Extracting a part of a string is a non-destructive operation in Gambas
> and no copying takes place. (Concatenating strings, on the other hand,
> will copy.) So, there is some reading overhead (if you need UTF-8 strings),
> but it's smaller than you probably thought.
>
> > Dim Alphabetics as string "abc...zyzABC...ZYZ"
> > Dim re as RegExp
> > Dim matches as String []
> > Dim RawText as String
> >
> > re.Compile("([" & Alphabetics & "]+?)([^" & Alphabetics & "]+)",
> > RegExp.utf8)
> > RawText = "abc12345def ghi jklm mno p1"
> >
> > Do While RawText
> >  re.Exec(RawText)
> >  matches.add(re[1].text)
> >  RawText = String.Mid(RawText, String.Len(re.text) + 1)
> > Loop
> >
> > For i = 0 To matches.Count - 1
> >   Print matches[i]
> > Next
> >
> >
> > Above code correctly finds "abc, def, ghi, jlkm, mno, p". But the tricks
> I

[Gambas-user] ODBC standar not tested property and many wiki/docs need corrections

2017-06-19 Thread PICCORO McKAY Lenz
Hi gambas devels and users, in some mail conversation with Jorje Carrion (
shordi) i noted that most gambas developers think that odbc supports same
features like normal native connections, many wiki pages assumed all the
gb.db connection types works equal, and it not as said!


.. and seems nobody except by me test or use really the ODBC behaviour in
gambas..


I mean: combinatios of ODBC+MSSQL or ODBC+ORACLE or ODBC+DB2 or
ODBC+SYBASE/FREETDS are not tested never in gambas i noted.. the opened
bugs confirmed that


http://gambaswiki.org/bugtracker/edit?object=BUG.1113 sql does not exec
after connect ODBC+FREETDS

http://gambaswiki.org/bugtracker/edit?object=BUG.1102 in some cases
subquerys does not return nothing

http://gambaswiki.org/bugtracker/edit?object=BUG.1100 due ODBC specs,
cursor are FOWARD ONLY


fill the gridview using DATA event need that Result object have a cursor,
using MoveTO, but due the Result are Foward only usage of the "MoveTo" are
not working in all ODBC combinations cases...

by example wiki page said: "You can fill the grid explicitly, or implement
the Data  event to
display the grid contents on demand."
http://gambaswiki.org/wiki/comp/gb.qt4/gridview/.data


of course we can use other methos, but with thousand of rows are very
inefective...


All of these "limitations" around ODBC combinations must be in all the
realted wikis, due as like me, spend many hours thinking that "moveto" can
be done in odbc connections like sqlite or mysql connections..
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Building binaries with gba3 sometimes fails

2017-06-19 Thread alexchernoff
Okay, 

so if i run gbc3 on the project before gba3, it should compile it and then
archive it, right?

peace!





--
View this message in context: 
http://gambas.8142.n7.nabble.com/Building-binaries-with-gba3-sometimes-fails-tp59410p59414.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Building binaries with gba3 sometimes fails

2017-06-19 Thread Benoît Minisini via Gambas-user

Le 19/06/2017 à 13:00, alexchernoff a écrit :

sorry, I meant I compile using gba3. Or does it also not account for changes?

thanks!



Yes, I understood you meant gba3. And gba3 is not a compiler, it's an 
archiver. It does not take your changes into account.


--
Benoît Minisini

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Building binaries with gba3 sometimes fails

2017-06-19 Thread alexchernoff
sorry, I meant I compile using gba3. Or does it also not account for changes?

thanks!




--
View this message in context: 
http://gambas.8142.n7.nabble.com/Building-binaries-with-gba3-sometimes-fails-tp59410p59412.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Building binaries with gba3 sometimes fails

2017-06-19 Thread Benoît Minisini via Gambas-user

Le 19/06/2017 à 12:54, alexchernoff a écrit :

Dear all,

I come in peace. I have some shell scripts to batch compile a bunch of
Gambas 3 projects. Sometimes I notice the gbr3 builds an executable, but it
it does NOT include some latest and saved changes...

I have to open the project and run it in the IDE, close IDE, and gbr3 it
again for it to work.

Anybody know why?

thanks!




gbr3 does not take into account your last changes. Only gbc3 (the 
compiler) does.


--
Benoît Minisini

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Building binaries with gba3 sometimes fails

2017-06-19 Thread alexchernoff
Dear all,

I come in peace. I have some shell scripts to batch compile a bunch of
Gambas 3 projects. Sometimes I notice the gbr3 builds an executable, but it
it does NOT include some latest and saved changes...

I have to open the project and run it in the IDE, close IDE, and gbr3 it
again for it to work.

Anybody know why?

thanks!




--
View this message in context: 
http://gambas.8142.n7.nabble.com/Building-binaries-with-gba3-sometimes-fails-tp59410.html
Sent from the gambas-user mailing list archive at Nabble.com.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user