[Gambas-user] reconf error for r7786 trunk

2016-05-24 Thread Tony Morehen
I ran reconf-all which quits with:

autoreconf: configure.ac: adding subdirectory gb.httpd to autoreconf
autoreconf: Entering directory `gb.httpd'
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from 
'/usr/share/aclocal/lt~obsolete.m4'
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
configure.ac:88: error: possibly undefined macro: GB_AC_LBL_CHECK_LIB
   If this token and others are legitimate, please use m4_pattern_allow.
   See the Autoconf documentation.
configure.ac:127: error: possibly undefined macro: GB_AC_ACME_TM_GMTOFF
configure.ac:128: error: possibly undefined macro: GB_AC_ACME_INT64T
configure.ac:129: error: possibly undefined macro: GB_AC_ACME_SOCKLENT
autoreconf: /usr/bin/autoconf failed with exit status: 1


No errors or warnings prior to this.


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] [Gambas Bug Tracker] Bug #973: Desktop.RunAsRoot(): file or directory doesn't exist

2016-08-05 Thread Tony Morehen
Try adding the full path to chmod or cat.


On 8/5/2016 5:00 PM, bugtrac...@gambaswiki.org wrote:
> http://gambaswiki.org/bugtracker/edit?object=BUG.973=L21haW4-
>
> Comment #2 by vuott VUOTT:
>
>> Desktop.RunAsRoot requires the command to be written between the brackets.
> Yes, I know it.
>
>
> If I try this:
>
> Public Sub Button1_Click()
>
>Desktop.RunAsRoot("chmod 666 /dev/tty1")
>
> End
>
>   or e.g.:
>
> Public Sub Button1_Click()
>
>Desktop.RunAsRoot("cat /dev/input/mouse0")
>
> End
>
>
> I get that error message:
> "File or directory doesen't exist."
>
> vuott VUOTT changed the state of the bug to: Opened.
>
>
>
> --
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Arrays of Structs

2016-11-29 Thread Tony Morehen
I may just be responding to a typo but your struct is named MapObjec 
while the code using it refers to MapObject.


On 28/11/16 10:40 PM, Cam Era wrote:
> I expect I'm trying to do something that's not possible with Gambas, but
> I'll ask this anyway.
>
> I'm trying to create an n x n array of a STRUCT which itself contains an
> array of type STRUCT.
>
> I have this declaration:
>
>  Public Struct MapObjec
>xPos As Integer
>yPos As Integer
>ObjectType As Integer
>isVisible As Boolean
>ObjectPicture As Picture
>  End Struct
>
>  Public Struct MapRoom
>MapObjects[50] As MapObject
>  End Struct
>
>  Static Private WorldMap[100, 100] As MapObject
>
>
> and this code:
>
>  WorldMap[5, 10].MapObjects.yPos = 100
>
>
> which generates a "NULL object" error.
>
> Any pointers as to whether this is possible and if so, how?
>
>
> Cheers
>
> -- Cam
> --
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] New Editor Side Bar

2016-12-17 Thread Tony Morehen
Fabian, it looks great and works like a charm.

By the way, I'm working on text editor which would benefit from a couple 
of minor changes to the text editor component.  Could you make 
$hDoc.Lines a read/write property of TextEditor and $hDoc.LineLength a 
read only property?

I working on a search function.  I can use Instr on TextEditor.Text to 
find the appropriate text but I can't select that text because the 
TextEditor.Select function requires Start Column, Start Row, End Column, 
End Row and there is no function to calculate those coordinates from the 
position in the text stream that InStr returns.

Exposing Lines lets me search for text on the same basis as the Select 
function, by row and column.  Exposing LineLength lets me easily write a 
function to go from Instr's text position to Select's column, row 
coordinates.

Indeed, I have already written a function to do that.  It splits 
TextEditor.Text into lines and then uses the String.Len function to 
calculate coordinates.  Unfortunately, it has to do that every time I do 
a search which is redundant given that TextEditor has the same 
information internally.

At some point, it may be useful to add a Select(selectionstart as 
integer, selectionlength as integer) method.  This would make TextEditor 
a virtual drop-in replacement for TextArea.

On 12/12/16 09:00 AM, Fabien Bodard wrote:
> I added a new property to the Gambas code editor. I hope that I have
> sufficiently debugged it to avoid any inconvenience. This bar is drawn
> from the vertical kate scroll bar. It displays a preview of the entire
> code of the file. Of course as I coded in Gambas it is not really a
> preview but rather a simplified rendering taking into account the
> indentation and the length of the lines. A text rendering would have
> cost far too many resources. Some line property remains however
> highlighted as the lines in comment and in the margin the information
> if the row is changed. The marked lines are represented by a yellow
> line.
>
>
> When moving the cursor, the first and last lines of the displayed area
> are indicated by a tooltip. When browsing the bar, a mini editor shows
> the code present at the position indicated by the mouse on the bar. I
> added two features. Ctrl + Click moves the editor directly to the line
> below the mouse pointer. Ctrl + Alt + Click Sets the "magnifying"
> editor to where it is. This makes it possible to have the code portion
> under the eyes. Just click on the "magnifying" editor to hide it.
>
> Give me your impressions, and especially remount me any problem as
> quickly as possible.
>
> Regards,
>



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


Re: [Gambas-user] New Editor Side Bar

2016-12-18 Thread Tony Morehen
Thanks for the info, Benoit.  I'm still learning all of Gambas' nuances.  BTW, 
I am using string.instr.

On December 18, 2016 3:43:07 AM EST, "Benoît Minisini" 
<gam...@users.sourceforge.net> wrote:
>Le 18/12/2016 à 05:52, Tony Morehen a écrit :
>> Fabian, it looks great and works like a charm.
>>
>> By the way, I'm working on text editor which would benefit from a
>couple
>> of minor changes to the text editor component.  Could you make
>> $hDoc.Lines a read/write property of TextEditor and $hDoc.LineLength
>a
>> read only property?
>
>No need for that. Use TextEditor array accessor to access a specific
>line:
>- "MyTextEditor[Line].Text" returns a the "Line" line.
>- "MyTextEditor[Line].Length" returns the length of the "Line" line.
>
>Beware that MyTextEditor[Line] returns a virtual temporary object. You 
>must not store it.
>
>>
>> I working on a search function.  I can use Instr on TextEditor.Text
>to
>> find the appropriate text
>
>You must not use Instr(), it cannot handle UTF-8 text. Use 
>String.Instr() instead.
>
>Regards,
>
>-- 
>Benoît Minisini
>
>--
>Check out the vibrant tech community on one of the world's most 
>engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>___
>Gambas-user mailing list
>Gambas-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
Check out the vibrant 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] A couple of ?s about encryption

2017-08-13 Thread Tony Morehen
Don't use .hidden.  There is nothing secure about and its only used by 
the development/installation environments.  Hidden directories in 
general do nothing for security.


Don't worry about open source/GNU.  All encryption programs use the same 
well known algorithms.  It's passwords that guarantee security, not the 
algorithm.  BTW, like hidden files, there is no security from obscurity.


As far as shelling to a third-party encryption program like gpg or 
openssl, those programs are good and produce secure outputs, depending 
of course on the algorithm selected.  However, the act of shelling 
exposes you to several attacks like man-in-the-middle.  Not recommended.


So internal encryption is recommended and Gambas has the gb.crypt and 
gb.openssl components to lighten your workload.  Also, gb.desktop has 
several password-related functions that can save and retrieve passwords 
from your system's wallet/keyring.


gb.crypt includes several one way hash algorithms like md5 or sha-256.  
With these, you save the password hash and then compare hashes on future 
logins.  With these, you never save the actual passwords and the hashes 
are virtually impossible to decrypt.


For two way encryption, where you need to go from plain text to 
encrypted text back to plain text, look at gb.openssl.  It has methods 
for symmetric encryption (one password to both encrypt and decrypt text) 
and for asymmetric encryption(two passwords, one to encrypt and one to 
decrypt).  Public key private key encryption is an example of the 
latter.  Text encrypted with the private key can only be decrypted by 
the public key and vice versa.



On 2017-08-13 01:59 PM, mikeB wrote:

eGreeetings,
I am starting a project that involves encryption of passwords and user 
names - storing and recalling them.


1st ? = i noticed Gambas can save and recall files from a ".hidden" 
directory. If the files are encrypted before
saving to a hidden dir - how secure is this?  In other words would an 
experienced coder be able to find and
copy these files? Would this be the secure/ recommended way/ place to 
store these files?


2nd ? = shelling out to the "gpg" command line to encrypt / decrypt 
the password files be a secure way of
doing this or is there a better way (i.e. writing the encryption code 
within the Gambas project)?


3rd ? = Now a GNU question from a real newbie on this subject. With 
this type of program (Protected Passwords)
how in the heck could it be released under GNU? Or should it be? Don't 
understand how it could possibly be

"protected" if the source code was available to all?

Any suggestions, from the group, would be GREATLY APPRECIATED!
mikeB



-- 


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




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


Re: [Gambas-user] How to stop a control raising events?

2017-08-13 Thread Tony Morehen
Careful, though, Object.Lock inhibits all events associated with a 
control, including events from internal controls.  For example, DirView 
has an internal TreeView control.  When you click on a folder or set the 
Current property in code,  DirView tells the TreeView to expand that 
branch.  TreeView then raises the Expand event, requesting that DirView 
fill in the sub-folders of that branch.  After that is done, DirView 
raises its click event.


I wanted the click event to only occur when the user clicks on a folder 
so I surrounded the code setting DirView.Current with 
object.lock/unlock.  All of a sudden, DirView stopped updating 
properly.  This seemed to occur only during the initialization of 
DirView.  It took me 2 days to figure out that the object.lock stopped 
the TreeView Expand event so DirView did not update. Another control was 
setting the DirView Current property during its initialization, not any 
of my own code, which made debugging even harder.


I wound up replacing the object.lock with a boolean flag.  When set, the 
flag stops the Click event code from running.



On 2017-08-13 06:18 PM, Tobias Boege wrote:

On Mon, 14 Aug 2017, adamn...@gmail.com wrote:

(A quicky!)

Wasn't there a way to temporarily stop a control raising events, MyControl.Lock 
or somesuch? My memory fails!
tia
bruce

Object.Lock(x)





--
Check out the vibrant 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] Weather app in Software Farm

2017-07-14 Thread Tony Morehen
I just uploaded a Weather systray app to the software farm. 
Comments/suggestions welcome.  Enjoy.




--
Check out the vibrant 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] Weather app in Software Farm

2017-07-16 Thread Tony Morehen

I just uploaded a version that uses the gb.gui component instead of

gb.qt5.  It also has a workaround that may fix your error. That error
arises when your system does not have a systray enabled.  See:

https://unix.stackexchange.com/questions/278104/app-icons-dont-appear-in-system-tray-on-linux-mint-17-3

I haven't been able to test since I'm running Manjaro.  What version of
Mint are you using : Cinnamon, Mate Xfce? 17.? 18.?


On 2017-07-15 09:39 AM, Charlie wrote:

Tony Morehen wrote

I just uploaded a Weather systray app to the software farm.
Comments/suggestions welcome.  Enjoy.

Hi Tony,

I tried your program on a computer at work and got it working after adding
*gb.qt4*. Linux Mint does not have QT5 yet. I tried it a home but even after
fixing QT I got: -

*"sni-qt/5871" WARN  12:51:31.765 void
StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE *

After 20 seconds FMain appeared but with no data.

Not sure what the problem is.




-
Check out www.gambas.one
--
View this message in context: 
http://gambas.8142.n7.nabble.com/Weather-app-in-Software-Farm-tp59768p59771.html
Sent from the gambas-user mailing list archive at Nabble.com.

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




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


Re: [Gambas-user] What is the simplest way to display text properties in Gambas?

2017-07-06 Thread Tony Morehen
Basically, assign some simple HTML to the text property.  Not sure what 
comprises simple HTML though.


ie TextLabel1.Text="Bold not bold"

Seelhttp://gambaswiki.org/wiki/comp/gb.qt4/textlabel


On 2017-07-06 12:43 PM, Fernando Cabral wrote:

Based on the image you've sent a link to, I have not been able to
understand how to do it.

Thank you.

- fernando

2017-07-06 11:08 GMT-03:00 Charlie :


Fernando Cabral wrote

I'd like to display text highlights like bold and italics. Can I do it
using TextArea? If yes, how?

If I can't which resource should I use?

Try using a TextLabel: -






-
Check out www.gambas.one
--
View this message in context: http://gambas.8142.n7.nabble.
com/What-is-the-simplest-way-to-display-text-properties-in-
Gambas-tp59692p59696.html
Sent from the gambas-user mailing list archive at Nabble.com.


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








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


Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Tony Morehen

Did you try Benoit's suggestion:

Public Sub Main()

  Dim sIn as String
  Dim sOut as String

  sIn = File.Load("/home/fernando/temp/deah001.dhn")
  sOut = Add11(sIn)
  File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut)

End

Public Sub Add11(InputString as String) as String
  Dim bArray As Byte[]
  Dim String11 As String
  Dim i As Integer

  bArray = Byte[].FromString(InputString)
  For i = 0 To bArray.Max
bArray[i] += 11
  Next
 Return bArray.ToString
End


On 2017-07-15 01:36 PM, Fernando Cabral wrote:

Well, after 5 hours the most efficient version is still running. Only 1/5
of the file has been processed. The less efficient version has only
processed 1 MB, or 1/ 42 of the file.

So I decided to write a C program to do the same task. Since I have not
been using C in the last 20 years, I did not try any fancy thing. I know C
has to be more efficient, so I expected to find find, perhaps, 10 minutes,
5 minutes. Not so. To my surprise, the program bellow did the whole thing
in ONE SECOND!

I found this to be quite inexpected.

















*#include int main(void){FILE *fp;int c;fp =
fopen("/home/fernando/temp/deah001.dhn", "r");while((c = fgetc(fp)) !=
EOF) {putchar(c + 11);}fclose(fp);return 0;}*

I am sure there is a way to do this efficiently in Gambas.Certainly not in
1 second, as it happened here, but perhaps in 5 or 10 minutes instead of
the several hours it is now taking.

- fernando

2017-07-15 11:08 GMT-03:00 Fernando Cabral :


Hi

I've found a file whose text has been obfuscated by subtracting 11 from
every byte. Now I want to bring it back to regular text. To do this I have
to add 11 to each byte read from that file. Now, I have tried several ways
to do it, and they all seemed every inefficient to me. Two examples follow











*j = 0For i = 0 To Len(RawText)str &= Chr(CByte(Asc(RawText, i) + 11))  '
either this or the following'Mid(Rawtext, i, 1) = Chr(CByte(Asc(RawText, i)
+ 11))Inc jIf j = 10 Then   Print i; Now   j = 0EndifNext*

In the first option (uncommented) I am building a new string byte by byte.
In the second option (commented) I am replacing each character in place.
I expected the second option to be way faster, especially because there is
no need for the string to be reallocated. Nevertheless, it showed to be a
snail.
The first option, in spite of the fact that it grows slower and slower as
the string grows, is still way faster than the second option.


To me it does not make sense. Does it for you?
Also, is there a faster way to do this?

--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.








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


Re: [Gambas-user] Pre-release of Gambas 3.10.0

2017-07-18 Thread Tony Morehen
I'll compile and start using it right away.  In the meantime, a feature 
request:


Currently, a menu item with children does nothing before displaying its 
child menu items.  I propose that the parent menu raise a click event 
before displaying its children.  This would allow you to show/not show 
enable/disable child menu items based on the current state of the app or 
its environment.


For example, when the edit menu is clicked, you can enable/disable the 
paste item based on the state of the clipboard.


This change should not affect existing apps as they will not have click 
handlers for parent menus.



On 2017-07-18 11:56 AM, Benoît Minisini via Gambas-user wrote:

Hi,

I have just uploaded the source tarball of Gambas 3.10 on Sourceforge:

https://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.10.0.tar.bz2/download 



Can people test it and report any problem before I make the release 
public?


Thanks in advance!





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


Re: [Gambas-user] reading files

2017-07-20 Thread Tony Morehen
It is my code.  It started off life as part of a cd ripper program I 
wrote in 2010 in vb6.  It was inspired by code provided by Steve McMahon 
(st...@vbaccelerator.com) under an Apache style licence.  The code has 
since been heavily rewritten, translated to vb.net and finally 
translated to gambas.



On 2017-07-20 07:16 AM, Shane wrote:

with the code i was trying to adapt you can't

i was getting strange values eg.

a struct size of 208 when it was meant to be 128 and for some strange 
reason get end of file


when seeking to eof less header even if i backed up more than the 208 
bytes


i can see that tony didn't right it i should of said did he convert it 
to gambas ?


i think this should be in the farm ?




On 20/07/17 21:04, Gianluigi wrote:

2017-07-20 12:09 GMT+02:00 Shane <buster6se...@gmail.com>:


yep can't use structs have to do like tony's code works perfect thanks
again tony


h are you sure?



p.s is this your code ?


No, but you can easily see who wrote it :)





On 20/07/17 19:56, Gianluigi wrote:


Right ... and a look here too [0]

Ciao :)
Gianluigi

[0] 
http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#msg41793


2017-07-20 3:15 GMT+02:00 Shane <buster6se...@gmail.com>:

thanks tony sounds like just what i needed i will take a look

cheers



On 19/07/17 22:34, Tony Morehen wrote:

I've attached an archive containing the code I use to read v1 and 
v2 MP3

tags and other MP3 info including bitrates (fixed and VBR), sampling
rates
and number of channels.  v1 tags are pretty staightforward to 
read if

you
don't try to read the structure directly, but by each element of the
structure at a time.  Some tips:

1) Numeric elements (bytes, bytearrays, shorts, integers, longs) 
can be
read directly from the stream. ie  (4 byte Integer) = Read 
#Stream As

Integer.  Gambas can handle little endian/big endian issues.

2) Fixed length strings must be handled in a two stage process. 
First,
the required string length number of bytes is read into a byte 
array.

This
byte array is then converted to a string. Sample code:

Dim Bytes As New Byte[StringLength]
Bytes.Read(Stream)
FixedString = Bytes.ToString()

Note: Bytes.ToString stops the string conversion at the first 
null or at

the end of the array.  Therfore, you don't have to worry about
null-terminated strings.

v2 tags are more complicated, particularly since the tags can be 
ascii,
either kind of utf16, or utf8 encoding.  The code I sent has been 
tested

with over 10,000 mp3 files has seems to have no issues.


On 2017-07-19 12:33 AM, Shane wrote:

thank you Gian i did take a rest and read but alas it did not help
as far as i see it he is saying don't use binary file for fixed 
length

strings

but as this is an mp3 file tag witch i have no control i am doomed



On 18/07/17 19:22, Gianluigi wrote:

Why do not you take a moment of rest and read what Tobias Boege

recommend
me in the discussion [0] I told you here [1]?

[0]
http://gambas.8142.n7.nabble.com/Random-access-files-with-fi
xed-length-string-td50880.html
[1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html

2017-07-18 9:04 GMT+02:00 Shane <buster6se...@gmail.com>:

I am very confused from the docs


_Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_

_Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_

so wouldn't it be_
_

IDtag = read #hfile  as ID3v1_TAG  ?

with doesn't work by the way



On 18/07/17 12:44, nand...@nothingsimple.com wrote:

I think


Read #hfile, IDtag, ID3v1_TAG
should be
Read #hfile, IDtag as ID3v1_TAG


--
Open WebMail Project (http://openwebmail.org)


-- Original Message ---
From: Shane <buster6se...@gmail.com>
To: gambas-user@lists.sourceforge.net
Sent: Tue, 18 Jul 2017 10:50:43 +1000
Subject: Re: [Gambas-user] reading files

i don't know what i am doing wrong

Public Struct ID3v1_TAG '(128 bytes)

  Tag[3] As String   'always TAG
  Title[30] As String 'title, 30 characters
  Artist[30] As String 'artist, 30 characters
  Album[30] As String 'album, 30 characters
  Year[4] As String 'year, 4 characters
  Comment[30] As String 'comment, 30 characters (or
28 if
track# included)
  Genre As Byte 'genre, 255 for none
defined
End Struct

Private Sub GetID3v1(File As String)
 Dim IDtag As ID3v1_TAG
 Dim hfile As File

 hfile = Open File For Read

 '
 'read the tag
 ' seek to end of less tag size

 Read #hfile, IDtag, ID3v1_TAG

here i get IDtag is NULL

On 18/07/17 05:05, nand...@nothingsimple.com wrote:

Yes it is possible, I do it. here is some code (incomplete)


-Nando (Canada)



' top of class file
Public Struct recstruc
   _a as integer
   _b as integer
   _c as integer
end struct


' a function
public function openAfile(filename as string) as file

dim hfile as file
dim arec as recstruc

hfile = open

Re: [Gambas-user] reading files

2017-07-19 Thread Tony Morehen
I've attached an archive containing the code I use to read v1 and v2 MP3 
tags and other MP3 info including bitrates (fixed and VBR), sampling 
rates and number of channels.  v1 tags are pretty staightforward to read 
if you don't try to read the structure directly, but by each element of 
the structure at a time.  Some tips:


1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can be 
read directly from the stream. ie  (4 byte Integer) = Read #Stream As 
Integer.  Gambas can handle little endian/big endian issues.


2) Fixed length strings must be handled in a two stage process. First, 
the required string length number of bytes is read into a byte array.  
This byte array is then converted to a string. Sample code:


  Dim Bytes As New Byte[StringLength]
  Bytes.Read(Stream)
  FixedString = Bytes.ToString()

Note: Bytes.ToString stops the string conversion at the first null or at 
the end of the array.  Therfore, you don't have to worry about 
null-terminated strings.


v2 tags are more complicated, particularly since the tags can be ascii, 
either kind of utf16, or utf8 encoding.  The code I sent has been tested 
with over 10,000 mp3 files has seems to have no issues.



On 2017-07-19 12:33 AM, Shane wrote:

thank you Gian i did take a rest and read but alas it did not help

as far as i see it he is saying don't use binary file for fixed length 
strings


but as this is an mp3 file tag witch i have no control i am doomed



On 18/07/17 19:22, Gianluigi wrote:
Why do not you take a moment of rest and read what Tobias Boege 
recommend

me in the discussion [0] I told you here [1]?

[0]
http://gambas.8142.n7.nabble.com/Random-access-files-with-fixed-length-string-td50880.html 


[1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html

2017-07-18 9:04 GMT+02:00 Shane :


I am very confused from the docs

_Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_

_Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_

so wouldn't it be_
_

IDtag = read #hfile  as ID3v1_TAG  ?

with doesn't work by the way



On 18/07/17 12:44, nand...@nothingsimple.com wrote:


I think
  Read #hfile, IDtag, ID3v1_TAG
should be
  Read #hfile, IDtag as ID3v1_TAG


--
Open WebMail Project (http://openwebmail.org)


-- Original Message ---
From: Shane 
To: gambas-user@lists.sourceforge.net
Sent: Tue, 18 Jul 2017 10:50:43 +1000
Subject: Re: [Gambas-user] reading files

i don't know what i am doing wrong

Public Struct ID3v1_TAG '(128 bytes)
Tag[3] As String   'always TAG
Title[30] As String 'title, 30 characters
Artist[30] As String   'artist, 30 characters
Album[30] As String   'album, 30 characters
Year[4] As String  'year, 4 characters
Comment[30] As String  'comment, 30 characters (or 
28 if

track# included)
Genre As Byte   'genre, 255 for none defined
End Struct

Private Sub GetID3v1(File As String)
   Dim IDtag As ID3v1_TAG
   Dim hfile As File

   hfile = Open File For Read

   '
   'read the tag
   ' seek to end of less tag size

   Read #hfile, IDtag, ID3v1_TAG

here i get IDtag is NULL

On 18/07/17 05:05, nand...@nothingsimple.com wrote:


Yes it is possible, I do it.  here is some code (incomplete)

-Nando (Canada)



' top of class file
Public Struct recstruc
 _a as integer
 _b as integer
 _c as integer
end struct


' a function
public function openAfile(filename as string) as file

dim hfile as file
dim arec as recstruc

hfile = open filename for read write create

with arec   'some values to write.
 ._a = 1
 ._b = 22
 ._c = 333
end with

write #hfile, arec as recstruc

'if you position the hfile pointer back to zero, you can...
read #hfile, arec as recstruc

close #hfile

end






--
Open WebMail Project (http://openwebmail.org)


-- Original Message ---
From: T Lee Davidson 
To: gambas-user@lists.sourceforge.net
Sent: Sun, 16 Jul 2017 12:42:35 -0400
Subject: Re: [Gambas-user] reading files

On 07/16/2017 06:57 AM, Shane wrote:

given this example

PRIVATE SUB BinaryRead(FilePath AS String)
  DIM binaryFile AS File
  DIM i AS Integer
  DIM b AS Byte
  DIM s AS Short
  DIM s1 AS String
  DIM s2 AS String
  ' Read binary file
  binaryFile = OPEN FilePath FOR READ
  READ #binaryFile, i
  READ #binaryFile, b
  READ #binaryFile, s
  READ #binaryFile, s1
  READ #binaryFile, s2
  CLOSE #binaryFile
  ' Display results
  PRINT i
  PRINT b
  PRINT s
  PRINT s1
  PRINT s2
END


is there a way for gambas to read a struct of all these variables
in one read ?

You may have hinted at the solution within your question. Have you

considered
using a Structure?

http://gambaswiki.org/wiki/lang/read :
"... reads the stream Stream as 

Re: [Gambas-user] [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

2017-07-19 Thread Tony Morehen

That is the documented behaviour:

All Message functions can have up to three buttons:

 *

   The first button is always the default button.

 *

   The last button is always the cancel button.


On 2017-07-19 09:20 AM, bugtrac...@gambaswiki.org wrote:

http://gambaswiki.org/bugtracker/edit?object=BUG.1128=L21haW4-

C THAL reported a new bug.

Summary
---

Message.Question should return -1 on cancel

Type : Bug
Priority : Medium
Gambas version   : 3.9.90 (TRUNK)
Product  : Language


Description
---

Message.Question returns 2 if the message window was closed or canceled via 
.

That is bad, especially if there are two buttons and the action should not be 
default, but on button two, like so:

Dim ret as integer

ret = Message.Question("Do you really want to delete all?", "No", "Yes")

--

If the user cancels or closes the window of the message it returns 2! All will 
be deleted ...





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


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


Re: [Gambas-user] reading files

2017-07-20 Thread Tony Morehen

Audio or development


On 2017-07-20 02:40 PM, Hans Lehmann wrote:

Am 20.07.2017 um 20:27 schrieb Tony Morehen:
I've uploaded the class with a short command line demo to the 
software farm. 


Hello Tony,

under which heading can I find the class in the software farm?

Honsek
-- 


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




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


Re: [Gambas-user] reading files

2017-07-20 Thread Tony Morehen

I've uploaded the class with a short command line demo to the software farm.


On 2017-07-20 12:22 PM, Gianluigi wrote:

Hi Tony,
Sorry if i answered  instead of you, but I did not understand who the
question was for :-(

Regards
Gianluigi

2017-07-20 15:35 GMT+02:00 Tony Morehen <tmore...@ajmconsulting.ca>:


It is my code.  It started off life as part of a cd ripper program I wrote
in 2010 in vb6.  It was inspired by code provided by Steve McMahon (
st...@vbaccelerator.com) under an Apache style licence.  The code has
since been heavily rewritten, translated to vb.net and finally translated
to gambas.


On 2017-07-20 07:16 AM, Shane wrote:


with the code i was trying to adapt you can't

i was getting strange values eg.

a struct size of 208 when it was meant to be 128 and for some strange
reason get end of file

when seeking to eof less header even if i backed up more than the 208
bytes

i can see that tony didn't right it i should of said did he convert it to
gambas ?

i think this should be in the farm ?




On 20/07/17 21:04, Gianluigi wrote:


2017-07-20 12:09 GMT+02:00 Shane <buster6se...@gmail.com>:

yep can't use structs have to do like tony's code works perfect thanks

again tony

h are you sure?


p.s is this your code ?

No, but you can easily see who wrote it :)




On 20/07/17 19:56, Gianluigi wrote:

Right ... and a look here too [0]

Ciao :)
Gianluigi

[0] http://www.gambas-it.org/smf/index.php?topic=5794.msg41793#m
sg41793

2017-07-20 3:15 GMT+02:00 Shane <buster6se...@gmail.com>:

thanks tony sounds like just what i needed i will take a look


cheers



On 19/07/17 22:34, Tony Morehen wrote:

I've attached an archive containing the code I use to read v1 and v2
MP3


tags and other MP3 info including bitrates (fixed and VBR), sampling
rates
and number of channels.  v1 tags are pretty staightforward to read if
you
don't try to read the structure directly, but by each element of the
structure at a time.  Some tips:

1) Numeric elements (bytes, bytearrays, shorts, integers, longs) can
be
read directly from the stream. ie  (4 byte Integer) = Read #Stream As
Integer.  Gambas can handle little endian/big endian issues.

2) Fixed length strings must be handled in a two stage process.
First,
the required string length number of bytes is read into a byte array.
This
byte array is then converted to a string. Sample code:

 Dim Bytes As New Byte[StringLength]
 Bytes.Read(Stream)
 FixedString = Bytes.ToString()

Note: Bytes.ToString stops the string conversion at the first null
or at
the end of the array.  Therfore, you don't have to worry about
null-terminated strings.

v2 tags are more complicated, particularly since the tags can be
ascii,
either kind of utf16, or utf8 encoding.  The code I sent has been
tested
with over 10,000 mp3 files has seems to have no issues.


On 2017-07-19 12:33 AM, Shane wrote:

thank you Gian i did take a rest and read but alas it did not help


as far as i see it he is saying don't use binary file for fixed
length
strings

but as this is an mp3 file tag witch i have no control i am doomed



On 18/07/17 19:22, Gianluigi wrote:

Why do not you take a moment of rest and read what Tobias Boege


recommend
me in the discussion [0] I told you here [1]?

[0]
http://gambas.8142.n7.nabble.com/Random-access-files-with-fi
xed-length-string-td50880.html
[1] http://gambas.8142.n7.nabble.com/vb-code-td59764.html

2017-07-18 9:04 GMT+02:00 Shane <buster6se...@gmail.com>:

I am very confused from the docs

_Variable_ *= READ* [ *#* _Stream_ ] *AS* _Datatype_

_Variable_ *= READ* [ *#* _Stream_ *,* ] _Length_

so wouldn't it be_
_

IDtag = read #hfile  as ID3v1_TAG  ?

with doesn't work by the way



On 18/07/17 12:44, nand...@nothingsimple.com wrote:

I think

 Read #hfile, IDtag, ID3v1_TAG

should be
 Read #hfile, IDtag as ID3v1_TAG


--
Open WebMail Project (http://openwebmail.org)


-- Original Message ---
From: Shane <buster6se...@gmail.com>
To: gambas-user@lists.sourceforge.net
Sent: Tue, 18 Jul 2017 10:50:43 +1000
Subject: Re: [Gambas-user] reading files

i don't know what i am doing wrong

Public Struct ID3v1_TAG '(128 bytes)


   Tag[3] As String   'always TAG
   Title[30] As String 'title, 30 characters
   Artist[30] As String 'artist, 30 characters
   Album[30] As String 'album, 30 characters
   Year[4] As String 'year, 4 characters
   Comment[30] As String 'comment, 30 characters (or
28 if
track# included)
   Genre As Byte 'genre, 255 for none
defined
End Struct

Private Sub GetID3v1(File As String)
  Dim IDtag As ID3v1_TAG
  Dim hfile As File

  hfile = Open File For Read

  '
  'read the tag
  ' seek to end of less tag size

  Read #hfile, IDtag, ID3v1_TAG

here i get IDtag is NULL

On 18/07/17 05:05, nand...@nothingsimple.com wrote:

Yes it is p

Re: [Gambas-user] Mystery with file.load and regexp

2017-07-04 Thread Tony Morehen
File.Load is working fine.  It is just loading a file that has a 
trailing "\n".  Split then adds an empty string as the last entry in the 
array.  This is Split's documented behaviour.  Adding the True option 
suppresses empty entries.  Note that Split will also add an empty entry 
for any blank lines ie "\n\n".  The True option will also suppress those 
empty entries.


A word of caution:  the True option will not suppress lines that are 
comprised entirely of spaces.  I'd test to see if those kind of lines 
also cause problems.



On 2017-07-04 10:28 PM, Fernando Cabral wrote:

I have found and worked around the problem. When you do the following:

*Dim Expressions as string[] =
Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"),
"\n") *

The last item pushed into *Expressions* is an empty string ("") even though
it DOES NOT exist
in the file. So, the expressions are compiled one after the other til the
last one, that is empty. Then the program crashes.

So it seems there is a bug in the *load.file()*. Bug that I was able to
compensate for by adding the option *True* in the call to the functions
*split()*.

2017-07-04 22:29 GMT-03:00 Fernando Cabral :


Concerning RegExp I have another mysterious thing to understand

If I do something like:








*Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The
same")For Each searchedfor In searchfor   re.Compile(searchedfor,
re.utf8)Next*
The expression gest compiled. No error.
Neverthelesse, if I the same words from a file, using this expression:

*Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")*

re.Compile will not work. It will display an error message saying there is
nothing to compile. Now, if I do:


*print "@" & Searchfor[n] &"@\n"*
in both cases I will see precisely the same output. I can't distinguish
one from the other. So, why it compiles in the first case, but does not in
the second?

This is the mystery I must solve with a little help from a good soul out
there.

- fernando



--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.








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


Re: [Gambas-user] why this could not be? error in runtime?

2017-07-28 Thread Tony Morehen
It's difficult to say for sure what's happening without Piccaro's test 
strings.  However, 2 things do come to mind.


First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to 
right search for ")", starting at -n  characters from the end of 
strinchar.  So if Instr doesn't find ")", it will return 0, which, in 
conjunction with the second -1, will cause mid to drop the last 
character of strinchar.  So to get the answer you want, use 
RInstr(strinchar,")"). which will do a right to left search for ")", 
starting at the end of strinchar.


Second, there may be a bug in gambas, or the documentation needs to make 
clear what end of string means.  This is best explained by example:


Instr("(foo)",")",-1) returns 5
Instr("(foo)f",")",-1) returns 5
Instr("(foo)ff",")",-1) returns 0

This means that Instr(s1,s2,-1) begins its search one character before 
the last character of the string.  So end of string actually means last 
character of the string and the docs should make that explicit or there 
is a bug if the intended meaning of end of string is the position after 
the last character of the string.



On 2017-07-28 09:31 PM, Fernando Cabral wrote:

Piccoro, sorry for my previous information. Something was missing.
In fact, both versions work the same:












*  strinchar = "test )after)r"positionlen = (InStr(strinchar, ")", -1)
- 1)Print strincharPrint positionlenstrinchar = Mid(strinchar,
1, positionlen) Print strincharstrinchar = "test )after)r"
strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1))Print
strinchar *
Both print  "test )after"

- fernando

2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz 
:


Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen <
jussi.lahti...@gmail.com> a écrit:

No... again. My initial mail was correct. It should be:

strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1))

But the IDE makes highlighting bug with the brackets.


Jussi

On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen 
wrote:

Because the line makes no sense at all. Try to remove ")".


Jussi

On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz <
mckaygerh...@gmail.com> wrote:

in the following code:

 strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1)

IDE said error invalid argument, but if i do:

 psotionlen = InStr(strinchar, ")", -1) - 1
  strinchar = Mid(strinchar, 1, psotionlen)

works, why?

i wnat to remove the last occurence of a char but bybass some possible
spaces/chars at the end of string

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


Actually, his original code is correct. For me it runs without error in
the IDE using
the 3.10 development version, but the editor is indeed having trouble
matching the
parentheses.

I also tried it on the playground (which also uses 3.10) and it works
fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689
13025e5d2b83c .

However the playground's editor does match the parentheses correctly. :)

Which Gambas version are you using ? There may be an old bug here.

--
Adrien Prokopowicz



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








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


Re: [Gambas-user] why this could not be? error in runtime?

2017-07-28 Thread Tony Morehen

Sorry about that,

What strings are you using?  What output do you want?  For example:
fn("(foo)") do you want "(foo)"  or "(foo"  yours returns "(foo"
fn("(foo)x") do you want "(foo)" or "(foo" yours returns "(foo"
fn("(foo)xx") do you want "(foo)" or "(foo" or "(foo)x" yours returns 
"(foo)x"
fn("(foo)xxx") do you want "(foo)" or "(foo" or "(foo)x" or "(foo)xx" 
yours returns "(foo)xx"


Let's get the algorithm right.  Then worry about bugs.

On 2017-07-28 11:53 PM, PICCORO McKAY Lenz wrote:

HEY TONY; ITS PICCORO; NOT PICARO! GR

in the playground wprks perfectly, i not have 3.10, but in the job i have
3.1 and at my home 3.5
its a bug in 3.9 and 3.8, *with 3.1 works perfectly in debian squeeze (very
older but better)*

2017-07-28 21:02 GMT-04:00 Adrien Prokopowicz <adrien.prokopow...@gmail.com>
:


Actually, his original code is correct. For me it runs without error in
the IDE using
the 3.10 development version, but the editor is indeed having trouble
matching the
parentheses.


me too, the edtor has some problems, when the ide made a word wrap, and i
have thesame behaviour, parentheses does not matching correctly..



I also tried it on the playground (which also uses 3.10) and it works
fine : https://gambas-playground.proko.eu/?gist=97ed16795393aa3b689
13025e5d2b83c .


tested, me too..



However the playground's editor does match the parentheses correctly. :)


jajaja excelent work!



Which Gambas version are you using ? There may be an old bug here.


3.9.1 with some git patches..

in the job i have 3.1 and at my home 3.5

its a bug in 3.9 and 3.8, with 3.1 works perfectly in debian squeeze (very
older but better)



Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-07-28 23:46 GMT-04:00 Tony Morehen <tmore...@ajmconsulting.ca>:


It's difficult to say for sure what's happening without Piccaro's test
strings.  However, 2 things do come to mind.

First, according to Gambas doc, InStr(strinchar, ")", -n) does a left to
right search for ")", starting at -n  characters from the end of
strinchar.  So if Instr doesn't find ")", it will return 0, which, in
conjunction with the second -1, will cause mid to drop the last character
of strinchar.  So to get the answer you want, use RInstr(strinchar,")").
which will do a right to left search for ")", starting at the end of
strinchar.

Second, there may be a bug in gambas, or the documentation needs to make
clear what end of string means.  This is best explained by example:

Instr("(foo)",")",-1) returns 5
Instr("(foo)f",")",-1) returns 5
Instr("(foo)ff",")",-1) returns 0

This means that Instr(s1,s2,-1) begins its search one character before the
last character of the string.  So end of string actually means last
character of the string and the docs should make that explicit or there is
a bug if the intended meaning of end of string is the position after the
last character of the string.



On 2017-07-28 09:31 PM, Fernando Cabral wrote:


Piccoro, sorry for my previous information. Something was missing.
In fact, both versions work the same:












*  strinchar = "test )after)r"positionlen = (InStr(strinchar, ")", -1)
- 1)Print strincharPrint positionlenstrinchar = Mid(strinchar,
1, positionlen) Print strincharstrinchar = "test )after)r"
strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1))Print
strinchar *
Both print  "test )after"

- fernando

2017-07-28 22:02 GMT-03:00 Adrien Prokopowicz <
adrien.prokopow...@gmail.com>
:

Le Sat, 29 Jul 2017 02:40:44 +0200, Jussi Lahtinen <

jussi.lahti...@gmail.com> a écrit:

No... again. My initial mail was correct. It should be:


strinchar = Mid(strinchar, 1, (InStr(strinchar, ")", -1) - 1))

But the IDE makes highlighting bug with the brackets.


Jussi

On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen <
jussi.lahti...@gmail.com
wrote:

Hmmm... sorry, no mistake... I will look closer.


Jussi

On Sat, Jul 29, 2017 at 3:33 AM, Jussi Lahtinen <
jussi.lahti...@gmail.com>
wrote:

Because the line makes no sense at all. Try to remove ")".


Jussi

On Fri, Jul 28, 2017 at 11:55 PM, PICCORO McKAY Lenz <
mckaygerh...@gmail.com> wrote:

in the following code:


  strinchar = Mid(strinchar, 1, InStr(strinchar, ")", -1) - 1)

IDE said error invalid argument, but if i do:

  psotionlen = InStr(strinchar, ")", -1) - 1
   strinchar = Mid(strinchar, 1, psotionlen)

works, why?

i wnat to remove the last occurence of a char but bybass some
possible
spaces/chars at the end of string

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blo

Re: [Gambas-user] Gambas ML problem

2017-08-09 Thread Tony Morehen
I haven't seen them either but nabble shows  "This post has NOT been 
accepted by the mailing list yet."  for all three posts.



On 2017-08-09 01:25 PM, Gianluigi wrote:

I do not understand.
Does it mean that you see here [0] mails sent in the last few days?
Who received Charlie's email [1] or Ingo or alexchernoff mail?

I am saying that Gambas User Nabble is not working and some things sent to
them do not arrive by mail.

[0] http://gambas.8142.n7.nabble.com/gambas-user-f3.html
[1] http://gambas.8142.n7.nabble.com/Don-t-say-anything-td59988.html

2017-08-09 16:36 GMT+02:00 Jussi Lahtinen :


+1


Jussi

On Wed, Aug 9, 2017 at 5:08 PM, Rolf-Werner Eilert 
wrote:


Am 09.08.2017 15:29, schrieb Gianluigi:


What is happening to our ML?
It does not seem to work anymore.
Charlie here [0] asks this but I do not have receive it, and the last
mails
I received after 2 August here [0] do not appear.
Probably Benoit has announced that version 3.10 is official but I have

not

received ...

[0] http://gambas.8142.n7.nabble.com/gambas-user-f3.html

--


Everything fine on my side today.

Regards
Rolf





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



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


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




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


Re: [Gambas-user] Shell command formating

2017-08-07 Thread Tony Morehen

Try changing command to:

command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>1"


On 2017-08-06 09:52 PM, Shane wrote:

command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path




--
Check out the vibrant 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] Shell command

2017-08-07 Thread Tony Morehen

Shane,

I can reproduce your crash here on 3.9.2.  It's cause is the line:

Settings["Options/stmDevice"] = ComboBox1.Current

If that line is changed to:

Settings["Options/stmDevice"] = ComboBox1.Current.Text

or the simpler, and in my mind preferred:

Settings["Options/stmDevice"] = ComboBox1.Text

The segmentation fault goes away.

So the code that I'd recommend you use (I commented the code changes):

Public sdevices As String


Public Sub SaveOps_Click()

  Settings["Options/CCompCLine"] = TextBox1.Text
'to fix the crash
  Settings["Options/stmDevice"] = ComboBox1.Text
  Settings.Save()
  Me.Close
End

Public Sub Form_Open()
 Dim d As String

   TextBox1.Text = Settings["Options/CCompCLine"]
   Shell "stm8flash -l" To sdevices
'  fill combobox with devices
'trim gets rid of the trailing "\n"
'moving Split into the loop saves an intermediate, unneeded string creation
   For Each d In Split(Trim(sdevices), " ", "", True)
 ComboBox1.Add(d)
   Next
'index = find selects the saved device
  ComboBox1.Index = ComboBox1.Find(Settings["Options/stmDevice"])
End







--
Check out the vibrant 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] Trouble with CSVFile Component

2017-07-27 Thread Tony Morehen

Did you add gb.utils component to your project?

Project->Properties->Components & check gb.utils


On 2017-07-27 07:10 PM, markwalt wrote:

Hi guys,

I'm trying to write a very simple program that pulls in one CSV File, and
spits out another, based on what's inside the file.

I see from the Wiki that there's a function for that, in the db.utils
component.  However, using the very sparse example provided, I'm getting
errors.

I'm using 3.8.4, which is the "current" version in my distro (Xubuntu
16.04.2 LTS), and the documentation says the feature was available as of
Gambas 3.7.

Here's the code I'm using:

Public Sub Main()

   Dim sCSVGrid As String
   Dim sCSVImport As String
   Dim hCSVFile As CsvFile
  
   
   
   Print "Enter the complete path and filename of the CSV file you are

importing"
   Input sCSVImport
   Print "Enter the complete path and filename of the CSV file containing the
grid you are creating"
   Input sCSVGrid
   
  
   hCSVFile = New CsvFile(sCSVImport)
   
   
   
End


Obviously, it's not doing anything yet, but this simple bit of code blows up
at

  Dim hCSVFile As CsvFile

saying CsvFile is an unknown identifier.

Yet, this code was taken from the example, I just added a few lines.

>From what I unerstand from the documentation, anything in db.util should be
available, but I guess I'm missing something, probably something simple.

As you can see, I'm a bit of a newb.   Any tips on what I'm doing wrong?





--
View this message in context: 
http://gambas.8142.n7.nabble.com/Trouble-with-CSVFile-Component-tp59904.html
Sent from the gambas-user mailing list archive at Nabble.com.

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




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


Re: [Gambas-user] Difference DateDiff(...) ?

2017-08-06 Thread Tony Morehen
You're right.  Print is not the problem.  Another part of Gambas could 
raise an error.  But Benoit is right.  Doing this kind of check is too 
resource intensive.  You're also right.  Since DateDiff(gb.second) will 
overflow for a ~70 year difference, over the longer term, it should 
return a long.  Since this kind of edge case is rare, it's not an urgent 
change and,in fact, may cause problems for existing code.



On 2017-08-06 02:27 PM, d4t4f...@gmail.com wrote:

Toni,

I don't think Print is at fault here at all. My guess is that DateDiff may need an 
"attitude adjustment" in these cases: It may need to either raise an overflow 
error or return a 64bit Long.

Hope this helps,
zxMarce.



On Aug 6, 2017, 12:00, at 12:00, Tony Morehen <tmore...@ajmconsulting.ca> wrote:

zxMarce, you are exactly right.  DateDiff returns an integer so when
print adds the two datediff it adds 2 signed integers and gets an
signed
integer.  Since the max value of a signed integer is 2147483647, the
answer of 2208988800 overflows to -2085978496. So print's behaviour is
as expected.  The only question is: Should print raise an overflow
error?  Note that there has not been a hardware overflow so the
gambas's
math engine must do the overflow check (by matching signs).


On 2017-08-06 10:30 AM, d4t4f...@gmail.com wrote:

Without a machine nearby, I'd risk you're in the right track.

The DIM AS LONG creates 64bit vars while DateDiff may return 32bit

data (don't have the docs with me).

Print will use 64bit to print the vars and 32bit with direct DateDiff

(you may confirm by using CLng to affect the DateDiff's in the second
Print)

Remember that when you have the most significant bit (MSB) set,

Gambas will interpret the value as twos-complement sign and yield
negative values.

Regards,
zxMarce.


On Aug 6, 2017, 10:21, at 10:21, Hans Lehmann <h...@gambas-buch.de>

wrote:

Hello,
Why are two different results:

Public Sub Main()

Dim a, b As Long

a = DateDiff("01/01/1900", "01/01/1935", gb.Second)
b = DateDiff("01/01/1935", "01/01/1970 ", gb.Second)

Print a + b
Print DateDiff("01/01/1900", "01/01/1935", gb.Second) +
DateDiff("01/01/1935", "01/01/1970 ", gb.Second)

End

Results:

2208988800 ' ok
-2085978496' complement?

Best regards

Hans


--

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

--

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



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

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




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


Re: [Gambas-user] Shell command

2017-08-06 Thread Tony Morehen
what is the output of the shell line?  If you could post the complete 
output, we could properly test your code.


You could try this line:

devices = Split(sdevices, " ", "", True)


On 2017-08-06 08:35 PM, Shane wrote:

Hi Jussi

I gave that a try by commenting that line out still the same result so 
that not the problem




On 06/08/17 22:17, Jussi Lahtinen wrote:
I guess settings component can't handle saving of arbitrary object. 
In this
case "Settings["Options/stmDevice"] = ComboBox1.Current". Maybe you 
want to

save ComboBox1.Current.Text?
However there shouldn't be segfault.


Jussi

On Sun, Aug 6, 2017 at 7:18 AM, Shane  wrote:


I have this in a sub form

Public sdevices As String


Public Sub SaveOps_Click()

   Settings["Options/CCompCLine"] = TextBox1.Text
   Settings["Options/stmDevice"] = ComboBox1.Current
   'Settings.Save()
   Me.Close
End

Public Sub Form_Open()
  Dim devices As String[]
  Dim d As String
'
TextBox1.Text = Settings["Options/CCompCLine"]
Shell "stm8flash -l" To sdevices
'  fill combobox with devices
devices = Split(sdevices, " ")
For Each d In devices
  ComboBox1.Add(d)
Next
'   ComboBox1.Find(Settings["Options/stmDevice"])

End

but when I exit this form and then the main form i get s Seg fault

but with the shell part commented out it is ok what am i doing wrong ?

any ideas

Thanks Shane




--
Check out the vibrant 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

-- 


Check out the vibrant 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



-- 


Check out the vibrant 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




--
Check out the vibrant 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] Difference DateDiff(...) ?

2017-08-06 Thread Tony Morehen
zxMarce, you are exactly right.  DateDiff returns an integer so when 
print adds the two datediff it adds 2 signed integers and gets an signed 
integer.  Since the max value of a signed integer is 2147483647, the 
answer of 2208988800 overflows to -2085978496. So print's behaviour is 
as expected.  The only question is: Should print raise an overflow 
error?  Note that there has not been a hardware overflow so the gambas's 
math engine must do the overflow check (by matching signs).



On 2017-08-06 10:30 AM, d4t4f...@gmail.com wrote:

Without a machine nearby, I'd risk you're in the right track.

The DIM AS LONG creates 64bit vars while DateDiff may return 32bit data (don't 
have the docs with me).

Print will use 64bit to print the vars and 32bit with direct DateDiff (you may 
confirm by using CLng to affect the DateDiff's in the second Print)

Remember that when you have the most significant bit (MSB) set, Gambas will 
interpret the value as twos-complement sign and yield negative values.

Regards,
zxMarce.


On Aug 6, 2017, 10:21, at 10:21, Hans Lehmann  wrote:

Hello,
Why are two different results:

Public Sub Main()

   Dim a, b As Long

   a = DateDiff("01/01/1900", "01/01/1935", gb.Second)
   b = DateDiff("01/01/1935", "01/01/1970 ", gb.Second)

   Print a + b
   Print DateDiff("01/01/1900", "01/01/1935", gb.Second) +
DateDiff("01/01/1935", "01/01/1970 ", gb.Second)

End

Results:

2208988800 ' ok
-2085978496' complement?

Best regards

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

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




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


[Gambas-user] [CRASH REPORT] gbUDisk2

2017-08-06 Thread Tony Morehen

Hello all,

Damn, my program crashed Gambas this way :

1) Run the program
2) Plug in a usb drive
3) Click the mount button, mounts OK
4) Click the unmount button
Program crashes Aborted(6)
Console shows realloc error invalid old size

Background:
I'm writing a Udisks2 module that communicates with UDisks2 over dbus.  
It gathers drive info on existing drives and receives notifications when 
a new drive is plugged in, usb stick etc.

Two problems:
1) The crash above.  Note that unmount works if the usb drive is already 
plugged in.  Careful: the program defaults to unmounting /dev/sdb1.  
Make sure you use the right drive id.
2) The program intially sends some basic drive info to debug output.  
First, it prints the info item by item with no problems. Then it tries 
to print the same items in one print statement.  Some of the output is 
garbage.  What's worst, I've tried saving each info item to separate 
variables.  If I step through the assignments one item at a time, the 
individual assignment is at first correct. However, after the next item 
is assigned, the previous item's value also changes.  This looks like a 
buffer overrun or a stack overflow.


gbUDisk2-0.0.1-crash-170806-114746.tar.bz2
Description: application/bzip
--
Check out the vibrant 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] [CRASH REPORT] gbUDisk2

2017-08-07 Thread Tony Morehen
#8173 seems to have fixed everything, including a crash when I enable 
dbus signalling, which I haven't brought up yet.  Now I have to figure 
out how to install 8173 to all my PCs


Some advice please.  Currently, I have many calls like 
DBus["system://org.freedesktop.UDisks2"]["/org/freedesktop/UDisks2/block_devices/sda1", 
"org.freedesktop.UDisks2.Filesystem"].MountPoints. (status quo)


I can replace it with new approach 1:
Private $DBusApp As DBusApplication = New DBusApplication(MyDBus.System, 
$Application)


mnt=$DBusApp["/org/freedesktop/UDisks2/block_devices/sda1", 
"org.freedesktop.UDisks2.Filesystem"].MountPoints


or even new approach 2:

Private Proxy as DBusProxy

Proxy = $DBusApp["/org/freedesktop/UDisks2/block_devices/sda1", 
"org.freedesktop.UDisks2.Filesystem"]


mnt=Proxy.Mountpoints

What would be your preferred approach? I know that the DBus class caches 
DBus Applications so that there doesn't seem to be any resource 
advantages to new approach 1.  New approach 2 will require 2 proxies for 
each drive, one for the Filesystem interface and one for the Block 
interface.


On 2017-08-07 09:52 AM, Benoît Minisini wrote:

Le 07/08/2017 à 15:02, Adrien Prokopowicz a écrit :
Le Sun, 06 Aug 2017 17:56:27 +0200, Tony Morehen 
<tmore...@ajmconsulting.ca> a écrit:



Hello all,

Damn, my program crashed Gambas this way :

1) Run the program
2) Plug in a usb drive
3) Click the mount button, mounts OK
4) Click the unmount button
Program crashes Aborted(6)
Console shows realloc error invalid old size

Background:
I'm writing a Udisks2 module that communicates with UDisks2 over dbus.
It gathers drive info on existing drives and receives notifications 
when

a new drive is plugged in, usb stick etc.
Two problems:
1) The crash above.  Note that unmount works if the usb drive is 
already

plugged in.  Careful: the program defaults to unmounting /dev/sdb1.
Make sure you use the right drive id.
2) The program intially sends some basic drive info to debug output.
First, it prints the info item by item with no problems. Then it tries
to print the same items in one print statement.  Some of the output is
garbage.  What's worst, I've tried saving each info item to separate
variables.  If I step through the assignments one item at a time, the
individual assignment is at first correct. However, after the next item
is assigned, the previous item's value also changes.  This looks like a
buffer overrun or a stack overflow.


After a bit of searching, I found that the offending code can be 
reduced to

this single line :

Print 
DBus["system://org.freedesktop.UDisks2"]["/org/freedesktop/UDisks2/block_devices/sda1", 
"org.freedesktop.UDisks2.Filesystem"].MountPoints


It appears this property gets translated to a Byte[][], but the 
interpreter crashes
when trying to create one from the native components, because the 
class's symbol table

is not initialized yet (as object classes are created dynamically).

However, creating one from Gambas code works, and in fact, creating 
one before

the D-Bus call makes it not crash anymore :

   Dim x As New Byte[][]
   Print 
DBus["system://org.freedesktop.UDisks2"]["/org/freedesktop/UDisks2/block_devices/sda1", 
"org.freedesktop.UDisks2.Filesystem"].MountPoints 'works!


Now you have a workaround, for until this is actually fixed. :)

Regards,


Is it better with revision #8173?





--
Check out the vibrant 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] Balloons, everywhere but when I don't want them.

2017-08-18 Thread Tony Morehen
I'm not too sure that a component is needed since there is so little 
code involved.  I also not sure if a component would be appropriate.  
I'll put together a Howto and a demo class and uploaded it in a day or 
two to the mailing list.



On 2017-08-18 12:45 PM, Moviga Technologies wrote:

This could perhaps implemented into the gb.Desktop component as
'Desktop.Notify()'?

Den 18.08.2017 16:15, skrev Tobias Boege:


On Fri, 18 Aug 2017, Tony Morehen wrote:


Gambas can talk to the notifications daemon via Dbus.  I use this code:

Private NotifyInterface As String = "org.freedesktop.Notifications"
Private NotifyApp As String = "session://" & NotifyInterface
Private NotifyPath As String = "/" & Replace(NotifyInterface, ".", "/")

'does the daemon support icon, body, button to click etc
Dim sArray As String[] = Dbus[NotifyApp][NotifyPath,
NotifyInterface].GetCapabilities()
'popup (the hintsCollection is an empty collection, iDuration = -1, use
default)
notifyID = Dbus[NotifyApp][NotifyPath,
NotifyInterface].Notify(AppName, notifyID, IconPath,SummaryText, BodyText,
[TextToSignal, ButtonText], hintsCollection, iDuration)
'setup dbussignal to get popup closed and and buttonpressed notifications

Private  NotifySignal as New DbusSignal(Dbus.Session,NotifyInterface, True)
As "NotifyDbusSignal"
'signal handler
Public Sub NotifyDbusSignal_Signal(Signal As String, Arguments As Variant[])
Select Case Signal
Case "NotificationClosed"
Case "ActionInvoked"
'Arguments[0] contains TextToSignal from above
End Select
End

I just checked the code and this is exactly what libnotify does.

--
Check out the vibrant 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




--
Check out the vibrant 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] Git compilation report

2017-08-18 Thread Tony Morehen

I'd recommend for a very clean make:

cd gambasdevel
sudo make uninstall'really only needed on a version change or your 
compilation is likely
'to include different ie fewer 
components

make clean  'get rid of all the generated or backup cruft
git clone --depth=1 https://gitlab.com/gambas/gambas.git gambasdevel
'no need for all the previous versions
./reconf-all && LLVM_CONFIG=llvm-config-3.5 ./configure -C
make && sudo make install

To just update to the latest revision (there must be no changes to the 
configure.ac or Makefile.am files.


cd gambasdevel
git pull'watch for changes to configure or Makefile
'if there are do ./reconf-all && 
LLVM_CONFIG=llvm-config-3.5 ./configure -C

make && sudo make install



On 2017-08-18 04:54 PM, Gianluigi wrote:

Perhaps I begin to understand something, but apologize me if I continue to
say nonsense.

When updating:

cd gambasdevel
sudo make uninstall
Unclear part (see below)
./reconf-all && LLVM_CONFIG=llvm-config-3.5 ./configure -C
make && sudo make install

Unclear part:
I run the git pull command as Charlie suggests?
Or git checkout master as Christof seems to suggest?
I have never used make clean when need to use it?
Would it be the same as rm -rf gambasdevel /?
I note that the command:

git clone --depth=1 https://gitlab.com/gambas/gambas.git gambasdevel

Download only the latest version of development and not the whole git, as
explained in the wiki (about a third of the 100MB)

He is turning my head, I go to sleep.
Goodnight to everyone (in Italy it's night :-))

Gianluigi

2017-08-18 21:54 GMT+02:00 Christof Thalhofer :


Am 18.08.2017 um 21:15 schrieb PICCORO McKAY Lenz:

2017-08-18 14:57 GMT-04:00 Gianluigi :



-
Even if Piccoro does not approve?


i already said the same, do not update, alway remove previous install and
made again!

Removing the last installation (make uninstall) is neccessary but not
deleting the whole repository with the Gambas sources every time!!! That
would be bullshit.


Alles Gute

Christof Thalhofer

--
Dies ist keine Signatur



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



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




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


Re: [Gambas-user] Mailinglist

2017-08-19 Thread Tony Morehen

What about using nabble itself?


On 2017-08-19 03:25 PM, Jussi Lahtinen wrote:

1) Google groups are not a mailing-list. I want mails, so that I can have
every post in my mail client and read them without Internet.


They are if you want. That is exactly how I use google groups. I never use
the web interface.


2) Google crawls the data, and who knows what they do with them.
It's Gambas mailing list, do we care? Also nabble already publishes the
mailing list content.




3) Google brutally stopped their issue tracker. I had to make an issue
tracker for Gambas in a hurry because of that. There is no guarantee that
they won't stop Google groups brutally too.


Yeah, bad policy from google, but this is quite hard requirement to
fulfill. There is always some uncertainty.




4) I don't want to force people to have a Google account.


Google account is needed only for the web interface.



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




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


Re: [Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1134: The scrollbar in gb.form.terminal is virtually illegible against a black background.

2017-08-22 Thread Tony Morehen
I was using Breeze Dark and it was responsible for the invisible scroll 
bars. I've switched themes so this bug should be marked Rejected.



On 2017-08-22 04:54 PM, Benoît Minisini via Gambas-user wrote:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1134: The scrollbar in 
gb.form.terminal is virtually illegible against a black background.

Date : Tue, 22 Aug 2017 20:52:32 GMT
De : bugtrac...@gambaswiki.org
Pour : tmore...@ajm-software.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1134=L21haW4-

Comment #1 by Benoît MINISINI:

Which widget theme do you use? Can you provide a screenshot of the 
problem?


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




--
Check out the vibrant 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] Connect to and control LibreOffice

2017-08-22 Thread Tony Morehen

You're not fixing TerminalView's Paste?


On 2017-08-22 11:46 AM, Benoît Minisini via Gambas-user wrote:

Le 22/08/2017 à 17:35, Fabien Bodard a écrit :

hum or this :-) ... on the road...



And as I just fixed the TerminalView control, you can even finish the 
gb.term.form component. :-)






--
Check out the vibrant 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] [Gambas Bug Tracker] Bug #1133: Paste doesn't work in gb.form.terminal

2017-08-20 Thread Tony Morehen

I submitted a merge request on Gitlab to fix this bug.


On 2017-08-10 11:21 PM, bugtrac...@gambaswiki.org wrote:

http://gambaswiki.org/bugtracker/edit?object=BUG.1133=L21haW4-

Tony MOREHEN reported a new bug.

Summary
---

Paste doesn't work in gb.form.terminal

Type : Bug
Priority : Medium
Gambas version   : Unknown
Product  : Unknown


Description
---

When running terminal.exec(["bash"]), the paste method does nothing, even 
though the clipboard has 'plain/text' content

Cause:  line 924 in TerminalView.class --
If Not $hProcess Or Not $hPipeOut Then Return
-- will return either or both $hProcess or $hPipeOut are null.  It should 
return only when both are null.

Correct:
If Not $hProcess And Not $hPipeOut Then Return

I've attached a patch to fix.  The patch also adds a SendText method to 
gb.form.terminal.  This allows the containing application to send commands to 
the terminal process or pipe.


System information
--

[System]
Gambas=3.9.90 r8018
OperatingSystem=Linux
Kernel=4.8.15-1-MANJARO
Architecture=x86_64
Distribution=Manjaro Linux
Desktop=XFCE
Theme=Gtk
Language=en_CA.utf8
Memory=3947M

[Libraries]
Cairo=libcairo.so.2.11400.8
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.9
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.1002.0
GTK+2=libgtk-x11-2.0.so.0.2400.31
GTK+3=libgtk-3.so.0.2200.5
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.66.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.7.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=xfce
DISPLAY=:0.0
GB_GUI=gb.qt4
GDMSESSION=xfce
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
GTK2_RC_FILES=/.gtkrc-2.0
GTK_MODULES=canberra-gtk-module
HOME=
LANG=en_CA.utf8
LC_ADDRESS=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LOGNAME=
MAIL=/var/spool/mail/
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=
QT_QPA_PLATFORMTHEME=qt5ct
SAL_USE_VCLPLUGIN=gtk
SESSION_MANAGER=local/:@/tmp/.ICE-unix/9931,unix/:/tmp/.ICE-unix/9931
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=9936
SSH_AUTH_SOCK=/tmp/ssh-bUdChQqs4Zo0/agent.9935
TZ=:/etc/localtime
USER=
XAUTHORITY=/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_ID=c4
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=x11
XDG_VTNR=7
_=/usr/bin/gambas3





--
Check out the vibrant 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] Class Implementing DBus Notifications

2017-08-20 Thread Tony Morehen
I saw that.  As far as I could tell, it's identical to the gnome 
discussion.  Including having the hints category and urgency discussion 
before the hints chapter!



On 2017-08-20 12:06 PM, adamn...@gmail.com wrote:

On Sun, 20 Aug 2017 11:37:38 -0400
Tony Morehen <tmore...@ajmconsulting.ca> wrote:


1)  I tried to be as agnostic as possible.  The reference to the Gnome
developer's specification is there because it is the only one available
on the web.

http://www.galago-project.org/specs/notification/0.9/index.html
seems to the one for the notify-osd "spec" but there is at least a 1.1 version 
around somewhere. Can't find it though.

There is not even one on freedesktop.org.  It is my
understanding that modern DEs conform to that spec, including KDE,
Gnome, Cinnamon, XFCE etc.  If the server supports a current libnotify,
then is should support my code. Btw, I'm running Xfce on Manjaro.  Wrt

 etc

cheers
b




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


Re: [Gambas-user] Class Implementing DBus Notifications

2017-08-20 Thread Tony Morehen
1)  I tried to be as agnostic as possible.  The reference to the Gnome 
developer's specification is there because it is the only one available 
on the web.  There is not even one on freedesktop.org.  It is my 
understanding that modern DEs conform to that spec, including KDE, 
Gnome, Cinnamon, XFCE etc.  If the server supports a current libnotify, 
then is should support my code. Btw, I'm running Xfce on Manjaro.  Wrt 
Icewm, Icewm has not been updated since 2011.  It probably implements an 
old version of the spec.  People have my code they can change to suit 
their needs.   I recommend D-feet as a Dbus explorer, so people can see 
what application names, paths and interfaces to use.


2) Yes, this was a slip on my part.  My daemon returns the 4 parts that 
I coded for, but in the back of my mind I knew that only 3 were 
official.  I've changed the code to make SpecificationVersion optional.


3) I've added 0 = no timeout to the comments on duration. Another 
oversight.  Yes, some daemons ignore the Duration variable.  In fact 
they can ignore almost any of the Send parameters.  So providing a value 
may be wishful thinking, but at least it won't generate an error.


4) You're right, you can use standard icon names.  I've renamed the 
property to IconNameOrPath and the comment to reflect this. I'd insisted 
on full path because that was the only thing that worked for me.  The 
iconname I was using was drive-harddisk-usb, which is an icon in my 
theme.  It turns out that is a non-standard icon and so needs a full 
path to work.  When I shortened it to drive-harddisk, the simple name 
worked.


5) NotifyID is supposed to be a unique unsigned integer, starting at 0 
and increasing by one for each notification message that occurs during 
the session.  You need such an Id to replace a current notification or 
to close an open one, particularly a non-expiring one.  In my system, 
that is exactly what occurs.  For example, in my AutoMount program, when 
I plug in a drive, device added pops up, which is then replaced by drive 
mounted.  I use 2 separate notifications because mounting can take some 
time.


Anyway, attached is a revised class.


On 2017-08-20 10:19 AM, adamn...@gmail.com wrote:
Thanks, for that Tony, some good stuff in there (the least of which is 
that damned "hints" collection!) Since my original post and everyones 
comments I have spent more time reading than doing. So a few comments 
(in the most sincerest mode possible).

1. We (gambas "we") should strive for agnosticism. This class is very dependent on some specific implementations of the so called 
gnome "standard" which is turn looks very much like the "specification" for the (lousy) notify-osd daemon. 
("lousy" because it was dumbed down so far that even Shuttleworth could understand it.) Your class is dependent on the 
notification daemon that is running on a machine to a) use DBus messaging the way those (ahem) standards and specifications state.  DE's 
that use non-compliant notification daemons are not supported by your code.  This is not a biggy, But one has to take care. Secondly, you 
are relying on the daemon DBus interface being called exactly "org.freedesktop.Notifications" which is fine for all the common 
ones but I did find one today (might have been for IceWM - can't remember?) that registers as "org.freedesktop.notify".

2. (Very specific) the code at line 114: result.Add(sa[3], 
"SpecificationVersion") is very specific to notify-osd. All the so called 
standards only refer to 3 required items being returned from GetServerInformation.

3. This "duration" parameter seems to be supported/interpreted/used/abused willy nilly by different 
daemons. In general, it "appears" that a value of 0 tends to indicate a non-disappearing 
notification (but then again sometimes not). It "appears" that a value of -1 is generally used to 
do whatever the daemon designers thought might be a good idea. It appears that other values may or may not be 
used as a timeout period.  In short,
apart from the actual libnotify library (which after all is only going to pass that value 
on to the display daemon) its' use is rarely "the timeout before a notification is 
closed" ( without user interaction).

4. One thing I did find that was quite good and apparently generally broadly implemented is the use of the so 
called "standard" desktop icon names e.g. instead of passing a fully qualified path to a specific 
icon you can send one of these "names". For example, setting IconPath to, say, "task-due" 
will use the task-due picture depending on the users actual active icon set. The names are at: 
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#names

5. Question: In the (little) amount of playing around today I am having trouble with the 
"replaces_id" parameter for the notify method, i.e your $iLastNotifyID returned 
by the Notify function.  All I ever seem to get back is zero?? The Ubuntu spec (for 
notify-osd) seems 

Re: [Gambas-user] [Gambas Bug Tracker] Bug #1133: Paste doesn't work in gb.form.terminal

2017-08-20 Thread Tony Morehen
I know that bugtracker has been discontinued.  I just replied to an 
earlier, related message as a convenient way to let Benoit and others 
who have write permission to gitlab gambas/gambas know that I submitted 
a merge request.  They can be seen at 
https://gitlab.com/gambas/gambas/merge_requests,



On 2017-08-20 03:44 PM, PICCORO McKAY Lenz wrote:

tony, the answers to "bugtraker" are not traked.. you must enter in the bug
url and paste the respnse here..  and will be usefully the url of the merge
url request to able others track the help/colaboration

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-08-20 9:57 GMT-04:00 Tony Morehen <tmore...@ajmconsulting.ca>:


I submitted a merge request on Gitlab to fix this bug.


On 2017-08-10 11:21 PM, bugtrac...@gambaswiki.org wrote:


http://gambaswiki.org/bugtracker/edit?object=BUG.1133=L21haW4-

Tony MOREHEN reported a new bug.

Summary
---

Paste doesn't work in gb.form.terminal

Type : Bug
Priority : Medium
Gambas version   : Unknown
Product  : Unknown


Description
---

When running terminal.exec(["bash"]), the paste method does nothing, even
though the clipboard has 'plain/text' content

Cause:  line 924 in TerminalView.class --
If Not $hProcess Or Not $hPipeOut Then Return
-- will return either or both $hProcess or $hPipeOut are null.  It should
return only when both are null.

Correct:
If Not $hProcess And Not $hPipeOut Then Return

I've attached a patch to fix.  The patch also adds a SendText method to
gb.form.terminal.  This allows the containing application to send commands
to the terminal process or pipe.


System information
--

[System]
Gambas=3.9.90 r8018
OperatingSystem=Linux
Kernel=4.8.15-1-MANJARO
Architecture=x86_64
Distribution=Manjaro Linux
Desktop=XFCE
Theme=Gtk
Language=en_CA.utf8
Memory=3947M

[Libraries]
Cairo=libcairo.so.2.11400.8
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.9
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.1002.0
GTK+2=libgtk-x11-2.0.so.0.2400.31
GTK+3=libgtk-3.so.0.2200.5
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.66.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.7.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=xfce
DISPLAY=:0.0
GB_GUI=gb.qt4
GDMSESSION=xfce
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
GTK2_RC_FILES=/.gtkrc-2.0
GTK_MODULES=canberra-gtk-module
HOME=
LANG=en_CA.utf8
LC_ADDRESS=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LOGNAME=
MAIL=/var/spool/mail/
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/
default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=
QT_QPA_PLATFORMTHEME=qt5ct
SAL_USE_VCLPLUGIN=gtk
SESSION_MANAGER=local/:@/tmp/.ICE-unix/9931,unix/<
hostname>:/tmp/.ICE-unix/9931
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=9936
SSH_AUTH_SOCK=/tmp/ssh-bUdChQqs4Zo0/agent.9935
TZ=:/etc/localtime
USER=
XAUTHORITY=/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_ID=c4
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=x11
XDG_VTNR=7
_=/usr/bin/gambas3





--
Check out the vibrant 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


--
Check out the vibrant 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




--
Check out the vibrant 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] More DBus queries - signals

2017-08-20 Thread Tony Morehen

I see nothing amiss in your code.

This is the code I use for a DbusObject.  It is used to control a 
desktop menu application.  Note the event declaration.  DbusObject is 
missing, but implicit to the class.  I raise the event the same way you do:


  DBus.Raise(hDbusObj, 
"org.ajmconsulting.gbmenu.App.StartupNotification", [$key, pid])


$key is a AppName.desktop file, pid is the id/handle of the process just 
launched.


' Gambas class file
' hDbusObj


Inherits DBusObject
Private ClientCount As Integer = -1

Event org_ajmconsulting_gbmenu_App_StartupNotification(sName As String, 
pid As Integer)


Public Function org_ajmconsulting_gbmenu_App_show() As Boolean

  FMain.Show
  '   Debug "show"
  Desktop.ActiveWindow = FMain.Id
  Return FMain.Visible

End

Public Function org_ajmconsulting_gbmenu_App_showAt(Optional X As 
Integer, Y As Integer, Gravity As String) As Boolean

  '   Debug "showat", X, Y, Gravity

  If X < 10 Then X = 0
  Select Case String.LCase(Gravity)
Case "northwest"
  FMain.x = X
  FMain.y = Y
Case "west"
  FMain.x = X
  FMain.y = Y - FMain.Height / 2
Case "southwest"
  FMain.x = X
  FMain.y = Y - FMain.Height
Case "north"
  FMain.x = X - FMain.Width / 2
  FMain.y = Y
Case "center", "centre"
  FMain.x = X - FMain.Width / 2
  FMain.y = Y - FMain.Height / 2
Case "south"
  FMain.x = X - FMain.Width / 2
  FMain.y = Y - FMain.Height
Case "northeast"
  FMain.x = X - FMain.Width
  FMain.y = Y
Case "east"
  FMain.x = X - FMain.Width
  FMain.y = Y - FMain.Height / 2
Case "southeast"
  FMain.x = X - FMain.Width
  FMain.y = Y - FMain.Height
  End Select
  Return org_ajmconsulting_gbmenu_App_show()

End

Public Function org_ajmconsulting_gbmenu_App_showToggle() As Boolean

  '   Debug "showtoggle"
  If FMain.Visible Then
Return org_ajmconsulting_gbmenu_App_hide()
  Else
Return org_ajmconsulting_gbmenu_App_show()
  Endif

End

Public Function org_ajmconsulting_gbmenu_App_showPreferences() As Boolean

  FSetup.Run
  '   Debug "setup"
  Return True

End

Public Function org_ajmconsulting_gbmenu_App_showCentered() As Boolean
  '   Debug "showCentered"

  FMain.X = (Screen.W - FMain.W) / 2
  FMain.Y = (Screen.H - FMain.H) / 2
  Return org_ajmconsulting_gbmenu_App_show()

End

Public Function org_ajmconsulting_gbmenu_App_hide() As Boolean
  '   Debug "hide"

  FMain.Visible = False
  Return Not FMain.Visible

End

Public Function org_ajmconsulting_gbmenu_App_isShowing() As Boolean
  '   Debug "isShowing"

  Return FMain.Visible

End

Public Function org_ajmconsulting_gbmenu_App_addClient() As Integer
  '   Debug "addClient"

  Inc ClientCount
  Return ClientCount

End

Public Function org_ajmconsulting_gbmenu_App_removeClient(arg1 As 
Integer) As Boolean

  '   Debug "removeClient", arg1

  Return True

End

Public Function org_ajmconsulting_gbmenu_App_getDesktopFilePath(arg1 As 
String) As String

  '   Debug "removeClient", arg1

  Return FMain.$DesktopFiles[arg1].Location

End

Public Function org_ajmconsulting_gbmenu_App_getIconPath(arg1 As 
String[], sz As Integer) As String

  '   Debug "removeClient", arg1

  Return Icons.GetIconPath(arg1, sz)

End


On 2017-08-20 10:38 AM, adamn...@gmail.com wrote:

The wiki @ http://gambaswiki.org/wiki/doc/dbus#t9 says
"...
The name of the event must be the normalized name of the interface, followed by 
an underscore and the normalized name of the signal.
The signal is emitted to the D-Bus bus by using the DBusApplication.Raise 
method.
..."

for the last few days I've been raising DBus signals simply by calling 
something like:

   Event Message(text As String, origin As String)
...
   DBus.Raise(Me, "Message", [msg.Text, "Self"])

 being a DBusObject child object
<"Message"> being the signal name as registered on the bus
 being the text parameter for the event as it is known inside the 
gambas code
<"Self"> being the origin parameter

This seems to be working fine. Am I doing something unsupported that is likely 
to disappear?

tia
b




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


Re: [Gambas-user] Balloons, everywhere but when I don't want them.

2017-08-18 Thread Tony Morehen
BTW the attached code is not fully functional.  It tries to listen for a 
signal on both the system bus (Udisks2 signal) and the session bus 
(Notifications).  Unfortunately, Gambas can only listen to one bus at a 
time, the second declared bus is ignored. As a result, the code that 
responds to the Notifications signal is never called.


I've opened a bug report (1132) on this issue.


On 2017-08-18 10:05 AM, Tony Morehen wrote:

Gambas can talk to the notifications daemon via Dbus.  I use this code:

Private NotifyInterface As String = "org.freedesktop.Notifications"
Private NotifyApp As String = "session://" & NotifyInterface
Private NotifyPath As String = "/" & Replace(NotifyInterface, ".", "/")

'does the daemon support icon, body, button to click etc
  Dim sArray As String[] = Dbus[NotifyApp][NotifyPath, 
NotifyInterface].GetCapabilities()
'popup (the hintsCollection is an empty collection, iDuration = -1, 
use default)
notifyID = Dbus[NotifyApp][NotifyPath, 
NotifyInterface].Notify(AppName, notifyID, IconPath,SummaryText, 
BodyText, [TextToSignal, ButtonText], hintsCollection, iDuration)

'setup dbussignal to get popup closed and and buttonpressed notifications

Private  NotifySignal as New DbusSignal(Dbus.Session,NotifyInterface, 
True) As "NotifyDbusSignal"

'signal handler
Public Sub NotifyDbusSignal_Signal(Signal As String, Arguments As 
Variant[])

  Select Case Signal
Case "NotificationClosed"
Case "ActionInvoked"
  'Arguments[0] contains TextToSignal from above
  End Select
End

You can see the code in action in the attached gbAutoMount code. This 
app uses Udisks2 to automatically mount usb drives when plugged in.



On 2017-08-18 09:28 AM, Tobias Boege wrote:

On Fri, 18 Aug 2017, adamn...@gmail.com wrote:

Probably obscure, but I'll give it a go anyway...

This project has about 80 or so Timers running at any given time, 
when they fire some stuff is updated and then a balloon pops up to 
alert the user that some update has happened.  All fantastic.


And an added bonus is that the balloon pops up on any virtual 
desktop. Which is even more fantastic as far as I am concerned and 
exactly what I have been looking for for some years.


What is not so great is that when this happens on the desktop where 
the app is running, not only does the balloon appear, but the actual 
form that produces the balloon gets popped up to the top of the 
desktop. Which is infuriating if the user is actually in another app 
on that desktop. Even further, the project itself has a bunch of 
popup forms where the user can enter manual updates of some data. 
When the balloon appears (and the main form) the popup is lowered 
and you cannot bring it back to the top layer.


I'll try a more concrete example (or two), to see if I can explain 
what I am trying to do a bit more clearly.


I have my email client (sylpheed) running, every so often it goes 
and checks for incoming mail.  If there is some new mail a boxy 
looking thing appears at the bottom right corner of the screen 
telling me I have new mail. No matter which desktop I am actually on 
at the time.  A bit later that boxy thing fades away. It doesn't 
interrupt what I am doing in any way, nor does it pop up the main 
email client screen.
Similarly, on my laptop I have Batti running which when I'm getting 
a bit low on battery power pops up a message in the desktop panel 
telling me to plug the damn thing in. Again this does not interrupt 
what I'm doing.


So, how can I achieve the same effect in gambas?


Sounds like a feature of your DE (and I'm not good with DEs) but a quick
search suggests something called libnotify for sending desktop 
notifications.
It is said to be toolkit- and desktop-independent, but you need a 
conforming
notification daemon running -- which you may already have, if you can 
see
notifications from other programs (assuming they use the same 
machinery).


So, I guess you would need a gb.libnotify component (it really 
doesn't look
hard to do, there's only maybe 3 dozen functions in the library and 
it seems

you only need as few as 5 of them to show your first notification).

If you can't do that, there seems to be a tool called "notify-send" 
which
looks like it lets you access all the library features via the 
command-line.
That said, notify-send does nothing on my desktop, probably because I 
don't

run a fancy notification server...

Regards,
Tobi





--
Check out the vibrant 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


--
Check out the vi

Re: [Gambas-user] Balloons, everywhere but when I don't want them.

2017-08-18 Thread Tony Morehen

Gambas can talk to the notifications daemon via Dbus.  I use this code:

Private NotifyInterface As String = "org.freedesktop.Notifications"
Private NotifyApp As String = "session://" & NotifyInterface
Private NotifyPath As String = "/" & Replace(NotifyInterface, ".", "/")

'does the daemon support icon, body, button to click etc
  Dim sArray As String[] = Dbus[NotifyApp][NotifyPath, 
NotifyInterface].GetCapabilities()
'popup (the hintsCollection is an empty collection, iDuration = -1, use 
default)
notifyID = Dbus[NotifyApp][NotifyPath, 
NotifyInterface].Notify(AppName, notifyID, IconPath,SummaryText, 
BodyText, [TextToSignal, ButtonText], hintsCollection, iDuration)

'setup dbussignal to get popup closed and and buttonpressed notifications

Private  NotifySignal as New DbusSignal(Dbus.Session,NotifyInterface, 
True) As "NotifyDbusSignal"

'signal handler
Public Sub NotifyDbusSignal_Signal(Signal As String, Arguments As 
Variant[])

  Select Case Signal
Case "NotificationClosed"
Case "ActionInvoked"
  'Arguments[0] contains TextToSignal from above
  End Select
End

You can see the code in action in the attached gbAutoMount code. This 
app uses Udisks2 to automatically mount usb drives when plugged in.



On 2017-08-18 09:28 AM, Tobias Boege wrote:

On Fri, 18 Aug 2017, adamn...@gmail.com wrote:

Probably obscure, but I'll give it a go anyway...

This project has about 80 or so Timers running at any given time, when they 
fire some stuff is updated and then a balloon pops up to alert the user that 
some update has happened.  All fantastic.

And an added bonus is that the balloon pops up on any virtual desktop. Which is 
even more fantastic as far as I am concerned and exactly what I have been 
looking for for some years.

What is not so great is that when this happens on the desktop where the app is 
running, not only does the balloon appear, but the actual form that produces 
the balloon gets popped up to the top of the desktop. Which is infuriating if 
the user is actually in another app on that desktop. Even further, the project 
itself has a bunch of popup forms where the user can enter manual updates of 
some data. When the balloon appears (and the main form) the popup is lowered 
and you cannot bring it back to the top layer.

I'll try a more concrete example (or two), to see if I can explain what I am 
trying to do a bit more clearly.

I have my email client (sylpheed) running, every so often it goes and checks 
for incoming mail.  If there is some new mail a boxy looking thing appears at 
the bottom right corner of the screen telling me I have new mail. No matter 
which desktop I am actually on at the time.  A bit later that boxy thing fades 
away. It doesn't interrupt what I am doing in any way, nor does it pop up the 
main email client screen.
Similarly, on my laptop I have Batti running which when I'm getting a bit low 
on battery power pops up a message in the desktop panel telling me to plug the 
damn thing in. Again this does not interrupt what I'm doing.

So, how can I achieve the same effect in gambas?


Sounds like a feature of your DE (and I'm not good with DEs) but a quick
search suggests something called libnotify for sending desktop notifications.
It is said to be toolkit- and desktop-independent, but you need a conforming
notification daemon running -- which you may already have, if you can see
notifications from other programs (assuming they use the same machinery).

So, I guess you would need a gb.libnotify component (it really doesn't look
hard to do, there's only maybe 3 dozen functions in the library and it seems
you only need as few as 5 of them to show your first notification).

If you can't do that, there seems to be a tool called "notify-send" which
looks like it lets you access all the library features via the command-line.
That said, notify-send does nothing on my desktop, probably because I don't
run a fancy notification server...

Regards,
Tobi





gbAutoMount-0.0.3.tar.gz
Description: application/gzip
--
Check out the vibrant 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] Support for IMAP in gb.net.curl

2017-09-23 Thread Tony Morehen
Just a quick update on an Imap class.  The following methods have been 
implemented and, for the most part, tested:


Abort, AddMessageFlags, Authed, BuildSequenceSet, Capabilities,
CleanUpMailBoxList, Connect, CopyMessage, CopyMessages, CreateMailbox, 
Debug,

DeleteMailbox, DeleteMessage, DeleteMessages, Encrypt, Exec, Expunge,
FindValue, GetMessage, GetMessageFlags, Host, LSub, List, ListMailboxes,
ListSubscribedMailboxes, Logout, MailboxInfo, MailboxStatus, 
MoveMessage, MoveMessages, Noop, Password, Port, RemoveMessageFlags,

RenameMailbox, Search, SelectMailbox, SetMessageFlags, User, Welcome

The testing has been done on a static email account.  As a result, copy, 
move and delete messages have not been properly tested.  I'll follow up 
on that in another message.





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


Re: [Gambas-user] Support for IMAP in gb.net.curl

2017-09-23 Thread Tony Morehen
To support a dynamic email account (one with new messages and deleted 
messages) and to implement the Idle and Notify commands, I need to 
handle server notifications.  What I plan to do is implement a monitor 
loop which will do a readline on the input from the server.  Each new 
line will be tested to see if it is a notification.  If so, the 
appropriate action will be taken.  If it's not a notification, it will 
be printed to a buffer stream. Currently, commands are directly sent to 
the server socket and replies are read directly from the same socket.  
In the new approach, replies will be read from the buffer.


One complication is that I must ensure that all the CRLFs in the buffer 
must remain intact.  Another complication is that I cannot just do a 
readline on a blocking stream.  There maybe some time between 
notifications, which would normally cause the readline to timeout.  Idle 
and Notify commands can wait for 20 minutes or more.


Comments? Suggestions?  I'd really appreciate advice on the best way to 
handle this.



On 2017-09-23 09:09 PM, Tony Morehen wrote:
Just a quick update on an Imap class.  The following methods have been 
implemented and, for the most part, tested:


Abort, AddMessageFlags, Authed, BuildSequenceSet, Capabilities,
CleanUpMailBoxList, Connect, CopyMessage, CopyMessages, CreateMailbox, 
Debug,

DeleteMailbox, DeleteMessage, DeleteMessages, Encrypt, Exec, Expunge,
FindValue, GetMessage, GetMessageFlags, Host, LSub, List, ListMailboxes,
ListSubscribedMailboxes, Logout, MailboxInfo, MailboxStatus, 
MoveMessage, MoveMessages, Noop, Password, Port, RemoveMessageFlags,

RenameMailbox, Search, SelectMailbox, SetMessageFlags, User, Welcome

The testing has been done on a static email account.  As a result, 
copy, move and delete messages have not been properly tested. I'll 
follow up on that in another message.





-- 


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




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


Re: [Gambas-user] Support for IMAP in gb.net.curl

2017-09-23 Thread Tony Morehen
I came across an interesting issue when working on Imap's Fetch 
command.  Fetch is used to down load messages.  The response to a Fetch 
has 4 parts:

1) a single line providing the size of the download, say, 69000 bytes.
2) the mime-encoded download (a string 69000 bytes long)
3) one line whose only contents is ")"
4) one line status line.

So my code does:
Readline
response = Read #stream, iSize    'iSize=69000
Readline
Readline

Using a TCP socket,  the Read # line has no error but the download is 
incomplete, say only 5 bytes.  The remaining 19000 byes is read by 
the next Readline.  However, the response variable is the correct 69000 
bytes in length, with the last 19000 bytes zero-filled.  Its like the 
Read # timed out but the timeout is set to 1 and 10 seconds had not 
elapsed.  Socket.blocking was set to True.


Using an openssl process, the Read # line raises an error:  Error 9, Bad 
file descriptor.


I have a workaround:  Read # is replaced with

  Dim result as new String[]

  Bytesread=0
  Do While BytesRead < iSize
    Response = Read #$hStream,  IIf(iSize - BytesRead > 4096, 4096, 
iSize - BytesRead)

    result.Add(Response)
    bytesread += 4096
  Loop
  Response = result.Join("")

Now both TCP and openssl work, no zero-fill no errors.

Any ideas? Other fixes?


On 2017-09-23 09:09 PM, Tony Morehen wrote:
Just a quick update on an Imap class.  The following methods have been 
implemented and, for the most part, tested:


Abort, AddMessageFlags, Authed, BuildSequenceSet, Capabilities,
CleanUpMailBoxList, Connect, CopyMessage, CopyMessages, CreateMailbox, 
Debug,

DeleteMailbox, DeleteMessage, DeleteMessages, Encrypt, Exec, Expunge,
FindValue, GetMessage, GetMessageFlags, Host, LSub, List, ListMailboxes,
ListSubscribedMailboxes, Logout, MailboxInfo, MailboxStatus, 
MoveMessage, MoveMessages, Noop, Password, Port, RemoveMessageFlags,

RenameMailbox, Search, SelectMailbox, SetMessageFlags, User, Welcome

The testing has been done on a static email account.  As a result, 
copy, move and delete messages have not been properly tested. I'll 
follow up on that in another message.





-- 


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




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


Re: [Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1196: Socket Lof returns 0 when data is available.

2017-10-04 Thread Tony Morehen

That fixes both polling and events.  Great work. and quite the turnaround!

The change makes sense.  I read the original code as testing the actual, 
physical socket while the revised code effectively tests a virtual 
socket with responses buffered to the stream.


Unfortunately, the fix does not affect the no events problem I have in 
the serversocket class.  In the ClsServer.class of gbDummyImapServer, 
the Socket_Read event is only triggered when line 35, the 
Object.Attach() line is included.  Comment out that line and 
Socket_rRead is never called.



On 2017-10-04 10:46 PM, Benoît Minisini via Gambas-user wrote:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1196: Socket Lof returns 0 when data 
is available.

Date : Thu, 05 Oct 2017 02:46:26 GMT
De : bugtrac...@gambaswiki.org
Pour : tmore...@ajm-software.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1196=L21haW4-

Comment #1 by Benoît MINISINI:

Does commit 
https://gitlab.com/gambas/gambas/commit/e02d02880660eb796d60ca6b0d32fbf08bf9eb8f 
make Lof() work correctly on Sockets?


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




--
Check out the vibrant 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] Fwd: [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the first declared bus for signals

2017-08-30 Thread Tony Morehen
Sorry, it doesn't work for me.  In fact, my test program receives no 
signals at all.


I'm working off what at the time was the latest commit, 
a2183117ffd8448b10008f76e7dac6eecd01cc3d


I've attached the test program.  To use, just insert or remove a usb 
drive and watch the debug messages.


BTW I replaced /usr/lib/gambas3/gb.dbus.so.0.0.0 with the same file from 
my previous build and the test program received the signals ok.



On 2017-08-29 06:56 PM, Benoît Minisini via Gambas-user wrote:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the 
first declared bus for signals

Date : Tue, 29 Aug 2017 22:56:25 GMT
De : bugtrac...@gambaswiki.org
Pour : tmore...@ajm-software.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1132=L21haW4-

Comment #3 by Benoît MINISINI:

It should have been fixed in commit 
https://gitlab.com/gambas/gambas/commit/a2183117ffd8448b10008f76e7dac6eecd01cc3d.


Can you confirm?

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




dbussignals-0.0.1.tar.gz
Description: application/gzip
--
Check out the vibrant 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] Fwd: [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the first declared bus for signals

2017-08-30 Thread Tony Morehen

It is indeed fixed.  Thanks Benoit!

BTW is there any way to add an event loop to a console app?  ie I want 
to use a console app as a daemon, responding to dbus signals.


On 2017-08-30 03:57 PM, Benoît Minisini via Gambas-user wrote:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the 
first declared bus for signals

Date : Wed, 30 Aug 2017 19:57:34 GMT
De : bugtrac...@gambaswiki.org
Pour : tmore...@ajm-software.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1132=L21haW4-

Comment #4 by Benoît MINISINI:

It should really be fixes in commit 
https://gitlab.com/gambas/gambas/commit/4d9579f217036d570080b6175f67e7ac96a19470.





-- 


Check out the vibrant 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




--
Check out the vibrant 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] Fwd: [Gambas Bug Tracker] Bug #1161: Class Editor is Locked

2017-09-05 Thread Tony Morehen

Some more questions / things to try:

1) Copy the project folder elsewhere in your home directory, but not in 
the dropbox tree.  Try to edit.

2) In the copied folder, run chmod --recursive a+w *.  Try to edit.
3) Try creating a new module, class or form.  Try this in both the 
copied folder and the original.  Try to add code and edit the new module 
etc.

4) Can the problems be related to dropbox.


On 2017-09-05 09:52 AM, Fernando Cabral wrote:

Tony Morehen wrote:

The fact that Gambas runs properly from a vm strongly suggests that the

problem is not Gambas, but is the system environment that Gambas is running
in.


Agreed. But so far, this understanding has not helped me to find a solution.

What directory is your project located?  Have you tried copying the project

to your home directory?

It is on my home directory (everything is under

/home/fernando/Dropbox/Gambas/*"). Directory Dropbox is a local directory
that is replicated by Dropbox so I have a copy available in other machines
that respect the same structure).

In the vm, is Gambas loading the project directly from the original

directory or from a copy in the vm.


Yes. In the VM Gambas works with the same files directly. The
above-mentioned directory is mounted on the VM so Gambas sees them as local
files (local to the VM).

Does your system enable extended ACLs?  Are you running AppArmor or

SELinux?  What about in the vm?


Not running AppArmor or SELinux. Extended ACLs not enabled.

OS running on the physical machine is precisely the same that runs on the
virtual machine. I install them both from the same source and give them the
same configuration. For instance, now I am running Linux Mint 18.2 on the
metal and, under VirtualBox I have the same Linux Mint 18.2 (technically it
is not a clone, but it looks a lot like it).

Regards

- fernando


2017-09-05 10:10 GMT-03:00 Tony Morehen <tmore...@ajmconsulting.ca>:


Fernando,

The fact that Gambas runs properly from a vm strongly suggests that the
problem is not Gambas, but is the system environment that Gambas is running
in.

What directory is your project located?  Have you tried copying the
project to your home directory?  In the vm, is Gambas loading the project
directly from the original directory or from a copy in the vm.

Does your system enable extended ACLs?  Are you running AppArmor or
SELinux?  What about in the vm?



On 2017-09-05 08:55 AM, Fernando Cabral wrote:


Benoît, I don't know which input method I am using and I don't know how to
find it.
Nevertheless, I know for sure it is the standard method for Linux Mint,
whichever it is.
I've never tinkered with it. Also, IDE used to work. All of sudden, it
stopped working.
I had changed nothing between the working stage and the non-working stage.
Besides, when I install the virtual machines, I use the default input
method (whichever it is).

Perhaps you can provide me with a command to find out what input method I
am using.
The nearest I got to it was by looking into the files at /etc/X11/xinit.
Basically, either they are empty or say "default".

Regards

- fernando


2017-09-05 8:24 GMT-03:00 Benoît Minisini via Gambas-user <
gambas-user@lists.sourceforge.net>:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1161: Class Editor is Locked
Date : Tue, 05 Sep 2017 11:21:11 GMT
De : bugtrac...@gambaswiki.org
Pour : deli...@gmail.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1161=L21haW4-

Comment #1 by Benoît MINISINI:

Which X11 input method do you use?

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







--
Check out the vibrant 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








--
Check out the vibrant 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] Support for IMAP in gb.net.curl

2017-09-24 Thread Tony Morehen
There's not much logic behind the 4096.  It was the first number I tried 
and it worked.  I originally used 4096 in a copy routine in a file 
manager program.  There, 4096 makes sense as it equals a hard drive 
cluster size.



On 2017-09-24 04:06 PM, Benoît Minisini via Gambas-user wrote:

Le 24/09/2017 à 04:07, Tony Morehen a écrit :
I came across an interesting issue when working on Imap's Fetch 
command.  Fetch is used to down load messages.  The response to a 
Fetch has 4 parts:

1) a single line providing the size of the download, say, 69000 bytes.
2) the mime-encoded download (a string 69000 bytes long)
3) one line whose only contents is ")"
4) one line status line.

So my code does:
Readline
response = Read #stream, iSize    'iSize=69000
Readline
Readline

Using a TCP socket,  the Read # line has no error but the download is 
incomplete, say only 5 bytes.  The remaining 19000 byes is read 
by the next Readline.  However, the response variable is the correct 
69000 bytes in length, with the last 19000 bytes zero-filled.  Its 
like the Read # timed out but the timeout is set to 1 and 10 
seconds had not elapsed. Socket.blocking was set to True.


Using an openssl process, the Read # line raises an error: Error 9, 
Bad file descriptor.


I have a workaround:  Read # is replaced with

   Dim result as new String[]

   Bytesread=0
   Do While BytesRead < iSize
 Response = Read #$hStream,  IIf(iSize - BytesRead > 4096, 4096, 
iSize - BytesRead)

 result.Add(Response)
 bytesread += 4096
   Loop
   Response = result.Join("")

Now both TCP and openssl work, no zero-fill no errors.

Any ideas? Other fixes?




I looked at the gb.net socket source code (which I didn't wrote), and 
things are clear: the read method of the Socket class stream just do 
one system call. So it does not read what the user asks, but what is 
available on the socket.


Other streams implemented in the interpreter (like pipe, for example), 
on the contrary, try to read the number of bytes requested by the user.


Your code implements the missing logic in gb.net, so it fixes the 
problem (as 4096 may be the granularity of TCP data that is sent to 
the user space).


I have to fix that directly in gb.net. Of course it's a pity that each 
stream has to implement the same logic, so maybe I should take more 
time to see I can find a solution directly in the interpreter.






--
Check out the vibrant 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] Support for IMAP in gb.net.curl

2017-09-28 Thread Tony Morehen
Benoit, the Read issue is resolved.  I tested using both the the 
existing code, with the read loop and the original code where it tries 
to read the entire message at once.  Both work for both a TCP connection 
and an openssl connection.


However, the send comand for a TCP connection raises a socket closed 
error.  Not right away, but after several send commands. It seems to be 
a timing issue, the error is not raised when I step through the code.  
The send command is simply:


Public Sub Send(Data As String)

  Print #$hStream, Data

End

There is no error at all using an ssl connection.


On 2017-09-26 08:59 PM, Benoît Minisini via Gambas-user wrote:

Hi, Tony.

I have just pushed the 'rework-stream-interface' branch to the gitlab 
repository.


I have reworked the internal interpreter stream interface, so that 
incomplete reads are retried automatically until all the data is read 
or an error occurs, whatever the underlying stream.


Can you try it and tell me if it fixes the incomplete read on TCP 
sockets?


Regards,

Le 24/09/2017 à 04:07, Tony Morehen a écrit :
I came across an interesting issue when working on Imap's Fetch 
command.  Fetch is used to down load messages.  The response to a 
Fetch has 4 parts:

1) a single line providing the size of the download, say, 69000 bytes.
2) the mime-encoded download (a string 69000 bytes long)
3) one line whose only contents is ")"
4) one line status line.

So my code does:
Readline
response = Read #stream, iSize    'iSize=69000
Readline
Readline

Using a TCP socket,  the Read # line has no error but the download is 
incomplete, say only 5 bytes.  The remaining 19000 byes is read 
by the next Readline.  However, the response variable is the correct 
69000 bytes in length, with the last 19000 bytes zero-filled.  Its 
like the Read # timed out but the timeout is set to 1 and 10 
seconds had not elapsed. Socket.blocking was set to True.


Using an openssl process, the Read # line raises an error: Error 9, 
Bad file descriptor.


I have a workaround:  Read # is replaced with

   Dim result as new String[]

   Bytesread=0
   Do While BytesRead < iSize
 Response = Read #$hStream,  IIf(iSize - BytesRead > 4096, 4096, 
iSize - BytesRead)

 result.Add(Response)
 bytesread += 4096
   Loop
   Response = result.Join("")

Now both TCP and openssl work, no zero-fill no errors.

Any ideas? Other fixes?







--
Check out the vibrant 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] CRYPT function - a little help please?

2017-08-24 Thread Tony Morehen

Dim userid As String

Dim encrypted As String
Dim cked As Boolean

userid = "xcodex"
encrypted = Crypt.md5(userid, "abcdefgh")
cked = Crypt.Check(userid, encrypted)
Print cked

On 2017-08-24 06:14 PM, mikeB wrote:

userid = "xcodex"
Crypt.MD5(userid, "abcdefgh")
cked = Crypt.Check(userid, "abcdefgh")
Message.Info(cked)




--
Check out the vibrant 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] Fwd: \r\n and \n

2017-08-27 Thread Tony Morehen
I'm having the same issue.  I have to remember to click reply to list.  
Unfortunatly, memory fails all to often.



On 2017-08-27 05:12 PM, Benoît Minisini via Gambas-user wrote:

Le 27/08/2017 à 22:57, Jussi Lahtinen a écrit :

I just realized that Benoit answered directly to me, not via the list.
Thank you everyone, but the "problem" is solved. See below.


Jussi



Yep, sorry. I don't know why, but my Thunderbird seems to ignore the 
Reply-to field of the mails now!






--
Check out the vibrant 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] Class Implementing DBus Notifications

2017-08-20 Thread Tony Morehen
As promised, attached is a heavily commented class implementing DBus 
Notifications.  It is a complete implementation of the specification.  
There are two approaches to using the class:


1) fill in the properties and call SendNotification:

Dim hDbusNotify As New DbusNotify
hDbusNotify.Summary = "Device added:"
hDbusNotify.Body = "/dev" &/ device
hDbusNotify.FullPathToIcon = icon
hDbusNotify.Actions = [""]
notifyID = dbusNotify.SendNotification()
mount = UDisks2.Mount(device)
hDbusNotify.Summary = "Device mounted:"
hDbusNotify.Body = "/dev" &/ device & " to " & mount
hDbusNotify.Actions = ["browse=" & mount, "Browse"]
hints.Add(2, "urgency")
hDbusNotify.Hints = hints
hDbusNotify.Duration = 5000
notifyID = dbusNotify.SendNotification(notifyID)

2) Use the Notify function directly:

Dim hDbusNotify As New DbusNotify
Dim hints As New Collection
hints.Add("device.removed", "category")
hDbusNotify.Notify("Device removed:", "/dev" &/ device, icon, 
[""], 0, hints, 5000)


DbusNotify raises 2 events:

Public Sub dbusNotify_ActionInvoked(iNotifyID As Integer, sActionKey As 
String)


  If Left(LCase(sActionKey), 7) = "browse=" Then
'want to ensure a trailing "/"
sActionKey = "file://" & Trim(Mid(sActionKey, 8) &/ " ")
Shell "xdg-open " & sActionKey
  Endif

End

Public Sub dbusNotify_NotificationClosed(iNotifyID As Integer, iReason 
As Integer)

'Usually ignored
End



dbusNotify.class
Description: application/java
--
Check out the vibrant 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] TerminalView1.Exec(...)

2017-09-01 Thread Tony Morehen
If you're using a recent commit, you can use 
hTerminalView.Input("somecommand\n") to run it automatically or don't 
include "\n" and press ENTER.



On 2017-09-01 03:15 AM, Hans Lehmann wrote:

Hello,

I currently test the component gb.form.terminal with the class 
TerminalView. The class works as expected with TerminalView1.Exec 
(["bash"]) or with TerminalView1.Exec (["sudo", "apt-get", "install", 
"libxml2-utils"]. Is there a way for TerminalView1.Exec (["bash"]) to 
pass a command to the terminal and then run it automatically or after 
ENTER?


Best regards

Hans
-- 


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




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


Re: [Gambas-user] TerminalView1.Exec(...)

2017-09-01 Thread Tony Morehen
Your version is dated Aug 21.  Input() was added Aug 22. TerminalView 
has been updated quite a lot recently.  You should update to the current 
commit.



On 2017-09-01 11:09 AM, Hans Lehmann wrote:

Am 01.09.2017 um 15:05 schrieb Tony Morehen:
If you're using a recent commit, you can use 
hTerminalView.Input("somecommand\n") to run it automatically or don't 
include "\n" and press ENTER.

Hello Tony,

[System]
Gambas=3.10.90 5bb80e5 (master)
OperatingSystem=Linux
Kernel=3.19.0-32-generic
Architecture=x86_64
Distribution=Linux Mint 17.3 Rosa
Desktop=CINNAMON
Theme=Gtk
Language=de_DE.UTF-8
Memory=1855M

I always get the message "Unknown symbol 'Input' in the class 
'TerminalView'. What now?


Regards

Hans
-- 


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




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


Re: [Gambas-user] New domain name for Gambas

2017-09-01 Thread Tony Morehen
My preference is for gambas-basic.  It would make it easier for 
potential visitors to find the site.


another option is perhaps to take over the gambas.guru site. It seems to 
be well structured  but has been read only for some time.


On 2017-09-01 05:13 PM, Adrien Prokopowicz wrote:
I have the same feeling about the g4mbas name : it doesn't feel very 
mature, and

you can't read it very well.

Personally I've been thinking about something like gambas-basic or 
gambas-lang.

This way it's much more readable and easy to type in.

gambashq looks nicer, but it isn't really obvious what HQ is. (And to 
be honest

I'm not sure either :-) ).

Le Fri, 01 Sep 2017 23:00:20 +0200, Cristiano Guadagnino 
 a écrit:


I'd prefer gambashq.org. While g4mbas is indeed funny, I fear it may 
give
the false impression that Gambas is something childish, not a real 
mature

product like it is.

Just my 2 euro-cents :-).

Cris


On Fri, Sep 1, 2017 at 10:39 PM, Benoît Minisini via Gambas-user <
gambas-user@lists.sourceforge.net> wrote:


Hi,

As gambas.{org,net,com...} are all unavailable, I'm thinking about 
buying

g4mbas.org (or .net, .com...) as a new domain name for Gambas.

Another solution would be buying gambashq.org or 
gambas-something.org...

But I find g4mbas more funny.

What do you think about that, people?

--
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

-- 


Check out the vibrant 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







--
Check out the vibrant 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] New domain name for Gambas

2017-09-01 Thread Tony Morehen

.org and .net are owned by buydomains.com, expire 5/18


On 2017-09-01 07:34 PM, PICCORO McKAY Lenz wrote:

why gambas are unnavailable?

how many days left to one of that domains?

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2017-09-01 16:39 GMT-04:00 Benoît Minisini via Gambas-user <
gambas-user@lists.sourceforge.net>:


Hi,

As gambas.{org,net,com...} are all unavailable, I'm thinking about buying
g4mbas.org (or .net, .com...) as a new domain name for Gambas.

Another solution would be buying gambashq.org or gambas-something.org...
But I find g4mbas more funny.

What do you think about that, people?

--
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


--
Check out the vibrant 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




--
Check out the vibrant 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] [Gambas Bug Tracker] Bug #1136: ColorButton fails with error bad drawing under gtk2 and gtk3

2017-09-02 Thread Tony Morehen
Sorry, I realized after I uploaded the project that I uploaded a version 
using a customized DirView.  Is there any way to delete the gbTerm I 
published to the Software Farm?


My version of DirView has some new events and properties.  It is 
otherwise 100% compatible with the standard DirView.


ShowFiles(boolean) True shows the files contained in the current folder.
FoldersFirst(boolean) When files are shown, sort folders first
RootName(string) Change name of root ie change "/" to "System"

Event IconByType(sPath As String, iIconType As Integer)
Raised after Icon event, sPath is the same as Icon's sPath, iIconType 
type of icon to supply 0=file, 1=closed folder, 2=open folder


I'd be happy to contribute this component to Gambas.


On 2017-09-02 01:26 PM, bugtrac...@gambaswiki.org wrote:

http://gambaswiki.org/bugtracker/edit?object=BUG.1136=L21haW4-

Comment #6 by Benoît MINISINI:

OK, I remove the reference to that property, and could run the project. I got 
the bug.

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





--
Check out the vibrant 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] [Gambas Bug Tracker] Bug #1136: ColorButton fails with error bad drawing under gtk2 and gtk3

2017-09-02 Thread Tony Morehen
Some how I've wound up with 2 gambaswiki accounts.  I logged in with the 
wrong account so didn't see the remove button.



On 2017-09-02 02:47 PM, Benoît Minisini wrote:

Le 02/09/2017 à 20:09, Tony Morehen a écrit :
Sorry, I realized after I uploaded the project that I uploaded a 
version using a customized DirView. Is there any way to delete the 
gbTerm I published to the Software Farm?


Click on the "Remove" button. You can remove a project from the 
software farm only if you have published it.




My version of DirView has some new events and properties.  It is 
otherwise 100% compatible with the standard DirView.


ShowFiles(boolean) True shows the files contained in the current folder.
FoldersFirst(boolean) When files are shown, sort folders first
RootName(string) Change name of root ie change "/" to "System"

Event IconByType(sPath As String, iIconType As Integer)
Raised after Icon event, sPath is the same as Icon's sPath, iIconType 
type of icon to supply 0=file, 1=closed folder, 2=open folder


I'd be happy to contribute this component to Gambas.


If you put an exported DirView class in your project, it will 
automatically inherits and override the gb.form DirView class. That 
way, you can enhance the DirView and publish your project without 
having to wait for your changes to be merged.


Regards,





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


Re: [Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the first declared bus for signals

2017-08-30 Thread Tony Morehen

I thought some more about what you wrote and I tried:

1) Created a Main module and set it as the startup class.
2) Moved FMain's _new code (setting up signal handlers etc) to Sub 
Main() in module Main

3) Moved all other code into Main
4) deleted FMain and removed all components except gb.DBus and gb.base

Everything worked.  I have my daemon with a minimum of memory overhead.  
Brilliant!



On 2017-08-30 06:10 PM, Benoît Minisini wrote:

Le 31/08/2017 à 00:07, Tony Morehen a écrit :

It is indeed fixed.  Thanks Benoit!

BTW is there any way to add an event loop to a console app?  ie I 
want to use a console app as a daemon, responding to dbus signals.




There is always an event loop in Gambas programs. It starts as soon as 
the Main() function is finished.






--
Check out the vibrant 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] Fwd: [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the first declared bus for signals

2017-08-31 Thread Tony Morehen
Hans, I've uploaded gbAutoMount to the Software Farm.  It shows what you 
can do with Udisks2 and desktop notifications.



On 2017-08-31 12:43 PM, Hans Lehmann wrote:

Am 31.08.2017 um 16:40 schrieb Tony Morehen:
There were issues with dbus signals that were cleared up in the 
recent development release.


OK.
In the console is now:

/Main.UdisksDbusSignal_Signal.20: Adding:  sdb1//
//Main.UdisksDbusSignal_Signal.24: Removed:  sdb1/

The program in my DBUS project work as expected.Fine!

Now only the questions remain for me:

  * How do I link the project to a different GUI project?
  * How do I access the two results in the console from another program?

Best regards

Hans


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


Re: [Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1161: Class Editor is Locked

2017-09-05 Thread Tony Morehen

Fernando,

The fact that Gambas runs properly from a vm strongly suggests that the 
problem is not Gambas, but is the system environment that Gambas is 
running in.


What directory is your project located?  Have you tried copying the 
project to your home directory?  In the vm, is Gambas loading the 
project directly from the original directory or from a copy in the vm.


Does your system enable extended ACLs?  Are you running AppArmor or 
SELinux?  What about in the vm?



On 2017-09-05 08:55 AM, Fernando Cabral wrote:

Benoît, I don't know which input method I am using and I don't know how to
find it.
Nevertheless, I know for sure it is the standard method for Linux Mint,
whichever it is.
I've never tinkered with it. Also, IDE used to work. All of sudden, it
stopped working.
I had changed nothing between the working stage and the non-working stage.
Besides, when I install the virtual machines, I use the default input
method (whichever it is).

Perhaps you can provide me with a command to find out what input method I
am using.
The nearest I got to it was by looking into the files at /etc/X11/xinit.
Basically, either they are empty or say "default".

Regards

- fernando


2017-09-05 8:24 GMT-03:00 Benoît Minisini via Gambas-user <
gambas-user@lists.sourceforge.net>:



 Message transféré 
Sujet : [Gambas Bug Tracker] Bug #1161: Class Editor is Locked
Date : Tue, 05 Sep 2017 11:21:11 GMT
De : bugtrac...@gambaswiki.org
Pour : deli...@gmail.com, g4m...@gmail.com

http://gambaswiki.org/bugtracker/edit?object=BUG.1161=L21haW4-

Comment #1 by Benoît MINISINI:

Which X11 input method do you use?

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








--
Check out the vibrant 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