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 

> > 2009/5/18 Benoît Minisini 
> >
> > > > 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


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

2009-05-20 Thread Sergio A. Hernandez
2009/5/18 Benoît Minisini 

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

#!/usr/bin/env gbs2
USE "gb.xml"
PUBLIC SUB Main()
 DIM writer AS XmlWriter

 writer = NEW XmlWriter
 writer.Open(User.Home & "/Heroes.xml", TRUE)
 writer.Comment("Heroes Characters")

 writer.StartElement("characters")
  writer.Attribute("series", "Heroes")

  writer.StartElement("heroe")
   writer.Attribute("id", "1")
   writer.Attribute("name", "Claire Bennet")
   writer.StartElement("name")
writer.Text("Claire Bennet")
   writer.EndElement 'name
   writer.StartElement("played_by")
writer.Text("Hayden Panettiere")
   writer.EndElement 'played_by
   writer.StartElement("ability")
writer.Text("Rapid cellular regeneration")
   writer.EndElement 'ability
  writer.EndElement 'heroe

  writer.StartElement("heroe", ["id", "2", "name", "Hiro Nakamura"])
   writer.Element("name", "Hiro Nakamura")
   writer.Element("played_by", "Masi Oka")
   writer.Element("ability", "Space-time manipulation: teleportation & time
travel")
  writer.EndElement 'heroe

  writer.StartElement("villain", ["id", "3", "name", "Gabriel Sylar"])
   writer.Element("name", "Gabriel Sylar")
   writer.Element("played_by", "Zachary Quinto")
   writer.Element("ability", "Understand how things work and multiple other
abilities acquired")
  writer.EndElement 'villain

 writer.EndElement 'character

 PRINT writer.EndDocument()
END

To create the following xml file



 
  Claire Bennet
  Hayden Panettiere
  Rapid cellular regeneration
 
 
  Hiro Nakamura
  Masi Oka
  Space-time manipulation: teleportation & time
travel
 
 
  Gabriel Sylar
  Zachary Quinto
  Understand how things work and multiple other abilities
acquired
 

I want to include this example on the spanish wikibook for Gambas, actually
I already included but I can make it work.
http://es.wikibooks.org/wiki/Gambas/Scripting_con_Gambas
--
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] Web site translations

2009-05-20 Thread Sergio A. Hernandez
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 
> 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


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

2009-05-19 Thread Sergio A. Hernandez
The idea itself sound nice, a unique way to install your favorite
application.
But, the concept is a contradiction to what Linux: is almost 300 different
distros most of them active. 1000s of diferent projects, manuals, tutorials,
books, etc.

Some people think that is one of the weakest links of Linux, that all we are
divided in several distros and several projects. But I think is what make
Linux so attractive, the freedom to use whatever desktop, software, distro,
etc you want. Who cares if Linux will never beat Windows?
Me and my family use Linux and we love it, and is what really matters.

On my opinion, of the two major distros (Ubuntu & OpenSuse) the one that
makes your life easier is Ubuntu, some time ago I just give up to have the
latest and greatest version of Gambas and other projects, I try to be
patient and wait to the ubuntu package.
*BTW, when is going to be ready the newest Gambas packages for Ubuntu???
*
:-) have a nice day.

On Tue, May 19, 2009 at 8:24 AM, Rob  wrote:

> On Tuesday 19 May 2009 03:07, KhurramM wrote:
> > gambas-3.1.2-install.bin or gambas-3.1.2-install.sh
> > for every new release (stable or unstable), for all linuxes.
> > 2> Faster bug fixing (as every one uses it).
>
> I certainly wouldn't.  If I can't install something using apt-get, I build
> my own package rather than using some binary installer.
>
> > 5> Be independent of compiling and dependency seeking.
>
> You realize that for Gambas to include all its dependencies in the
> installer - Gtk, KDE, mysql, all the other libraries, statically linked so
> they'll run on any version of Linux - would make the Gambas installer fill
> a CD and maybe more, right?
>
> > 8> Easy testing of a unstable release.
>
> When it comes to unstable development versions of programs, I think putting
> the "make barrier" in place is useful because it prevents less technical
> users from testing software that isn't safe for them to use yet.  If you
> have trouble compiling things, you're also going to have trouble running a
> debugger to post a stack trace after a crash.
>
> > 3> More documentation to configure and use.
> > 10> More helps available.
>
> How will putting Gambas into a monolithic installer create more
> documentation and help?
>
> > Just as sun offers jdk and jre releases fro linuxes.
>
> Sun offers their jdk and jre installers because they used to be proprietary
> software and most distributions wouldn't package them.  That has changed,
> at least partly, but their culture is already in place.  Also, Java has
> very few dependencies, because it reinvents the wheel for the most part
> rather than using existing toolkits and libraries the way Gambas does.
>
> > Currently I am on hardy, and I dont find it comfortable to compile.
>
> There is an installer system called Klik that would provide what you're
> describing, a single file that includes all dependencies, and years ago
> someone packaged Gambas 1.x for Klik.  But I don't know if anyone updates
> it any more and even so, if you're running a KDE 3 system and try to
> install a version of Gambas that includes an entire copy of KDE 4, for
> example, I think it's not going to work too well.  It's a moot point,
> since even when they kept Klik up to date, they only included stable
> versions of programs, not development ones.
>
> Rob
>
>
> --
> 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


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

