Re: [Gambas-user] Gambas and OpenPffice document

2012-10-10 Thread Ivan Kern
I do not know, I have not much experience with Gambas and not at all with gb.xml. It is easy with VB, the code looks like this: Dim OSM, oDesk, oDoc, oTxt, OBK, oRng As Object 'OOo objects Dim arg () Set OSM = CreateObject (com.sun.star.ServiceManager) Set oDesk = oSM.createInstance

[Gambas-user] Display tiff with two sides

2012-10-10 Thread Gregor Burck
Hi, I start from the example ImageViewer. I can open from the konsole with Args (thank so far), resize the displayed image. but I open an tiff with 2 pictures in it. How could I diplay the second? Bye Gregor --

[Gambas-user] How to check Is a Network unreachable

2012-10-10 Thread abbat
Hi all, My programm uses a MySQL requests and very often I have a problem with a network. In terminal for ping I get Network is unreachable for my problem. How can I check the network status in Gambas? Thanks to all. -- View this message in context:

[Gambas-user] no IF ... THEN ... ELSE ... in one line?

2012-10-10 Thread Rolf-Werner Eilert
Hi, just stumbled over this one: IF teil.Count 1 THEN mesVon.Add(teil[1]) ELSE mesVon.Add() IF teil.Count 2 THEN mesStatus.Add(teil[2]) ELSE mesStatus.Add() IF teil.count 3 THEN mesPri.Add(teil[3]) ELSE mesPri.Add() IF teil.Count 4 THEN mesRef.Add(teil[4]) ELSE

[Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Rolf-Werner Eilert
Hi all, Who has made the examples for IIF? Maybe you can explain what you meant by not translatable: ' Never do the following in real code, because it is not translatable! X = 7 PRINT You have X message If(X 1, s, ) waiting. Thanks Rolf

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
As I read it, it means it would be difficult to make a multi-language version of that message. It's too broken up and makes a specific English grammatical choice (whether to add 's' for plural). Someone who wanted to translate this program to work in another country's language would struggle

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Fabien Bodard
You need to do: Print (you have ) X iif(x1, (message), (messages )) Le 10 oct. 2012 11:48, Rolf-Werner Eilert eilert-sprac...@t-online.de a écrit : Hi all, Who has made the examples for IIF? Maybe you can explain what you meant by not translatable: ' Never do the following in real code,

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Rolf-Werner Eilert
Ahh - ok :-) I thought it was something more difficult... Thanks Rolf Am 10.10.2012 11:57, schrieb Caveat: As I read it, it means it would be difficult to make a multi-language version of that message. It's too broken up and makes a specific English grammatical choice (whether to add 's'

[Gambas-user] Solaris?

2012-10-10 Thread Gregor Burck
Hi, did someone use or try gambas on solaris? Bye Gregor -- -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Rolf-Werner Eilert
Ok, that makes sense. Thank you too! Rolf Am 10.10.2012 11:58, schrieb Fabien Bodard: You need to do: Print (you have ) X iif(x1, (message), (messages )) Le 10 oct. 2012 11:48, Rolf-Werner Eilerteilert-sprac...@t-online.de a écrit : Hi all, Who has made the examples for IIF? Maybe

Re: [Gambas-user] no IF ... THEN ... ELSE ... in one line?

2012-10-10 Thread Rolf-Werner Eilert
As you might guess, I managed to re-write the things with IIF like mesVon.Add(IIF(teil.Count 1, teil[1], )) which is even shorter than the one-liner I wanted to use first. My only worry is speed - is IIF much slower than a pure IF ELSE construction? Rolf Am 10.10.2012 10:46, schrieb

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Fabien Bodard
Yes caveat its true this way is available for just a few of language for example I think it not work for Germany or asian Le 10 oct. 2012 11:58, Fabien Bodard gambas...@gmail.com a écrit : You need to do: Print (you have ) X iif(x1, (message), (messages )) Le 10 oct. 2012 11:48,

Re: [Gambas-user] no IF ... THEN ... ELSE ... in one line?

2012-10-10 Thread Fabien Bodard
Yes Le 10 oct. 2012 12:13, Rolf-Werner Eilert eilert-sprac...@t-online.de a écrit : As you might guess, I managed to re-write the things with IIF like mesVon.Add(IIF(teil.Count 1, teil[1], )) which is even shorter than the one-liner I wanted to use first. My only worry is speed - is IIF

Re: [Gambas-user] no IF ... THEN ... ELSE ... in one line?

2012-10-10 Thread Rolf-Werner Eilert
Hm! Ok, I tried both, and in THIS case here, I cannot feel any difference in speed. So I stay with IIF. Rolf Am 10.10.2012 12:47, schrieb Fabien Bodard: Yes Le 10 oct. 2012 12:13, Rolf-Werner Eilerteilert-sprac...@t-online.de a écrit : As you might guess, I managed to re-write the things

Re: [Gambas-user] no IF ... THEN ... ELSE ... in one line?

