[Gambas-user] Feature request: Make 'Pointer' a true integer type

2014-04-27 Thread Bruno Félix Rezende Ribeiro
Hello again!

It'd be very handy if 'Pointer' was considered by the interpreter as an
integer data type like 'Byte', 'Short', 'Integer' and 'Long'. That way
one could use any integer function indiscriminately on a Pointer as
well, rather than converting it to 'Long' (using 'CLong' function)
every time it's an argument for an integer function.  That is specially
relevant when interfacing with external C libraries, where to make
portable Gambas programs one need to treat the C data type 'long' as
the Gambas data type 'Pointer'.  This means that 'Pointer' isn't
meaningful only in pointer contexts but also in ordinary integer
contexts.  What do you think about this proposed change?  Is there any
way in which it can be harmful to existing code or interpreter's
functionality?

Thanks in advance.

Ps: In order to make portable Gambas programs which interface with
external C libraries, one needs to follow the correct equivalence
between C and Gambas integer data types, which is given by the table:

[C] [Gambas]
charByte
short   Short
int Integer
longPointer
void *  Pointer
long long   Long

However, the Gambas Wiki page [1], besides having an incomplete table
which does not address 'char', 'short' and 'long long', says that the
equivalent of C's 'long' is Gambas' 'Long', what is only true on some
64-bit architectures.

Footnotes:

[1] http://gambaswiki.org/wiki/howto/extern

-- 
 ,= ,-_-. =.  Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
 `-'(. .)`-'  GNU Linux-Libre is one of its official kernels;
 \_/  All software must be free as in freedom;


signature.asc
Description: PGP signature
--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04

2014-04-27 Thread Jesus
El 27/04/14 02:13, Ru Vuott escribió:
 Hello,

 two friends of the forum www.gambas-it.org have asked me to post this 
 problem here in the Mailing List.


 They had updated and used normally the version 3.5.3 of Gambas.

 Well, not long ago they have updated their Ubuntu LTS distro  at new 14:04 
 version.
 But, when they installed Gambas again, they have been downgraded to the 
 previous Gambas version: 3.5.2 !
 Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3

 What can they do?

 Regards
 vuott

Hi Vuott

To answer this question, one must first know which installation method 
has been followed.

Either do they used nemh repository or official ones in the distribution?

I think it's a matter of updating their repositories.

Regards
-- 
Jesus Guardon

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MaskBox.Mask

2014-04-27 Thread Tobias Boege
On Sat, 26 Apr 2014, Patrik Karlsson wrote:
 Hi,
 
 today I am using TextBox_Change event to reject | characters.
 
 Public Sub txtName_Change()
 
   If String.InStr(Last.Text, |)  0 Then
 Last.Text = Replace(Last.Text, |, )
   Endif
 
 End
 
 I guess MaskBox can do this much simplier, but how, what Mask?
 

No, MaskBox is there to force formatted input. But the Mask property is way
weaker than regular expressions. The main point is that you can only
describe fixed-length strings (plus/minus the finite number of #/9 fields
in your Mask). So wherever you want to forbid |, you would write [^|]
but that also consumes any character but |. So you cannot accept arbitrary
strings but only strings of a length equal to the times you forbid the |
character.

Your initial approach was much better but one thing: if you use InStr() each
time the TextBox changes, you will scan the whole contents each time they
change but you only want to capture inputs, right? If you tell your user not
to use Ctrl-V or stuff, you can do:

Public Sub txtName_KeyPress()
  If Key.Text = | Then Stop Event
End

Regards,
Tobi

-- 
There's an old saying: Don't change anything... ever! -- Mr. Monk

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView: Change parent key

2014-04-27 Thread Jørn Erik Mørne
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thanks! I am running Gambas 3.5.2 now, but perhaps I'll be able to
pull the development version and try it out.

Another feature request that I think would have been extremely great
would be something like a .RichTextInsert() method for the TextEdit
control. This way it would be very easy to insert HTML objects like
tables, hyperlinks and so on at the cursor's current position.

I may ask to much here now, but you don't get without asking :)
I know that the QT TextEdit has methods for handling tables. Getting
some basic table functionality like that in Gambas' TextEdit would be
awesome, e.g. inserting/deleting tables, rows and columns, split and
merging cells. I believe this is already built into QT, no?

Best Regards
Erik


