Re: [Gambas-user] using sockets to send binay files

2010-04-11 Thread Olivier Cruilles

Hi,

May be this email can help you.

---


On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote:

Robert this may not be much help to you and I'm not sure how related to your 
problem it is,  but just on the off chance. I struggled with saving a picture 
and retrieving from a postgres field. 

The code I included worked really well for a long time, but in the last couple 
of upgrades though it saves the file ok, it retreives a corrupt image. and I 
get a libpng error (sob sob) and I havn't had time or inclination to re-look 
at it.

Please if/when you figure it out can I have a few pointers.

Regards

Richard



 The ImgData stops writing when it comes to a byte with value H00 (I
 believe) although I'm pretty sure it doesn't matter how I write the stream,
 once it's read as a String, it becomes terminated by any NULL char. So my
 question is this: How do I read the data from the Socket in binary, write
 it to a stream file in binary, but STILL I MUST be able to split the data
 based on the 2 CRLF's
 
 On Sun, Nov 30, 2008 at 11:48 AM, Robert Moss 
the.at.rob...@gmail.comwrote:
 Sorry that's not it, I mis-copied the line, in the actual code it does
 Mid(sData, p1 + 4)
 
 On Sun, Nov 30, 2008 at 2:39 AM, Doriano Blengino 
 
 doriano.bleng...@fastwebnet.it wrote:
 Robert Moss ha scritto:
 I am trying to get an image (or any binary data) downloaded from a
 
 website
 
 and into a jpg file. I expect I will need to use the Byte[] datatype,
 
 but I
 
 absolutely can NOT use Callbacks when the data comes in this time.
 
 ...
 
 DO UNTIL(EOF(#Sock))
READ #Sock, sBuf, Lof(Sock)
sTotal = sBuf
 LOOP
 
 CLOSE #Sock
 
 
 p1 = InStr(sTotal, \r\n\r\n)
 
 ImgData = Mid(sTotal, p1)
 
 OPEN localimg.jpg FOR OUTPUT CREATE AS #myFile
 WRITE #myFile, ImgData, Len(ImgData)
 CLOSE #myFile
 
 I think there is a problem with InStr(...,\r\n\r\n).
 By taking mid$(...,p1), you retain the two CRLFs, which are not good at
 the beginning of a jpeg file.
 You should get rid of the first 4 characters. May be there are still
 other problems, but this is one for sure.
 
 Regards,
 
 --
 Doriano Blengino
 
 Listen twice before you speak.
 This is why we have two ears, but only one mouth.
 
 
 
 - 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=100url=/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 -
 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=100url=/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


-
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=100url=/___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user




Le 10 avr. 2010 à 23:15, Ricardo Díaz Martín a écrit :

 
 Hi,
 
 Is there some way to send binary files using gambas sockets? Reading and
 sending byte per byte is too much slow.
 
 I read old post from Benoit about this and I think it's no possible at this
 time. It's true?
 
 Regards,
 Ricardo Díaz
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 

Olivier Cruilles
Mail: linu...@club-internet.fr

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.

Re: [Gambas-user] using sockets to send binay files

2010-04-11 Thread Ricardo Díaz Martín
Thanks Olivier for your reply. I discovered last night binary files can be
sent as text files if you uuencode on before sending and uudecode after
files are received.

uuencode and uudecode are unix standards commands (they are in Ubuntu
repositories and in Mac OX too)

The code you put in your mails only works with text files.

Regards,
Ricardo Díaz




2010/4/11 Olivier Cruilles linu...@club-internet.fr


 Hi,

 May be this email can help you.

 ---


 On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote:

 Robert this may not be much help to you and I'm not sure how related to
 your
 problem it is,  but just on the off chance. I struggled with saving a
 picture
 and retrieving from a postgres field.

 The code I included worked really well for a long time, but in the last
 couple
 of upgrades though it saves the file ok, it retreives a corrupt image. and
 I
 get a libpng error (sob sob) and I havn't had time or inclination to
 re-look
 at it.

 Please if/when you figure it out can I have a few pointers.

 Regards

 Richard



  The ImgData stops writing when it comes to a byte with value H00 (I
  believe) although I'm pretty sure it doesn't matter how I write the
 stream,
  once it's read as a String, it becomes terminated by any NULL char. So my
  question is this: How do I read the data from the Socket in binary, write
  it to a stream file in binary, but STILL I MUST be able to split the data
  based on the 2 CRLF's
 
  On Sun, Nov 30, 2008 at 11:48 AM, Robert Moss
 the.at.rob...@gmail.comwrote:
  Sorry that's not it, I mis-copied the line, in the actual code it does
  Mid(sData, p1 + 4)
 
  On Sun, Nov 30, 2008 at 2:39 AM, Doriano Blengino 
 
  doriano.bleng...@fastwebnet.it wrote:
  Robert Moss ha scritto:
  I am trying to get an image (or any binary data) downloaded from a
 
  website
 
  and into a jpg file. I expect I will need to use the Byte[] datatype,
 
  but I
 
  absolutely can NOT use Callbacks when the data comes in this time.
 
  ...
 
  DO UNTIL(EOF(#Sock))
 READ #Sock, sBuf, Lof(Sock)
 sTotal = sBuf
  LOOP
 
  CLOSE #Sock
 
 
  p1 = InStr(sTotal, \r\n\r\n)
 
  ImgData = Mid(sTotal, p1)
 
  OPEN localimg.jpg FOR OUTPUT CREATE AS #myFile
  WRITE #myFile, ImgData, Len(ImgData)
  CLOSE #myFile
 
  I think there is a problem with InStr(...,\r\n\r\n).
  By taking mid$(...,p1), you retain the two CRLFs, which are not good at
  the beginning of a jpeg file.
  You should get rid of the first 4 characters. May be there are still
  other problems, but this is one for sure.
 
  Regards,
 
  --
  Doriano Blengino
 
  Listen twice before you speak.
  This is why we have two ears, but only one mouth.
 
 
 
 
  - 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=100url=/
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
  -
  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=100url=/
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user


 -
 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=100url=/___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user




 Le 10 avr. 2010 à 23:15, Ricardo Díaz Martín a écrit :

 
  Hi,
 
  Is there some way to send binary files using gambas sockets? Reading and
  sending byte per byte is too much slow.
 
  I read old post from Benoit about this and I think it's no possible at
 this
  time. It's true?
 
  Regards,
  Ricardo Díaz
 
 --
  Download Intel#174; Parallel Studio Eval
  Try the new software tools for yourself. Speed compiling, find bugs
  proactively, and fine-tune applications for parallel performance.
  See why Intel Parallel Studio got high marks during 

Re: [Gambas-user] using sockets to send binay files

2010-04-11 Thread Benoît Minisini
 Hi,
 
 Is there some way to send binary files using gambas sockets? Reading and
 sending byte per byte is too much slow.
 
 I read old post from Benoit about this and I think it's no possible at this
 time. It's true?
 
 Regards,
 Ricardo Díaz

Use the WRITE or the PRINT instruction. For example:

PRINT #MySocket, File.Load(/path/to/myfile);

Don't forget the ; at the end of the PRINT instruction, otherwise a newline 
will be added.

Regards,

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)?

2010-04-11 Thread Benoît Minisini
 Hello to all.
 
 I'm continuing the pt_BR translation of Gambas3 IDE, but I'm having a
 problem.
 
 I'm using lokalize (old kbabel) to translate the potfile, but I don't know
 how integrate the translation into gambas IDE. I recreated the .mo file
 and recompiled gambas3.gambas, but it continues in English lang.
 
 The envronment variables (LC_* and LANG) are ok (pt_BR.UTF-8).
 
 What is the language structure of a gambas application? Where must I put
 the .mo file? Something like locale/lang/LC_MESSAGES/ ?
 
 Thanks.
 
 And sorry my bad English :-)

You should use the translation dialog of the IDE to translate the IDE. In 
Gambas 3, you have a tab in this dialog to import a *.po file.

The language structure of a gambas application is that:

- Every *.po and their *.mo file are stored inside the project .lang 
directory.

- When creating an executable, all *.mo files are stored in it, not the *.po 
file.

- When running the program, a standard translation directory is created in 
/tmp/gambas.userid/processid/tr/lang/LC_MESSAGES/, and destroyed when 
the program ends.

Regards,

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread Benoît Minisini
 -Mensaje original-
 De: Benoît Minisini gam...@users.sourceforge.net
 Reply-to: mailing list for gambas users
 gambas-user@lists.sourceforge.net
 Para: mailing list for gambas users gambas-user@lists.sourceforge.net
 Asunto: Re: [Gambas-user] Debugging program to find error
 Fecha: Thu, 8 Apr 2010 18:29:17 +0200
 
  Hi
  
  Continuing with experiments to try to implement a project of Gambas on a
  computer that does not have the IDE using the variable GB_DIR.
  
  The main problem is to debug the project on the computer that Gambas is
  not installed because the debugger does not work with the parameters
  indicated on the website of Benoit.
  
  I have tried to solve this by placing the routes where the executable.
  Example:
  
  Edit  /etc/environment and added:
  
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/
  op t/project/gambas2/bin
  
  Then run gbc2 -agt and gives me the following:
  
  /opt/project/ FMain.class: 15: Unknown identifier: Button
  
  any idea?
  
  For testing purposes, the project consists of only one form and a
  button.
  
  
  Note:
  I'm testing this on a Ubuntu 8.04 distribution without Gambas 2
  installed, running through VirtualBox.
  
  Regards
  
  [OperatingSystem]
  OperatingSystem=Linux
  KernelRelease=2.6.28-14-generic
  DistributionVendor=ubuntu
  DistributionRelease=Ubuntu 9.04
  
  [System]
  CPUArchitecture=i686
  TotalRam=1026628 kB
  
  [Gambas]
  Gambas1=Not Installed
  Gambas2=2.20.2
  Gambas2Path=/usr/local/bin/gbx2
  Gambas3=2.99.0
  Gambas3Path=/usr/local/bin/gbx3
 
 If you want to compile, and debug, you have to install Gambas. What you
 are doing is step by step creating a script that installs Gambas. You are
 reinventing the concept of binary package! Why not using them so?
 
 Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=).
 
 I just want to see the possibility of a Gambas project, compiling it and
 using the variable GB_DIR, take it to another computer without having to
 download the necessary components to run the application, and be
 independent if I install it on a distribution 9.10 ,8.10 or 8.04 in
 Ubuntu (In the first instance).-
 Please correct me if I understand wrong, but when you generate a deb
 package and automatically install it on another computer, this request
 and install the components needed. Now, I imagine that if I want to
 install a compiled project of Gambas on another computer, without the
 need to download the packages from the internet, I must use the variable
 GB_DIR, and pack all the necessary libraries of components, such as
 gb.draw.so, gb.gtk.so, etc, depending on the components that are
 described in the file .proyect.
 Now the problem is that these libraries as I need other necessary shared
 libraries to run the apliacion, which are different for each
 distribution.
 What I want is to carry my application with all dependencies included,
 either, components and shared libraries. The only problem, that by doing
 this, the interpreter gbx2 can not find the library libffi.so and that I
 am trying to solve.
 I just need to move an entire folder with the interpreter, components
 and shared libraries to a location, such as / opt / project. Running a
 file .sh, which is indicated by export routes.
 
 Thanks for your time.
 
 Regards
 

OK, I see. You have to reinventing the wheel, because your target systems do 
not have an Internet access. :-)