2012-10-10 Thread Charlie Reinl
Am Mittwoch, den 10.10.2012, 12:59 +0200 schrieb Rolf-Werner Eilert: Hm! Ok, I tried both, and in THIS case here, I cannot feel any difference in speed. So I stay with IIF. Rolf Am 10.10.2012 12:47, schrieb Fabien Bodard: Yes Le 10 oct. 2012 12:13, Rolf-Werner

Re: [Gambas-user] Solaris?

2012-10-10 Thread Fabien Bodard
What is solaris? ;-) Le 10 oct. 2012 12:06, Gregor Burck gre...@aeppelbroe.de a écrit : Hi, did someone use or try gambas on solaris? Bye Gregor -- -- Don't let slow site performance ruin your business.

Re: [Gambas-user] Solaris?

2012-10-10 Thread Gregor Burck
? Solaris (système d'exploitation) http://fr.wikipedia.org/wiki/Solaris_(système_d'exploitation) -- -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance

Re: [Gambas-user] Solaris?

2012-10-10 Thread Fabien Bodard
Well it was a joke... But is there many server or laptop that use this today? Le 10 oct. 2012 15:06, Gregor Burck gre...@aeppelbroe.de a écrit : ? Solaris (système d'exploitation) http://fr.wikipedia.org/wiki/Solaris_(système_d'exploitation) --

Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-10 Thread Benoît Minisini
Le 10/10/2012 15:56, Emanuele Sottocorno a écrit : OS: Ubuntu 12.04.1 Kernel: 3.2.0-31-generic pkg-config: 0.26 Updated to Rev 5229, configure, make and make install run with no error. The only warnings from configure were: configure: WARNING: Unable to met pkg-config requirement: 1.2.8

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread Jussi Lahtinen
Thank you for the answer, but my question wasn't about differences of UK and US English. I'll ask again with different words. 1. Why I cannot delete English (UK) translation, is this bug? 2. If project is translated only in English (common), does the translation work (in technical sense) in UK,

Re: [Gambas-user] I can't believe this... I can!

2012-10-10 Thread Jussi Lahtinen
I'm using Gambas 3 rev 5228, but this feature was introduced some time ago... Jussi On Wed, Oct 10, 2012 at 2:28 AM, Caveat gam...@caveat.demon.co.uk wrote: LOL... you must be using a different Gambas! I go to Project, Properties, click on the Options tab and under Compilation have just

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Jussi Lahtinen
Print (you have ) X iif(x1, (message), (messages )) This is still not good. Better would be: Print Subst((you have 1 2), x, IIf(x 1, (messages), (message))) Now translation is not depended on order of words. Jussi

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Fabien Bodard
True :-) Le 10 oct. 2012 16:21, Jussi Lahtinen jussi.lahti...@gmail.com a écrit : Print (you have ) X iif(x1, (message), (messages )) This is still not good. Better would be: Print Subst((you have 1 2), x, IIf(x 1, (messages), (message))) Now translation is not depended on order of

Re: [Gambas-user] Display tiff with two sides

2012-10-10 Thread Gregor Burck
Hi, sorry I try to tell it more exactly. A tiff could contain multiple subfiles, see http://en.wikipedia.org/wiki/Tagged_Image_File_Format Some programms could handle with this, evince is one of that. I load a tiff with Image.Load(xyz.tiff) Afer that I draw it with Draw.Image() to a

Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-10 Thread Emanuele Sottocorno
Output from debugger and valgrind attached. thanks Emanuele segfault.tar.gz Description: application/compressed-tar -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app

Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-10 Thread Benoît Minisini
Le 10/10/2012 18:10, Emanuele Sottocorno a écrit : Output from debugger and valgrind attached. thanks Emanuele Is it possible to recompile gambas with no optimization? Not all of it, but just gb.qt4: $ cd gambas sources directory/gb.qt4 $ make clean ... $ make CFLAGS=-O0 -g CXXFLAGS=-O0 -g

Re: [Gambas-user] Display tiff with two sides

