Re: [Gambas-user] Html UTF-8 ISO-8859-1

2016-08-30 Thread Patrik Karlsson
2016-08-28 11:34 GMT+02:00 Gianluigi :

> Hello Patrik,
> thanks for the reply.
> Unfortunately I have not understood how I can get your iconv frontend.
> Regard
> Gianluigi
>
>
> If you dont use git you can download a zip with
https://codeload.github.com/trixon/gambas-alphatrans/zip/master
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Html UTF-8 ISO-8859-1

2016-08-26 Thread Patrik Karlsson
2016-08-23 20:41 GMT+02:00 Gianluigi :

> Hi all,
> I need to make minor modifications to the source of existing html files.
> Unfortunately, some files are saved properly (UTF-8), while others do not
> (ISO-8859-1).
> I have tried in various ways, using Conv$() also combined with Html(),
> using the TextArea and TextEditor but I could not anything, any
> suggestions?
> I would avoid the use of the shell (eg. open the html file in gedit, etc.)
> I attach explanation test.
>
> Regards
> Gianluigi
>
>
A while back I made a iconv frontend i gambas.

http://trixon.se/projects/gambas/alphatrans/
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-11-13 Thread Patrik Karlsson
It took longer time than I expected but now I have been pooking arround a
bit more.
The ppa I am using is ppa:gambas-team/gambas3.

And when I try to configure gb.jit the output is
checking for llvm-config... /usr/bin/llvm-config
checking for LLVM, version between 3.1 and 3.5... no
configure: WARNING: gb.jit is disabled

The output of pata@rpi2:~/Hämtningar/gambas3-3.8.2/gb.jit$ llvm-config
--version
is 3.6.2

I have llvm-3.5 installed but there are to many symlinks from llvm-3.6 to
llvm under /usr/bin for me to sort it out, so I guess I will have to
disable JIT until it works with newer versions of llvm.

/Patrik



2015-11-02 6:16 GMT+01:00 Patrik Karlsson :

> Im on the road now so Ill get back to you on this one in about a week.
> Den 1 nov 2015 18:35 skrev "Benoît Minisini"  >:
>
>> Le 31/10/2015 23:39, Patrik Karlsson a écrit :
>> > I built in from source and now the IDE starts ok,
>>
>> It may be a problem in the packaging so...Which ppa did you use?
>>
>> > however, gb.jit was
>> > disabled.
>> > Is it possible to solve that one?
>> >
>>
>> It depends on your distribution. 'gb.jit' requires LLVM between 3.1 and
>> 3.5. Did you install it?
>>
>> --
>> Benoît Minisini
>>
>>
>> --
>> ___
>> 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] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-11-01 Thread Patrik Karlsson
Im on the road now so Ill get back to you on this one in about a week.
Den 1 nov 2015 18:35 skrev "Benoît Minisini" :

> Le 31/10/2015 23:39, Patrik Karlsson a écrit :
> > I built in from source and now the IDE starts ok,
>
> It may be a problem in the packaging so...Which ppa did you use?
>
> > however, gb.jit was
> > disabled.
> > Is it possible to solve that one?
> >
>
> It depends on your distribution. 'gb.jit' requires LLVM between 3.1 and
> 3.5. Did you install it?
>
> --
> Benoît Minisini
>
>
> --
> ___
> 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] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-10-31 Thread Patrik Karlsson
I built in from source and now the IDE starts ok, however, gb.jit was
disabled.
Is it possible to solve that one?

2015-10-31 18:27 GMT+01:00 Patrik Karlsson :

> Well, I downloaded the source and:
>
> cd gambas3-3.8.2/app/src/gambas3/
> pata@rpi2:~/Hämtningar/gambas3-3.8.2/app/src/gambas3$ gbc3 -agt
> OK
> pata@rpi2:~/Hämtningar/gambas3-3.8.2/app/src/gambas3$ gdb gbx3
> GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
> Copyright (C) 2015 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "arm-linux-gnueabihf".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from gbx3...(no debugging symbols found)...done.
> (gdb) run
> Starting program: /usr/bin/gbx3
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library
> "/lib/arm-linux-gnueabihf/libthread_db.so.1".
> [New Thread 0x6eb0b460 (LWP 11722)]
> [New Thread 0x6e106460 (LWP 11723)]
> [New Thread 0x6d7ff460 (LWP 11724)]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6fef07ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> (gdb) bt
> #0  0x6fef07ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> #1  0x6fef0720 in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb)
>
> 2015-10-31 17:25 GMT+01:00 Benoît Minisini :
>
>> Le 31/10/2015 15:20, Patrik Karlsson a écrit :
>> > Ok, this is what I got:
>> >
>> > (gdb) run
>> > Starting program: /usr/bin/gbx3
>> > [Thread debugging using libthread_db enabled]
>> > Using host libthread_db library
>> > "/lib/arm-linux-gnueabihf/libthread_db.so.1".
>> > [New Thread 0x6eb81460 (LWP 4656)]
>> > [New Thread 0x6e176460 (LWP 4657)]
>> > [New Thread 0x6d976460 (LWP 4658)]
>> >
>> > Program received signal SIGSEGV, Segmentation fault.
>> > 0x6ff137ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
>> > (gdb) bt
>> > #0  0x6ff137ce in ?? () from
>> /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
>> > #1  0x6ff13720 in ?? () from
>> /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
>> > Backtrace stopped: previous frame identical to this frame (corrupt
>> stack?)
>> > (gdb)
>> >
>>
>> I have no idea why the interpreter is inside he libLLVM library. He
>> should be there. Are you sure you have run the gambas 3 IDE?
>>
>> Can you compile Gambas from sources with debugging information on the
>> RPi, so that we get more information?
>>
>> --
>> Benoît Minisini
>>
>>
>> --
>> ___
>> 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] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-10-31 Thread Patrik Karlsson
Well, I downloaded the source and:

cd gambas3-3.8.2/app/src/gambas3/
pata@rpi2:~/Hämtningar/gambas3-3.8.2/app/src/gambas3$ gbc3 -agt
OK
pata@rpi2:~/Hämtningar/gambas3-3.8.2/app/src/gambas3$ gdb gbx3
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gbx3...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/gbx3
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x6eb0b460 (LWP 11722)]
[New Thread 0x6e106460 (LWP 11723)]
[New Thread 0x6d7ff460 (LWP 11724)]

Program received signal SIGSEGV, Segmentation fault.
0x6fef07ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
(gdb) bt
#0  0x6fef07ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
#1  0x6fef0720 in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

2015-10-31 17:25 GMT+01:00 Benoît Minisini :

> Le 31/10/2015 15:20, Patrik Karlsson a écrit :
> > Ok, this is what I got:
> >
> > (gdb) run
> > Starting program: /usr/bin/gbx3
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library
> > "/lib/arm-linux-gnueabihf/libthread_db.so.1".
> > [New Thread 0x6eb81460 (LWP 4656)]
> > [New Thread 0x6e176460 (LWP 4657)]
> > [New Thread 0x6d976460 (LWP 4658)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x6ff137ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> > (gdb) bt
> > #0  0x6ff137ce in ?? () from
> /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> > #1  0x6ff13720 in ?? () from
> /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
> > Backtrace stopped: previous frame identical to this frame (corrupt
> stack?)
> > (gdb)
> >
>
> I have no idea why the interpreter is inside he libLLVM library. He
> should be there. Are you sure you have run the gambas 3 IDE?
>
> Can you compile Gambas from sources with debugging information on the
> RPi, so that we get more information?
>
> --
> Benoît Minisini
>
>
> --
> ___
> 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] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-10-31 Thread Patrik Karlsson
Ok, this is what I got:

(gdb) run
Starting program: /usr/bin/gbx3
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x6eb81460 (LWP 4656)]
[New Thread 0x6e176460 (LWP 4657)]
[New Thread 0x6d976460 (LWP 4658)]

Program received signal SIGSEGV, Segmentation fault.
0x6ff137ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
(gdb) bt
#0  0x6ff137ce in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
#1  0x6ff13720 in ?? () from /usr/lib/arm-linux-gnueabihf/libLLVM-3.5.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)


2015-10-31 0:45 GMT+01:00 Benoît Minisini :

> Le 30/10/2015 19:54, Patrik Karlsson a écrit :
> > Hi,
> > I added the ppa and installed gambas as usual (apt-get install gambas3).
> > When I try to start gambas it segfaults.
> >
> > Is it because of me, the ppa or gambas? :)
> >
> > pata@rpi2:~$ gambas3
> >
> > Segmentation fault (core dumped)
> >
> > pata@rpi2:~$ gambas3 -V
> >
> > 3.8.2
> >
> > pata@rpi2:~$ uname -a
> > Linux rpi2 4.1.10-v7+ #821 SMP PREEMPT Sat Oct 10 00:16:28 BST 2015
> armv7l
> > armv7l armv7l GNU/Linux
>
> If it segfaults, it's not your fault. It may be the ppa, but it is
> usually the interpreter.
>
> Can you provide a stack backtrace of the crash as explained in the §5 of
> the "reporting a problem" website page?
>
> Thanks.
>
> --
> Benoît Minisini
>
>
> --
> ___
> 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


[Gambas-user] gambas3 segfaults on Ubuntu MATE for the Raspberry Pi 2

2015-10-30 Thread Patrik Karlsson
Hi,
I added the ppa and installed gambas as usual (apt-get install gambas3).
When I try to start gambas it segfaults.