Anyway, if libffi.so is missing, why not just added it to your package?

And if you want to use the compiler, you must install all the *.info and 
*.list files associated with the components.

Regards,

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Help with a Gambas version of VB registry settings functions?

2010-04-11 Thread chrisken

Hi, everybody. I've been thinking for a while that I'd like to come up with a
gambas equivalent for the useful 'registry settings' functions included in
visual basic 6 - obviously they couldn't use the registry in the same way,
since that doesn't really exist in Linux, but the need for a simple way of
saving and reloading the last known state of my programs and other simple
details is something that does carry over. The most important routines to
me, are:

SaveSetting (appname, section, key, value) - saves the given value, filed by
appname, section, and key
GetSetting (appname, section, key, optional defaultvalue) - returns the
previous value saved for the given appname, section, and key. If no previous
value is found, returns defaultvalue if it is supplied, or else an empty
string.

GetAllSettings (which returns a two-dimensional array of all keys and values
for a given appname and section) and DeleteSetting (which clears out the
previous value for an appname/section/key) would be useful too, but not
critical.

So - any suggestions for how best to handle this? I've been wondering about
the storage medium - if I can actually dynamically write .ini type files, or
if it would be easier to handle this in a sqlite database format. Also, I'm
not sure about where to put the files so that they'd be found no matter what
gambas program is accessing them, (is there a way to find out what the
user's home directory path is called?) and if I go with sqlite, I'd need a
way to test to see if my table is already in the sqlite file or not.

Sorry for the rambling-ness. Any replies would be appreciated.
-- 
View this message in context: 
http://old.nabble.com/Help-with-a-Gambas-version-of-VB-registry-settings-functions--tp28208990p28208990.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help with a Gambas version of VB registry settings functions?

2010-04-11 Thread Benoît Minisini
 Hi, everybody. I've been thinking for a while that I'd like to come up with
 a gambas equivalent for the useful 'registry settings' functions included
 in visual basic 6 - obviously they couldn't use the registry in the same
 way, since that doesn't really exist in Linux, but the need for a simple
 way of saving and reloading the last known state of my programs and other
 simple details is something that does carry over. The most important
 routines to me, are:
 
 SaveSetting (appname, section, key, value) - saves the given value, filed
 by appname, section, and key
 GetSetting (appname, section, key, optional defaultvalue) - returns the
 previous value saved for the given appname, section, and key. If no
 previous value is found, returns defaultvalue if it is supplied, or else
 an empty string.
 
 GetAllSettings (which returns a two-dimensional array of all keys and
 values for a given appname and section) and DeleteSetting (which clears
 out the previous value for an appname/section/key) would be useful too,
 but not critical.
 
 So - any suggestions for how best to handle this? I've been wondering about
 the storage medium - if I can actually dynamically write .ini type files,
 or if it would be easier to handle this in a sqlite database format. Also,
 I'm not sure about where to put the files so that they'd be found no
 matter what gambas program is accessing them, (is there a way to find out
 what the user's home directory path is called?) and if I go with sqlite,
 I'd need a way to test to see if my table is already in the sqlite file or
 not.
 
 Sorry for the rambling-ness. Any replies would be appreciated.

Did you notice the gb.settings component?

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help with a Gambas version of VB registry settings functions?

2010-04-11 Thread chrisken

No, I didn't - I did look for something similar that was built-in, especially
on the 'Differences from Visual Basic' page - but then, I guess you can't
list everything there.

Thanks muchly for the tip!

Benoît Minisini wrote:
 
 
 Did you notice the gb.settings component?
 
 -- 
 Benoît Minisini
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 

-- 
View this message in context: 
http://old.nabble.com/Help-with-a-Gambas-version-of-VB-registry-settings-functions--tp28208990p28209276.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)?

2010-04-11 Thread Leandro Santiago
Ok. Now I'm doing it. I'm using translation dialog.

I opened IDE project into gambas IDE.

I translated my lang file and created the .gambas executable. I saw the
/tmp/gambas structure and the lang file is there, but the program is yet in
English. Until here everything is OK.

But even in other languages as default (properties dialog) (like French,
fully translated), the program is yet in English. What am I doing wrong?

I'm using gambas 3 rev. 2870 in Ubuntu 9.10.

2010/4/11 Benoît Minisini gam...@users.sourceforge.net

  Hello to all.
 
  I'm continuing the pt_BR translation of Gambas3 IDE, but I'm having a
  problem.
 
  I'm using lokalize (old kbabel) to translate the potfile, but I don't
 know
  how integrate the translation into gambas IDE. I recreated the .mo file
  and recompiled gambas3.gambas, but it continues in English lang.
 
  The envronment variables (LC_* and LANG) are ok (pt_BR.UTF-8).
 
  What is the language structure of a gambas application? Where must I put
  the .mo file? Something like locale/lang/LC_MESSAGES/ ?
 
  Thanks.
 
  And sorry my bad English :-)

 You should use the translation dialog of the IDE to translate the IDE. In
 Gambas 3, you have a tab in this dialog to import a *.po file.

 The language structure of a gambas application is that:

 - Every *.po and their *.mo file are stored inside the project .lang
 directory.

 - When creating an executable, all *.mo files are stored in it, not the
 *.po
 file.

 - When running the program, a standard translation directory is created in
 /tmp/gambas.userid/processid/tr/lang/LC_MESSAGES/, and destroyed when
 the program ends.

 Regards,

 --
 Benoît Minisini


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] htonl equal