2009-05-19 Thread Sergio A. Hernandez
String Functions in Gambas see http://gambas.sourceforge.net/ for detailed
info about them.

   * *Asc* Returns the ASCII code of a character in a string.
   * *Chr$* Returns a character from its ASCII code.
   * *Comp* Compares two strings.
   * *InStr* Searches a string into another string.
   * *LCase$* Converts a string to lowercase.
   * *Left$* Returns the first characters of a string.
   * *Len* Returns the length of a string.
   * *LTrim$* Strips white spaces from the left of a string.
   * *Mid$* Returns a part of a string.
   * *Replace*$ Replaces in a string a substring by another one.
   * *Right*$ Returns the last characters of a string.
   * *RInStr* Searches a string into another string from its right.
   * *RTrim*$ Strips white spaces from the right of a string.
   * *Scan* Splits a string against a regular expression pattern.
   * *Space*$ Returns a string containing only space.
   * *Split* Splits a string into substrings.
   * *String*$ Returns the same string concatenated many times.
   * *Subst*$ Substitutes strings in a pattern.
   * *Trim*$ Strips white spaces from a string.
   * *UCase*$ Converts a string to uppercase.


On Tue, May 19, 2009 at 1:23 AM, KhurramM  wrote:
>
> Hi all!
>
> I am still learning gambas.
>
> I need a little help in character manipulation. I C there are functions:
>
> getchar
> putchar
> fgetc
> isdigit
>
> Can these be implemented now in gambas. I failed to use the first two
using
> chr and chr$.
>
> Thanks in advance for tips/ solution.
> --
> View this message in context:
http://www.nabble.com/C-Code-character-manipulation---alternatives-tp23611042p23611042.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
>
--
> 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


Re: [Gambas-user] How to control the PRINT output in console application

2009-05-16 Thread Sergio A. Hernandez
You can try something like this
PRINT Format$(TimeVal, "-0.00"), Format$(height, "-0,000.00"),
Format$(velocity, "-0.00")

by doing this you force to insert 0 to make the numbers of the same
size, but I think is kind of awkward to see 0220.00 instead of 220.00

If you want to have a nice aligned text like this
0.02201.14
0.5  2176.491.04

You can build your own Format$ function by using Len, Space$, Mid$.

On Sat, May 16, 2009 at 12:44 PM, KhurramM  wrote:
>
> Hello! I am writing this code:
>
> PRINT Format$(TimeVal, "-.##"), Format$(height, "-.##"), Format$(velocity,
> "-.##")
>
> But getting:
>  0       220    1.14
>  .5      2176.49    1.04
>
> Now here, how I control the allignment of 1.14 to be vertically same with
> 1.04.
>
> The first two entries are correct.
>
> Thankyou:working:
> --
> View this message in context: 
> http://www.nabble.com/How-to-control-the-PRINT-output-in-console-application-tp23576681p23576681.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> --
> 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


Re: [Gambas-user] Conect to Firebird

2009-05-15 Thread Sergio A. Hernandez
In your Package Manager (YAST/Synaptic/Etc) make sure that the
following packages are installed (or in your case the first 3):

gambas2-gb-db
gambas2-gb-db-firebird
gambas2-gb-db-form
gambas2-gb-db-mysql
gambas2-gb-db-odbc
gambas2-gb-db-postgresql
gambas2-gb-db-sqlite

You can see the Beginners Guide with a very verbose explanation about
databases on Gambas.
http://vectorlinux.osuosl.org/Uelsk8s/gambas-beginner-guide.pdf

Supposedly, the big difference between the different db drivers is
only on the connection string.

On Fri, May 15, 2009 at 5:34 PM, cristian abarzua  wrote:
> Hello.
>
> I tried the ODBC, but can not connect. This odbc is there to download it
> from somewhere?
>
> Regards
>
>
> 2009/5/15 cristian abarzua 
>
>> Hello
>>
>> I tried to connect to the firebird server on my computer with the following
>> instructions:
>>
>> PUBLIC SUB Button1_Click()
>>
>>   DIM $hConn AS NEW Connection
>>
>>   WITH $hConn
>>     .Type = "firebird"
>>     .Host = "localhost"
>>     .Login = "SYSDBA"
>>     .Password = "x"
>>     .Name = "employee.fdb"
>>   END WITH
>>
>> TRY $hConn.Open
>> IF ERROR THEN PRINT "La base de datos no puede ser abierta. Error = ";
>> ERROR.Text
>>
>> END
>>
>> Unfortunately I said:
>>
>> "Can not find driver for database: firebird"
>>
>>
>> When I select the project, choose database, but when using the manager, I
>> did not sample the database.
>> Attached image
>>
>> [image: firebird.png]
>>
>> Anyone managed to connect to firebird?
>>
>> Regards.
>
> --
> 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