Is it because of me, the ppa or gambas? :)

pata@rpi2:~$ gambas3

Segmentation fault (core dumped)

pata@rpi2:~$ gambas3 -V

3.8.2

pata@rpi2:~$ uname -a
Linux rpi2 4.1.10-v7+ #821 SMP PREEMPT Sat Oct 10 00:16:28 BST 2015 armv7l
armv7l armv7l GNU/Linux
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature removal suggestion: Pressing Escape hides debug pane

2015-09-19 Thread Patrik Karlsson
2015-09-19 7:16 GMT+02:00 Kevin Fishburne :

> When modifying a line of code there are context-sensitive pop-ups for
> syntax help, code completion and method/property enumeration, which is
> awesome. However, one type of pop-up requires that you press Escape to
> clear and the others do not. Being unable to reliably differentiate
> between pop-up types results in Escape being pressed in error which then
> causes the debug pane to be hidden. When using the debug pane to jump
> between search results, accidentally pressing Escape in an attempt to
> clear the context-sensitive pop-up results in the debug pane, and
> consequently the search results, being hidden. This significantly
> interrupts workflow and has been annoying the shit out of me for
> possibly years.
>
> I think the Escape key should be uncoupled from debug pane functionality
> entirely, forcing the user to use a different key or perhaps the mouse
> alone to show/hide or otherwise manipulate it. Is anyone else
> experiencing this or is it just me?
>
> --
> Kevin Fishburne
> Eight Virtues
> www: http://sales.eightvirtues.com
> e-mail: sa...@eightvirtues.com
> phone: (770) 853-6271
>
>
You are not alone. :)
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] No Global Menu in Ubuntu

2014-10-27 Thread Patrik Karlsson
Thank you!

I did a quick test in Ubuntu 14.10 as a virtual machine and installed
Gambas from the daily ppa.

The IDE and a simple app works as expected.

Looking forward to the fix in my production environment.

2014-10-25 14:15 GMT+02:00 Benoît Minisini :

> Le 25/10/2014 07:31, Patrik Karlsson a écrit :
> > 2014-10-21 18:02 GMT+02:00 Benoît Minisini  >:
> >
> >> Le 21/10/2014 17:47, Patrik Karlsson a écrit :
> >>> 2014-10-17 19:41 GMT+02:00 Patrik Karlsson :
> >>>
> >>>> Hi,
> >>>>
> >>>> I have just updated to Gambas 3.6 from the gambas-team ppa and
> >> discovered
> >>>> that Gambas does not longer support Global Menu in Ubuntu when using
> >>>> GB_GUI=gb.qt4.
> >>>>
> >>>> I can not make the IDE export the menus and my own apps only exports
> the
> >>>> menu with gb.gtk and gb.gtk3.
> >>
> >> Maybe Qt4 does not support exporting its menu bar through the Unity
> >> protocol? I don't know actually, as I use KDE...
> >>
> >> Hi Benoît,
> >
> > I have just tested this in Ubuntu 14.10 and the problem is still there. I
> > have also tested in KDE and Gambas does not export the menu in KDE.
> >
> > Is it possible to take a look at this?
>
> Apparently the Ubuntu patch that make Qt application export their menu
> is not very clever. It works with most applications, but not with the
> Gambas IDE.
>
> I found a workaround in revision #6573. It is enabled only if you
> explicitely hide the menus, and then restart the IDE.
>
> Otherwise, you can explicitely set the 'APPMENU_DISPLAY_BOTH'
> environment variable to '1' before starting the IDE.
>
> Tell me if it works for you.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> --
> ___
> 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] No Global Menu in Ubuntu

2014-10-24 Thread Patrik Karlsson
2014-10-21 18:02 GMT+02:00 Benoît Minisini :

> Le 21/10/2014 17:47, Patrik Karlsson a écrit :
> > 2014-10-17 19:41 GMT+02:00 Patrik Karlsson :
> >
> >> Hi,
> >>
> >> I have just updated to Gambas 3.6 from the gambas-team ppa and
> discovered
> >> that Gambas does not longer support Global Menu in Ubuntu when using
> >> GB_GUI=gb.qt4.
> >>
> >> I can not make the IDE export the menus and my own apps only exports the
> >> menu with gb.gtk and gb.gtk3.
>
> Maybe Qt4 does not support exporting its menu bar through the Unity
> protocol? I don't know actually, as I use KDE...
>
> Hi Benoît,

I have just tested this in Ubuntu 14.10 and the problem is still there. I
have also tested in KDE and Gambas does not export the menu in KDE.

Is it possible to take a look at this?
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] No Global Menu in Ubuntu

2014-10-21 Thread Patrik Karlsson
2014-10-21 18:02 GMT+02:00 Benoît Minisini :

> Le 21/10/2014 17:47, Patrik Karlsson a écrit :
> > 2014-10-17 19:41 GMT+02:00 Patrik Karlsson :
> >
> >> Hi,
> >>
> >> I have just updated to Gambas 3.6 from the gambas-team ppa and
> discovered
> >> that Gambas does not longer support Global Menu in Ubuntu when using
> >> GB_GUI=gb.qt4.
> >>
> >> I can not make the IDE export the menus and my own apps only exports the
> >> menu with gb.gtk and gb.gtk3.
> >>
> >> Is this possible to fix in Gambas or is it a Ubuntu thing?
> >>
> >> Does it work for other ubuntu users?
> >>
> >>
> >> [System]
> >> Gambas=3.6.0
> >> OperatingSystem=Linux
> >> Kernel=3.13.0-37-generic
> >> Architecture=x86_64
> >> Distribution=Ubuntu 14.04.1 LTS
> >> Desktop=GNOME
> >> Theme=QGtk
> >> Language=C
> >> Memory=7911M
> >> [Libraries]
> >> Cairo=libcairo.so.2.11301.0
> >> Curl=libcurl.so.4.3.0
> >> DBus=libdbus-1.so.3.7.6
> >> GStreamer=libgstreamer-0.10.so.0.30.0
> >> GStreamer=libgstreamer-1.0.so.0.204.0
> >> GTK+3=libgtk-3.so.0.1000.8
> >> GTK+=libgtk-x11-2.0.so.0.2400.23
> >> OpenGL=libGL.so.1.2.0
> >> Poppler=libpoppler.so.44.0.0
> >> Qt4=libQtCore.so.4.8.6
> >> SDL=libSDL-1.2.so.0.11.4
> >>
> >
> > Hi, it's me again. :)
> >
> > Am I the only Ubuntu (Unity) user on this list having problem with menus?
> > Or am I the only Ubuntu (Unity) user on this list with Gambas 3.6?
> >
> > I really do like to get rid of that menu bar...
>
> Maybe Qt4 does not support exporting its menu bar through the Unity
> protocol? I don't know actually, as I use KDE...
>

Well it did in 3.5.4 so what has changed in Gambas that could change the
menu?
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] No Global Menu in Ubuntu

2014-10-21 Thread Patrik Karlsson
2014-10-21 18:40 GMT+02:00 Johny Provoost :

>
> Op 21-10-14 om 17:47 schreef Patrik Karlsson:
> >
> > Hi, it's me again. :)
> >
> > Am I the only Ubuntu (Unity) user on this list having problem with menus?
> > Or am I the only Ubuntu (Unity) user on this list with Gambas 3.6?
> >
> > I really do like to get rid of that menu bar...
>
> No you don't Patrik.  I have it too, but I don't mind.
>
>
Thank you, that's good to know, I think. :)
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] No Global Menu in Ubuntu

2014-10-21 Thread Patrik Karlsson
2014-10-17 19:41 GMT+02:00 Patrik Karlsson :

> Hi,
>
> I have just updated to Gambas 3.6 from the gambas-team ppa and discovered
> that Gambas does not longer support Global Menu in Ubuntu when using
> GB_GUI=gb.qt4.
>
> I can not make the IDE export the menus and my own apps only exports the
> menu with gb.gtk and gb.gtk3.
>
> Is this possible to fix in Gambas or is it a Ubuntu thing?
>
> Does it work for other ubuntu users?
>
>
> [System]
> Gambas=3.6.0
> OperatingSystem=Linux
> Kernel=3.13.0-37-generic
> Architecture=x86_64
> Distribution=Ubuntu 14.04.1 LTS
> Desktop=GNOME
> Theme=QGtk
> Language=C
> Memory=7911M
> [Libraries]
> Cairo=libcairo.so.2.11301.0
> Curl=libcurl.so.4.3.0
> DBus=libdbus-1.so.3.7.6
> GStreamer=libgstreamer-0.10.so.0.30.0
> GStreamer=libgstreamer-1.0.so.0.204.0
> GTK+3=libgtk-3.so.0.1000.8
> GTK+=libgtk-x11-2.0.so.0.2400.23
> OpenGL=libGL.so.1.2.0
> Poppler=libpoppler.so.44.0.0
> Qt4=libQtCore.so.4.8.6
> SDL=libSDL-1.2.so.0.11.4
>

Hi, it's me again. :)

Am I the only Ubuntu (Unity) user on this list having problem with menus?
Or am I the only Ubuntu (Unity) user on this list with Gambas 3.6?

I really do like to get rid of that menu bar...
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] No Global Menu in Ubuntu

2014-10-17 Thread Patrik Karlsson
Hi,