2010-04-11 Thread Mohammad Razeghi
Hi

I am looking for c++ htonl function equal in gambas can any one help please
?

Thanks ...
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)?

2010-04-11 Thread Benoît Minisini
 Ok. Now I'm doing it. I'm using translation dialog.
 
 I opened IDE project into gambas IDE.
 
 I translated my lang file and created the .gambas executable. I saw the
 /tmp/gambas structure and the lang file is there, but the program is yet in
 English. Until here everything is OK.
 
 But even in other languages as default (properties dialog) (like French,
 fully translated), the program is yet in English. What am I doing wrong?
 
 I'm using gambas 3 rev. 2870 in Ubuntu 9.10.
 

If you run it from the IDE after having translated it, it is yet in English? 
If so, do you have a warning message in the console about a missing locale? If 
you don't, can you tell what are the values of the following environment 
variables: LANG, LANGUAGE, LC_ALL and LC_MESSAGES?

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread craf
-Mensaje original-
De: Benoît Minisini gam...@users.sourceforge.net
Reply-to: mailing list for gambas users
gambas-user@lists.sourceforge.net
Para: mailing list for gambas users gambas-user@lists.sourceforge.net
Asunto: Re: [Gambas-user] Debugging program to find error
Fecha: Sun, 11 Apr 2010 14:58:18 +0200


 -Mensaje original-
 De: Benoît Minisini gam...@users.sourceforge.net
 Reply-to: mailing list for gambas users
 gambas-user@lists.sourceforge.net
 Para: mailing list for gambas users gambas-user@lists.sourceforge.net
 Asunto: Re: [Gambas-user] Debugging program to find error
 Fecha: Thu, 8 Apr 2010 18:29:17 +0200
 
  Hi
  
  Continuing with experiments to try to implement a project of Gambas on a
  computer that does not have the IDE using the variable GB_DIR.
  
  The main problem is to debug the project on the computer that Gambas is
  not installed because the debugger does not work with the parameters
  indicated on the website of Benoit.
  
  I have tried to solve this by placing the routes where the executable.
  Example:
  
  Edit  /etc/environment and added:
  
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/
  op t/project/gambas2/bin
  
  Then run gbc2 -agt and gives me the following:
  
  /opt/project/ FMain.class: 15: Unknown identifier: Button
  
  any idea?
  
  For testing purposes, the project consists of only one form and a
  button.
  
  
  Note:
  I'm testing this on a Ubuntu 8.04 distribution without Gambas 2
  installed, running through VirtualBox.
  
  Regards
  
  [OperatingSystem]
  OperatingSystem=Linux
  KernelRelease=2.6.28-14-generic
  DistributionVendor=ubuntu
  DistributionRelease=Ubuntu 9.04
  
  [System]
  CPUArchitecture=i686
  TotalRam=1026628 kB
  
  [Gambas]
  Gambas1=Not Installed
  Gambas2=2.20.2
  Gambas2Path=/usr/local/bin/gbx2
  Gambas3=2.99.0
  Gambas3Path=/usr/local/bin/gbx3
 
 If you want to compile, and debug, you have to install Gambas. What you
 are doing is step by step creating a script that installs Gambas. You are
 reinventing the concept of binary package! Why not using them so?
 
 Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=).
 
 I just want to see the possibility of a Gambas project, compiling it and
 using the variable GB_DIR, take it to another computer without having to
 download the necessary components to run the application, and be
 independent if I install it on a distribution 9.10 ,8.10 or 8.04 in
 Ubuntu (In the first instance).-
 Please correct me if I understand wrong, but when you generate a deb
 package and automatically install it on another computer, this request
 and install the components needed. Now, I imagine that if I want to
 install a compiled project of Gambas on another computer, without the
 need to download the packages from the internet, I must use the variable
 GB_DIR, and pack all the necessary libraries of components, such as
 gb.draw.so, gb.gtk.so, etc, depending on the components that are
 described in the file .proyect.
 Now the problem is that these libraries as I need other necessary shared
 libraries to run the apliacion, which are different for each
 distribution.
 What I want is to carry my application with all dependencies included,
 either, components and shared libraries. The only problem, that by doing
 this, the interpreter gbx2 can not find the library libffi.so and that I
 am trying to solve.
 I just need to move an entire folder with the interpreter, components
 and shared libraries to a location, such as / opt / project. Running a
 file .sh, which is indicated by export routes.
 
 Thanks for your time.
 
 Regards
 