[Gambas-user] Gambas Scripting Language - Some Questions

2009-05-15 Thread Sergio A. Hernandez
Hello all,
I have some questions about the scripting language. I need a little help.
Question
1- The gbs2 scripter only have access to the gb. internal native class?
2- How can I use other components as the gb.XML?
3- Why my scripts dont run directly even when I am including the first
line #!/usr/bin/env gbs2?
4- How can I pass arguments to the script?

Thanks in advance, and have a nice weekend.

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


Re: [Gambas-user] Conect to Firebird

2009-05-15 Thread Sergio A. Hernandez
Try with the ODBC driver.

On Fri, May 15, 2009 at 4:56 PM, cristian abarzua  wrote:
> Hello
>
> I tried to connect to the firebird server on my computer with the following
> instructions:
>
> PUBLIC SUB Button1_Click()
>
>  DIM $hConn AS NEW Connection
>
>  WITH $hConn
>    .Type = "firebird"
>    .Host = "localhost"
>    .Login = "SYSDBA"
>    .Password = "x"
>    .Name = "employee.fdb"
>  END WITH
>
> TRY $hConn.Open
> IF ERROR THEN PRINT "La base de datos no puede ser abierta. Error = ";
> ERROR.Text
>
> END
>
> Unfortunately I said:
>
> "Can not find driver for database: firebird"
>
>
> When I select the project, choose database, but when using the manager, I
> did not sample the database.
> Attached image
>
> [image: firebird.png]
>
> Anyone managed to connect to firebird?
>
> Regards.
>
> --
> 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


Re: [Gambas-user] Using Driver for Firebird

2009-05-14 Thread Sergio A. Hernandez
Use the generic driver ODBC to interact with Firebird or any other
Database that supports this standard like MS SQL Server or Firebird in
this case.

On Thu, May 14, 2009 at 10:14 AM, cristian abarzua  wrote:
> Hello.
>
> Does anyone know how to connect to Firebird using the driver that comes with
> Gambas?.
>
> Thank you
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> 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


Re: [Gambas-user] Re port for Gambas

2009-05-12 Thread Sergio A. Hernandez
Kido,
Other nice option is to use the XSLT component.
At the beginning I was thinking in some fancy PInvoke over Kugar, but
after the email from Marc I realize that we need to keep it in the
scope of the simplest solution.
The best thing to do is to convert the mysql output to xml, then
transform to xslt without leaving Gambas. By doing this, you reduce
the need of other dependency, and can modify easily the way the report
looks using some fance css.
I apologize for pointed you guys in the wrong direction.


PS. Recently, I recommend to Ricky (the Doctor) to create directly the
HTML file from some parsed data because at that time I was using to
write some XML example for the Gambas book I'm writing. Honestly, I
must admit that I was not analyzing the issue correctly just because I
wanted to 'kill two birds with one stone'.