Den 27. april 2014 09:13, skrev gambas-user-requ...@lists.sourceforge.net:
 Message: 2 Date: Sat, 26 Apr 2014 16:32:37 +0200 From: Beno?t
 Minisini gam...@users.sourceforge.net Subject: Re: [Gambas-user]
 TreeView: Change parent key To: mailing list for gambas users 
 gambas-user@lists.sourceforge.net Message-ID: 
 535bc385.3020...@users.sourceforge.net Content-Type: text/plain; 
 charset=ISO-8859-1; format=flowed Le 23/04/2014 23:13, J?rn Erik
 M?rne a ?crit :
 Hi!
 
 Is there a way with the TreeView component to change an item's
 parent key?
 
 Now, I have to clear out all elements, and reload them each
 time I want to move an item to another parent, and this also
 resets the current opened/closed status of each item, which
 clutters the users's experience a bit.
 
 Perhaps there's a good way I haven't thought of?
 
 Regards, Erik
 
 I added a Reparent() method to the TreeView items in revision
 #6250.
 
 Tell me if it works for you.
 
 I now leave and will come back from holidays next week, so I won't
 be able to answer before.
 
 Regards,
 
 -- Beno?t Minisini
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTXRh/AAoJEADmWD07BL0OhIcIAMNur2VrX1KkkcbavF2GHvS0
Q2O8ZqClkRPbSSLrTQEEg6+EHjrKvNDvdDucsWLQRr4E516pgy/aE5uYGBCVEOcE
y/tBHn464+IZgB/KJ1CmnMJYw767v5VlGsvBSyodIgjcKBeUYSTw7agWK3WMQPb2
iEFzD4qOWkV/IGjdXx6GtAugpVuF7bbp5kFaSCiPJK0ldII0CRrk6kD8bSx4JH2P
WLK0SHYLbfhiwbnNpmPONTZNTXWlflr2n6ixyEHNWPJwKiVDidO+A4Xjw/DdkaHa
WtyVm31AdAgL+aUUwGUPrNx0F6OplsEFX/jGbIvia57a7JY6oHD9dmtXsfbuE5M=
=/vnQ
-END PGP SIGNATURE-

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04

2014-04-27 Thread Johny Provoost

op 27-04-14 13:16, Ian Haywood schreef:
 On Sun, Apr 27, 2014 at 9:09 AM, Jesus ea7...@ea7dfh.com wrote:
 El 27/04/14 02:13, Ru Vuott escribió:
 Hello,

 two friends of the forum www.gambas-it.org have asked me to post this 
 problem here in the Mailing List.


 They had updated and used normally the version 3.5.3 of Gambas.

 Well, not long ago they have updated their Ubuntu LTS distro  at new 14:04 
 version.
 But, when they installed Gambas again, they have been downgraded to the 
 previous Gambas version: 3.5.2 !
 Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3

 What can they do?
 sounds like they had a PPA configured but lost it when they reinstalled 
 Ubuntu.
 Not sure where 3.5.2 came from: sadly ubuntu's stock version is still
 3.1.1 from over two years ago. Hopefully this will be fixed in the
 next ubuntu version.
 They need to reinstall from kendek's PPA

 Ian

Well, I didn't notice it till now, but I got 3.5.2 to in Ubuntu 14.04 
(clean install) , and I installed Gambas from ppa 
http://ppa.lauchpad.net/nemh/gambas3/ubuntu trusty main

Johny Provoost



--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04

2014-04-27 Thread Ru Vuott
Hello, thanks for contributions.

One of them said he solved by cleaning  version 3.5.2, then:
sudo add-apt-repository ppa:nemh/gambas3
sudo apt-get update
sudo apt-get install gambas3

regards
vuott




Dom 27/4/14, Johny Provoost johny.provo...@skynet.be ha scritto:

 Oggetto: Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04
 A: gambas-user@lists.sourceforge.net
 Data: Domenica 27 Aprile 2014, 19:40
 
 
 op
 27-04-14 13:16, Ian Haywood schreef:
  On
 Sun, Apr 27, 2014 at 9:09 AM, Jesus ea7...@ea7dfh.com
 wrote:
  El 27/04/14 02:13, Ru Vuott
 escribió:
  Hello,
 
  two
 friends of the forum www.gambas-it.org have
 asked me to post this problem here in the Mailing List.
 
 
  They had updated and used normally
 the version 3.5.3 of Gambas.
 
  Well, not long ago they have
 updated their Ubuntu LTS distro  at new 14:04 version.
  But, when they installed Gambas
 again, they have been downgraded to the previous
 Gambas version: 3.5.2 !
 
 Obviously, They'ld like to obtain again the newest
 version of Gambas: 3.5.3
 
  What can they do?
  sounds like they had a PPA configured but
 lost it when they reinstalled Ubuntu.
 
 Not sure where 3.5.2 came from: sadly ubuntu's stock
 version is still
  3.1.1 from over two
 years ago. Hopefully this will be fixed in the
  next ubuntu version.
 
 They need to reinstall from kendek's PPA
 
  Ian
 
 Well, I didn't notice
 it till now, but I got 3.5.2 to in Ubuntu 14.04 
 (clean install) , and I installed Gambas from
 ppa 
 http://ppa.lauchpad.net/nemh/gambas3/ubuntu
 trusty main
 
 Johny
 Provoost
 
 
 
 --
 Start Your Social Network Today - Download eXo
 Platform
 Build your Enterprise Intranet with
 eXo Platform Software
 Java Based Open Source
 Intranet - Social, Extensible, Cloud Ready
 Get Started Now And Turn Your Intranet Into A
 Collaboration Platform
 http://p.sf.net/sfu/ExoPlatform
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04