OK, I see. You have to reinventing the wheel, because your target systems do 
not have an Internet access. :-)

Anyway, if libffi.so is missing, why not just added it to your package?

And if you want to use the compiler, you must install all the *.info and 
*.list files associated with the components.

Regards,

-- 
Benoît Minisini

Hello. 


I see that I can not explain it yet. :=)

add email sent by you:

Benoît Minisini write:
With the revision #2401, you can define a GB_DIR environment variable
that points at the Gambas installation directory.

With that, you should be able to run Gambas from your USB key, provided
that the destination O.S. has all the needed shared libraries installed.

You can put all the needed shared libraries on the USB key too, and run
Gambas completely, by using the LD_LIBRARY_PATH environment variable.

 Regards



you must:

0) Run ldd on the *.so files of all gambas components used by your
application 
to make a list of needed shared libraries. Don't forget to run ldd on
the 
interpreter.

1) Put all detected shared libraries in a folder. Let's name it
/my/ld/dir

2) Copy a gambas installation directory in another folder. Let's name
it 
/my/gambas/dir.

3) Create a script like that:

#!/bin/sh
export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH
export GB_DIR=/my/gambas/dir
exec 

Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread Benoît Minisini
 Hello. 
 
 
 I see that I can not explain it yet. :=)
 
 [...]
 
 That's what I'm trying to do, a ¡Wizzard to do the job automatically!.
 
 I appreciate your understanding:
 
 Regards.
 