On Tue, May 12, 2009 at 6:29 AM, Marc Miralles  wrote:
> yes Sergio, it works perfectly on gambas. I Think at this moment is a
> good solution for make reports in gambas
>
> I test this in gambas 2.12
>
> Here the code in gambas, it's very easy:
>
> PUBLIC FUNCTION kugar
>    DIM flname AS String
>    DIM hfile AS file
>
>    flname = User.home & "/gambas//projectname//reports/test.kdf"
>    IF Exist(flname) THEN KILL flname
>      OPEN flname FOR WRITE CREATE AS #hFile
>        'Make Kugar file data in XML
>        PRINT #hfile, ""
>        PRINT #hfile, ""
>        PRINT #hfile, "        PRINT #hfile, "    "
>        PRINT #hfile, "            PRINT #hfile, "        Template CDATA #REQUIRED>"
>        PRINT #hfile, ""
>        PRINT #hfile, "    "
>        PRINT #hfile, "            PRINT #hfile, "        level CDATA #REQUIRED"
>        PRINT #hfile, "        title CDATA #REQUIRED"
>        PRINT #hfile, "        version CDATA #REQUIRED"
>        PRINT #hfile, "        platform CDATA #REQUIRED"
>        PRINT #hfile, "        copies CDATA #REQUIRED>"
>        PRINT #hfile, "]>"
>        PRINT #hfile, ""
>          ' here you can replace next lines for a  "for each in" and
> replace fields with mysq result and add some rows
>        PRINT #hfile, ""
>        PRINT #hfile, "     platform= 'x86' copies= '1'/>"
>        PRINT #hfile, "     version= '2.2' platform= 'x86' copies= '3'/>"
>        PRINT #hfile, ""
>      CLOSE #hFile
>    Message.Info("File Created", "OK")
>    SHELL "kugar " & flname
> END
>
>
>
> En/na Sergio A. Hernandez ha escrit:
>> Marc,
>> I get confused, I made work Kugar work under C++ QT, but I'm not quite
>> sure I can on Gambas.
>> The best way with Gambas is, just like you said, create a HTML
>> customized report. But is a time consuming project that probably Kido
>> is not going to use anymore.
>> If you can make work Kugar under gambas please let us know.
>>
>> On Fri, May 8, 2009 at 7:36 AM, Marc Miralles  wrote:
>>
>>> Dear Kido Zu
>>>
>>> I think this sample and guide  in docs.kde is good for you. In this
>>> moment I haven't a sample in gambas but I think it's a good info for
>>> beginning.
>>>
>>> http://docs.kde.org/kde3/en/koffice/kugar/tutorial.html ( for  make
>>> template)
>>> http://docs.kde.org/kde3/en/koffice/kugar/tut-2.html (about how to make
>>> a data file with SQL result)
>>> http://docs.kde.org/kde3/en/koffice/kugar/tut-3.html (how to run report
>>> in any language)
>>>
>>> This night I can test Kugar in gambas I think is similar to make report
>>> in HTML, You can create a  XML data file  with required format and run
>>> it in gambas with  Kugar.
>>>
>>> I think its easy.
>>>
>>> If this night I have time to do it and if I have exit I send sample to
>>> your mail.
>>>
>>>
>>>
>>> En/na Kido Zu ha escrit:
>>>
>>>> thanks Marc..
>>>>
>>>> can you show me or give me an example how to create Kugar report for
>>>> Gambas...with a simple way?:confused:
>>>>
>>>>
>>>>
>>>> Marc Miralles wrote:
>>>>
>>>>
>>>>> Hi Kido zu
>>>>>
>>>>> I test Kugar in gnome, now, in Ubuntu 9.04 and it work fine.
>>>>>
>>>>>
>>>>>
>>>>> En/na Kido zu ha escrit:
>>>>>
>

Re: [Gambas-user] Testing Sites

2009-05-12 Thread Sergio A. Hernandez
This is an interesting proposal : A repository-like site of Gambas Projects.
Sound nice.
Probably, you can register a sourceforge project or even in a personal blog.
I'm sure that some other programmers may be willing to help others and
their selves by testing others software.



On Mon, May 11, 2009 at 8:10 PM, Steven James Drinnan  wrote:
> Just a thought, there now seems to quite a few programmers here doing
> projects in one form or another. Witch is fantastic. Is there a site for
> us to download and test each others projects?
>
> I.E my thoughts would be
>
> Download binaries for for project pre-complied.
> To test for
>        1.ease of installation.
>        2. Ease of use.
>        3. Documentation usefulness.
>        4. Program functionality. (I.E works as expected. Thought is should
> have something. etc.)
>        5. Crash/security testing. I.E through rubbish at it and see what
> happens.
>
> The main goal would be to get our software ready for deployment and
> would provide and environment where we can get our projects faster to a
> stable point.
>
> If there is already this somewhere please tell.
>
> Any thoughts?
>
>
>
>
>
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Re port for Gambas

2009-05-08 Thread Sergio A. Hernandez
Marc,
I get confused, I made work Kugar work under C++ QT, but I'm not quite
sure I can on Gambas.
The best way with Gambas is, just like you said, create a HTML
customized report. But is a time consuming project that probably Kido
is not going to use anymore.
If you can make work Kugar under gambas please let us know.

On Fri, May 8, 2009 at 7:36 AM, Marc Miralles  wrote:
> Dear Kido Zu
>
> I think this sample and guide  in docs.kde is good for you. In this
> moment I haven't a sample in gambas but I think it's a good info for
> beginning.
>
> http://docs.kde.org/kde3/en/koffice/kugar/tutorial.html ( for  make
> template)
> http://docs.kde.org/kde3/en/koffice/kugar/tut-2.html (about how to make
> a data file with SQL result)
> http://docs.kde.org/kde3/en/koffice/kugar/tut-3.html (how to run report
> in any language)
>
> This night I can test Kugar in gambas I think is similar to make report
> in HTML, You can create a  XML data file  with required format and run
> it in gambas with  Kugar.
>
> I think its easy.
>
> If this night I have time to do it and if I have exit I send sample to
> your mail.
>
>
>
> En/na Kido Zu ha escrit:
>> thanks Marc..
>>
>> can you show me or give me an example how to create Kugar report for
>> Gambas...with a simple way?:confused:
>>
>>
>>
>> Marc Miralles wrote:
>>
>>> Hi Kido zu
>>>
>>> I test Kugar in gnome, now, in Ubuntu 9.04 and it work fine.
>>>
>>>
>>>
>>> En/na Kido zu ha escrit:
>>>
 Hi...

 what's the best report for Gambas?
 i'm using ubuntu and MySQL.
 can Kugar run on Gnome?

 thanks...





 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production scanning environment may not be a perfect world - but thanks
 to
 Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
 i700
 Series Scanner you'll get full speed at 300 dpi even with all image
 processing features enabled. http://p.sf.net/sfu/kodak-com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