I have just updated to Gambas 3.6 from the gambas-team ppa and discovered
that Gambas does not longer support Global Menu in Ubuntu when using
GB_GUI=gb.qt4.

I can not make the IDE export the menus and my own apps only exports the
menu with gb.gtk and gb.gtk3.

Is this possible to fix in Gambas or is it a Ubuntu thing?

Does it work for other ubuntu users?


[System]
Gambas=3.6.0
OperatingSystem=Linux
Kernel=3.13.0-37-generic
Architecture=x86_64
Distribution=Ubuntu 14.04.1 LTS
Desktop=GNOME
Theme=QGtk
Language=C
Memory=7911M
[Libraries]
Cairo=libcairo.so.2.11301.0
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.6
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.204.0
GTK+3=libgtk-3.so.0.1000.8
GTK+=libgtk-x11-2.0.so.0.2400.23
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.44.0.0
Qt4=libQtCore.so.4.8.6
SDL=libSDL-1.2.so.0.11.4
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IDE feature request

2014-10-09 Thread Patrik Karlsson
I have the same problem as you. Reported it on this list some time ago.

Patrik
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] alphatrans

2014-09-13 Thread Patrik Karlsson
Hi,

I made a gui for iconv that makes it easy to convert file encoding.
Feel free to try it out and come with any suggestions that you might have.

Screenshot and source code:
http://trixon.se/linux/alphatrans/

/Patrik
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Radio menu item

2014-09-08 Thread Patrik Karlsson
2014-09-08 17:23 GMT+02:00 Tobias Boege :

> > I guess I could make "Toggle" menu items behave like a radio group but >
> don't like that idea.
>
> Why not? How else would you signify to your user that it's not an ordinary
> menu?


Well, toggle is ok, what I do not want for a radio menu item to have the
visual style of an ordinary CheckBoxMenuItem.


> Do you know if the traditional look of RadioButtons is supported in
> menus in QT and GTK?


Yes. I'm in Ubuntu now and the gnome-calculator and nautilus file manager
has radio menu items looking as it should be.

Attached is a project that implements such RadioButton-like menus using a
> hack


That's a really nice trick!

Still, would it be possible to have real radio menu items?

/Patrik
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Radio menu item

2014-09-08 Thread Patrik Karlsson
I was looking for a way to have menu items behave like radio 'buttons' and
the only thing I found was an old archive post from 2009.
http://sourceforge.net/p/gambas/mailman/message/24068134/

Is it possible to have radio menu items now?

/Patrik

I guess I could make "Toggle" menu items behave like a radio group but I
don't like that idea.
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Loading non UTF-8 text files to TextArea

2014-09-08 Thread Patrik Karlsson
2014-09-06 20:45 GMT+02:00 Benoît Minisini :

> Le 06/09/2014 20:29, Patrik Karlsson a écrit :
> > Hi,
> >
> > I got: Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion
> > 'g_utf8_validate (text, len, NULL)' failed
> > when trying TextArea.Text=File.Load("iso8859-1.txt")
> >
> > So my TextArea stays empty.
>
> If the file contents is not UTF-8, it's up to you to convert it to UTF-8.
>
> TextArea.Text = Conv(File.Load("iso8859-1.txt"), "ISO-8859-1", "UTF-8")
>
> >
> > I have found an old bug report regarding this tagged as wont fix.
> >
> > Since the file loads as expected in qt, is it future safe to use qt in my
> > app, will it always work?
> >
> > Does qt support "every other" encoding too?
> > Im asking since Im working on a gui for iconv.
> >
> > /Patrik
>
> It should not work in Qt either, unless it has some automatic conversion
> inside, or it is more tolerant.
>
> Regards,
>
> --
> Benoît Minisini
>
> "It should not work..." :) In that case I'll be using Conv(), thanks!

/Patrik
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Loading non UTF-8 text files to TextArea

2014-09-06 Thread Patrik Karlsson
Hi,

I got: Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion
'g_utf8_validate (text, len, NULL)' failed
when trying TextArea.Text=File.Load("iso8859-1.txt")

So my TextArea stays empty.

I have found an old bug report regarding this tagged as wont fix.

Since the file loads as expected in qt, is it future safe to use qt in my
app, will it always work?

Does qt support "every other" encoding too?
Im asking since Im working on a gui for iconv.

/Patrik
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] yaya - yet another yahtzee

2014-07-13 Thread Patrik Karlsson
2014-07-13 1:18 GMT+02:00 Kevin Fishburne :

> On 07/12/2014 12:56 PM, Patrik Karlsson wrote:
> > My first Gambas project of any substance is becoming somewhat useful and
> > I'm asking you for some feedback before I'm wrapping it up.
> >
> > It's a dice game based on the Yahtzee "structure" and it's easy to create
> > similar dice games.
> > Eg.
> https://github.com/trixon/gambas-yaya/blob/master/gamedefs/default.json
> I don't know how to play Yahtzee, but here are my suggestions:
>
> 1) Place a "Roll" button image in the bottom-right corner.
>

Let me think about that..


> 2) Create a default player so the user doesn't have to create one on
> first run.
>

Will do, and I'll also make it easier to add new names on the fly.


> 3) Decide on either a two-pane horizontal or two-pane vertical layout
> with one pane containing the dice and the other pane containing the
> "info grid" for lack of a better term. It currently requires scrolling
> to see all the information.
>

Not today but I might do it in the future. Would you also have the dice
stacked on each other in a vertical layout?
You could reduce the font size so that you don't have to scroll.

4) If you move the mouse across the top edge of the collision box of the
> "roll" area the hand graphic scrolls left and right repeatedly, which
> while probably easy to fix is confusing when learning the interface.
>

You are right, there's something strange going on there. It should hide the
hand when moving away from the dice panel, but not in that way.


> 5) This is probably because I don't know what I'm doing, but after
> several rolls the graphical UI becomes unresponsive, not allowing me to
> roll again or right/left click on a die. If this is because I lost the
> game there should be an OSD telling me that I lost.
>

That's my way of saying you have no more rolls and you have to register
something in the scorecard.
Below the player name there is a counter that goes 3/3 when there no more
rolls left, in that round.


> One final suggestion is that if you'd like to increase the "oooh aaah"
> factor you might want to consider having a "3D mode" which uses OpenGL
> to render the dice and board. You could even do some really simple
> collision detection with the dice.
>

Nice idea but since I'm 3D challenged that will not happen any time soon. :)


> Nice work and keep it up.
>

Thank you, and thanks for your feedback.

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


Re: [Gambas-user] menu error

2014-06-29 Thread Patrik Karlsson
My guess is that you have to subtract one from your menu index.
http://en.wikipedia.org/wiki/Off-by-one_error



2014-06-29 5:14 GMT+02:00 Shane :

> I get the attached error when trying to insert a menu to an existing
> project form
>
> build 6343
>
> [System]
> Gambas=3.5.90
> OperatingSystem=Linux
> Kernel=3.8.0-35-generic
> Architecture=x86_64
> Distribution=Linux Mint 15 Olivia
> Desktop=GNOME
> Theme=QGtk
> Language=en_AU.UTF-8
> Memory=3808M
> [Libraries]
> Cairo=libcairo.so.2.11200.14
> Curl=libcurl.so.4.3.0
> DBus=libdbus-1.so.3.7.2
> GStreamer=libgstreamer-0.10.so.0.30.0
> GStreamer=libgstreamer-1.0.so.0.6.0
> GTK+3=libgtk-3.so.0.600.4
> GTK+=libgtk-x11-2.0.so.0.2400.17
> OpenGL=libGL.so.1.2.0
> Poppler=libpoppler.so.28.0.0
> Qt4=libQtCore.so.4.8.4
> SDL=libSDL-1.2.so.0.11.4
>
>
> --
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Referencing an array element with boolean

2014-06-21 Thread Patrik Karlsson
2014-06-21 12:28 GMT+02:00 Tobias Boege :