2012-10-10 Thread Jussi Lahtinen
I'm not sure. I guess it depends on libraries Gambas uses to handle pics... Can you send me such picture and I'll investigate more. Jussi On Wed, Oct 10, 2012 at 6:08 PM, Gregor Burck gre...@aeppelbroe.de wrote: Hi, sorry I try to tell it more exactly. A tiff could contain multiple

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread RICHARD WALKER
Sorry, I thought it would help to show why these translations are necessary for programs which may be expected to be widely used. I cannot think of any good reason to delete an en_GB translation, unless it is incomplete or incorrect or simply abandoned. If you wish to cater only for en_US then by

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
Still wouldn't work for Yoda-speak 29 messages have you :-) On 10/10/12 16:26, Fabien Bodard wrote: True :-) Le 10 oct. 2012 16:21, Jussi Lahtinen jussi.lahti...@gmail.com a écrit : Print (you have ) X iif(x1, (message), (messages )) This is still not good. Better would be: Print

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Jussi Lahtinen
Still wouldn't work for Yoda-speak 29 messages have you :-) Wrong, this would work. Code was: Print Subst((you have 1 2), x, IIf(x 1, (messages), (message))) And so, you would translate you have 1 2 to 1 2 have you. Jussi

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Jussi Lahtinen
You could even translate it to gentleman English. you have 1 2 -- Good sir, there is 2 for you, actually 1 2. Result would be example: Good sir, there is messages for you, actually 99 messages. Jussi On Wed, Oct 10, 2012 at 9:08 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote: Still

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Caveat
LOL... you got me on the Yoda-speak one, but a true English gentleman would know that there *is* one message and there *are* several messages :-D On 10/10/12 20:11, Jussi Lahtinen wrote: You could even translate it to gentleman English. you have 1 2 -- Good sir, there is 2 for you, actually 1

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread Benoît Minisini
Le 10/10/2012 20:02, Jussi Lahtinen a écrit : Just don't create the translation files for languages you do not intend to translate. I didn't. English (UK) is created automatically and apparently cannot be deleted. How do you know that it is not deleted? -- Benoît Minisini

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread Jussi Lahtinen
Yeah, I guess I'm not good enough to be true English gentleman! Jussi On Wed, Oct 10, 2012 at 9:16 PM, Caveat gam...@caveat.demon.co.uk wrote: LOL... you got me on the Yoda-speak one, but a true English gentleman would know that there *is* one message and there *are* several messages :-D

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread Jussi Lahtinen
How do you know that it is not deleted? Every time I open translation tool it is there and readily selected. That is the problem/annoying thing. Sometimes when I continue translating, I notice that I'm accidentally translating to English (UK), instead of English (common). If English (common)

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread RICHARD WALKER
Are you absolutely certain you are not using en_GB? Historically speaking, most European schools will have taught en_GB, though perhaps with an American accent;-) I wouldn't worry too much about it if I were you. The choice of language variant for English speakers (and perhaps also French

Re: [Gambas-user] Translation issue, English (common)

2012-10-10 Thread RICHARD WALKER
Try it out on me! My desktop is en_GB and is pretty much free from all en_US influences. I would even be happy to hack a couple of translations for you from Fingrish to en_, US and GB. R -- Don't let slow site

Re: [Gambas-user] Example to IIF: what is meant here

2012-10-10 Thread RICHARD WALKER
Not many of us are...:-( -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and

[Gambas-user] Release of Gambas 3.3.3

2012-10-10 Thread Benoît Minisini
Hi, I have just released Gambas 3.3.3 with some fixes for annoying bugs still present in Gambas 3.3.2. All the information is on the web site! Regards, -- Benoît Minisini -- Don't let slow site performance ruin your

[Gambas-user] Array slicing - how is it done in Gambas?

2012-10-10 Thread RICHARD WALKER
Let's say I have a string array with 12 elements. I want to pass some of these to a function for processing. What notation do I use to specify, say, the sub-array comprising elements 6, 7 and 8 of the 12 element array? At the moment I can only do it by creating a new array of appropriate size and

Re: [Gambas-user] Array slicing - how is it done in Gambas?

2012-10-10 Thread Emil Lenngren
Sorry to disappoint you, but there is no way (yet) to slice an array. You can do slicing on strings, with Left, Right and Mid. For example: Dim str1 As String Dim str2 As String str1 = hello there str2 = Mid(str1, 2, 4) ' will point to the same string but with the length 4 and offset 2. Print

Re: [Gambas-user] Array slicing - how is it done in Gambas?

2012-10-10 Thread Sebastian Kulesz
On Wed, Oct 10, 2012 at 5:23 PM, RICHARD WALKER richard.j.wal...@ntlworld.com wrote: Let's say I have a string array with 12 elements. I want to pass some of these to a function for processing. What notation do I use to specify, say, the sub-array comprising elements 6, 7 and 8 of the 12

[Gambas-user] gb3 latest revision and 3-3.3.3 segfault

2012-10-10 Thread Kevin Fishburne
I apologize if someone already mentioned this and I missed it. The GAMBAS 3 source download and the latest revision via svn checkout both compile and install successfully using these commands: ./reconf-all ./configure make sudo make install However the gambas3 executable crashes immediately

Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-10 Thread Emanuele Sottocorno
Thanks Benoit, attached the new generated gdb output and another valgrind. (hope it is useful) Emanuele segfault_no_opt.tar.gz Description: application/compressed-tar -- Don't let slow site performance ruin your

Re: [Gambas-user] Release of Gambas 3.3.3

2012-10-10 Thread Olivier Cruilles
Benoit, All it's ok for me on Fedora 14 to compile and create rpm packages from this official release Great work. Cordialement, Olivier Cruilles Mail: linu...@club-internet.fr Le 10 oct. 2012 à 22:10, Benoît Minisini gam...@users.sourceforge.net a écrit : Hi, I have just released

Re: [Gambas-user] Segmentation error (core dump created) at runtime

2012-10-10 Thread Kevin Fishburne
On 10/11/2012 01:31 AM, Emanuele Sottocorno wrote: Thanks Benoit, attached the new generated gdb output and another valgrind. (hope it is useful) Emanuele Dammit, I did miss the memo. Please excuse me while I fall on my sword. -- Kevin Fishburne Eight Virtues www: