Re: [Gambas-user] C Code character manipulation - alternatives

2009-05-21 Thread Doriano Blengino
KhurramM ha scritto:
 Thanks Sir.

 You have given me tips better then the book I am following on C. :working:

 My two queries:
 1 Can I implement ctrl+D or ^D, which I am not able to here, as in C?
 2 The program works with INPUT and LINE INPUT. But Line Input also takes
 blank space as input, while INPUT ends the program over here. And I use
 string here, but in C it was integer?

 --- Just for reference:
 Well I made my program final as:

 PUBLIC SUB Main()

' Declare AND initialize variables.
DIM c, count AS Integer

DIM c1 AS String
  
' READ , PRINT , AND count characters.
PRINT Enter characters (or Press Carriage Return to quit): 
LINE INPUT c1
count += Len(c1)

WHILE (c1  )' This is the best solution
   PRINT c1
   LINE INPUT c1
   count += Len(c1)
WEND 

' PRINT the number OF characters printed.
PRINT count   characters printed.

 END
   
I put the following code in a program; the code is invoked by pressing 
Button1:

PUBLIC SUB Button1_Click()
   ' Declare AND initialize variables.
   DIM c, count AS Integer
  
   DIM c1 AS String
 
   ' READ , PRINT , AND count characters.
   PRINT Enter characters (or Press Carriage Return to quit): 

   WHILE NOT Eof
  LINE INPUT c1
  PRINT c1
  count += Len(c1)
   WEND

   ' PRINT the number OF characters printed.
   PRINT count   characters printed.
END

Running the program inside the IDE, and using the internal console, no 
EOF is generated, but your version (which tested for empty lines) 
worked. Then I made an executable (Project menu - Generate - 
Executable) and launched it from a terminal. It runs correctly; you 
repeatedly type some text + ENTER, or you type Ctrl-D. The behaviour is 
correct and, as I was supposing, no Ctrl-D is detected inside the line 
input, but it is if you type ^D alone. As the routine is invoked every 
time Button1 is pressed, I tried to press Button1 again: after the first 
^D no more characters are detected. This makes sense, because you cannot 
go past the EOF...
Then I launched the following shell command: echo ciao |./dand.gambas
Doing so, the standard input for the program is redirected elsewhere 
(the output of the echo command). The program works as expected - it 
counts 4 characters and senses the EOF correctly.

Now, I suppose you are disappointed by INPUT and LINE INPUT, which are 
multi-char statements. If you want to process single characters, then 
you must use the READ statement (perhaps there is also a INKEY$) -- see 
the docs. Anyway, gambas does not have chars like C - you can use 
strings (of length 1); the ASC() function returns the numerical code of 
a character, and CHR() returns a char (a string of len 1)  by giving its 
ascii code. There is no character to designate EOF - you must use the 
Eof() function.

If you want to be a real gambas programmer, stop to put parenthesis 
around tests, like while (c1...)! :-)

If you have a goal in mind, perhaps could be better you tell it, so we 
can help you more precisely.

Cheers,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one mouth.


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature Request - Package Management

2009-05-21 Thread KhurramM

Well I again search the same site to find gambas2.12 for my hardy. Thanks a
lot. Still need to try it, yet.

I experimented the file on my testing jaunty:
(see attachment)

To gambas forum: I installed gambas via on jaunty (just for trial). It used
37.5mb total including this gambas file to install the package.
Gambas can be packaged into a plus/minus a little 37.5mb binary installer.
:jumping:

The person who told me it will take a CDs data to make an installer, seems
to quiet wrong, in his assertion. :-)

Best Regards
-- 
View this message in context: 
http://www.nabble.com/Feature-Request---Package-Management-tp23610862p23648664.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Using masks

2009-05-21 Thread M. Cs.
I want to enhance the look of my application. I need some instructions about
the masks. I have some ideas, but need confirmation.
1. So if I have a form sized 1024x768, and I want to create skins for it,
I'll have to create a same sized .png image with transparent areas over the
text boxes, buttons and other components?
2. How to use the mask, let say, the .png skin.png?
--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature Request - Package Management

2009-05-21 Thread Ron_1st
On Thursday 21 May 2009, KhurramM wrote:
 
 Well I again search the same site to find gambas2.12 for my hardy. Thanks a
 lot. Still need to try it, yet.
 
 I experimented the file on my testing jaunty:
 (see attachment)
 
 To gambas forum: I installed gambas via on jaunty (just for trial). It used
 37.5mb total including this gambas file to install the package.
 Gambas can be packaged into a plus/minus a little 37.5mb binary installer.
 :jumping:
 
 The person who told me it will take a CDs data to make an installer, seems
 to quiet wrong, in his assertion. :-)
 
 Best Regards

I asume you are fresh from a windows C environment jumped into the linux world.


You need to read that message carefully again. Rob is almost right with his 
statement.