I understand. :-)

But, if libffi.so.* are missing, why don't you provide them with your package?

-- 
Benoît Minisini

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread craf
-Mensaje original-
De: Benoît Minisini gam...@users.sourceforge.net
Reply-to: mailing list for gambas users
gambas-user@lists.sourceforge.net
Para: mailing list for gambas users gambas-user@lists.sourceforge.net
Asunto: Re: [Gambas-user] Debugging program to find error
Fecha: Mon, 12 Apr 2010 01:35:43 +0200


 Hello. 
 
 
 I see that I can not explain it yet. :=)
 
 [...]
 
 That's what I'm trying to do, a ¡Wizzard to do the job automatically!.
 
 I appreciate your understanding:
 
 Regards.
 

I understand. :-)

But, if libffi.so.* are missing, why don't you provide them with your package?


-- 
Benoît Minisini

Hi Benoit

I appreciate your patience

The problem of the interpreter gbx2 not find libffi library (gbr2: error
while loading shared libraries: libffi.so.5: cannot open shared object
file: No such file or directory
), is that the routes included in the file .sh are not taken into
account. To fix this I added the following paths to the file .profile
(The tests carried out from a project created in gambas2.20 in Ubuntu
9.10 to Ubuntu 8.04 distribution located on the same computer and runs
through Virtualbox.

#!/bin/sh
export PATH=/path/my/proyect/gambas2/bin
export
LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib

You see I have to load the variable LD_LIBRARY_PATH when the user start
a session, as this is ignored if the file is called from . sh

Doriano kindly indicated that this was due to the following:

Read carefully read the documentation about ld.so (8). That if the
states It
program is a setuid / setgid one, the PATH variable .. LD_ is ignored.

Actually, not like seeing if the file has this feature.

Now if you log off and go again, Ubuntu throws error. This is because as
directed on the path to the shared libraries, is not the path for those
that come with Ubuntu 8.04 distribution. To fix this I add them to the
path of LD_LIBARRY_PATH:

#!/bin/sh
export PATH=/path/my/proyect/gambas2/bin
export
LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib:/lib:/usr/lib:/usr/local/lib

This solves the problem, but to run the file .sh, which now gives the
error is about GTK not find the libraries: 

The GB_DIR variable in this case is not taken into account: 

Summing up the problems:

1) The LD_LIBRARY_PATH variable is not taken into account when running
the file. sh.
2) The GB_DIR variable is not taken into account.