> On Sat, 21 Jun 2014, Patrik Karlsson wrote:
> > 1. Why is Abs(True) True?
>
> Because the mapping Integer -> Boolean is not injective. The rule is: 0
> maps
> to False, everything else maps to True. To be able to map Boolean ->
> Integer
> the convention used in Gambas is False maps to zero (of course) and True
> maps
> to -1, which makes actually sense if you don't look into the array index
> but
> into the bit flags direction (True means "all bits set" in Gambas, which is
> what -1 is in two's complement). So what happens is:
>
> Abs(True) becomes Abs(CInt(True)) on the fly which is Abs(-1) = 1 which is
> non-zero and thus True again.


 That was interesting, thanks.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Referencing an array element with boolean

2014-06-21 Thread Patrik Karlsson
2014-06-21 12:23 GMT+02:00 Benoît Minisini :

> Le 21/06/2014 09:47, Patrik Karlsson a écrit :
> > 3. I have a "BoolToIndex" function in a library module but I was thinking
> > if it should not be part of the language, to be able to reference in
> > a _simple_ way to an array element with a boolean.
>
> No. But you will be able to do Abs(True).
>
> Moreover, Boolean is, by definition, not a good datatype for indexing!
>
>
Ok, that will be good too, thank you.
In this case indexing on booleans gives me a nice and clean code where I
have many 'either or' for loading the correct string value, sound clip and
image. But I will keep that in mind.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Referencing an array element with boolean

2014-06-21 Thread Patrik Karlsson
Many years ago when I was programming in Delphi I used to have object
arrays of size 2 and referencing to the element index with true and false.
This was very very useful.

It was possible since false=0 and true=+1.
In Gambas we have false=0 and true=-1.

So now I came up with:
  Dim sMoods As String[] = ["Sad", "Happy"]
  Dim bHappiness As Boolean

  Debug CInt(True), Abs(True), Abs(CInt(True))
  Debug CInt(False), Abs(False), Abs(CInt(False))

  bHappiness = False
  Debug "bHappiness= "; bHappiness; ": " & sMoods[Abs(CInt(bHappiness))]
  Debug "bHappiness= "; bHappiness; ": " & sMoods[If(bHappiness, 1, 0)]

  bHappiness = True
  Debug "bHappiness= "; bHappiness; ": " & sMoods[Abs(CInt(bHappiness))]
  Debug "bHappiness= "; bHappiness; ": " & sMoods[If(bHappiness, 1, 0)]

1. Why is Abs(True) True?

2. Which is fastest, Abs(CInt(... or If(... ? I guess that If(... is more
future proof.

3. I have a "BoolToIndex" function in a library module but I was thinking
if it should not be part of the language, to be able to reference in
a _simple_ way to an array element with a boolean.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: Color.Link and Color.Visited system colors.

2014-06-20 Thread Patrik Karlsson
Much appreciated, thank you.


2014-06-20 15:44 GMT+02:00 Benoît Minisini :

> Le 20/06/2014 07:57, Patrik Karlsson a écrit :
> > Is it possible to add system colors in order to get the color of links
> from
> > the current theme?
> > Color.Link and Color.Visited.
> >
> > /Patrik
>
> Done in revision #6331.
>
> Note that GTK+2 does not have system colors for that, so some default
> color is used.
>
> --
> Benoît Minisini
>
>
> --
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Feature request: Color.Link and Color.Visited system colors.

2014-06-19 Thread Patrik Karlsson
Is it possible to add system colors in order to get the color of links from
the current theme?
Color.Link and Color.Visited.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request IDE: Make the origin of the DEBUG line code act as a hyper link

2014-06-15 Thread Patrik Karlsson
2014-06-15 14:46 GMT+02:00 Benoît Minisini :

> Le 14/06/2014 22:33, Jussi Lahtinen a écrit :
> > Excellent idea!
> >
> >
> > Jussi
> >
> >
>
> Done in revision #6320.
>
> At the moment, the feature is not optional, but it will be. I'm just
> waiting from people's tests before.
>
> Regards,
>
> --
> Benoît Minisini
>
>
Thank you for making the Gambas experience more and more enjoyable.
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Development cycle and component vs library

2014-06-14 Thread Patrik Karlsson
2014-06-15 1:06 GMT+02:00 B Bruen :

> On Sat, 14 Jun 2014 07:26:46 +0200
> Patrik Karlsson  wrote:
>
> > I'm working on a dice game and I'm thinking of separating "the dice part"
> > from the game itself so I and others could reuse it, and for separation.
> >
> > The main reason for not doing this earlier is that I could not understand
> > how to make the game development cycle easy in the sense that:
> > 1. libraries have to be made executables and copied to my game project
> Yes, but there is an alternative to "copy". Make an executable of the
> library in its development project, lets call it "pkdice". Then create a
> symbolic link in your game project directory to that executable
> (pkdice.gambas in the library source project). Then every time you compile
> pkdice, the game will be using the latest version of the library.


> > 2. components have to installed to the system.
> Yes. As a matter of fact libraries can also be installed to the system.
> For that matter, at the end of the development cycle you will also want to
> install the game to the system (Unless you always want to run the game from
> it's development project?). So consider your development cycle and check
> that it includes a "deploy" step.
>
> Making and installing libraries, components and programs is actually very
> easy in Gambas, using the Project|Make|Installation Package route. We have
> found that the autotools packager works best for us, allowing installation
> across many different distros. Also, understanding it will help you to
> understand the distro specific installs. So I suggest you start with
> autotoools.  Once the package is built, it can be installed with the normal
> .config/make/make install cycle.
> >
> > Is this correct?
> > Is it possible to make the development cycle easier? e.g. Make changes in
> > my dice library/component propagate automatically in to my game project?
> >
> >  And finally, should I make it a library or a component?
> In short, initially as a library.  From the help:
> "Gambas components are shared libraries written in C, C++ or
> directly in gambas that add new classes to the gambas interpreter.
> They are shared between all Gambas programs running on your
> system, and can be seen as part of the language."
> and
> "Gambas libraries are Gambas executables that can be used by a
> project almost exactly like a component."
> This is a bit hard to understand and I'm probably only about 90% correct
> here, but.  There is actually very little difference and the differences
> are fairly unimportant to a new gambas developer.  Suffice to say, until
> you understand that help above, libraries are the way to go.
>
>
> >
> > /Patrik
>
> hth
> Bruce
>
> --
> B Bruen 
>

It helped, thanks!
Now I can easily make changes to my library and instantly test it in my app.

After reading your answer I did some testing and found that adding a
library to a project is a IDE thing only, I still have to deploy and
install the library in order for my installed app to use it.

As an alternative to sym linking I found ExecPath in .project allows me to
build it directly to my "game project" that uses the library in question.
When having two or more apps using the library, sym links is the best way
to go.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Feature request IDE: Make the origin of the DEBUG line code act as a hyper link

2014-06-14 Thread Patrik Karlsson
I would like to be able to (ctrl) click the Class.Function.Line in the
Debug output in order to navigate to its source.

*CScoreGrid.HoverRow.337*: 0  12
*CRoller.PictureBox_MouseUp.171*:

It does not have to look like a link, as long as it acts like one.

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Development cycle and component vs library

2014-06-13 Thread Patrik Karlsson
I'm working on a dice game and I'm thinking of separating "the dice part"
from the game itself so I and others could reuse it, and for separation.

The main reason for not doing this earlier is that I could not understand
how to make the game development cycle easy in the sense that:
1. libraries have to be made executables and copied to my game project
2. components have to installed to the system.

Is this correct?
Is it possible to make the development cycle easier? e.g. Make changes in
my dice library/component propagate automatically in to my game project?

 And finally, should I make it a library or a component?

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Fwd: Feature request: IDE

2014-06-13 Thread Patrik Karlsson
-- Forwarded message --
From: Benoît Minisini 
Date: 2014-06-10 19:51 GMT+02:00
Subject: Re: [Gambas-user] Feature request: IDE
To: Patrik Karlsson 


Well, everything is done except:



 2. Make shortcut for Horizontal and Vertikal split toggle.
>

-> On my machine, CTRL+H and CTRL+J act as toogle correctly. Which
version of Gambas do you use?




Im using 3.5.3 from the PPA.





 3. Insert an 'Edit' menu between File and Project with cut, copy,
> paste, undo redo...
>

-> I don't want to do that, because the menu is contextual (it depends
on the active tab) and has not enough entries.



Would it be possible to have them visible in the menu but disabled when out
of context?



 5. CTRL X cuts current row if nothing is selected 6. CTRL C copies
>
> current row if nothing is selected
>

I find that confusing, so no.


 7. Triple click selects entire row.
>

I can't detect triple click on Qt apparently... To select a line, you
can just click on the very left of the line.


 10. Move current selection up/down
>

Already done with ALT + arrows.

-- 
Benoît Minisini



Great work, thanks for the improvements!

/Patrik
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: IDE

2014-06-06 Thread Patrik Karlsson
2014-06-06 13:25 GMT+02:00 Jussi Lahtinen :

> > > 9. Move current row up/down
> > >
> > > 10. Move current selection up/down
> >
> > If I can find available shortcuts.
> >
>
>
> ?? Haven't you done this already, Benoit?
>
> ALT + up/down arrow keys?
>
>
Great, works for me!
Perhaps make that function more visible by adding menu items for it and
adding it to configure shortcuts?
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: IDE

2014-06-06 Thread Patrik Karlsson
2014-06-06 10:01 GMT+02:00 Benoît Minisini :

> Le 06/06/2014 09:52, Patrik Karlsson a écrit :
> > There are things in other IDEs/editors that I miss in Gambas and that I
> > think would be useful, not only to me.
> >
> > 1. Tab management
> > * Add close all from the view menu to the tabs popup menu.
>
> You can click on the little cross on the top left of the project tree view.
>

Ok, there you go! :) Since Im switching between IDEs and close all option
is common I still would appreciate it in Gambas too.


>
> > * Add close tabs to left
> > * Add close tabs to right
>
> Mmmf. Is it really useful?
>

Most of the time I find myself working constantly on 2-4 documents and
having many more others open at the same time. Those are the one I would
like to close with "close tabs to the right".


>
> > 2. Make shortcut for Horizontal and Vertikal split toggle.
>
> CTRL+H and CTRL+J don't work?
>
>
No, not for me. It just turns splitting on, not off.


> > 3. Insert an 'Edit' menu between File and Project with cut, copy, paste,
> > undo redo...
>
> OK. Maybe...
>
> >
> > 4. Shortcut for delete current row
> >
> > 5. CTRL X cuts current row if nothing is selected
>
> As I'm running out of shortcuts, maybe I can merge 4) and 5) ?
>

Well, #5 puts the line on the clipboard and #4 should not. But if we got #5
I would use it for #4 too. :)

> 12. CTRL Shift W as default for Close all windows.

>
> CTRL+ALT+W is the shortcut.
>
>
Maybe it's just me but I have only come across CTRL Shift W for Close all
windows. Thats not a big problem, I have redefined it.

And may I introduce #13...

The ability to load and save custom shortcut configuration in style with
color theme.
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Feature request: IDE

2014-06-06 Thread Patrik Karlsson
There are things in other IDEs/editors that I miss in Gambas and that I
think would be useful, not only to me.

1. Tab management
* Add close all from the view menu to the tabs popup menu.
* Add close tabs to left
* Add close tabs to right

2. Make shortcut for Horizontal and Vertikal split toggle.

3. Insert an 'Edit' menu between File and Project with cut, copy, paste,
undo redo...

4. Shortcut for delete current row

5. CTRL X cuts current row if nothing is selected

6. CTRL C copies current row if nothing is selected

7. Triple click selects entire row.

8. Sort selection (a-z, z-a)

9. Move current row up/down

10. Move current selection up/down

11. CTRL Mouse click acts as F2, Find definition.

12. CTRL Shift W as default for Close all windows.

/Patrik
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas on Mac OS X/MacPorts

2014-06-03 Thread Patrik Karlsson
2012-08-07 13:35 GMT+02:00 François Gallo :

>
> Le 7 août 2012 à 13:00, Patrik Karlsson  a écrit
> :
>
> > I have read about getting Gambas running on OS X and while browsing the
> svn
> > log of Gambas I found the lines below.
> >
> > * NEW: Add support for the MacPorts distribution.
> > * NEW: it is now available for Mac OS X 10.8
> > * BUG: Fix detection of X11 for the control DrawingArea on Mac OS X 10.8.
> > * BUG: Fix compilation on Mac OS X 10.8
> > * BUG: Correctly detect architecture on MacOSX.
> > * BUG: Some files were incorrectly modified by Mac OS X changes.
> > * BUG: Fix compilation on Mac OS X and Linux.
> > * NEW: Search include and library files in /opt/local for Mac OS X.
> > * NEW: Search include and library files in /opt/local for Mac OS X. But
> it
> > * NEW: Make the component compile on Mac OS X with the qt4-mac port. The
> > * BUG: Use -fnested-functions only on Mac OS X.
> > * BUG: Make the "main" directory compile on Mac OS X.
> >  that things work better on MacOSX.
> > * NEW: Mac OS X is a FreeBSD.
> >
> > Since I'm on the Mac most of the time this is very interesting.
> > I could not find Gambas in MacPorts so I guess it is not ready yet.
>
> Gambas is not in the MacPorts tree and i think it will be never because
> the qt4-x11 port doesn't work. Indeed, this one isn't up to date. While
> macports will not
> provide an update to this port, Gambas cannot go into the macports tree.
> To make Gambas i use both MacPorts and Fink. Although i only use Fink to
> get
> a 11 version of Qt.
>
> Currently, Gambas 3 compiles on OS X 10.8.
> Right now, i see with Benoit to debug it at runtime.
> The Gambas compiler crashes on some language instructions. Why? I don't
> know.
> Once Benoit will fix it, i could declare officially Gambas ported on OS X.
> (i hope at less…)
>
> I'm the main contributor who (try to) port Gambas on others systems than
> Linux.
> If you have some questions about Gambas's ports, contact me.
>
> >
> > How far has the project come?
> > Is there some kind of a time line?
> > How can I help?
>
> If you know good enough the OS X system, maybe yes i think you can help
> for Gambas.
>
> >
> > I guess my knowledge is limited to compile, install and test it.
>
> Logically, the main things that you must know is how install MacPorts and
> Fink distributions.
> Then, install the packages needed to compile Gambas.
>
> That's all you need to do :) .
> When i wrote "add support for macports distribution" in change log, i
> added path to a basic installation
> of MacPorts so that any people can compile directly Gambas.
>
> However don't forget to add in your .profile file environment variables
> needed to that.
> Fink and MacPorts adds automatically some variables but not all.
>
> You can already download svn source code of Gambas and try to compile it.
> Normally, you don't meet difficult to compile it.
>
> Do you use OS X 10.8 too?
>
> François
>
>
I tried building gambas on os x today and got some problem.
What do I have to do in order to make it work?

/Patrik

mbp:trunk pata$ LC_ALL=C gmake

gmake  all-recursive

gmake[1]: Entering directory '/Users/pata/temp/gambas/trunk'

Making all in main

gmake[2]: Entering directory '/Users/pata/temp/gambas/trunk/main'

gmake  all-recursive

gmake[3]: Entering directory '/Users/pata/temp/gambas/trunk/main'

Making all in gbc

gmake[4]: Entering directory '/Users/pata/temp/gambas/trunk/main/gbc'

  CC   gbc3-gb_error.o

clang: warning: argument unused during compilation: '-fnested-functions'

gb_error.c:94:3: error: function definition is not allowed here

  {

  ^

gb_error.c:126:3: warning: implicit declaration of function '_add_string'
is invalid in C99

  [-Wimplicit-function-declaration]

_add_string(pattern);

^

1 warning and 1 error generated.

Makefile:788: recipe for target 'gbc3-gb_error.o' failed

gmake[4]: *** [gbc3-gb_error.o] Error 1

gmake[4]: Leaving directory '/Users/pata/temp/gambas/trunk/main/gbc'

Makefile:446: recipe for target 'all-recursive' failed

gmake[3]: *** [all-recursive] Error 1

gmake[3]: Leaving directory '/Users/pata/temp/gambas/trunk/main'

Makefile:377: recipe for target 'all' failed

gmake[2]: *** [all] Error 2

gmake[2]: Leaving directory '/Users/pata/temp/gambas/trunk/main'

Makefile:427: recipe for target 'all-recursive' failed

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory '/Users/pata/temp/gambas/trunk'

Makefile:367: reci

Re: [Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Patrik Karlsson
2014-05-31 17:49 GMT+02:00 Jussi Lahtinen :

> Oh, in this case use IsInteger().
>
> Jussi
>
>
Got it, thanks!
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Function() vs Function$()

2014-05-31 Thread Patrik Karlsson
Why do we have both Function() and Function$() in Gambas?
e.g. Subst and Subst$, Left and Left$

Is it an old Basic convention?
Which variant is most desirable to use?

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Fwd: Wiki Last Changes - Admin Only

2014-05-31 Thread Patrik Karlsson
>
> Nice!
> Could we also have links to the changed page in the list? :)
>
> /Patrik
>
>
>Done.
>
>--
>Benoît Minisini

Awesome!
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Wiki Last Changes - Admin Only

2014-05-31 Thread Patrik Karlsson
2014-05-30 21:29 GMT+02:00 Benoît Minisini :

> Le 29/05/2014 22:28, Patrik Karlsson a écrit :
> > Would it be possible to enable read access to
> > http://gambaswiki.org/wiki/changes ?
> >
> > Every now and then I discover that a page has change and I think it would
> > be of value to see what pages are updated.
> >
> > /Patrik
>
> Done!
>
> --
> Benoît Minisini
>

Nice!
Could we also have links to the changed page in the list? :)

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Patrik Karlsson
Should not CInt("") return 0?

Print cint("")
Type mismatch: wanted Integer, got String instead

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Fwd: Music.Length part 2

2014-05-30 Thread Patrik Karlsson
From: Benoît Minisini 
Date: 2014-05-28 14:38 GMT+02:00
Subject: Re: [Gambas-user] Music.Length part 2
To: Patrik Karlsson 


Le 28/05/2014 14:32, Patrik Karlsson a écrit :

 I had some trouble with gambas gstreamer on Elementary OS so now I'm on
> Kubuntu.
>
> I get MediaPlayer to play a mp3 file as long as it is located _outside_
> my gambas project:
>$hPlayer.URL = Media.URL("internal.mp3") ' does not play
>$hPlayer.URL = Media.URL("/home/patrik/external.mp3") 'plays
>
> What I really do need is to play, get the duration an position for a
> file bundled _inside_ my gambas project.
> Is MediaPlayer capable of doing that?
>
> If not, can MediaPlayer play a file in my gambas executable archive with
> something like:
>$hPlayer.URL = Media.URL("/home/patrik/app.gambas#internal.mp3") ?
>
> /Patrik
>

No, GStreamer URLs cannot extract files located inside a Gambas archive.

The solution is copying the Gambas archive file to a temporary real file,
and use it as URL.

sTemp = File.SetExt(Temp$(),"mp3")
Copy "internal.mp3" to sTemp
$hPlayer.URL = Media.URL(sTemp)
...
Kill sTemp ' If your file is very big, this could be useful

I eventually can implement that transparently inside gb.media in the future.

Regards,

-- 
Benoît Minisini

Thanks, this solved my problem, and may I say, Temp$() is a really nice
concept! :)

However, I noticed that it takes about 0.15 seconds (for GStreamer?) to
calculate the length of my mp3 file, but I was able to manage that.

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Segmentation fault (11)

2014-05-29 Thread Patrik Karlsson
2014-05-29 22:55 GMT+02:00 Tobias Boege :

> On Thu, 29 May 2014, Patrik Karlsson wrote:
> > The program has stopped unexpectedly:
> > Segmentation fault (11)
> >
> > Please send a bug report to the following mail address:
> > gam...@users.sourceforge.net.
> > ---
> >
> > This is what I get when trying to close my program while it is doing some
> > timer based animations. I guess the program is to complex to make a
> simple
> > version that reproduces that behavior.
> >
> > The IDE debugger shows nothing, my process is just gone I guess.
> >
>
> That's normal with segfaults.
>
> > How can I debug it?
>
> You will want to compile Gambas with debugging information and use gdb on
> it. To include debugging information, do
>
> $ make clean && make CFLAGS+="-O0 -ggdb" CXXFLAGS+="-O0 -ggdb"
>
> in the source tree (IIRC). However, it is not going to be fun...
>
>
I have never used gdb so I will continue to break it down in order to found
the origin of the problem.
One thing I noticed is that this only happens with gb.qt4, not with qb.gtk.
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Segmentation fault (11)

2014-05-29 Thread Patrik Karlsson
The program has stopped unexpectedly:
Segmentation fault (11)

Please send a bug report to the following mail address:
gam...@users.sourceforge.net.
---

This is what I get when trying to close my program while it is doing some
timer based animations. I guess the program is to complex to make a simple
version that reproduces that behavior.

The IDE debugger shows nothing, my process is just gone I guess.

How can I debug it?
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Wiki Last Changes - Admin Only

2014-05-29 Thread Patrik Karlsson
Would it be possible to enable read access to
http://gambaswiki.org/wiki/changes ?

Every now and then I discover that a page has change and I think it would
be of value to see what pages are updated.

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Music.Length part 2

2014-05-28 Thread Patrik Karlsson
2014-04-23 17:51 GMT+02:00 Benoît Minisini :

> Le 23/04/2014 17:38, Patrik Karlsson a écrit :
> > Hi,
> >
> > it's almost 6 years since I wrote the first post [1] regarding
> Music.Length
> > I recently picked up Gambas again and I am about to finish this little
> > project now. :)
> >
> > As far as I can tell, there is still no easy "Gambas way" to get the
> length
> > of an audio file, right?
> >
> > Would it be possible to implement such a function now?
> > It would be really nice to have Music.Play return the length in seconds
> as
> > float and a pure Music.Length function.
> >
> > In the previous thread I got some answers regarding command line tools,
> but
> > in this case my audio files are bundled in the project.
> >
> > /patrik
> >
> > [1]
> >
> http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859
>
> You should use the gb.media component instead. Look at the "MediaPlayer"
> example, it displays the length of the video/audio file it plays.
>
> I admit that playing a file to know its length is a bit stupid. It
> should be possible to create a GStreamer pipe to just know the length of
> a multimedia file without playing it.
>
> --
> Benoît Minisini
>
>
I had some trouble with gambas gstreamer on Elementary OS so now I'm on
Kubuntu.

I get MediaPlayer to play a mp3 file as long as it is located _outside_ my
gambas project:
  $hPlayer.URL = Media.URL("internal.mp3") ' does not play
  $hPlayer.URL = Media.URL("/home/patrik/external.mp3") 'plays

What I really do need is to play, get the duration an position for a file
bundled _inside_ my gambas project.
Is MediaPlayer capable of doing that?

If not, can MediaPlayer play a file in my gambas executable archive with
something like:
  $hPlayer.URL = Media.URL("/home/patrik/app.gambas#internal.mp3") ?

/Patrik
--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Project properties - Version: Get from 'VERSION' file

2014-05-23 Thread Patrik Karlsson
Hi,

since I'm not that fond on the auto increment of version numbers getting
version from 'VERSION' file sounded interesting.

The problem was that it did not read from my VERSION file inside my project
directory, instead it was looking for the VERSION file at the same
directory level as my project.

Is this by design and convention?

Instead of having only my gambas project handled by git, should I also have
an extra "dummy" directory containing my gambas project directory, VERSION
file (and maybe some other gambas related files)?

/Patrik
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gb.settings

2014-05-20 Thread Patrik Karlsson
Hi,

does Settings cache values or does it read from file every time requested?

/Patrik
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: Array.Frequency

2014-05-18 Thread Patrik Karlsson
Ok, so the module looks like this now, is Variant slower than other native
data types?

Export
Fast

Public Function Frequency(avValues As Variant[], vValue As Variant) As
Integer

  Dim i As Integer
  Dim iFrequency As Integer

  For i = 0 To avValues.Length - 1
If avValues[i] = vValue Then
  Inc iFrequency
Endif
  Next

  Return iFrequency

End



2014-05-18 14:50 GMT+02:00 Emil Lenngren :

> For best performance, loop over index from 0 to length-1 instead of using
> the For Each construct.
>
>
> 2014-05-18 14:43 GMT+02:00 Benoît Minisini :
>
> > Le 18/05/2014 13:44, Patrik Karlsson a écrit :
> > > I'm converting a Java app of mine to Gambas and I could not find any
> > > equivalent to Java's Collections.frequency [1].
> > >
> > > So I wrote this function for Integer[]:
> > >
> > > Private Function Frequency(aArray As Integer[], iValue As Integer) As
> > > Integer
> > >
> > >Dim iCount As Integer
> > >Dim iItem As Integer
> > >
> > >For Each iItem In aArray
> > >  If iItem = iValue Then
> > >Inc iCount
> > >  Endif
> > >Next
> > >
> > >Return iCount
> > >
> > > End
> > >
> > > Would it be possible to add Frequency as a read only property to
> > gb.Array?
> > >
> > > /Patrik
> > >
> >
> > Why don't you do that in Gambas using JIT compiler ?
> >
> > --
> > Benoît Minisini
> >
> >
> >
> --
> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> > Instantly run your Selenium tests across 300+ browser/OS combos.
> > Get unparalleled scalability from the best Selenium testing platform
> > available
> > Simple to use. Nothing to install. Get started now for free."
> > http://p.sf.net/sfu/SauceLabs
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Feature request: Array.Frequency

2014-05-18 Thread Patrik Karlsson
I'm converting a Java app of mine to Gambas and I could not find any
equivalent to Java's Collections.frequency [1].

So I wrote this function for Integer[]:

Private Function Frequency(aArray As Integer[], iValue As Integer) As
Integer

  Dim iCount As Integer
  Dim iItem As Integer

  For Each iItem In aArray
If iItem = iValue Then
  Inc iCount
Endif
  Next

  Return iCount

End

Would it be possible to add Frequency as a read only property to gb.Array?

/Patrik

[1]
http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#frequency(java.util.Collection,
java.lang.Object)
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: Option to create .gitignore in new Project dialog

2014-05-17 Thread Patrik Karlsson
Great, looking forward to that one too!


2014-05-17 17:21 GMT+02:00 Benoît Minisini :

> Le 17/05/2014 16:40, Benoît Minisini a écrit :
> > Le 09/05/2014 16:16, Patrik Karlsson a écrit :
> >> I think it would be nice to just tick a CheckBox in the new project
> >> dialog
> >> to create a standard .gitignore.
> >>
> >> What do you think?
> >>
> >> /Patrik
> >
> > I want to automatically create a ".gitignore" file inside Gambas project
> > directories, to ignore all files that must be ignored.
> >
> > Question: is the ".gitignore" file automatically ignored? Never ignored?
> >
>
> In revision #6272, a ".gitignore" file is automatically created when
> opening a project.
>
> If the file already exists, it is not erased. The IDE just writes inside
> its own bunch of ignore patterns, using comments to delimit and
> recognize it.
>
> Tell me if it fits your needs, and if it works (I don't use git, so I
> can't test).
>
> --
> Benoît Minisini
>
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Frame Arrangement

2014-05-17 Thread Patrik Karlsson
Great news, looking forward to use it, thanks!


2014-05-17 1:44 GMT+02:00 Benoît Minisini :

> Le 10/05/2014 10:12, Patrik Karlsson a écrit :
> > I found this [1] and other threads on the topic of having Frame arrange
> it
> > contents.
> > We still miss the option to do it.
> > What is the status today, 10 years later, still problematic to implement?
> >
> > Any good work arounds? I was thinking of having a panel that I
> re-calculate
> > the size for, but maybe I just hit the some problem Benoit would have.
> >
> >
> > [1]
> >
> http://sourceforge.net/p/gambas/mailman/gambas-devel/thread/200404172306.17716.gambas%40users.sourceforge.net/#msg5541527
> >
> > /Patrik
>
> Since revision #6269, Frame have now all arrangement properties, like
> Panel and other containers.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature request: Option to create .gitignore in new Project dialog

2014-05-16 Thread Patrik Karlsson
2014-05-15 12:26 GMT+02:00 Benoît Minisini :

> Le 09/05/2014 16:16, Patrik Karlsson a écrit :
> > I think it would be nice to just tick a CheckBox in the new project
> dialog
> > to create a standard .gitignore.
>
> Better: the IDE should support git as it supports subversion.
>
> Do you have the needed knowledge to explain me the difference between
> git and subversion, and how I can do with git what I'm already doing
> with subversion? (updates, commits, conflict management, revision
> numbers, ignoring files...)
>
> --
> Benoît Minisini
>

I guess I don't.
I'm not sure how Gambas support for subversion is, I have never used it.
In NetBeans and Eclipse I have used integrated svn and integrated git and
if Gambas could provide that it would be really cool.
For me, the main advantage that git has over svn is well, speed, and the
fact that it is distributed. I can work on my local copy and commit even
when not online, and later push/sync with another repository.

/Patrik
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Frame Arrangement

2014-05-10 Thread Patrik Karlsson
I found this [1] and other threads on the topic of having Frame arrange it
contents.
We still miss the option to do it.
What is the status today, 10 years later, still problematic to implement?

Any good work arounds? I was thinking of having a panel that I re-calculate
the size for, but maybe I just hit the some problem Benoit would have.


[1]
http://sourceforge.net/p/gambas/mailman/gambas-devel/thread/200404172306.17716.gambas%40users.sourceforge.net/#msg5541527

/Patrik
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Feature request: Option to create .gitignore in new Project dialog

2014-05-09 Thread Patrik Karlsson
I think it would be nice to just tick a CheckBox in the new project dialog
to create a standard .gitignore.

What do you think?

/Patrik
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] MaskBox.Mask

2014-05-06 Thread Patrik Karlsson
Thank you for your input.
I will keep my code since I prefer the protection for CTRL-V over the
optimization for a very short string.
However, the _KeyPress and Stop Event will come in handy in another place,
thanks!

/Patrik


2014-04-27 16:26 GMT+02:00 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
>
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Dialog on top of FullScreen window

2014-05-06 Thread Patrik Karlsson
After I had problem [1] with gstreamer and MediaPlayer I tried it on a
couple of other distributions. It was only on elementary OS I had that
problem.

At the same time I ran my program in full screen mode and the problem
only appeared on elementary with pantheon desktop.

Are there something special about the form properties on Message.Info("This
one stays on top")?
Do you still like an example project?

/Patrik

[1] https://code.google.com/p/gambas/issues/detail?id=523


2014-04-26 13:07 GMT+02:00 Benoît Minisini :

> Le 26/04/2014 07:34, Patrik Karlsson a écrit :
> > Hi,
> >
> > Im having a problem with displaying forms on top of my main form when
> it's
> > in full screen mode, even though I have set Form.Stacking=Above for my
> > dialog form and called it with ShowModal.
> >
> > How ever, I noticed that when I use   Message.Info("This one stays on
> top")
> > its all ok.
> >
> > Can I change some property of my form to make it behave like
> Message.Infos
> > form?
> >
> > /Patrik
>
> Can you provide a little project that shows that behaviour?
>
> --
> Benoît Minisini
>
>
> --
> 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
>
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Dialog on top of FullScreen window

2014-04-25 Thread Patrik Karlsson
Hi,

Im having a problem with displaying forms on top of my main form when it's
in full screen mode, even though I have set Form.Stacking=Above for my
dialog form and called it with ShowModal.

How ever, I noticed that when I use   Message.Info("This one stays on top")
its all ok.

Can I change some property of my form to make it behave like Message.Infos
form?

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


[Gambas-user] MaskBox.Mask

2014-04-25 Thread Patrik Karlsson
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?

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


[Gambas-user] Music.Length part 2

2014-04-23 Thread Patrik Karlsson
Hi,

it's almost 6 years since I wrote the first post [1] regarding Music.Length
I recently picked up Gambas again and I am about to finish this little
project now. :)

As far as I can tell, there is still no easy "Gambas way" to get the length
of an audio file, right?

Would it be possible to implement such a function now?
It would be really nice to have Music.Play return the length in seconds as
float and a pure Music.Length function.

In the previous thread I got some answers regarding command line tools, but
in this case my audio files are bundled in the project.

/patrik

[1]
http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859
--
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


[Gambas-user] .gitignore for a Gambas project

2014-04-23 Thread Patrik Karlsson
Hi,

What should a .gitignore look like?

The one I am using contains:
.lock
*~
*.gambas
.settings

/Patrik
--
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] Gambas on Mac OS X/MacPorts

2012-08-09 Thread Patrik Karlsson
2012/8/7 François Gallo 

>
> Gambas is not in the MacPorts tree and i think it will be never because
> the qt4-x11 port doesn't work. Indeed, this one isn't up to date. While
> macports will not
> provide an update to this port, Gambas cannot go into the macports tree.
> To make Gambas i use both MacPorts and Fink. Although i only use Fink to
> get
> a 11 version of Qt.
>
> Currently, Gambas 3 compiles on OS X 10.8.
> Right now, i see with Benoit to debug it at runtime.
> The Gambas compiler crashes on some language instructions. Why? I don't
> know.
> Once Benoit will fix it, i could declare officially Gambas ported on OS X.
> (i hope at less…)
>
> I'm the main contributor who (try to) port Gambas on others systems than
> Linux.
> If you have some questions about Gambas's ports, contact me.
>
> >
> > How far has the project come?
> > Is there some kind of a time line?
> > How can I help?
>
> If you know good enough the OS X system, maybe yes i think you can help
> for Gambas.
>
> >
> > I guess my knowledge is limited to compile, install and test it.
>
> Logically, the main things that you must know is how install MacPorts and
> Fink distributions.
> Then, install the packages needed to compile Gambas.
>
> That's all you need to do :) .
> When i wrote "add support for macports distribution" in change log, i
> added path to a basic installation
> of MacPorts so that any people can compile directly Gambas.
>
> However don't forget to add in your .profile file environment variables
> needed to that.
> Fink and MacPorts adds automatically some variables but not all.
>
> You can already download svn source code of Gambas and try to compile it.
> Normally, you don't meet difficult to compile it.
>
> Do you use OS X 10.8 too?
>
> François
>
> Yes, I'm on 10.8 too but I dont know enough about the system to provide
any help on that.
I have been using macports for years and fink a month or so a while back.
I dont think I will try to install Gambas on OS X as long as Gambas
application will not be easily run on the Mac for the regular user.

Hopefully they will fix the qt4-x11 port so we can get a smooth
installation procedure.

Anyway, thanks for the effort so far!

/patrik
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas on Mac OS X/MacPorts

2012-08-07 Thread Patrik Karlsson
I have read about getting Gambas running on OS X and while browsing the svn
log of Gambas I found the lines below.

* NEW: Add support for the MacPorts distribution.
* NEW: it is now available for Mac OS X 10.8
* BUG: Fix detection of X11 for the control DrawingArea on Mac OS X 10.8.
* BUG: Fix compilation on Mac OS X 10.8
* BUG: Correctly detect architecture on MacOSX.
* BUG: Some files were incorrectly modified by Mac OS X changes.
* BUG: Fix compilation on Mac OS X and Linux.
* NEW: Search include and library files in /opt/local for Mac OS X.
* NEW: Search include and library files in /opt/local for Mac OS X. But it
* NEW: Make the component compile on Mac OS X with the qt4-mac port. The
* BUG: Use -fnested-functions only on Mac OS X.
* BUG: Make the "main" directory compile on Mac OS X.
  that things work better on MacOSX.
* NEW: Mac OS X is a FreeBSD.

Since I'm on the Mac most of the time this is very interesting.
I could not find Gambas in MacPorts so I guess it is not ready yet.

How far has the project come?
Is there some kind of a time line?
How can I help?

I guess my knowledge is limited to compile, install and test it.

/patrik
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] _compare() Type mismatch: wanted Date, Number or String