First you need to know in the windows world the differences between W98, XP and 
Vista.
when you write a program for one of those versions it does not work out the box 
in one
of the other 3. hmmm yes I know it can work sometimes but there is no 
garanty.
I wrote a programm with the WMP SDK71 on W98 and that does not work on the 
others.
Simple because MS changed something in the background for XP, Vista not tried.
This was using a binary package installer as you prefer.
The source can also be compiled for XP and Vista. I do have 3 packages and 3 
times
the size to use for the simple 1 file installer for the same program.

If we do the same for linux programs you must understand there are over 100 
different
distributions, name them w98,w98se,me,xp,vista,2000,nt.
Yes some are constructed from a master like Debian is used for the ubuntu 
series.
Mandriva for i.e. PCLinux2007, RedHat for fedora, Centos, etc. In MS Window 
terms the
Home, Premium, Ultimate etc.

Let say we support ten of those master systems, we need ten times the size of 
our full
program. Your mentioned 35MB was for ONE distribution, so we need 350MB now, 
half a CD.
(the source is less then 20MB ATM usable for all ten systems and children of 
them) 

Now comes the support to get a working system. We need the 4 most used Database 
engines.
Some PDF, XML and network support as i.e. Curl.
Everey one of the 10 master distributions compiles these on there likes for 
ordering 
in the disk map, the configuration and possible options.
Just a number but let say for a system you need 50MB to support this in 
compiled form. 
Now the 10 master distributions need 10 times 50MB as 500MB (almost a full CD)
(the source is less then 50MB and usable for all ten systems and children of 
them)

These support may already be installed by the distribution or are available for
installation as binary packages, and full supported for bug fixes by them.

If the guy that makes a program like gambas should do the way you want he must
deliver a file with a size for all code:
35MB gambas compiled x  10 = 350MB
50MB support compiled x 10 = 500MB
some setup program and total 850MB at least.
Give HIS support on the supporting code DB,PDF,XML and network stuff.

Noway he will or can do this. Do you release your program with this as 
requirement?
He wil never have enough time to live anymore or to make his application 
(gambas).

Second: this file will be picked up by major sites as Download.com and 
snapfiles and
many insecure sites( for dismanteling and add malware/virus and repacked) for 
the
simple windows to linux jumpers that doeds want the easy way without thinking.

Third: When I want to jump to an other linux distribution it is simple a few 
commands
to make a working version again. For my WMP application, having the source you 
can
change the function name changed between W98 and XP and recompile to get it 
working again.

Binary delivery is only usefull if it is done for a specific distribution by 
that 
distribution or the programmer head/leader. 
This is a safe place to get the program and for new people starting with linux 
the distributions repository is the onle safe place anyway.

For programmers it should not be a problem to compile a fresh new release of
the developer program used for creating there own programs, they need to compile
there own programs to. (not every program language has a IDE to do it)

Do not see the figures and conditions as absolute but as indication what is
involved in the total process to do a job as you prefer (or did after read 
this).
It shows why source delivery and prefers this way in the linux world.


I do also follow your thread about the C/C++ based character input.

You can be a good programmer for applications now in C/C++ but do not 
understand 
the working and background of C/C++, only your programs.

Porting a C program source to Basic source is not simple copy/past the code and
in the editor using the replace function to change the C statements text to 
Basic
words. You need to understand what the specific C statement does and find the 
Basic statement to do the same thing. The grammar/syntax between both languages 
are also different.



 PUBLIC SUB Main()

   ' Declare 

Re: [Gambas-user] Web site translations

2009-05-21 Thread David Villalobos Cambronero

Don't worry, it is done, but thanks

 Regards


--
David



- Original Message 
From: Sergio A. Hernandez info.g...@gmail.com
To: mailing list for gambas users gambas-user@lists.sourceforge.net
Sent: Wednesday, May 20, 2009 7:18:56 PM
Subject: Re: [Gambas-user] Web site translations

David,
Do you need some help with the Spanish translation?
Let me know.

On Wed, May 20, 2009 at 8:55 AM, David Villalobos Cambronero 
david_villalobo...@yahoo.com wrote:


 I just started with the Spanish translation.

  Regards


 --
 David



 - Original Message 
 From: Benoît Minisini gam...@users.sourceforge.net
 To: gambas-user@lists.sourceforge.net
 Sent: Wednesday, May 20, 2009 8:42:13 AM
 Subject: [Gambas-user] Web site translations

 Hi everyone,

 The Gambas web site is now fully translatable.

 To do that, most of the pages were moved to the wiki - pages that are
 generated cannot go to the wiki.

 Everything is in a new project located in /trunk/app/src named
 MakeWebSite
 (original, isn't it?).

 This project generates the HTML pages in all specified languages from HTML
 templates where string to be translated are marked.

 To do the translation, just translate the MakeWebSite project as any other
 Gambas project. You need a subversion write access to commit your changes,
 so
 ask me if you don't have one.

 News can be translated too, provided that you add the news html files to
 the
 /news/ project directory, where  is your language code.

 You don't have to run the project. If you do it anyway, it will generate
 the
 HTML directly inside the project directory. But as these generated files
 are
 not versioned, they will never be committed.

 Note that not all strings are marked yet, and some pages will move to the
 wiki.

 To translate the pages located in the wiki, just go to the wiki.

 If you want to translate the website to a new language, just tell me and I
 will add it to the project, with the corresponding flag.

 And of course if you want more details, ask!

 Regards,

 --
 Benoît


 --
 Crystal Reports - New Free Runtime and 30 Day Trial
 Check out the new simplified licensing option that enables
 unlimited royalty-free distribution of the report engine
 for externally facing server and web deployment.
 http://p.sf.net/sfu/businessobjects
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user






 --
 Crystal Reports - New Free Runtime and 30 Day Trial
 Check out the new simplified licensing option that enables
 unlimited royalty-free distribution of the report engine
 for externally facing server and web deployment.
 http://p.sf.net/sfu/businessobjects
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user



  

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Feature Request - Package Management

2009-05-21 Thread programacion
Hi 

:) is italian.