>>> --
>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>>> production scanning environment may not be a perfect world - but thanks to
>>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>>> i700
>>> Series Scanner you'll get full speed at 300 dpi even with all image
>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> ___
>>> Gambas-user mailing list
>>> Gambas-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>>>
>>>
>>
>>
>
>
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Hello all!!! How i can make my program to under...

2009-05-08 Thread Sergio A. Hernandez
I'm trying to imagine all possible scenarios, and the best way Gambas
can guess when you finish to enter data is the LostFocus event.
The keypress event is not the best option for your want to do.

Or probably instead to change the value on the TextBox probably you
may want to change a variable on the lost focus event or some warning
message if the value entered is not a valid value.

I run out of ideas about your issue.

Try the following in order you to understand what event can help you better.

PUBLIC SUB TextBox1_Change()
  PRINT "Change"
END

PUBLIC SUB TextBox1_Leave()
   PRINT "Leave"
END

PUBLIC SUB TextBox1_LostFocus()
  PRINT "Lost Focus"
END

PUBLIC SUB TextBox1_KeyPress()
PRINT "KEY PRESS"
END



On Thu, May 7, 2009 at 9:50 PM, Sergio A. Hernandez  wrote:
> Probably the issue here is the event in which your code is.
> When Gambas recognize the 'c' it changes .text to 1, that is why you
> are getting the "1l",
> What is the event you are using to perform the textbox validation?
>
> Try to change your validation code to the LostFocus() event.
> Probably will work better.
>
> On Thu, May 7, 2009 at 11:18 AM, vlahonick vlahonick
>  wrote:
>>
>> Hello all!!!
>>
>> How i can make my program to understand when i write "c" is different from 
>> "cl" ?
>>
>> EXAMPLE
>>
>> if textbox1.text="c" then
>> textbox1.text="1"
>> else
>> if textbox1.text="cl" then
>> textbox1.text="2"
>> end if
>> end if
>>
>> The problem is that when i am trying to write "cl" the result i get is
>> "1l" and this because the program doesnt understand that i want to
>> the result "1" ONLY if i write "c" and the result "2" when i write both 
>> letters.
>>
>> I tried to fixed it with the Len argument but i didnt make it.
>>
>> Any ideas how i can do that with the select case or somehow?
>>
>> Of course it will be fixed easy if instead of "cl" i put "Cl" but
>> in the program i want to create this is not an option because
>> i will use more elements starting with the "c" latter and i cant
>> obligate the user to have many instructions how to use the
>> program.For example to say to the user if u want a correct
>> result wirte c but if u want to write cl write Cl or if u want to
>> write cs write sc.
>>
>> Thanks u all in advance!!! :D
>> Please for ANY IDEAS contact me at tsopanotr...@hotmail.com :D
>>
>> regards vlahonick
>>
>> _
>> More than messages–check out the rest of the Windows Live™.
>> http://www.microsoft.com/windows/windowslive/
>> --
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Hello all!!! How i can make my program to under...

2009-05-07 Thread Sergio A. Hernandez
Probably the issue here is the event in which your code is.
When Gambas recognize the 'c' it changes .text to 1, that is why you
are getting the "1l",
What is the event you are using to perform the textbox validation?

Try to change your validation code to the LostFocus() event.
Probably will work better.

On Thu, May 7, 2009 at 11:18 AM, vlahonick vlahonick
 wrote:
>
> Hello all!!!
>
> How i can make my program to understand when i write "c" is different from 
> "cl" ?
>
> EXAMPLE
>
> if textbox1.text="c" then
> textbox1.text="1"
> else
> if textbox1.text="cl" then
> textbox1.text="2"
> end if
> end if
>
> The problem is that when i am trying to write "cl" the result i get is
> "1l" and this because the program doesnt understand that i want to
> the result "1" ONLY if i write "c" and the result "2" when i write both 
> letters.
>
> I tried to fixed it with the Len argument but i didnt make it.
>
> Any ideas how i can do that with the select case or somehow?
>
> Of course it will be fixed easy if instead of "cl" i put "Cl" but
> in the program i want to create this is not an option because
> i will use more elements starting with the "c" latter and i cant
> obligate the user to have many instructions how to use the
> program.For example to say to the user if u want a correct
> result wirte c but if u want to write cl write Cl or if u want to
> write cs write sc.
>
> Thanks u all in advance!!! :D
> Please for ANY IDEAS contact me at tsopanotr...@hotmail.com :D
>
> regards vlahonick
>
> _
> More than messages–check out the rest of the Windows Live™.
> http://www.microsoft.com/windows/windowslive/
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to create xml from table view?

2009-05-07 Thread Sergio A. Hernandez
I just wrote this example for a different subject.
All you need to do is to encapsule the  related lines in a
external loop for each row,
then you need to include the  lines in a internal loop for each column.

Obviously, you can rename the 

Re: [Gambas-user] help with some simple parsing

2009-05-06 Thread Sergio A. Hernandez
Opps i uploaded the wrong file.
Sorry.


On Wed, May 6, 2009 at 9:50 PM, Sergio A. Hernandez  wrote:
> Try the following. It is a complete different approach using the XML Writer.
> Try it as a console project, just make sure you the gb.xml is selected under
> PROJECT\PROPERTIES\COMPONENTS
>
> ' Gambas module file
> PUBLIC SUB Main()
>  DIM docXML AS XmlWriter
>
>  docXML = NEW XmlWriter
>  'this line is to save the xml document in your home folder
>  docXML.Open(User.Home & "/DoctorRicky.html", TRUE)
>
>  'This part is the fancy CSS styling only is not important
>  docXML.StartElement("style", ["type", "text/css"])
>    docXML.Text("table.fancyTable {padding: 2pt; widht:100%;}")
>    docXML.Text("th {font-weight: bold; background-color: #99;
> color: #00}")
>    docXML.Text("tr.evenRow {background-color: #f5f5dc; text-align: center}")
>    docXML.Text("tr.oddRow {background-color: #ff; text-align: center}")
>  docXML.EndElement
>
>  docXML.StartElement("table", ["class", "fancyTable"])
>   ' is the HTML tab for the headers
>   docXML.Element("th", "Test")
>   docXML.Element("th", "Date 1")
>   docXML.Element("th", "Date 2")
>   docXML.Element("th", "Date 3")
>   ' is the tag for the rows
>   docXML.StartElement("tr", ["class", "oddRow"])
>     ' is the tag for the colums
>     ' number of  elements must be the same as the number of  /> elements
>     docXML.Element("td", "LDL Fraction")
>     docXML.Element("td", "50 ml/dl")
>     docXML.Element("td", "100 ml/dl")
>     docXML.Element("td", "150 ml/dl")
>   docXML.EndElement()
>
>   'On the real life you'll prefer to handle this with a Loop Control Structure
>   docXML.StartElement("tr", ["class", "evenRow"])
>     docXML.Element("td", "HDL Fraction")
>     docXML.Element("td", "50 ml/dl")
>     docXML.Element("td", "75 ml/dl")
>     docXML.Element("td", "100 ml/dl")
>   docXML.EndElement()
>  docXML.EndElement()
>  'PRINT Xml.EndDocument
> END
>
> On Wed, May 6, 2009 at 7:01 AM, richard terry  wrote:
>> See the attached file for the data. Unfortunately I'm brain dead when it 
>> comes
>> to simple logic.
>>
>> In one of my hl7 messages in the Free Text segment under an actual pathology
>> result, there is a list of sequential bood test results representing previous
>> results of the same type - , separated by tabs which I need to display
>> properly. as I've re-constructed the result as html, the tabs simply
>> disappear in the result, so I've been looking for a solution, and to start I
>> thought maybe I could split this up into lines and then later put it into a
>> table embedded in the html to keep it aligned.
>>
>> Perhaps there is a simple way out, but this is what I've done so far.
>>
>>
>> So I started with this:
>>
>> 1) Split this into lines
>>
>> Dim bits as string[]
>> dim a_line as string
>>
>> bits = split(the_text_in_the_file,","", TRUE)
>>
>> for each a_line in bits
>>        print a_line
>> next
>>
>> Problem with this is that the \t (I presume tab character) gets in the way,
>> and it dosn't split properly with the results of the bits[] as shown in the
>> picture. Interestingly an occasional letter is lost off the test names.
>>
>> Any help appreciated.
>>
>> richard
>>
>>
>>
>>
>> --
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] help with some simple parsing

2009-05-06 Thread Sergio A. Hernandez
Try the following. It is a complete different approach using the XML Writer.
Try it as a console project, just make sure you the gb.xml is selected under
PROJECT\PROPERTIES\COMPONENTS

' Gambas module file
PUBLIC SUB Main()
 DIM docXML AS XmlWriter

 docXML = NEW XmlWriter
 'this line is to save the xml document in your home folder
 docXML.Open(User.Home & "/DoctorRicky.html", TRUE)

 'This part is the fancy CSS styling only is not important
 docXML.StartElement("style", ["type", "text/css"])