2012-08-06 Thread Patrik Karlsson
2012/8/2 Fabien Bodard 

> the _compare event is for the sort function in arrays
> http://gambasdoc.org/help/lang/special/compare?en&v3
>
> i think my way is the more simple
>

Thank you Tobias and Fabien for your input.
For now, I am using the _compare function by calling it directly and not
with <>. I guess I will rename it so I will not use <> on my objects in the
future. :)

/patrik
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] _compare() Type mismatch: wanted Date, Number or String

2012-07-31 Thread Patrik Karlsson
I'm writing a class for Playing cards and would like to compare them with:
=,<,>.

While hPlayingCard1=hPlayingCard2 works just fine,
hPlayingCard1hPlayingCard2 do not.

The program stops with:
#6: Type mismatch: wanted Number, Date or String, got PlayingCard instead

My _compare is simple:
Public Function _compare(OtherObject As PlayingCard) As Integer

Return 0

End

What can I do to make comparing with <,> possible?

/patrik
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Sub dirs in .src, something like a java package?

2012-07-30 Thread Patrik Karlsson
2012/7/30 Benoît Minisini 

> Le 30/07/2012 13:46, Patrik Karlsson a écrit :
> > Hi, I noticed in some code and at
> > http://gambasdoc.org/help/doc/project_structure?v3 that one can use sub
> > dirs in the source code. I have tried a couple of things but I can't see
> > any change in behaviour/scope when using sub dirs. But to be honest, Im
> not
> > 100% sure of the Gambas scopes like default access etc.
> >
> > Are they, sub dirs, just for humans or do Gambas care about them?
> >
> > /patrik
>
> They are just for humans.
>
> --
> Benoît Minisini
>
>
Ok, thanks, that's great too.
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Sub dirs in .src, something like a java package?