you can download the package deb of the version 2.12 of Gambas.

Regards

El mié, 20-05-2009 a las 19:55 -0700, KhurramM escribió:

 Sir the page is in French, I dont understand what to do here?
 
 Best Regards
 
 
 
 programacion wrote:
  
  Hi.
  
  Look this link http://www.gambas-it.org/gmbs/modules/news/
  
  Regards
  
  El mié, 20-05-2009 a las 11:10 -0700, KhurramM escribió:
  
  Sir it will be a very excellent piece of work if u have the latest
  gambas-debians for ubuntu and debian.
  
  Pls, if it is possible, put these for easy/direct download on the gambas
  website server.
  
  Because Hardy is a LTS, so I prefer to use it over the latest version. It
  will be a lot of help for me and other users.
  
  Still I wish if we could get direct binary/shell installers/upgraders.
  
  Thanks a lot.
  
  Best Regards
  
  Khurram
  --
  Crystal Reports - New Free Runtime and 30 Day Trial
  Check out the new simplified licensing option that enables 
  unlimited royalty-free distribution of the report engine 
  for externally facing server and web deployment. 
  http://p.sf.net/sfu/businessobjects
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
  
  
 
--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas 2.13.0 on FreeBSD

2009-05-21 Thread Alonso Cardenas Marquez
Hi everybody

The gambas was updated to 2.13.0 on FreeBSD ports tree, It
compiles/runs without problems on i386/amd64 (I use it on i386), The
previous version had some problems on amd64 (missing info files, some
problems on pointyhat build package system, etc).

If some FreeBSD user could test it on amd64, I could give me useful
information about like it is working there.

Well, that's all, enjoy it :)

(Sorry for break of thread in my previous message)

Greetings
ACM

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Scripting Language - Some Questions

2009-05-21 Thread Alonso Cardenas Marquez
Hi everybody

The gambas was updated to 2.13.0 on FreeBSD ports tree, It
compiles/runs without problems on i386/amd64 (I use it on i386), The
previous version had some problems on amd64 (missing info files, some
problems on pointyhat build package system, etc).

If some FreeBSD user could test it on amd64, I could give me useful
information about like it is working there.

Well, that's all, enjoy it :)

Greetings
ACM

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas Scripting Language - Some Questions

2009-05-21 Thread Sergio A. Hernandez
Yes, the gb.xml is installed on my system, it is visible under the tab
COMPONENTS.
Actually, I have the Gambas application that runs this example, and works
fine as an application.

2009/5/21 Benoît Minisini gam...@users.sourceforge.net

  2009/5/18 Benoît Minisini gam...@users.sourceforge.net
 
Hello all,
I have some questions about the scripting language. I need a little
help. Question
   
Thanks in advance, and have a nice weekend.
  
   The scripter works by creating a temporary project from your script, by
   compiling it, and by running it. The compiled project is cached so that
   it is
   used immediately if you run the script again.
  
   So:
1- The gbs2 scripter only have access to the gb. internal native
 class?
  
   No, it can use any component.
  
2- How can I use other components as the gb.XML?
  
   By using the special instruction USE. For example:
  
   USE gb.xml,gb.xml.rpc
  
3- Why my scripts dont run directly even when I am including the
 first
line #!/usr/bin/env gbs2?
  
   Two possible reasons:
  
   - The gbs2 symbolic link does not exist.
  
   - It exists, but is not in a directory specified in your PATH
 environment
   variable.
  
4- How can I pass arguments to the script?
  
   Just pass them:
  
   $ MyScript A B C
  
   Regards,
  
   --
   Benoît
  
   Hello again, I am trying to run this script base on what you guys
 suggest
 
  me, however I received the following error message:
  MMain.GenerateFiles.234: This component doesn't exist : gb.xml
  0: MMain.GenerateFiles.234
  1: MMain.MakeVirtualProject.140
  2: MMain.Main.61
 

 Is gb.xml installed on your system? Do you see it in the Gambas IDE?

 --
 Benoît


 --
 Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
 is a gathering of tech-side developers  brand creativity professionals.
 Meet
 the minds behind Google Creative Lab, Visual Complexity, Processing, 
 iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
 Group, R/GA,  Big Spaceship. http://www.creativitycat.com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user