I send back the routes of the project. Sorry so long

$ Tree opt 

 my_project/
|-- gambas2
|   |-- bin
|   |   |-- gbr2
|   |   `-- gbx2
|   |-- lib
|   |   `-- gambas2
|   |   |-- gb.draw.la
|   |   |-- gb.draw.so
|   |   |-- gb.draw.so.0
|   |   |-- gb.draw.so.0.0.0
|   |   |-- gb.form.component
|   |   |-- gb.form.gambas
|   |   |-- gb.gtk.component
|   |   |-- gb.gtk.ext.component
|   |   |-- gb.gtk.ext.la
|   |   |-- gb.gtk.ext.so
|   |   |-- gb.gtk.ext.so.0
|   |   |-- gb.gtk.ext.so.0.0.0
|   |   |-- gb.gtk.gambas
|   |   |-- gb.gtk.la
|   |   |-- gb.gtk.so
|   |   |-- gb.gtk.so.0
|   |   |-- gb.gtk.so.0.0.0
|   |   |-- gb.so
|   |   |-- gb.so.0
|   |   `-- gb.so.0.0.0
|   `-- library_shared
|   |-- lib
|   |   |-- ld-2.9.so
|   |   |-- ld-linux.so.2
|   |   |-- libgcc_s.so.1
|   |   |-- libpcre.so.3
|   |   |-- libpcre.so.3.12.1
|   |   |-- libselinux.so.1
|   |   |-- libz.so.1
|   |   |-- libz.so.1.2.3.3
|   |   `-- tls
|   |   `-- i686
|   |   `-- cmov
|   |   |-- libc-2.9.so
|   |   |-- libc.so.6
|   |   |-- libdl-2.9.so
|   |   |-- libdl.so.2
|   |   |-- libm-2.9.so
|   |   |-- libm.so.6
|   |   |-- libpthread-2.9.so
|   |   `-- libpthread.so.0
|   `-- usr
|   `-- lib
|   |-- libX11.so.6
|   |-- libX11.so.6.2.0
|   |-- libXau.so.6
|   |-- libXau.so.6.0.0
|   |-- libXcomposite.so.1
|   |-- libXcomposite.so.1.0.0
|   |-- libXcursor.so.1
|   |-- libXcursor.so.1.0.2
|   |-- libXdamage.so.1
|   |-- libXdamage.so.1.1.0
|   |-- libXdmcp.so.6
|   |-- libXdmcp.so.6.0.0
|   |-- libXext.so.6
|   |-- libXext.so.6.4.0
|   |-- libXfixes.so.3
|   |-- libXfixes.so.3.1.0
|   |-- libXi.so.6
|   |-- libXi.so.6.0.0
|   |-- libXinerama.so.1
|   |-- libXinerama.so.1.0.0
|   |-- libXrandr.so.2
|   |-- libXrandr.so.2.2.0
|   |-- libXrender.so.1
|   |-- libXrender.so.1.3.0
|   |-- libatk-1.0.so.0
|   |-- libatk-1.0.so.0.2609.1
|   |-- libcairo.so.2
|   |-- libcairo.so.2.10800.6
|  

Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread Benoît Minisini
 -Mensaje original-
 De: Benoît Minisini gam...@users.sourceforge.net
 Reply-to: mailing list for gambas users
 gambas-user@lists.sourceforge.net
 Para: mailing list for gambas users gambas-user@lists.sourceforge.net
 Asunto: Re: [Gambas-user] Debugging program to find error
 Fecha: Mon, 12 Apr 2010 01:35:43 +0200
 
  Hello.
  
  
  I see that I can not explain it yet. :=)
  
  [...]
  
  That's what I'm trying to do, a ¡Wizzard to do the job automatically!.
  
  I appreciate your understanding:
  
  Regards.
 
 I understand. :-)
 
 But, if libffi.so.* are missing, why don't you provide them with your
 package?
 
 Hi Benoit
 
 I appreciate your patience
 
 The problem of the interpreter gbx2 not find libffi library (gbr2: error
 while loading shared libraries: libffi.so.5: cannot open shared object
 file: No such file or directory
 ), is that the routes included in the file .sh are not taken into
 account. To fix this I added the following paths to the file .profile
 (The tests carried out from a project created in gambas2.20 in Ubuntu
 9.10 to Ubuntu 8.04 distribution located on the same computer and runs
 through Virtualbox.
 
 #!/bin/sh
 export PATH=/path/my/proyect/gambas2/bin
 export
 LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/ga
 mbas2/lib_shared/usr/lib
 
 You see I have to load the variable LD_LIBRARY_PATH when the user start
 a session, as this is ignored if the file is called from . sh
 
 Doriano kindly indicated that this was due to the following:
 
 Read carefully read the documentation about ld.so (8). That if the
 states It
 program is a setuid / setgid one, the PATH variable .. LD_ is ignored.
 
 Actually, not like seeing if the file has this feature.
 
 Now if you log off and go again, Ubuntu throws error. This is because as
 directed on the path to the shared libraries, is not the path for those
 that come with Ubuntu 8.04 distribution. To fix this I add them to the
 path of LD_LIBARRY_PATH:
 
 #!/bin/sh
 export PATH=/path/my/proyect/gambas2/bin
 export
 LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/ga
 mbas2/lib_shared/usr/lib:/lib:/usr/lib:/usr/local/lib
 
 This solves the problem, but to run the file .sh, which now gives the
 error is about GTK not find the libraries:
 
 The GB_DIR variable in this case is not taken into account:
 
 Summing up the problems:
 
 1) The LD_LIBRARY_PATH variable is not taken into account when running
 the file. sh.
 2) The GB_DIR variable is not taken into account.
 
 
 I send back the routes of the project. Sorry so long
 
 $ Tree opt
 
  my_project/
 
 |-- gambas2
 |
 |   |-- bin
 |   |
 |   |   |-- gbr2
 |   |   
 |   |   `-- gbx2
 |   |
 |   |-- lib
 |   |
 |   |   `-- gambas2
 |   |   
 |   |   |-- gb.draw.la
 |   |   |-- gb.draw.so
 |   |   |-- gb.draw.so.0
 |   |   |-- gb.draw.so.0.0.0
 |   |   |-- gb.form.component
 |   |   |-- gb.form.gambas
 |   |   |-- gb.gtk.component
 |   |   |-- gb.gtk.ext.component
 |   |   |-- gb.gtk.ext.la
 |   |   |-- gb.gtk.ext.so
 |   |   |-- gb.gtk.ext.so.0
 |   |   |-- gb.gtk.ext.so.0.0.0
 |   |   |-- gb.gtk.gambas
 |   |   |-- gb.gtk.la
 |   |   |-- gb.gtk.so
 |   |   |-- gb.gtk.so.0
 |   |   |-- gb.gtk.so.0.0.0
 |   |   |-- gb.so
 |   |   |-- gb.so.0
 |   |   
 |   |   `-- gb.so.0.0.0
 |   
 |   `-- library_shared
 |   
 |   |-- lib
 |   |
 |   |   |-- ld-2.9.so
 |   |   |-- ld-linux.so.2
 |   |   |-- libgcc_s.so.1
 |   |   |-- libpcre.so.3
 |   |   |-- libpcre.so.3.12.1
 |   |   |-- libselinux.so.1
 |   |   |-- libz.so.1
 |   |   |-- libz.so.1.2.3.3
 |   |   
 |   |   `-- tls
 |   |   
 |   |   `-- i686
 |   |   
 |   |   `-- cmov
 |   |   
 |   |   |-- libc-2.9.so
 |   |   |-- libc.so.6
 |   |   |-- libdl-2.9.so
 |   |   |-- libdl.so.2
 |   |   |-- libm-2.9.so
 |   |   |-- libm.so.6
 |   |   |-- libpthread-2.9.so
 |   |   
 |   |   `-- libpthread.so.0
 |   
 |   `-- usr
 |   
 |   `-- lib
 |   
 |   |-- libX11.so.6
 |   |-- libX11.so.6.2.0
 |   |-- libXau.so.6
 |   |-- libXau.so.6.0.0
 |   |-- libXcomposite.so.1
 |   |-- libXcomposite.so.1.0.0
 |   |-- libXcursor.so.1
 |   |-- libXcursor.so.1.0.2
 |   |-- libXdamage.so.1
 |   |-- libXdamage.so.1.1.0
 |   |-- libXdmcp.so.6
 |   |-- libXdmcp.so.6.0.0
 |   |-- libXext.so.6
 |   |-- libXext.so.6.4.0
 |   |-- libXfixes.so.3
 |   |-- libXfixes.so.3.1.0
 |   |-- libXi.so.6
 |   |-- libXi.so.6.0.0
 |   |-- libXinerama.so.1
 |   |-- 

Re: [Gambas-user] Debugging program to find error

2010-04-11 Thread Ron_1st
On Monday 12 April 2010, craf wrote:
 file: No such file or directory
 ), is that the routes included in the file .sh are not taken into
 account. To fix this I added the following paths to the file .profile
 (The tests carried out from a project created in gambas2.20 in Ubuntu
 9.10 to Ubuntu 8.04 distribution located on the same computer and runs
 through Virtualbox.
 
 #!/bin/sh
 export PATH=/path/my/proyect/gambas2/bin
 export
 LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib
 

From some early mail
export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH

This will add your path in front of the current one, pointing to i.e. gtk libs
In thecode you present here the current to other libraries is killed.

So add on the line at the end ':$LD_LIBRARY_PATH' (whitout quotes :) )

 You see I have to load the variable LD_LIBRARY_PATH when the user start
 a session, as this is ignored if the file is called from . sh
 
 Doriano kindly indicated that this was due to the following:
 


Best regards,

Ron_1st

-- 

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user