2012-07-30 Thread Patrik Karlsson
Hi, I noticed in some code and at
http://gambasdoc.org/help/doc/project_structure?v3 that one can use sub
dirs in the source code. I have tried a couple of things but I can't see
any change in behaviour/scope when using sub dirs. But to be honest, Im not
100% sure of the Gambas scopes like default access etc.

Are they, sub dirs, just for humans or do Gambas care about them?

/patrik
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Request: Remove background image from web site

2008-10-06 Thread Patrik Karlsson
Den Monday 06 October 2008 00:10:32 skrev Benoit Minisini:
> On dimanche 05 octobre 2008, Patrik Karlsson wrote:
> > IMHO it is some what hard to read the text when the background changes
> > from dark to white, on every line. How about a small logo at the top?
>
> I made the background image lighter. Is it better for you?

It is hard to say, it is still the switching of contrasts.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Request: Remove background image from web site

2008-10-05 Thread Patrik Karlsson
IMHO it is some what hard to read the text when the background changes from 
dark to white, on every line. How about a small logo at the top?

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Shortcuts in hidden menus will not work

2008-10-04 Thread Patrik Karlsson
Den Saturday 04 October 2008 18:34:20 skrev Benoit Minisini:
> AFAIK, there is not concept of hidden menu in QT. So hiding a menu really
> internally destroys it, and so the shortcut.
>
> > Also, is there a quicker way to toggle the menu bar in one single
> > command? Now I am hiding/showing the top most menues one at a time.
>
> Good idea. It is just a matter of adding a method to the Window class. I
> will note that on the TODO list for Gambas 3.