2014-04-27 Thread ISS Boss

   If I may butt in for a second.  That is exactly what I had to do when my
   Ubuntu updated to 12.04.  When I tried to check for updates the Update
   Manager told me that Gambas was unauthorized and refused to install it or
   upgrade it.
   I ran the commands you mention and upgraded myself  to Gambas version 3.5.3.
   I suspect that where I had originally gotten version 3.5.2 was NOT the
   latest PPA.
   There was no reason to uninstall the old version of Gambas.  The latest
   version seemed to install right over the old one.
   Bill

   Ru Vuott wrote, On 04/27/2014 17:37:

Hello, thanks for contributions.

One of them said he solved by cleaning  version 3.5.2, then:
sudo add-apt-repository ppa:nemh/gambas3
sudo apt-get update
sudo apt-get install gambas3

regards
vuott




Dom 27/4/14, Johny Provoost [1]johny.provo...@skynet.be ha scritto:

 Oggetto: Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04
 A: [2]gambas-user@lists.sourceforge.net
 Data: Domenica 27 Aprile 2014, 19:40


 op
 27-04-14 13:16, Ian Haywood schreef:
  On
 Sun, Apr 27, 2014 at 9:09 AM, Jesus [3]ea7...@ea7dfh.com
 wrote:
  El 27/04/14 02:13, Ru Vuott
 escribió:
  Hello,
 
  two
 friends of the forum [4]www.gambas-it.org have
 asked me to post this problem here in the Mailing List.
 
 
  They had updated and used normally
 the version 3.5.3 of Gambas.
 
  Well, not long ago they have
 updated their Ubuntu LTS distro  at new 14:04 version.
  But, when they installed Gambas
 again, they have been downgraded to the previous
 Gambas version: 3.5.2 !
 
 Obviously, They'ld like to obtain again the newest
 version of Gambas: 3.5.3
 
  What can they do?
  sounds like they had a PPA configured but
 lost it when they reinstalled Ubuntu.
 
 Not sure where 3.5.2 came from: sadly ubuntu's stock
 version is still
  3.1.1 from over two
 years ago. Hopefully this will be fixed in the
  next ubuntu version.
 
 They need to reinstall from kendek's PPA
 
  Ian
 
 Well, I didn't notice
 it till now, but I got 3.5.2 to in Ubuntu 14.04
 (clean install) , and I installed Gambas from
 ppa
 [5]http://ppa.lauchpad.net/nemh/gambas3/ubuntu
 trusty main

 Johny
 Provoost



 --
 Start Your Social Network Today - Download eXo
 Platform
 Build your Enterprise Intranet with
 eXo Platform Software
 Java Based Open Source
 Intranet - Social, Extensible, Cloud Ready
 Get Started Now And Turn Your Intranet Into A
 Collaboration Platform
 [6]http://p.sf.net/sfu/ExoPlatform
 ___
 Gambas-user mailing list
 [7]Gambas-user@lists.sourceforge.net
 [8]https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
[9]http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
[10]Gambas-user@lists.sourceforge.net
[11]https://lists.sourceforge.net/lists/listinfo/gambas-user

References

   1. mailto:johny.provo...@skynet.be
   2. mailto:gambas-user@lists.sourceforge.net
   3. mailto:ea7...@ea7dfh.com
   4. http://www.gambas-it.org/
   5. http://ppa.lauchpad.net/nemh/gambas3/ubuntu
   6. http://p.sf.net/sfu/ExoPlatform
   7. mailto:Gambas-user@lists.sourceforge.net
   8. https://lists.sourceforge.net/lists/listinfo/gambas-user
   9. http://p.sf.net/sfu/ExoPlatform
  10. mailto:Gambas-user@lists.sourceforge.net
  11. https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user