docXML.Text("table.fancyTable {padding: 2pt; widht:100%;}")
docXML.Text("th {font-weight: bold; background-color: #99;
color: #00}")
docXML.Text("tr.evenRow {background-color: #f5f5dc; text-align: center}")
docXML.Text("tr.oddRow {background-color: #ff; text-align: center}")
 docXML.EndElement

 docXML.StartElement("table", ["class", "fancyTable"])
   ' is the HTML tab for the headers
   docXML.Element("th", "Test")
   docXML.Element("th", "Date 1")
   docXML.Element("th", "Date 2")
   docXML.Element("th", "Date 3")
   ' is the tag for the rows
   docXML.StartElement("tr", ["class", "oddRow"])
 ' is the tag for the colums
 ' number of  elements must be the same as the number of  elements
 docXML.Element("td", "LDL Fraction")
 docXML.Element("td", "50 ml/dl")
 docXML.Element("td", "100 ml/dl")
 docXML.Element("td", "150 ml/dl")
   docXML.EndElement()

   'On the real life you'll prefer to handle this with a Loop Control Structure
   docXML.StartElement("tr", ["class", "evenRow"])
 docXML.Element("td", "HDL Fraction")
 docXML.Element("td", "50 ml/dl")
 docXML.Element("td", "75 ml/dl")
 docXML.Element("td", "100 ml/dl")
   docXML.EndElement()
 docXML.EndElement()
 'PRINT Xml.EndDocument
END

On Wed, May 6, 2009 at 7:01 AM, richard terry  wrote:
> See the attached file for the data. Unfortunately I'm brain dead when it comes
> to simple logic.
>
> In one of my hl7 messages in the Free Text segment under an actual pathology
> result, there is a list of sequential bood test results representing previous
> results of the same type - , separated by tabs which I need to display
> properly. as I've re-constructed the result as html, the tabs simply
> disappear in the result, so I've been looking for a solution, and to start I
> thought maybe I could split this up into lines and then later put it into a
> table embedded in the html to keep it aligned.
>
> Perhaps there is a simple way out, but this is what I've done so far.
>
>
> So I started with this:
>
> 1) Split this into lines
>
> Dim bits as string[]
> dim a_line as string
>
> bits = split(the_text_in_the_file,","", TRUE)
>
> for each a_line in bits
>        print a_line
> next
>
> Problem with this is that the \t (I presume tab character) gets in the way,
> and it dosn't split properly with the results of the bits[] as shown in the
> picture. Interestingly an occasional letter is lost off the test names.
>
> Any help appreciated.
>
> richard
>
>
>
>
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>


MMain.module
Description: Binary data
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] help with some simple parsing

2009-05-06 Thread Sergio A. Hernandez
Richard,

See the attached file and let me know if this is the output you want.
It is a HTML document. My approach is kind of different, probably the
best way to handle this is by using the XML Writer.



On Wed, May 6, 2009 at 8:52 AM, Stephen Bungay  wrote:
>   Hi Richard
>
>    This code snippet will dump the text into a TextArea for you, it
> asumes (a bad thing) that there are no newline characters in the data
> and as such works with your sample. I used a button to launch the
> code... the important bits are in the middle... :)
>
> PUBLIC SUB ButtonGO_Click()
>   DIM hFile AS File
>   DIM LineInput AS String
>   DIM ScrapString AS String
>   DIM SPlitString AS String[]
>
>   hFile = OPEN "/home/bungayst/scrap/sample_tabbed_text" FOR INPUT
>   WHILE NOT Eof(hFile)
>         LINE INPUT #hFile, LineInput
>   WEND
>   CLOSE hFile
>
>   LineInput = Replace$(LineInput, "", "\n")
>   TextArea1.Text = LineInput
>   SplitString = Split(LineInput, "\t")
>
>   FOR EACH ScrapString IN SPlitString
>       PRINT ScrapString
>   NEXT
> END
>
>
> richard terry wrote:
>> See the attached file for the data. Unfortunately I'm brain dead when it 
>> comes
>> to simple logic.
>>
>> In one of my hl7 messages in the Free Text segment under an actual pathology
>> result, there is a list of sequential bood test results representing previous
>> results of the same type - , separated by tabs which I need to display
>> properly. as I've re-constructed the result as html, the tabs simply
>> disappear in the result, so I've been looking for a solution, and to start I
>> thought maybe I could split this up into lines and then later put it into a
>> table embedded in the html to keep it aligned.
>>
>> Perhaps there is a simple way out, but this is what I've done so far.
>>
>>
>> So I started with this:
>>
>> 1) Split this into lines
>>
>> Dim bits as string[]
>> dim a_line as string
>>
>> bits = split(the_text_in_the_file,","", TRUE)
>>
>> for each a_line in bits
>>       print a_line
>> next
>>
>> Problem with this is that the \t (I presume tab character) gets in the way,
>> and it dosn't split properly with the results of the bits[] as shown in the
>> picture. Interestingly an occasional letter is lost off the test names.
>>
>> Any help appreciated.
>>
>> richard
>>
>>
>>
>>
>>
>> 
>>
>>
>> 
>>
>> --
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>
>>
>> 
>>
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] calling gambas server page from html form (post)

2009-05-03 Thread Sergio A. Hernandez
So far I remember you need to register use the following link:
http://gambasdoc.org/help/register

On Sun, May 3, 2009 at 3:40 AM, Joshua Higgins
 wrote:
>>        Print Request["your_name"]
>>
>
> Works fantastic. Just one more question: how would I go about helping to
> write the tutorial on making a cgi web application here
> http://gambasdoc.org/help/tutorial ?
>
> --
> joshua higgins
>>>--
> --
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] calling gambas server page from html form (post)

2009-05-03 Thread Sergio A. Hernandez
Joshua,
I am writing a Getting Started 24 lessons book, and the part that I
did figure out yet is the CGI Web Application lesson. If you are
planning to release your tutorial under the terms of the GNU Free Doc
License and you are interested, you can be co-author for this section
of the book.

http://gambas.sourceforge.net/Getting%20Started%20with%20GAMBAS.odt


On Sun, May 3, 2009 at 3:40 AM, Joshua Higgins
 wrote:
>>        Print Request["your_name"]
>>
>
> Works fantastic. Just one more question: how would I go about helping to
> write the tutorial on making a cgi web application here
> http://gambasdoc.org/help/tutorial ?
>
> --
> joshua higgins
>>>--
> --
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] a Debug question

2009-05-03 Thread Sergio A. Hernandez
Doriano,
>From my experience programming under languages that don't have any
debugger at all like PHP-LAMP, the best thing to do in these cases is
to create a debug subclass with a constructor that fills out all the
data on a large form (however you want, with static or random data).
That way you avoid entry the data and only focus to make sure your
application works the way it supposed to.
Hope this help you.

On Sat, May 2, 2009 at 1:02 AM, Doriano Blengino
 wrote:
> Benoît Minisini ha scritto:
>>> If  one puts in a breakpoint, and is  stepping through the code one line at
>>> a time to check values of variables etc, is there any way or re-setting to
>>> a line in the same subroutine prior to the current line you have stopped
>>> on.
>>>
>>> I've found sometimes I'm trying to find a bug, and I put in multiple break
>>> points so that I can skip from one to another, and then want to check
>>> something in the middle that I've gone past, but have to stop the entire
>>> program and start again.
>>>
>> Alas you cannot go back in time in debuggers yet. I've heard about people
>> thinking about it, but I don't think you will never see it in Gambas!
>>
>>
> This is a serious problem, tough. There are programs which, for one
> reason or another, are a little difficult to debug using the internal
> gambas debugger. For example, think at a data-entry form, with a lot of
> controls, each having validation (perhaps, put on top of a database). If
> you want to debug the final action of the form (the Apply button, may
> be), then you have to fill in all the values. Every time you discover a
> bug, even a stupid one, you must restart the program from the beginning;
> and, may be, that form is nested deep in the program logic - you have to
> step through many menus and dialogs to arrive at the point of interest.
> Other times, you don't have a clear idea of the algorithm you have to
> write, so you try again and again. In these situations, the more you can
> do through the debugger, the more time you save.
>
> There could be some improvements to the debugger:
>
>    - the possibility to assign new values to variables (perhaps not the
> structured, but only the simplest ones)
>    - the possibility to modify the program text and continue debugging
> (perhaps without adding/deleting lines)
>    - the possibility to change the program counter (perhaps with
> constraints)
>    - the possibility to add "debug" code, which is compiled in only
> when a special "debug run" is invoked
>    - conditional breakpoints / break on the "Nth occurence"
>
> ...and may be other which does'nt come to my mind at the moment.
>
> We already discussed a little about this: I know this is somehow hard to
> implement, but having the gambas virtual machine ready in memory should
> help... I mean: if the debugger "knows" how to obtain the value of a
> variable, and how to display it, then perhaps it is possible to
> [relatively] easily assign a new value. Or, the possibility to modify
> the source and continue debugging, seems to me not very hard to do (but
> I could be wrong, of course).
>
> I know that I am biased, because for my work I go deep to the processor
> hardware, and the debugger lets me do nearly everything I want, but you
> could consider whether any improvement could be done to the gambas debugger.
>
> Hope I did'nt annoyed you, they were simply ideas.
>
> Regards,
>
> --
> Doriano Blengino
>
> "Listen twice before you speak.
> This is why we have two ears, but only one mouth."
>
>
> --
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] a Debug question

2009-05-02 Thread Sergio A. Hernandez
My recommendation is you to print the values on the console to track
them at "run-time", I prefer to use this technique more than use the
integrated debugger, since you can follow up the overall outcome
without start/stops. Some people don't like it, but I find it very
useful.

On Fri, May 1, 2009 at 5:20 PM, richard terry  wrote:
> If  one puts in a breakpoint, and is  stepping through the code one line at a
> time to check values of variables etc, is there any way or re-setting to a
> line in the same subroutine prior to the current line you have stopped on.
>
> I've found sometimes I'm trying to find a bug, and I put in multiple break
> points so that I can skip from one to another, and then want to check
> something in the middle that I've gone past, but have to stop the entire
> program and start again.
>
> perhaps I'm using this tool wrongly.
>
> Thanks.
>
> --
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user