Ok, thanks,  and sorry for the double posting the mail list server is so... :)


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Restore fullscreen mode at Form_Open fails

2008-10-04 Thread Patrik Karlsson
Den Saturday 27 September 2008 00:18:06 skrev Benoit Minisini:
> > > Is there a better way to do this without the extra timer?
> As a workaround, I think you can set it in the constructor (_new) instead
> of Form_Open. It should work.

Thank you, it worked just fine, and it's much cleaner without my timer!

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Shortcuts in hidden menus will not work

2008-10-04 Thread Patrik Karlsson
Hi, Im making a program where I can toggle the menus visibility via CTRL+M.
The shortcuts in the menues does not work if the menus are not visible. I have 
solved this by making a popup menu, but is there another way?

Also, is there a quicker way to toggle the menu bar in one single command? Now 
I am hiding/showing the top most menues one at a time.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Shortcuts in hidden menus will not work

2008-10-04 Thread Patrik Karlsson
Hi, Im making a program where I can toggle the menus visibility via CTRL+M.
The shortcuts in the menues does not work if the menus are not visible. I have 
solved this by making a popup menu, but is there nother way?

Also, is there a quicker way to toggle the menu bar in one single command? Now 
I am hiding/showing the top most menues one at a time.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Request: Remember last directory for 'make source archive'

2008-09-27 Thread Patrik Karlsson
Den Saturday 27 September 2008 20:11:24 skrev Benoit Minisini:
> On samedi 27 septembre 2008, Patrik Karlsson wrote:
> > One thing that would be nice was if gambas could for each project 
> > remember last directory for 'make source archive'.
>
> Good idea. It is done in revision #1613 (for gambas 2).
>
> Regards,


Wow, what a great response, thank you!

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Request: Remember last directory for 'make source archive'

2008-09-27 Thread Patrik Karlsson
One thing that would be nice was if gambas could for each project  remember 
last directory for 'make source archive'.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Restore fullscreen mode at Form_Open fails

2008-09-26 Thread Patrik Karlsson
> > When I try this line in Form_Open
> >   ME.FullScreen = Settings["Main/FullScreen", FALSE]
> > If the setting is true, the only thing that happens is that the program
> > becomes a normal window in full size.

> It seems to work with gb.gtk, but not gb.qt. I need to investigate...

Ok, please do :)

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Restore fullscreen mode at Form_Open fails

2008-09-26 Thread Patrik Karlsson
When I try this line in Form_Open
  ME.FullScreen = Settings["Main/FullScreen", FALSE]
If the setting is true, the only thing that happens is that the program 
becomes a normal window in full size.

However, if I have a timer that executes (once), after a short delay, the line 
above, it works just fine. 

Is there a better way to do this without the extra timer?

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Music.Length

2008-06-27 Thread Patrik Karlsson
 need to read the whole file and
>> add the time per block. For file on local disk not a problem
>> but what if it is on local network share or via internet?
>> And how about live streams that use mp3 _encoding_?
>> The total time is only known when the stream is ready.
>>
>> If the file had also container layout and could describe the
>> content you can write the time into this container header
>> and that does not exist for the populair mp3 encoded files.
>>
>> It is missing the file(container) that the mp3 encoding
>> it is a good available encoding for streaming.
>> Just jump somewhere in the stream and in short time it plays.
>>
>>
>> side note 1)
>> The real name of a file should be myaudio.mp3.mpeg just as
>> myfileachive.tar.gz for files in a tar and late gzipped.
>> I's just MS DOS (DiskOperatingSystem) did not allow more as
>> 3 characters for the extension that made the *.mp3 naming scheme.
>>
>> side note 2)
>> when you were able to write the total length in the header.
>> Aborting a recording and you do not have a length to
>> write and the mp3 duration is 0 or endless.
>> In Result is you can't trust this value.
>>
>> Same problem why a *.avi file is not a good container for
>> streaming with the seek index on the end of the file
>> and the start of the file contains the amount of segments
>> in the file to be able to find the start of the index.
>> Aborting the write of a avi file with encoded (mp3, divx, cvid)
>> data block makes the avi file corrupt for play.
>> Remember the avi repair tools for this problem.
>> The index is need while the encoded data blocks do not have(always)
>> fixed lengths and decoding _must_ begin on a block start.
>>
>> Ron the 1'st
>>
>>
>> -
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

Thank you, that is good to know.
Since I am bundling some soundfx inside my gambas project, I have to
use an internal function to get the length. (If I don't cp out the
files to /tmp or so)

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem implementing events _inside_ a class

2008-06-26 Thread Patrik Karlsson
2008/6/26 Benoit Minisini <[EMAIL PROTECTED]>:
> The first question is: why do you need to catch MouseDown events inside
> CDiceBoard class?

Well, I want do do some action, that must always execute for every
instance of the class, without having to do the code for every object.

> Anyway, events are intended to the final user of an object.

Ok, I see.

>If you need to  intercept them inside the implementation of the object class, 
>you have to use Observers.

Thank you so much, now it works the way I want it to.


-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Problem implementing events _inside_ a class

2008-06-24 Thread Patrik Karlsson
Hi, since I'm new to Gambas it's a constant struggle, but a nice one that is. :)

I'm writng a class, CDiceBoard, that INHERITS Panel.
Everything went ok until it was time to implement some events for my class.

The following code works, but not the way I want it to be.
---
DIM hDiceBoard2 AS CDiceBoard
hDiceBoard2 = NEW CDiceBoard(ME) AS "myDiceBoard"

PUBLIC SUB myDiceBoard_MouseDown()
   DEBUG
END
---

How can I put the _MouseDown() inside CDiceBoard.class and make it work?

Regards
-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Access resources in another installed gambas project

2008-06-23 Thread Patrik Karlsson
>> Is it be possible to split the 'data' to a separate Gambas project,
>> and access sounds and images from the main project?

> You can build your data project as a component and access ressources through 
> an api ?

Thank you, I will look into that. Found this page,
http://www.gambasdoc.org/help/dev/gambas looks like a good place t o
start. :)

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Project translation, Change System.Language in run time

2008-06-23 Thread Patrik Karlsson
When I try no change System.Language in run time, my objects text does
not change.
If I start with LC_ALL=xx, I get the selected language, but how to
change it while running?

PS System.Language = "fa_IR" change the direction to Right To Left in
menues and tabs, but the strings are not changed.

Am I missing something?


-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Access resources in another installed gambas project

2008-06-23 Thread Patrik Karlsson
Hello, Im currently working on a project involving a couple of MB of
sound clips and pictures.
Is it be possible to split the 'data' to a separate Gambas project,
and access sounds and images from the main project?

In Delphi, i wrote a DLL, and in Java jar files.
What is the best and easiest way to do this in Gambas?

I like the idea of making the data project in gambas too, since it is
so easy to generate packages.

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Music.Length

2008-06-20 Thread Patrik Karlsson
2008/6/20 Jaap Cramer <[EMAIL PROTECTED]>:
> In the GambasDoc is an example on how to get information of a *.wav
> file, including duration. See: http://gambasdoc.org/help/lang/read?show
>
> Maybe useful?

Yes it might, thank you!
Maybe I just convert the mp3s to wav since it's only "internal" files
for SoundFX. Or, I define the length of each file manually, or
calculate the time, they have CBR.

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Music.Length

2008-06-20 Thread Patrik Karlsson
2008/6/20 Benoit Minisini <[EMAIL PROTECTED]>:
> I don't know why apparently the length of the audio is not encoded in the file
> header...

Ok, I see, at http://www.mp3-tech.org/programmer/frame_header.html I found

"There is no main file header in an MPEG audio file. An MPEG audio
file is built up from a succession of smaller parts called frames. A
frame is a datablock with its own header and audio information.
In the case of Layer I or Layer II, frames are some totally
independent items, so you can cut any part of MPEG file and play it
correctly. The player will then play the music starting to the first
plain valid frame founded. However, in the case of Layer III, frames
are not always independant. Due to the possible use of the "byte
reservoir", wich is a kind of buffer, frames are often dependent of
each other. In the worst case, 9 frames may be needed before beeing
able to decode one frame."

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Music.Length

2008-06-20 Thread Patrik Karlsson
Hello, I'm about to port an old Delphiapp to a nicer environment and
I'm looking at Gambas to do the work, Gambas is realy nice!

One function I used in Delphi was to get the length of the sound
played in TMediaPlayer, since I would like things done after 80%,
90%...
Music.Pos tells me where I am, but I can not found a function that
tells me how far I have to go.

Is there a solution to this?

-- 
Patrik Karlsson

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user