Re: [Gambas-user] Gambas-Documentation

2017-06-06 Thread Dimitris Anogiatis
While Google translate and other online transaction tools are not perfect
we could try a few of them to see which combination of such tools makes
more sense for both the English side and the non-English side.

Keep in mind that the way we put words to our thoughts is also affected​ by
different patterns and experiences in all our lives as well as mood and
stress levels at the time of asking for info or documenting a piece of
code. Plus not all words have a direct equivalent in every language. So we
also have to have a balance between specifics and verbosity.

That's my 2 cents worth of wisdom anyways :)

On Jun 6, 2017 10:00 AM, "Benoît Minisini via Gambas-user" <
gambas-user@lists.sourceforge.net> wrote:

Le 06/06/2017 à 17:54, PICCORO McKAY Lenz a écrit :

> hi benoit, there many issues in gb.db specifically in odbc component, i
> wish to be fixed in the next release please, thanks in advance
>
> currently i can to contribute to the documentation how-to's wiki parts but
> i cannot write on both languajes, its very tedious for me write english..
> so if any could translate from spanish will be usefully
>
>
I don't speak spanish, and your english is often unreadable, so we need
some help...

-- 
Benoît Minisini



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas-user Digest, Vol 132, Issue 29

2017-05-23 Thread Dimitris Anogiatis
Does the same behavior occur with a wired keyboard (not your wireless
Logitech K330)?

On Tue, May 16, 2017 at 3:48 AM, Glaucio Araujo  wrote:

> Hi, Jussi
>
>
> My Xorg.0.log is in ~/.local/share/xorg/
>
> Log attached.
>
> My Xinput:
>
>
> gda@acer:~$ xinput list
> ⎡ Virtual core pointerid=2[master pointer  (3)]
> ⎜   ↳ Virtual core XTEST pointer  id=4[slave  pointer
> (2)]
> ⎜   ↳ Logitech M215 2nd Gen   id=11[slave  pointer
> (2)]
> ⎜   ↳ Logitech K330   id=10[slave  pointer
> (2)]
> ⎜   ↳ ETPS/2 Elantech Touchpadid=13[slave  pointer
> (2)]
> ⎣ Virtual core keyboard   id=3[master keyboard (2)]
> ↳ Virtual core XTEST keyboard id=5[slave  keyboard
> (3)]
> ↳ Power Buttonid=6[slave  keyboard
> (3)]
> ↳ Video Bus   id=7[slave  keyboard
> (3)]
> ↳ Power Buttonid=8[slave  keyboard
> (3)]
> ↳ Sleep Buttonid=9[slave  keyboard
> (3)]
> ↳ AT Translated Set 2 keyboardid=12[slave  keyboard
> (3)]
> ↳ Acer WMI hotkeysid=14[slave  keyboard
> (3)]
> ↳ Logitech K330   id=15[slave  keyboard
> (3)]
> ↳ HD WebCam   id=16[slave  keyboard
> (3)]
>
>
>
>
>
>
> ---
>
> Gláucio de Araujo
>
> Mail : glaucio.de.ara...@gmail.com
> TIM  : (11) 95900-7801 (WhatsApp / Telegram)
>
>
> Date: Mon, 15 May 2017 23:54:16 +0300
> > From: Jussi Lahtinen 
> > Subject: Re: [Gambas-user] Keyboard locked -- insisting one more time
> > To: ferna...@fcabral.com.br,mailing list for gambas users
> > 
> > Message-ID:
> > 

Re: [Gambas-user] ​ Re: Keyboard locked -- insisting one more time

2017-05-23 Thread Dimitris Anogiatis
Ok.. Gambas3 run as root? Not a good idea. I realize it's a much needed
workaround but not the recommended one. I would go with what Cris suggested.
I've run Gambas3 3.9.2 on a Virtualbox VM of Ubuntu Budgie 17.04 and as a
normal user I've never had problems with the keyboard locking.

Is there something that might be misconfigured on your VM perhaps (I mean
on the Virtualbox settings)?

On Mon, May 15, 2017 at 9:20 AM, Cristiano Guadagnino 
wrote:

> Fernando, did you try setting up a new user on your system and trying to
> run gambas as the new user?
>
> Cris
>
>
>
>   
>
> Sent with Mailtrack
>  referral=crigu...@gmail.com=22>
>
>
> On Mon, May 15, 2017 at 12:53 PM, Fernando Cabral <
> fernandojosecab...@gmail.com> wrote:
>
> > Gláucio
> >
> > I see our systems and environment are quite similar, although not exactly
> > the same. Have you installed something different that might have changed
> > the IDE behavior? If I have, I have not been able to determine what it
> > could be. What I know for sure is that one moment everything was working,
> > next moment it was not anymore. What happened in-between, I can not
> figure
> > out.
> >
> > Now, after running gambas as superuser ("sudo gambas3") I have given up
> the
> > keyboard hypothesis (at least for now). I went back to the hypothesis
> that
> > it has to do with some file or directory permission. Nevertheless, I have
> > not been able to determine which file or directory it could be. As to the
> > project tree, I have opened it up completely (rwxrwxrwx for the
> directories
> > and at least rw-rw-rw- for the files. Even for the hidden ones.  It did
> not
> > help.
> >
> > I have also searched for every single file and directory related to
> gambas.
> > For this I used searches like "locate -i --regex .*gambas.*" and "gbr3"
> and
> > "gbx3", etc. Saved the results to a file and checked file and directory
> > permissions. I could not find and thing unexpected.
> >
> > I have exhausted my bag of tricks so I have resorted to either of two
> ugly
> > workarounds:  running gambas as superuser or doing the edition in a
> virtual
> > machine. In the last option, I just mount the project tree as a directory
> > in the virtual machine. Then I make the changes in the virtual machine
> and
> > test them in the real machine. Cumbersome, but has worked.
> > I would ask you to try running "sudo gambas3". If you can edit your files
> > as superuser, then it will be very likely that we have exactly the same
> > problem.
> >
> > Saudações
> >
> > - fernando
> >
> > 2017-05-14 18:19 GMT-03:00 Glaucio Araujo :
> >
> > > Hi,
> > >
> > > I'm having exactly the same problem here in Xubuntu 17.04 with Gambas
> > 3.9.1
> > > and 3.9.2(PPA).
> > >
> > >
> > > ​My system information:
> > >
> > > [System]
> > > Gambas=3.9.2
> > > OperatingSystem=Linux
> > > Kernel=4.10.0-20-generic
> > > Architecture=x86_64
> > > Distribution=Ubuntu 17.04
> > > Desktop=XFCE
> > > Theme=Gtk
> > > Language=pt_BR.UTF-8
> > > Memory=3829M
> > >
> > > [Libraries]
> > > Cairo=libcairo.so.2.11400.8
> > > Curl=libcurl.so.4.4.0
> > > DBus=libdbus-1.so.3.14.7
> > > GStreamer=libgstreamer-1.0.so.0.1004.0
> > > GTK+2=libgtk-x11-2.0.so.0.2400.31
> > > GTK+3=libgtk-3.so.0.2200.11
> > > OpenGL=libGL.so.1.2.0
> > > Poppler=libpoppler.so.64.0.0
> > > QT4=libQtCore.so.4.8.7
> > > QT5=libQt5Core.so.5.7.1
> > > SDL=libSDL-1.2.so.0.11.4
> > > SQLite=libsqlite3.so.0.8.6
> > >
> > > [Environment]
> > > CLUTTER_BACKEND=x11
> > > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
> > > DEFAULTS_PATH=/usr/share/gconf/xubuntu.default.path
> > > DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
> > > DESKTOP_SESSION=xubuntu
> > > DISPLAY=:0.0
> > > GB_GUI=gb.qt4
> > > GDMSESSION=xubuntu
> > > GLADE_CATALOG_PATH=:
> > > GLADE_MODULE_PATH=:
> > > GLADE_PIXMAP_PATH=:
> > > GTK_MODULES=gail:atk-bridge
> > > GTK_OVERLAY_SCROLLING=0
> > > HOME=
> > > J2REDIR=/usr/lib/jvm/java-8-oracle/jre
> > > J2SDKDIR=/usr/lib/jvm/java-8-oracle
> > > JAVA_HOME=/usr/lib/jvm/java-8-oracle
> > > JOURNAL_STREAM=8:23426
> > > LANG=pt_BR.UTF-8
> > > LANGUAGE=pt_BR:pt:en
> > > LOGNAME=
> > > MANDATORY_PATH=/usr/share/gconf/xubuntu.mandatory.path
> > > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
> > > sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/
> > > lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/
> > > bin:/usr/lib/jvm/java-8-oracle/jre/bin
> > > PWD=
> > > QT_ACCESSIBILITY=1
> > > QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
> > > QT_QPA_PLATFORMTHEME=gtk2
> > > SESSION_MANAGER=local/:@/tmp/.ICE-unix/
> > > 1227,unix/:/tmp/.ICE-unix/1227
> > > SHELL=/bin/bash
> > > SHLVL=0
> > > SSH_AGENT_PID=1209
> > > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
> > > TZ=:/etc/localtime
> > > USER=
> > > USERNAME=
> > > WINDOWPATH=1
> > > XAUTHORITY=/run/user/1000/gdm/Xauthority
> > > 

[Gambas-user] Support for new Packaging systems (Snappy and Flatpak)

2016-06-17 Thread Dimitris Anogiatis
Hey guys,

This is by no means urgent, I'm just asking mainly out of curiosity.

There's been a lot of talk lately about new packaging systems mainly Snappy
(from Canonical - http://snapcraft.io/) and Flatpak (from Red-Hat/Fedora
but I also think they GNOME Foundation is behind them too -
http://flatpak.org/).

New features like application isolation and transactional updates, packaged
dependencies etc etc.

Is there any thought that Gambas will use those packaging systems in future
versions?

Is there any practical reason for getting Gambas and/or Gambas created
software to be packaged
with the new systems, or are we sticking with the already available
solutions?

Chime in everyone

Thanks
Dimitris
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] qt5

2016-06-14 Thread Dimitris Anogiatis
Are the qt4 webkit and qt5 webkit too different that we can't use a symlink
for qt4's webkit to point to qt5's webkit?

That way we could (theoretically) bridge the gap temporarily until qt5
becomes more stable.

Ian, what are your thoughts on that? I mean I know its hacky but could it
possibly work?

Dimitris

On Tue, Jun 14, 2016 at 5:21 AM, Ian Haywood  wrote:

> On Mon, May 2, 2016 at 1:11 AM, Benoît Minisini
>  wrote:
> > Le 01/05/2016 16:01, Charlie a écrit :
> >> Thanks for the reply Benoît. Ubuntu 16.04 has Gambas 3.8.4 which I also
> use
> >> on Linux Mint 17.3 Cinnamon.
> >> Here is the Gambas Farm error I get.
> >> gambas1.png 
> >> Here are the 'System information' details for both operating systems.
> >> mint17.txt 
> >> ubuntu16.txt  >
> >> Note that for future editions the English is 'System information' not
> >> 'System information*s*'.
> >>
> >
> > So I guess that (again) Debian/Ubuntu Gambas packages were made
> > incorrectly...
> I confess I've given up trying to find a 'correct' solution that
> covers all cases.
>
> The problem quite complicated. Gambas looks for Qt4 and Qt5. If both are
> found,
> Qt4 is loaded.
> However, Debian does not have WebKit for Qt4 (it was taken out because
> they couldn't keep it secure, and wanted to concentrate on Qt5-WebKit,
> I believe)
> Consequently, the IDE and many other problems will crash (because they
> load Qt4 but then can't find WebKit).
>
> So, I tried making it a Conflicts: if you try to install the IDE, it
> tries to remove Qt4. which causes more problems as noted above.
>
> The other option is to patch Gambas on Debian so it preferentially
> loads Qt5 (a bit of work). That will get the IDE working, but many
> other programs won't run
> (because Qt5 doesn't quite have the stability of Qt4, at least last
> time I checked)
>
> Sadly, my recommendation to all (our) users has been stick to
> Mint/Ubuntu and the PPAs for now.
>
> Ian
>
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421=/41014381
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] new web page at gambas.sourgeforce.net has "fake" links

2015-12-05 Thread Dimitris Anogiatis
Just as an FYI there's a couple of typos on the title of the email.

It was reported that gambas.sourgeforce.net had fake links
when it should have been gambas.sourceforge.net

The first URL only has a generic landing page (thus the "fake" links)


On Fri, Dec 4, 2015 at 1:00 PM, Benoît Minisini <
gam...@users.sourceforge.net> wrote:

> Le 04/12/2015 20:53, PICCORO McKAY Lenz a écrit :
> > umm the compiled program itself its a cgi ?
> >
> > the gb.web.form its a great  feature!!
> > Lenz McKAY Gerardo (PICCORO)
> > http://qgqlochekone.blogspot.com
> >
>
> Yes.
>
> And when you check the 'gb.httpd' component, it becomes an autonomous
> web server with your project embedded as a CGI script inside. I.e. one
> Gambas program that you just have to run as a global service on your
> server.
>
> This is what is used by the IDE by default when you debug it.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> --
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] annoying glitch

2015-03-07 Thread Dimitris Anogiatis
Hey Gary,

I assume you're using the two for loops to find which item on the source
listbox is selected and then removed after the addition to the second
listbox is done.
Gambas listboxes are a bit more flexible. You can get the index of the
selected item with  lstInCar.Index. If there is no item selected on the
listbox then the index is -1
If the Listbox is empty (ie no more items in it), lstInCar.Index becomes -1
again. To get the text that the current selected item has then you can use
lstInCar.Current.Text

So with this in mind your code can become:

Public Sub btnLeft_Click()
'if the lstInCar is not empty or if an item is selected
  If lstInCar.Index  -1 Then
  'Add the selected item to lstAtHome
  lstAtHome.Add(lstInCar.Current.Text)
  'Remove the item from lstInCar that you just added to lstAtHome
  lstInCar.Remove(lstInCar.Index)
  Endif
End

if you want to do the reverse (send an item back to lstInCar) you will have
to reverse the listboxes.

Depending on what behavior you want to achieve you can add the following
two lines after the EndIf
but BEFORE the End statement (so that the next two lines are within the
Sub):

  lstAtHome.Current.Selected = False
  lstInCar.Current.Selected = False

What these two lines will do is undo the selection from both listboxes just
in case the user decides to select something on both of them.

The code will finally become:

Public Sub btnLeft_Click()
'if the lstInCar is not empty or if an item is selected
  If lstInCar.Index  -1 Then
  'Add the selected item to lstAtHome
  lstAtHome.Add(lstInCar.Current.Text)
  'Remove the item from lstInCar that you just added to lstAtHome
  lstInCar.Remove(lstInCar.Index)
  Endif
  'Deselect items from both listboxes
  lstAtHome.Current.Selected = False
  lstInCar.Current.Selected = False
End

This piece of code works only for a simple list box where you can select
only one item at a time
For listboxes that allow multiple selections at a time the code will be a
bit different (but then we can
work on that a bit later).

I hope this helps you out in understanding Gambas a bit better.
Dimitris


On Sat, Mar 7, 2015 at 10:41 AM, Gary Emms gary.e...@gmail.com wrote:

 Hi
 I'm trying to follow a tutorial from Linux Format. I have 2 list boxes
 and I'm trying to move an entry from one to the other using:

 Public Sub btnLeft_Click()

 Dim i As Integer
'transfer selected itelms to left
For i = 0 To lstInCar.Count - 1
  If lstInCar[i].Selected Then
lstAtHome.Add(lstInCar[i].Text)
  Endif
Next
'clear the entries from the left (backwards)
For i = lstInCar.Count - 1 To 0 Step - 1
  If lstInCar[i].Selected Then
lstInCar.Remove(i)
  Endif
Next
 End

 it works fine except, If, and only if, I select the first item in the
 list after it is deleted the new top item is  automatically selected. Is
 this a bug or am I doing something wrong?
 Cheers
 Gary


 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A couple of questions about building web / cgi applications

2015-02-13 Thread Dimitris Anogiatis
Hey Bruce,
In addition to all the good suggestions everyone is throwing in the
problem, you could use a CouchDB database on a different server and just
connect to it with a normal http connection if you're worried about file
hits on the sd card. Gambas supports JSON and the httpclient component
should work just fine for what you want it to do.

Hope this helps,
Dimitris


On Fri, Feb 13, 2015 at 7:04 PM, Benoît Minisini 
gam...@users.sourceforge.net wrote:

 Le 13/02/2015 21:35, Bruce Cunningham a écrit :
  Caveat,
 
  Thanks for the info.
 
  I'm a little concerned about using a disk based database because
  the disk is flash, which has a limited number of write cycles.  Even
  with wear-leveling, I would eventually kill parts of the flash.  I
  don't want these things dropping dead in the field after a year or
  so...
 
  I was considering something like named pipes, but I'm a little
  unclear about how Linux actually handles them.  I thought I saw a
  mention that they are managed via temporary files within the file
  system, and that would defeat the whole idea of not writing to disk.
 
  I know how to do interprocess communication in Windows, but not in
  Linux with Gambas.
 
  Bruce
 
  Bruce Cunningham bcunning...@sportif.com
 

 You can use a named pipe : you create the node on the disk once (if you
 don't want to ruin the flash). All the data exchange will be done in
 memory by the system.

 Regards,

 --
 Benoît Minisini


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A couple of questions about building web / cgi applications

2015-02-12 Thread Dimitris Anogiatis
Hey Bruce,

Here's an example of a CGI app that I just made. I hope it helps and
doesn't confuse you more. I havent run it on an actual web server yet (just
on the embedded web server that the IDE has) but I guess it won't be hard
to plug it in to either Apache, Lighttpd or Nginx (whichever you want to
use).

If anyone has a better example by all means jump in :)

As for your second question, you might want to consider a database or a 3rd
program that would work as sort of a bridge/proxy between the two programs
(the CGI and the main program). That way even if the web interface gets
ddosed (or flooded due to an overzealous sensor), at least the main program
would be able to control the rest of the system.

Hope this helps
Dimitris


On Thu, Feb 12, 2015 at 3:27 PM, Bruce Cunningham bcunning...@sportif.com
wrote:

 Benoît,

 What I mean by main application is a GUI application that is always
 running, reading sensor data, controlling relays and updating the graphical
 user interface.  It needs to be as close to real-time as I can get.  By CGI
 module, I mean a CGI script that is invoked by web requests coming in to
 the web server, which would be a transient process.  It takes some
 parameters from the web request, reads or updates data from the main
 application, sends back an html response, and then terminates.

 I want them as separate processes so that if someone tries to DDOS the web
 interface, they (hopefully) won't kill the main application that needs to
 control stuff.

 I was hoping someone had an example of a CGI application they would be
 willing to share?

 Bruce

 Bruce Cunningham
 bcunning...@sportif.com


 -Original Message-
 From: Benoît Minisini [mailto:gam...@users.sourceforge.net]
 Sent: Thursday, February 12, 2015 1:59 PM
 To: mailing list for gambas users
 Subject: Re: [Gambas-user] A couple of questions about building web / cgi
 applications

 Le 12/02/2015 19:09, Bruce Cunningham a écrit :
  I'm looking for some advice and maybe some code examples for a project
  I'm starting.  I'm building an embedded device with an ARM based
  System-On-Module (similar to an Rpi, but in an sodimm form factor).
 
  Thanks to some great help from members of this mailing list, I have
  successfully compiled Gambas for the SOM.  The device will have a
  main GUI application that handles the user interface and all of the
  control logic.  However, it will also have a web interface for remote
  access to some of the control settings.
 
  Here are my questions:
 
  1) Does anyone have any code examples for CGI applications in Gambas?
  I know there is an option to use the Gambas interpreter to build
  ASP-like pages, but I would rather the web code be in compiled into a
  CGI module instead (for security reasons).  I've built CGI
  applications in VB6, so I have a fairly good understanding how CGI
  work in general.  I've read the Gambas docs on CGI, but I still don't
  quite understand it.
 
  2) What is the easiest way to exchange data (variables and arrays)
  between the CGI module, and the main application?  Using a file on
  disk is not a great option, since the device will be using flash for
  the file system, and these values will be changing several times a
  second.  That will kill the flash very quickly.
 
  Thanks,
 
  Bruce Cunningham
  bcunning...@sportif.commailto:bcunning...@sportif.com
 

 I don't understand what you don't understand in Gambas and CGI.

 By using the gb.web component, your Gambas project becomes a CGI
 application (or CGI script or whatever you want to call it) :

 - the gb.web component takes the CGI environment variables and present
 them with a nice ASP-like interface.

 - The Request class analyzes the HTTP request for you: it can understand
 GET arguments, POST arguments, handle file uploads for you.

 - The Response class allows you to send a response with its Mime
 datatypes, and other custom HTTP headers.

 I don't understand your story of having a CGI module (what's that?) and
 a main application.

 So, please elaborate.

 --
 Benoît Minisini


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 

Re: [Gambas-user] Quickie on SELECT

2015-02-07 Thread Dimitris Anogiatis
Hey Bruce,

You could try

SELECT CASE EVAL(hSomething.SomeArray.Exists(hSomething.Value))
  CASE True
Print Yes, value exists in hSomething
  CASE False
Print No, value does not exist in hSomething
  CASE Else
END SELECT

Putting CASE EVAL (if it's possible) to make SELECT check against the
results of the Eval Statements, would mean (as I understand it) that the
result of EVAL would need to be within a reasonable range so that it
doesn't raise any exceptions, and the same data type as the hSomething that
you have in your original example.

I hope this helps.

Regards,
Dimitris

On Sat, Feb 7, 2015 at 5:26 PM, adamn...@gmail.com adamn...@gmail.com
wrote:


 Does anyone know if you can use an EVAL in a CASE selector?
 e.g.  SELECT hSomething
 ...
 CASE EVAL(hSomething.SomeArray.Exisits(hSomething.Value))
 ...

 (I am just being too lazy to try it)

 regards
 Bruce
 --
 B Bruen adamn...@gnail.com (sort of)


 --
 Dive into the World of Parallel Programming. The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net/
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Self-Signed SSL certificate in Gambas3 3.5.4 Webview

2015-02-04 Thread Dimitris Anogiatis
Hey guys,

I'm using Gambas3 3.5.4 on Debian Jessie.

I want to login to a web app I'm working on with a self signed SSL
certificate.

I try to load the app on a webview component using a url starting with
https but it doesn't
show me anything, no error messages no nothing.

1) Is there a debug property or method on the webview component?

2) Where do I put the certificate files in order to get the program to
properly create the https
connection?

3) Is there an example on how to load an https page to the webview, just in
case I am doing something wrong?

By the way I've successfully logged in to gmail and watched a couple of
youtube videos so I know that the webview control can handle https
connections, so it must be that I am using a self-signed
certificate on this site.

Thanks in advance
Dimitrios
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Install from Ubuntu repo - several issues

2014-12-12 Thread Dimitris Anogiatis
Dave,

The examples stored are in a folder with different permissions.
You need to save the example you're trying to a different location, ie to
your home directory.

After you do that the example will compile and run properly.

I hope this helps

Dimitris

On Fri, Dec 12, 2014 at 7:22 AM, Willy Raets wi...@earthshipbelgium.be
wrote:

 On vr, 2014-12-12 at 05:54 -0800, LVDave wrote:
  Having used to use MSVisualBasic many moons ago, I wanted to see how
 close
  Gambas was to VB. Since I'm on Ubuntu 14.04, I installed Gambas from the
  Ubuntu repository. Everything installed with no errors, but when I
 attempt
  to open any one of the sample projects, I get a dialog box saying this
  project seems to be already opened, opening the same project twice can
 lead
  to data loss...If I go ahead and reopen the sample, it appears to load
  ok, but then if I try to run it, I get a dialog box saying the program
 has
  returned the value of 1... As I said this occurs with all of the sample
  programs..
 
  What am I doing wrong??

 As far as I know Ubuntu 14.04 official repository has a very outdated
 Gambas 3.1.1.

 Since Gambas 3.1.1, many bugs have been fixed and the latest stable
 version is Gambas 3.6.2

 I suggest you first remove the current install (if it is Gambas 3.1.1)
 and next install the most recent stable Gambas 3.6.2 from the
 Gambas-team PPA.

 The instructions to install latest stable from binaries (PPA) are in the
 Gambas wiki:
 http://gambaswiki.org/wiki/install/ubuntu#t2

 If after all this you still have problems with the examples just let us
 know.


 --
 Kind regards,

 Willy (aka gbWilly)

 http://gambasshowcase.org/
 http://howtogambas.org
 http://gambos.org






 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE

 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problems installing Gambas 3.5.4

2014-11-05 Thread Dimitris Anogiatis
Hey Simon,

Re: Issue 2, I've found that if you load an example and save it to another
location you won't have to fiddle with permissions. That way you also keep
the original examples just in case you want to revisit them.

Hope this helps

On Wed, Nov 5, 2014 at 1:59 AM, ep...@skellner.de ep...@skellner.de wrote:

 Hello Gambas users

 Problems installing Gambas 3.5.4 for wheezy in site:
 http://gambas.sourceforge.net/de/main.html

 Hardware: Bananian Pi
 OS: Raspian

 --
 Issue 1:
 sudo apt-get install gambas3 fails with error.
 Package: gambas3-gb-jit needs Package: libllvm3.4

 So change it in file /etc/apt/preferences

 Package: libllvm3.3   - libllvm3.4
 Pin: release n=jessie
 Pin-Priority: 1050

 After that is done install runs successfully.

 --
 Issue 2:
 Cant't compile any example because all files are not writeable for user:
 bananapi (Default user)

 So go to /usr/share as root and type in the following command:
 chmod -R o+w gambas3

 After that examples can be compiled and they runs successfully.

 --
 Question: How to upgrade from Gambas 3.5.4 to Gambas 3.6.1. without
 compiling the sources.?
 (This doesn't work on my Bananian Pi. See my last Email.)
 I also tried to compile Gambas 3.5.4 from svn. Here ./configure -C runs
 successful, but make fails with missing a PDF-file.

 Best regards
 SIMON KELLNER


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

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


Re: [Gambas-user] Installation package(s)

2014-09-22 Thread Dimitris Anogiatis
I think that those 13 files are mostly all that's needed to put your
program into a repository including the source code.
If you just want to get the binary into your target system or on a website
without going through a repository...
then you only need one.

On Mon, Sep 22, 2014 at 9:57 AM, Charlie char...@cogier.com wrote:

 I want to create an installation package but when I try I now get 13 files
 created, what are they all for and is there a way to get just one or am I
 missing something? Thanks.



 --
 View this message in context:
 http://gambas.8142.n7.nabble.com/Installation-package-s-tp48444.html
 Sent from the gambas-user mailing list archive at Nabble.com.


 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer

 http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

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


Re: [Gambas-user] Building /trunk, deprecated documentation

2014-09-18 Thread Dimitris Anogiatis
/me scratches head... Ubuntu 12.04LTS with metacity and gnome2? I thought
Ubuntu switched to Unity a LOOONG time ago or am I missing something here?

On Thu, Sep 18, 2014 at 3:51 AM, John Leake jle...@socit.co.uk wrote:

  Some of the symptoms
  
 
  (1) System wide keyboard short cuts all fucked up.
  (2) No Window decoration.
  (3) Window layering, focus, bring to top - knackered.
  (4) Default position on window launch not what it used to be.
  (5) Thunderbird text menus not working.
  (6) Firefox text menus not working
  (7) Right Click context menus not working
  (8) Desktop Panels not on top
 
  What I have tried without success
  -
  sudo apt-get purge gambas
  sudo apt-get autoremove
  BackBox restore desktop
  Lots of reboots because the windows eventually fill the whole screen and
  the top one is the last program launched.
  Removing all the gambas repos and updating and rebooting
  rm -rf .gnome .gnome2 .gconf .gconfd .metacity
 
 
  Some of my ideas
  
  Fucked up (sorry incompatible) graphics libraries.
 
 What seemed to help
 ---
 sudo apt-get install metacity - this gave be back window focus and bring
 to top as well as window decoration (although ugly/basic) and context
 menus, keyboard short cuts, and working firefox/thunderbird text menus.

 Can anyone explain what might have happened ?




 --
 Want excitement?
 Manually upgrade your production database.
 When you want reliability, choose Perforce
 Perforce version control. Predictably reliable.

 http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

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


Re: [Gambas-user] Issue 548 in gambas: complete code of htttp post example

2014-08-12 Thread Dimitris Anogiatis
I'm not sure there is a need for a re-write. Just some comments to explain
what the code does.

For example on the button_click event you send the parameters for the
webservice POST and the
actual message you are sending  is contained in the sCad string and the
message target is set in
the URL property (ie P.URL=http://myserver/myphpscript.php).

Now if you want to make a normal POST call to a web form you need to change
the message sent in sCad; if for example you have 2 fields name and email
the message becomes:

sCad=name=test1email=te...@test.com.

You also need to change the Post message so that the first parameter
changes from text/xml to
application/x-www-form-urlencoded

Depending on the site you might or might not get a reply back from the
server  to the POST
if you do then you need to look at the code in the P_Finished event. The
second IF block is specific
to the Web service data so comment it out but the rest is all you need.

I hope this helps (and doesn't confuse you more).


On Tue, Aug 12, 2014 at 1:09 PM, gam...@googlecode.com wrote:


 Comment #6 on issue 548 by mckayger...@gmail.com: complete code of htttp
 post example
 http://code.google.com/p/gambas/issues/detail?id=548

 the bug its about http POST not about webservices

 if u read said complete code of http post example and i said confuses
 novice developers due the actual http post example mixed two things:
 http-post and xmlrcp!

 well u make much more noise..! Caveat make good response due explaime what
 its no relevant and made example caller, that iluminate me the confusion,
 due i'm not expert on CGI (and i really hate it) and neither webservice
 things

 now i try to made examples run more easyle in gambas without need many
 customizations, but seems are very hard due i'm have a older machine
 (lenny) with gambas 3.4 only, THAT's why i asked about the wont fix

 --
 You received this message because this project is configured to send all
 issue notifications to this address.
 You may adjust your notification preferences at:
 https://code.google.com/hosting/settings


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

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


[Gambas-user] How can I detect left or right click on TrayIcon

2014-01-21 Thread Dimitris Anogiatis
Hey guys,

I'm using Gambas 3.5.1 on Debian jessie (Gnome 3.8.4) and I was wondering
how can one
detect a left or right click on the TrayIcon control.

What do I need to do that? Can anyone give me some pointers?

Thanks in Advance

Sincerely
Dimitris
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How can I detect left or right click on TrayIcon

2014-01-21 Thread Dimitris Anogiatis
Hey Benoît,

Thanks for the tip. I was able to use the MouseDown event on the Trayicon
object to popup different menus on left and right click which is what I
really wanted.

You guys ROCK :)

Keep up the great work :)

Dimitris


On Tue, Jan 21, 2014 at 7:23 PM, Benoît Minisini 
gam...@users.sourceforge.net wrote:

 Le 21/01/2014 12:44, Dimitris Anogiatis a écrit :
  Hey guys,
 
  I'm using Gambas 3.5.1 on Debian jessie (Gnome 3.8.4) and I was wondering
  how can one
  detect a left or right click on the TrayIcon control.
 
  What do I need to do that? Can anyone give me some pointers?
 
  Thanks in Advance
 
  Sincerely
  Dimitris

 The TrayIcon object raises mouse events.

 --
 Benoît Minisini


 --
 CenturyLink Cloud: The Leader in Enterprise Cloud Services.
 Learn Why More Businesses Are Choosing CenturyLink Cloud For
 Critical Workloads, Development Environments  Everything In Between.
 Get a Quote or Start a Free Trial Today.

 http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Key code constant wrong?

2013-11-10 Thread Dimitris Anogiatis
Perhaps its a remnand from the typewriter days...where the separation
between line feed and carriage return was more visible due to its
mechanical nature.



On Sun, Nov 10, 2013 at 2:10 AM, Benoît Minisini 
gam...@users.sourceforge.net wrote:

 Le 10/11/2013 06:05, Alain Baudrez a écrit :
 
  Why is Enter printed on that key on my laptop ??
 
  I would never have guessed to refer to Key.Return instead of key.Enter.
 
  Alain

 Good question: both are named Enter (in french) on my keyboard too,
 but they have always been two different keys internally.

 You must assume that two physicals different keys should always have
 different Key.Code values (even if this is not always the case!).

 --
 Benoît Minisini


 --
 November Webinars for C, C++, Fortran Developers
 Accelerate application performance with scalable programming models.
 Explore
 techniques for threading, error checking, porting, and tuning. Get the most
 from the latest Intel processors and coprocessors. See abstracts and
 register
 http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Obtain my IP with Gambas

2013-10-29 Thread Dimitris Anogiatis
you don't need a root account or root priviledges to get the IP address:
just do a

Shell ip -4 addr show eth0 | grep inet TO ipaddr

and just parse the IP from that line.
Note that eth0 is the name of your network interface.

Hope this helps to simplify things in your code.

Dimitris



On Mon, Oct 28, 2013 at 11:41 AM, PICCORO McKAY Lenz mckaygerh...@gmail.com
 wrote:

 From: Jussi Lahtinen jussi.lahti...@gmail.com
  Hard to say without knowing what FAuth does.
  Can you make little runnable project to demonstrate your problem?
 not necesary, the code explint itseft..
 but thanks was my fault, i declared the result of shell as integer,
 event string...
 that's why skip dialog, ;-)


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas self-extracting installer (3)

2013-10-26 Thread Dimitris Anogiatis
Hey Benoit,

When I try the self extracting executable on my laptop it gives me the
following error message:

Verifying archive integrity... All good.
Uncompressing Gambas installer test.
STARTDIR=/tmp/selfgz25001
Unsupported architecture: i686

Distribution: Debian Wheezy (7.2)
Architecture: x86
GUI component: GTK+
Desktop used: MATE 1.6.0

uname -a gives me the following results:
Linux LapDOS3 3.10-0.bpo.3-686-pae #1 SMP Debian 3.10.11-1~bpo70+1
(2013-09-24) i686 GNU/Linux

What might I be doing wrong?
Dimitris


On Sat, Oct 26, 2013 at 4:43 PM, Benoît Minisini 
gam...@users.sourceforge.net wrote:

 Le 27/10/2013 00:42, Benoît Minisini a écrit :
  Le 26/10/2013 23:50, Kende Krisztián a écrit :
  I just have another idea:
 
  To make a GUI self-extracting installer, I have put in the
  self-extracting archive all the Qt4 shared libraries, all Qt4 gui
  components and the related components.
 
  Yeah, this is a fully portable installer. But why just the installer?
  Ubuntu Click packages are fully portable. :-)
 
 
  What's that?
 

 Mmm, seems to be an Ubuntu specific thing. Not useful at all...

 --
 Benoît Minisini


 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.report without a database connection

2013-09-13 Thread Dimitris Anogiatis
Thanks for your quick reply Fabien,

I also saw the report example and noticed that Report2 is covering that
case.




On Thu, Sep 12, 2013 at 2:47 PM, Fabien Bodard gambas...@gmail.com wrote:

 yes


 2013/9/12 Dimitris Anogiatis dos...@gmail.com

  Hey guys,
 
  Is it possible to use the gb.report component without a database
  connection?
 
  What I'm basically asking is if the report component can take data from
 an
  array (or from multiple arrays).
 
  Thanks in advance
  Dimitris
 
 
 --
  How ServiceNow helps IT people transform IT departments:
  1. Consolidate legacy IT systems to a single system of record for IT
  2. Standardize and globalize service processes across IT
  3. Implement zero-touch automation to replace manual, redundant tasks
 
 http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 



 --
 Fabien Bodard

 --
 How ServiceNow helps IT people transform IT departments:
 1. Consolidate legacy IT systems to a single system of record for IT
 2. Standardize and globalize service processes across IT
 3. Implement zero-touch automation to replace manual, redundant tasks
 http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gb.report without a database connection

2013-09-11 Thread Dimitris Anogiatis
Hey guys,

Is it possible to use the gb.report component without a database connection?

What I'm basically asking is if the report component can take data from an
array (or from multiple arrays).

Thanks in advance
Dimitris
--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Controls with colorated background

2013-05-16 Thread Dimitris Anogiatis
Antonio,
It could be the theme you're using. Change themes and see if you still get
the same behaviour.
If the colour on the control changes regardless of the theme you might have
to specify a white
background on the gridview

Regards,
Dimitris


On Thu, May 16, 2013 at 6:14 AM, Antonio Sánchez introli...@gmail.comwrote:

 I don't understand what you mean. Background white is ok (any color
 selected in properties), so 3.3.4 version is good. If I upgrade to 3.4.1, I
 get bad blur orange background (in the same case, any color selected for
 background).


 2013/5/16 Benoît Minisini gam...@users.sourceforge.net

  Le 16/05/2013 10:48, Antonio Sánchez a écrit :
   More datas. There is a mistake in my past message. I found a PC with
  gambas
   3.3.4 where background was white.
  
   Look at the attachment.
  
  
   2013/5/15 Antonio Sánchez introli...@gmail.com
  
  
   I have just register to the mailing list because I was looking for
   information about this problem. I don't know if it's exactly the same
   problem that has geaplane, we have this color problem since 3.2
 version
   and ONLY with the gridview.
  
   I attach some screenshots.
  
  
   Debian Wheezy/Sid with 3.4.1 gambas version.
  
 
 
  Since Gambas 3.3.0, a GridView highlights a column when it is sorted.
 
  Since Gambas 3.4.0, the column is not highlighted if it is the only one
  column in the GridView.
 
  So you have to upgrage to Gambas = 3.4.0 to get the fix.
 
  Regards,
 
  --
  Benoît Minisini
 
 
 
 --
  AlienVault Unified Security Management (USM) platform delivers complete
  security visibility with the essential security capabilities. Easily and
  efficiently configure, manage, and operate all of your security controls
  from a single console and one unified framework. Download a free trial.
  http://p.sf.net/sfu/alienvault_d2d
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 

 --
 AlienVault Unified Security Management (USM) platform delivers complete
 security visibility with the essential security capabilities. Easily and
 efficiently configure, manage, and operate all of your security controls
 from a single console and one unified framework. Download a free trial.
 http://p.sf.net/sfu/alienvault_d2d
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Class Window in gb.qt4 vs gb.ncurses

2013-05-05 Thread Dimitris Anogiatis
Creating a report from a non-graphical method might prove difficult.

If you are planning on using something like report from an HTML template on
a PDF File you either need to make sure you can generate a PS or PDF file
or you can use wkhtmltopdf https://code.google.com/p/wkhtmltopdf/ to
generate your PDF file then shell to lpr to send this to your printer.

Theoretically this could work but it will depend on what HTML features
wkhtmltopdf https://code.google.com/p/wkhtmltopdf/ supports and how you
make your HTML template.

Hope this helps.



On Sun, May 5, 2013 at 6:09 AM, Benoît Minisini 
gam...@users.sourceforge.net wrote:

 Le 05/05/2013 12:19, Jesus a écrit :
  Hi Tobi and all
 
 
  El 05/05/13 09:00, Tobias Boege escribió:
  On Sat, 04 May 2013, Jesus wrote:
  Recently a friend of mine reported an issue that I'm not sure how to
  explain correctly.
 
  He is making a terminal program that needs to print stuff on a real
  printer, so it needs the gb.qt4 component to get access to the Printer
  object. But also he needs to use gb.ncurses to do some neat
 presentation
  in a terminal in a kind of interactive mode. Problem arises when the
  *Window* class in gb.ncurses collides with the same class name in
 gb.qt4
  (needed to gain access to printer functions) It seems that window class
  in gb.qt4 surpasses the one in gb.ncurses.
 
  So, is it a known problem? Does anyone realized this incompatibility
  when using both components at the same time?
  Is there a way to use the printer without using gb.qt4?
 
 
 
  I never thought of using a graphical component together with
 gb.ncurses. I
  never intended that :-)
 
  Yes. The point is, how it is supposed to do printing from within
  gb.ncurses without using the Printer object (found only inside graphical
  components)?
 
  We then should need to do this through CUPS or something, doesn't it?
 
  The fact is my friend is trying to print a kind of report based in his
  own classes that uses Draw and Paint to actually draw a report in a
  drawing area when using the full program version, and the file
  representing the report itself is interpreted and printed from an
  stripped out version of the program that only works in console mode
  (interactive curses interface). The logic of printing is the same for
  both programs, so qt4 is needed to do all the stuff. Sources here [0].
 
 
  [...]
 
  What do you mean actually by surpasses? Is there an incorrectly
  overridden error or does the gb.qt4 Window just override[0] the
 gb.ncurses
  one? If the latter is the case, you can try to disable gb.ncurses and
  Component.Load() it manually at startup?
 
  Right, the latter is the case. It makes them incompatible with each
 other.
 
 
  I promise that future control classes and a future Window class (using
 the
  CDK) are more built like their gb.qt4 models but for now think of
 gb.ncurses
  as a component that conflicts with other graphical components. I don't
 think
  compatibility can ever be achieved, though.
 
  I think so, as well... but gb.ncurses programs would need to have a way
  to print things. I remember old clipper database programs they were able
  to print some kind of text based reports. It would be great if printing
  could be based in actual drawing routines as qt4 does. But I understand
  it probably never ever could be achieved.
 
 

 Priting from the command-line with cups (a five second google search!)

 http://www.cups.org/documentation.php/options.html

 Then you just have to generate your report in a format understable by
 cups (PS, PDF, JPG mainly I think).

 Regards,

 --
 Benoît Minisini


 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite
 It's a free troubleshooting tool designed for production
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://p.sf.net/sfu/appdyn_d2d_ap2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ProgressBar Change Event

2011-07-09 Thread Dimitris Anogiatis
Demosthene,

Since the value of the progressbar cotnrol is just between 0 to 1
you can probably try

IF ProgressBar1.Value = 1 THEN ProgressBar1.label=Process complete


You can probably do this within the ProgressBar1_Change() event
assuming that the event is going to get fired when an input changes
the Value property of the control.

I hope this helps

Dimitris

On Sat, Jul 9, 2011 at 1:04 AM, Demosthenes Koptsis
demosthen...@gmail.comwrote:

 in that case

 the expression
 if X =1 then message.info(all is done)

 who will watch this expression?

 i need a timer or event loop or event ProgressBar1_Change()

 i implement this for now with a timer
 but i think it would be more elegant as programming approach to watch the
 ProgressBar1.Value and not the variable who set this value.


 On Sat, 2011-07-09 at 00:02 +0200, Fabien Bodard wrote:
  ??? can't you test the value when you set the value of the progressbar ?
 
  progressbar1.value = X
 
  if X =1 then message.info(all is done)
 
  2011/7/8 Demosthenes Koptsis demosthen...@gmail.com:
   hi,
  
   i make an example with progressbar and i saw that i was needed a
   ProgressBar_Change() event to check the status (value) of the control.
  
   So if value is 1 to show a Message.Info(Complete 100%).
  
   Is it possible to implement this event?
  
  
   --
   Regards,
   Demosthenes Koptsis.
  
  
  
 --
   All of the data generated in your IT infrastructure is seriously
 valuable.
   Why? It contains a definitive record of application performance,
 security
   threats, fraudulent activity, and more. Splunk takes this data and
 makes
   sense of it. IT sense. And common sense.
   http://p.sf.net/sfu/splunk-d2d-c2
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 
 

 --
 Regards,
 Demosthenes Koptsis.



 --
 All of the data generated in your IT infrastructure is seriously valuable.
 Why? It contains a definitive record of application performance, security
 threats, fraudulent activity, and more. Splunk takes this data and makes
 sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-d2d-c2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Unable to split string containing ascii characters

2011-06-05 Thread Dimitris Anogiatis
Hey Titan,

Using the Split function is not the only option if you want to parse data
from a string

There's also Mid$, Left$, Right$ InStr, RInStr and other functions that you
use to extract
specific data from a string. Scan is another function that you can use to
split strings into
pieces but it's not as widely used.

Check it out here:  http://www.gambasdoc.org/help/lang/scan

If you're the one generating the string in the first place the best way to
go about
extracting data from a string is if you create some kind of an identifiable
beginning
and end of the important information in your string.

if you're not the one generating the string in question you need to see if
there is
an identifiable pattern so you can use InStr or RinStr to find the pattern
in the entire
string and then chop it off accordingly.

It's easy to get frustrated but as in every programming language out there
there's always
more than just one way to skin a cat

For your convenience here is a list of all the string related functions and
their descriptions
http://www.gambasdoc.org/help/cat/string?v2

Hope this helps

Regards,
Dimitris


On Sun, Jun 5, 2011 at 6:36 PM, richard terry rte...@pacific.net.au wrote:

 On Monday 06 June 2011 10:29:23 Titan Rain wrote:
  I'm sorry for the hostility, I am frustrated as you perceived. I've been
   trying to accomplish this for 3 days, in just this case, as well as the
   few days I spent hacking my way around it in an earlier case. I've never
   thought to replace the whole string by some single character then split
 by
   that. I appreciate the pointer, and apologize for my anger.
 
 
 ---
  --- Simplify data backup and recovery for your virtual environment with
   vRanger. Installation's a snap, and flexible recovery options mean your
   data is safe, secure and there when you need it. Discover what all the
   cheering's about. Get your free trial download today.
  http://p.sf.net/sfu/quest-dev2dev2
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 The interesting thing about gambas is that many non obvious things are
 really
 simple. I similarly used to spend many hours getting frustrated (usually
 due
 to my own stupidity and lack of logic, I might add).

 If you need help just tar a project from the menu in gambas and people will
 take a look at the code and post it back.

 Just ask and anyone will help.

 Regards

 Richard


 --
 Simplify data backup and recovery for your virtual environment with
 vRanger.
 Installation's a snap, and flexible recovery options mean your data is
 safe,
 secure and there when you need it. Discover what all the cheering's about.
 Get your free trial download today.
 http://p.sf.net/sfu/quest-dev2dev2
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas daemon

2011-05-10 Thread Dimitris Anogiatis
Hey guys,

I have a couple of questions...

1) How can I create a daemon in gambas2 (gambas2.21 on Debian Lenny)?
   Would Application.Daemon=True be enough?

2) Would my daemon be ran as root? if not is there a way for Gambas to set
that when it creates the debian package?

Thanks in advance
Dimitris
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Print html direct?

2010-11-24 Thread Dimitris Anogiatis
Hey guys,

Does htmldoc have any UTF-8 support?

Regards,
Dimitrios


On Wed, Nov 24, 2010 at 7:36 AM, Rolf-Werner Eilert 
eilert-sprac...@t-online.de wrote:

 Am 24.11.2010 13:54, schrieb charlesg:
 
  Hi
 
 
  Gregor Burck wrote:
 
  Can I direct print html?
 
 
  I shell to htmldoc to turn the html to pdf.
  e.g.
  shll = htmldoc --bodyfont Sans --fontsize 6.0 --outfile 
  Application.path  /tfc.pdf --webpage   Application.path  /tfc.htm
  SHELL shll WAIT
  then:
  shll = lpr   Application.path  /tfc.pdf
  shell shll wait

 This is really cool dude :-) I'll print it and pin it on my wall, will
 certainly be used next time I've got to do something like this!

 By the way, htmldoc doesn't seem to be on my system, do you know where
 it comes from?

 Regards

 Rolf



 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Dimitris Anogiatis
I use

INC Application.Busy

and

DEC Application.Busy

in my applications on Debian Lenny (with LXDE)
and Gambas 2.21 and it works just fine.

Regards,
Dimitris


On Wed, Nov 24, 2010 at 9:23 PM, vikram austin...@yahoo.com wrote:

  Setting FMain.Mouse and calling WAIT is useless. Application.Busy should
  already set the busy cursor for every widget in the application.
 Otherwise
  this is a bug.
 Application.Busy alone is not showing a busy pointer on Debian Squeeze,
 with Gambas 2.21.

 Regards,
 Vikram





 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] About help and arrays and variables

2010-11-19 Thread Dimitris Anogiatis
Demosthenes,

I might be able to help out with the Greek Translation of the wiki as well.
When you're done with your book, send me an email perhaps we can work
on that together.

Regards,
Dimitris

On Fri, Nov 19, 2010 at 7:40 AM, Demosthenes Koptsis demosthen...@gmail.com
 wrote:

 On Fri, 2010-11-19 at 15:17 +0100, Simonart Dominique wrote:
  Le 19/11/2010 14:58, Fabien Bodard a écrit :
   2010/11/19 Demosthenes Koptsisdemosthen...@gmail.com:
   ok!
  
   i was cofused from two things
  
  Hi all,
 
  I tend to get a little confused too!
 
  Are these assumptions correct?
 
  If array notation is on Variable name, array is STATIC
 PRIVATE TicTacToe[3] AS Integer 'a static array
  If array notation is on Data type, array is DYNAMIC
 PRIVATE TicTacToe AS Integer[] 'a dynamic array

   1)
   in previous message about static arrays Fabien said that:
  
   yes a static array is not an object ... that's why it's a little bit
   deprecated :)
  
  
   anther way :
  
   dim htmpArray as integer[]=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  
  
   so a
   DIM htmpArray as integer[]=  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
   i thought was a static.
   no a dynamic ... look at the bottom
  
   and
  
   2)
   -
   DIM aInt2 AS Integer[3]
  
   aInt2[0] = 1
   aInt2[1] = 20
   aInt2[2] = 30
  
   aInt2.Add(40) 'here is the resize of the array
   aInt2.Add(50)
   aInt2.Add(60)
  
   PRINT aInt2[3]
   PRINT aInt2[4]
   PRINT aInt2[5]
   -
  
   In my gambas2-2.21 rev3300 there is no error, nor compilation nor
   execution!
  
   Normal it's Dynamic array :)
  
   Dynamic :
   DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ]
  
   ex : dim aInt as  Integer[10]
  
   Static
   [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS
   Native Datatype
  
  
   ex : Private aInt[10] as integer
  
   you can't declare a staic array in a sub
  
 
 
 
 
 --
  Beautiful is writing same markup. Internet Explorer 9 supports
  standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
  Spend less time writing and  rewriting code and more time creating great
  experiences on the web. Be a part of the beta today
  http://p.sf.net/sfu/msIE9-sfdev2dev
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user




 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today
 http://p.sf.net/sfu/msIE9-sfdev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] dialog.select font conf setting

2010-09-07 Thread Dimitris Anogiatis
Hey Daniel,

Try Dialog.SelectFont()

Gambas might be thinking that Dialog.SelectFont is a property so try it with
a pair of parenthesis at the end

Hope this helps

Regards
Dimitris

On Tue, Sep 7, 2010 at 12:21 AM, Daniel Vanhee daniel.van...@gmail.comwrote:

 Hallo everyone,

 i am new to gambas and trying some things out.
 I would like to give the user of my program the opportunity to choose a
 font.
 The default title of the dialog.selectFont must been changed
 The font that has been chosen must be written  to the conf-file

 My code is as follows

 PUBLIC SUB mnuFormatFont_Click()
  ' set the title
  ' let choose the font
  ' apply the font
  ' write chosen font to the conf file
  Dialog.Title =  Kies een font 
  Dialog.SelectFont
  TextArea1.Font = Dialog.Font
  Settings[Tekst/Lettertype] = TextArea1.Font
 END

 When running the program
 - the title is not changed
 - the data are not written to the conf file

 What is wrong?

 Daniel.

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Case statement quesiton

2010-07-19 Thread Dimitris Anogiatis
Hey Richard,

Perhaps this might work for you

Select Case BMI  25
Case True
  Print BMI is Less than 25
Case False
  Print BMI is MORE than 25
Case Else
End Select

or you could also set ranges

Select Case BMI
Case 1 to 24
  Print BMI is Less than 25
Case 25
  Print BMI is 25
Case 26 to 35
  Print BMI is MORE than 25
Case Else
End Select

Depending on your code's structure and style either one of those workarounds
will work.
 I tested them myself using Gambas2 2.19 on Linux Mint 9

Regards,
Dimitris

On Sun, Jul 18, 2010 at 11:02 PM, richard terry rte...@pacific.net.auwrote:

  Select Case BMI
  Case  25

 This dosn't seem to work? can't one use less than, greater than,  etc?

 Regards

 Richard




 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gbr3: no project file in '/usr/local/bin/gambas3'

2010-07-05 Thread Dimitris Anogiatis
Hey Matti

try starting gambas from the terminal by typing

/usr/local/bin/gambas3/gbr3 /usr/local/bin/gambas3/gambas3.gambas

it should run the Gambas IDE then.

I hope this helps

Regards
Dimitris

On Sun, Jul 4, 2010 at 11:21 PM, Matti math.e...@t-online.de wrote:

 Once again, I tried to install Gambas3 on my SuSe 11.2.
 Got rev 3025 from svn, and this time appearently the installation ran
 without
 errors.
 But when I try to start gambas3, I get the message above.

 What now? I found one thread in the mail archives, but this looks like
 there was
 something wrong in the revision.

 In /usr/local/bin/gambas3 I have the files:
 gambas3
 gambas3.gambas
 gba3
 gbc3
 gbi3
 gbr3
 gbs3
 gbs3.gambas
 gbw3
 gbx3

 Thanks for help
 Matti


 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gbr3: no project file in '/usr/local/bin/gambas3'

2010-07-05 Thread Dimitris Anogiatis
Matti,

first go to /usr/local/bin

then type gbr3 and then press enter

If you get something like this:

gbr3: no archive file

then gambas is located in /usr/local/bin/

and you can try this

gbr3 gambas3.gambas
(since you're already in /usr/local/bin/)

I hope this takes you a bit further

Regards,
Dimitris


On Mon, Jul 5, 2010 at 12:17 AM, Matti math.e...@t-online.de wrote:

 Hi Dimitri,

 there is no directory /usr/local/bin/gambas3/ here.
 And when I try any commands in /usr/local/bin/, I get messages like ERROR:
 #35:
 Cannot open file '.': No such device
 0: ? or gbr3: no project file in 'gambas3.gambas'.

 Matti

 Am 05.07.2010 07:59, schrieb Dimitris Anogiatis:
  Hey Matti
 
  try starting gambas from the terminal by typing
 
  /usr/local/bin/gambas3/gbr3 /usr/local/bin/gambas3/gambas3.gambas
 
  it should run the Gambas IDE then.
 
  I hope this helps
 
  Regards
  Dimitris
 
  On Sun, Jul 4, 2010 at 11:21 PM, Matti math.e...@t-online.de wrote:
 
  Once again, I tried to install Gambas3 on my SuSe 11.2.
  Got rev 3025 from svn, and this time appearently the installation ran
  without
  errors.
  But when I try to start gambas3, I get the message above.
 
  What now? I found one thread in the mail archives, but this looks like
  there was
  something wrong in the revision.
 
  In /usr/local/bin/gambas3 I have the files:
  gambas3
  gambas3.gambas
  gba3
  gbc3
  gbi3
  gbr3
  gbs3
  gbs3.gambas
  gbw3
  gbx3
 
  Thanks for help
  Matti
 
 
 
 --
  This SF.net email is sponsored by Sprint
  What will you do first with EVO, the first 4G phone?
  Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
  This SF.net email is sponsored by Sprint
  What will you do first with EVO, the first 4G phone?
  Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 


 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] hi all

2010-06-26 Thread Dimitris Anogiatis
Welcome to Gambas, Simone.
Hopefully you'll love the language as much as we do

Don't hesitate to give us a shout if you need help with
anything.

And above all :) Have fun :)

Regards
Dimitris

On Sat, Jun 26, 2010 at 3:33 AM, Simone Gentili sensora...@gmail.comwrote:

 I started today to develop with Gambas!!!

 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Structure support in Gambas 3

2010-05-27 Thread Dimitris Anogiatis
Benoît,
What would happen if there was a case you had program A with 3.x
dependencies and Program B running 3.y dependencies?
Or are you only referring to complete Gambas 3.x and 3.y installations on
the same machine?

Regards,
Dimitris

2010/5/27 Benoît Minisini gam...@users.sourceforge.net

   To define a structure, you must declare it inside a class or a module
   that
  
   way:
   Public StructStructName
   Var1  AsType1
   Var2  AsType2
   End Struct
 
  This means you cannot define the struct itself at runtime like an
  object, right? You must know the struct's composition of variables in
  advance? So the program could not react freely to a change in the
  database? (Don't know how to express it more clearly...)

 Of course, as for the other classes. If you don't know the structure of
 your
 data at compile time, you must use something else like a collection.

 Maybe there will be a trick (not possible at the moment), like creating a
 gambas project at runtime, compile it, and loads it as a component. But it
 would be weird to do that.

 
  But it's great, I find this practical as well when you include external
  functions from the system.
 
   ability to release incremental versions of Gambas (3.1, 3.2...) that
   won't be just bug fixes like in the 2.x versions.
 
  I don't quite see what you mean by that. Do you intend to create an
  update mechanism that loads new libraries?
 

 No. I just want to be able to release new features faster in Gambas 3. But
 that will mean that:

 - If X  Y, 3.X must be able to run programs in 3.Y, maybe with a
 recompilation.
 - But not the contrary. 3.Y may not be able to run 3.X programs. Users will
 have to upgrade.
 - You won't be able to install 3.X and 3.Y on the same machine.

 Package dependencies must be more precise (depends on 3.1 gambas runtime
 instead of depends on any 3.x gambas runtime).

 Only the 4.0 will be able to break the backward compatibility, by removing
 instructions, features, changing the meaning of them...

 Regards,

 --
 Benoît Minisini


 --

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

--

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


Re: [Gambas-user] Gambas for windows, how?

2010-05-13 Thread Dimitris Anogiatis
Tomas,
What you could do in this case, is setup a machine with Debian or Ubuntu on
the customer's premises, (It doesn't have to be a top notch machine) and
setup x2go and he can use the application from Windows by logging in to the
debian machine using SSH and x2go which is a terminal server (kinda like RDP
for windows).

Another solution is to create a Virtual Machine (I usually use Virtualbox)
of Ubuntu or debian on the customer's fastest machine enable RDP and login
with Windows Remote Desktop client and use Gambas that way.

I hope this helps

Regards
Dimitris

On Thu, May 13, 2010 at 11:17 AM, Olivier Cruilles linu...@club-internet.fr
 wrote:

 Ok... but for the moment... no really portage of Gambas was made on windows
 and the only one
 way to execute it, is over cygwin ... and not all works as the IDE for
 example ... only console mode of Gambas.

 So, if you really want to use Gambas... you must use Linux too  sorry..


 Le 13 mai 2010 à 18:41, admhards...@yahoo.ca a écrit :

 
  Ok you are right but I wanna developer an app for a customer  in windows,
 because he doesn't know any debian, ubuntu, just windows
  Do you undestood me?
  Tomas
  Sent on the TELUS Mobility network with BlackBerry
 
  -Original Message-
  From: Alessandro Rinaldi alerina...@linuxzogno.org
  Date: Thu, 13 May 2010 18:06:27
  To: mailing list for gambas usersgambas-user@lists.sourceforge.net
  Subject: Re: [Gambas-user] Gambas for windows, how?
 
  I can't understand why you want to use a so good software on a so ugly OS
 ;)
 
 
 --
 
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 
 
 --
 
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 

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




 --

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

--

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


Re: [Gambas-user] Too many open files error message

2010-05-04 Thread Dimitris Anogiatis
Hey Ricard,

just as a quick workaround try replacing the Open - Close code with

File.Save(sFilename, sHTML)

You might circumvent the Too many files open error, which I am unsure why
it comes up.

Perhaps the total number of open files within your project is too much or
the opening and closing
of your files happens too fast and some of the files don't get the chance to
close properly...
just guessing here...

I hope this helps
Dimitris


On Tue, May 4, 2010 at 12:08 PM, richard terry rte...@pacific.net.auwrote:


 This routine is called by my program, consecutively a large number of times
 during an automated process:

 Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As
 String = html)

  Dim wFile As File
  Dim sFilename As String

  sFilename = Temp$(prefix)  .html
  wfile = Open sFilename For Write Create
  Print #wfile, sHTML
  Close #wfile
  wb.url = sFilename
 End

 the temp file is opened-closed.

 Yet at a certain point gambas comes up with an error 24: too many opened
 files.
 Does this mean the temp-file quota has somehow been exceeded?

 It makes no difference if I put in a fixed name like this:

 sfilename = /home/richard/temp.html

 Same result  it eventually bugs out. and complains
 Regards

 Richard



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

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


Re: [Gambas-user] User components replaced by Libraries in Gambas 3

2010-04-26 Thread Dimitris Anogiatis
Benoît,

Will all the controls that are gambas written, be implemented in this
fashion too?
if so how will the IDE distinguish between a library and a control?

Regards,
Dimitris

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

  Ian Haywood ha scritto:
   svitoos wrote:
   I think it is better to look for libraries in the directories listed
 in
   GB3_LIBRARY_PATH, and if this variable is not defined
   then /usr/lib/gambas3:/usr/local/lib/gambas3:~/.local/lib/gambas3
  
   I think this is a good idea, because gambas should behave like other
   POSIX-based interpreted languages (python, ruby, perl, etc.) unless
   there is a good reason not to.
 
  I agree too.
 
   Benoit wrote:
   As they are libraries, looking inside gambas installation
   prefix/lib/gambas3 may be a good solution, but Gambas executables are
   architecture-independant, so maybe they should go into gambas
   installation prefix/share?
  
   lib is where python and ruby libraries go, even though technically
   their bytecodes are architecture-independent too, this is probably
   because lib has all the other
   system libraries and its more confusing to make an exception.
 
  Probably I am wrong, but I don't see all this importance about keeping
  some files in .../share just because they are architecture independent.
  I don't see any advantage in this convention; it would be more logical
  if .../share contained files shareable by different applications on the
  system (and, in fact, you find many of them: icons, fonts,
  translations...). If so, then gambas libraries are not common to
  different applications - they are common to gbx3, and .../lib would be
  more logical.
 
   I don't want to multiply the directories where libraries must be
   searched for
  
   I think there is a good reason for the three directories suggested
 above.
   It is important to search both /usr/ and /usr/local/ to provide a
   clear separation between default libraries managed by the OS
   installation system (apt-get, rpm, or whatever)
   and third-party libraries installed by the system admin, plus it is
   useful to have a third directory under $HOME so libraries can be
   installed without being the superuser.
  
   Ian
 
  Agreed again.
 
  And now a little curiosity: would be those libraries *true* executable?

 They are.

  I mean - I code a project with some class, and the main class contains
  code to test the other ones. Then I can use the project as a library,
  and still use it as a standalone program to test the library at any
  time. In addition, the project/library can be used to configure it... I
  mean - I use, say, an SMTP library. In my final application, instead of
  asking the user a lot of parameters about the network, I can simply
  SHELL .../libsmtp.gambas to let the library ask and store all the
  relevant parameters and preferences...
 
  Regards,
  Doriano
 

 There is no difference at all between a library and a executable. A library
 is
 just an executable that is used as a component by another executable.

 So you can do what you want!

 Regards,

 --
 Benoît Minisini


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

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


Re: [Gambas-user] EOF problem

2010-04-18 Thread Dimitris Anogiatis
Ed,
if reading a text file and extracting information from it is what you're
trying to do, why not just use

tmp = File.Load(Fname)

File.Load is documented over here
http://www.gambasdoc.org/help/comp/gb/file/load

after loading the contents of Fname in tmp you can do your magic, without
using an OPEN statement and a loop
unless the file you're reading is a few megabytes, File.Load should be
sufficiently fast to cover your needs.

I am sure that there's more than one ways to skin a cat, and professionals
didn't exactly drop out of the sky one day
knowing everything about programming :) It takes practice and more practice
and even more practice :)  we all learn
in different ways and we're all here to help each other :) Whether we are
professionals,amateurs hobbyists or plain curious

As they say in my country, One hand washes the other and both wash the face
:)

Hope this helps
Regards,
Dimitris

On Mon, Apr 19, 2010 at 1:17 AM, Ed  Clare Kelm
twopil...@interisland.netwrote:

 Hi all:

 A couple of comments about the discussions below:

 1.  The test program was written with EOF at the start, because the
 actual program I am working on has this structure, for reading in
 multiple lines of text:

 WHILE NOT EOF(tfile)
(bunch of code for reading the lines in and putting the data in the
 proper places)
 WEND

 CLOSE #tfile

 When that failed, I wrote the test program to see if I was actually
 sometimes getting an EOF immediately after opening the file, since the
 first thing WHILE does is test EOF.

 2.  Clearing label1 after every button click is just a little
 insurance.  Given that things weren't working as expected, I wanted to
 make sure what I saw in label1 was new info, not something left from the
 previous button click.  I know that shouldn't be necessary, because the
 IF-THEN-ELSE structure will always write to the label - but then there
 shouldn't be an immediate EOF either.

 3.  Using Fname like that is just a little habit I've developed.  It
 allows me to try a different file by commenting out one setting of Fname
 and writing a new one, without erasing the previous one.  And it makes
 the OPEN statement more compact and easy to read.  It is also sometimes
 useful to put such equates all in one place, so it's easy to find and
 change parameters, rather than rummaging around in the code.  You are
 correct, it is sort of a waste if I am only using the variable once.  In
 my actual program, Fname also gets used when the database gets modified
 and the file then has to be re-written.

 I am not a professional programmer, so I'm sure I have some ways of
 doing things that make professionals cringe!

 Thanks again for thinking about my problem!

 Regards,

 Ed K.

 Doriano Blengino wrote:
  Les Hardy ha scritto:
 
  Doriano Blengino wrote:
 
 
  Les Hardy ha scritto:
 
 
 
  Hi Ed,
  I figured it out.
  First of all, depending how the text file was emptied/created, the
  contents may not be truely empty.
  Gedit for example leaves the 0A (end-of-line) character in the 'empty'
  file. This is recognised by eof() as a character, so, end-of-file is
 not
  found.
  I am not sure if this can be considered a bug in Gambas, but it does
  mean an eof() is only good for preventing read errors, and is not
  reliable for testing if a file is empty.
 
 
 
 
  Just breaking in to say that a file with a EOL in it is not an empty
  file - it is a file with an empty line in it...
 
 
 
  Your correct, I agree completely, but the original code Ed supplied, '
  IF Eof(tfile) ' cannot work , as it checks eof before a read.
  When I saw he was using eof() that way, and knowing empty files are not
  always empty, I thought I had found his problem, so I just added a bit
  of code that should have got around it.
 
  I am sure you will agree, that, whatever other problems he may have,  he
  needs not to use eof() the way he is.
 
 
  Here is the original code. I think it is perfectly right:
 
  PUBLIC SUB Button1_Click()
 
 DIM tfile AS File
 DIM Fname AS String
 
 Fname = /home/us/Documents/testdat.txt
 
 tfile = OPEN Fname FOR READ
 
 label1.Text = 
 
 IF Eof(tfile) THEN
label1.Text = EOF
 ELSE
LINE INPUT #tfile, label1.Text
 END IF
 
 CLOSE #tfile
 
  END
 
 
 
  If eof() is not checked *before* reading, then when? I see only two
  things I would not do (but it depends a lot). First, why use the fname
  variable, if it is used only once... second, why set label1.text if that
  .text will be anyway written shortly later?
 
  But, apart from these two very little things, that can also have some
  good reason, the rest of the code is the only possible, I think. Note
  also that label1.text can get 3 different values: EOF is the file is
  empty;  if the first line of the file is empty; something else if the
  first line of the file contains some data. These three cases cover all
  the cases we talked about (empty and not empty files), and I think our
  friends know what 

Re: [Gambas-user] EOF problem

2010-04-17 Thread Dimitris Anogiatis
Ed can you try this and tell us if it still doesn't work?

PUBLIC SUB Button1_Click()

  DIM tfile AS File
  DIM Fname AS String
  Dim temp AS String

  Fname = /home/us/Documents/testdat.txt

  tfile = OPEN Fname FOR READ

  label1.Text = 

  IF Eof(tfile) THEN
 label1.Text = EOF
 Print EOF
  ELSE
 LINE INPUT #tfile, temp
 Print temp
  END IF

  CLOSE #tfile

END

Watch the IDE's debug window to see what's being printed as the file is
being read

If this doesn't work too then you could try to update your version of
Gambas2 since
the latest stable version is 2.20.2

I hope this helps

Regard
Dimitris


On Sun, Apr 18, 2010 at 2:25 AM, Ed  Clare Kelm
twopil...@interisland.netwrote:

 Thanks for the quick reply!

 1.  The problem is independent of the contents of the text file.

 2.  I tried a more complicated test program in which there are TWO
 buttons, and TWO different text files.  This behaves similarly;  most of
 the time, failure of one button/file will be  accompanied by  failure of
 the other, but not always.   Very occasionally, one button/file will
 work, one will fail.

 3.  According to Synaptics Package Manager I have the latest version of
 Gambas available, called 2.8.2-1build1 - if there is a newer version,
 how would I find and install it?

 4.  Would it be worth trying an upgrade to Ubuntu 9.10?

 Regards,

 Ed K.

 Benoît Minisini wrote:
  Hi!
 
  I'm having a problem reliably reading a text file.
 
  I am using:
 
  Panasonic CF-51 Toughbook
  Ubuntu 9.04 , Kernel 2.6.28-18
  Gambas 2.8, QT
 
  Below is the code for a test program which demonstrates the problem.
  This is a simple form, with one button, and one label. The only code is
  the Button1_click event shown.  The file testdat.txt contained in
  Fname is a text file with one short line of text, created with GEDIT.
 
  One would expect that clicking Button1 would open the file, read the
  line of text, and place it into label1.  Indeed, this is exactly what
  happens roughly 4 times out of 5.  However, sometimes the file comes up
  empty, with an immediate EOF.  When the program is first started from
  the IDE, if it works correctly the first time, it will do so every time
  the button is clicked.  However, if it fails (indicates EOF) the first
  time, it will fail everytime the button is clicked.  Stopping the
  program and restarting it will roll the dice anew.  There does not seem
  to be any pattern to the failure.  It might happen twice in a row, it
  might not happen for 10 starts.
 
  Does anybody have any ideas?  Is this an Ubuntu issue?
 
  Thanks!
 
  Ed K.
 
 
  PUBLIC SUB Button1_Click()
 
 DIM tfile AS File
 DIM Fname AS String
 
 Fname = /home/us/Documents/testdat.txt
 
 tfile = OPEN Fname FOR READ
 
 label1.Text = 
 
 IF Eof(tfile) THEN
label1.Text = EOF
 ELSE
LINE INPUT #tfile, label1.Text
 END IF
 
 CLOSE #tfile
 
  END
 
 
 
  I cannot reproduce the problem with the same code. Does it occur whatever
 the
  contents of 'testdat.txt' is? Can you try the latest version of Gambas 2?
 
 

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


Re: [Gambas-user] printing issue

2010-03-04 Thread Dimitris Anogiatis
Hey Robi,
As an alternative you could also get a list of the install printers by doing

Dim prnList as String
SHELL (lpstat -a) to prnList

Hope this helps

Regards,
Dimitris

On Thu, Mar 4, 2010 at 4:39 AM, Doriano Blengino 
doriano.bleng...@fastwebnet.it wrote:

 Robert JUHASZ ha scritto:
  Hello List,
 
  I have a small issue with the printer handling of my application: when I
 try
  to print, the list of printers is empty and consequently the OK button is
  disabled (there are printers installed on the computers). If I click on
  cancel, the default printer prints out the document. If I print to file
 it
  works well.
 
  Development computer: Ubuntu 9.10, package made on Gambas 2.19 and 2.20.
  User computer: Ubuntu 9.10, no gambas installed.
 
 It happened to me, on an Ubuntu machine.
 If I well remember, I deleted the file /etc/printcap which was /not/
 containing right informations about the installed printers. There was
 cups installed but, after an analysis, I discovered that QT searched in
 printcap instead of the right place. By deleting the file, QT started to
 search in the right place.

 I don't have that machine at hands right now, so I only go by memory;
 you can carefully make some test. I used strace to see what gambas/QT
 was doing: if you want you can do the same. Please take this words
 seriously - really I am not sure.

 Regards,
 Doriano



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


Re: [Gambas-user] trouble with cgi scripting - Error 24 No Startup Method

2010-02-21 Thread Dimitris Anogiatis
Hey Joshua,
Try this instead of the original cgi example.

#!/usr/bin/env gbw2
%
DIM sEnv AS String
PRINT !-- Variable declaration must come before any HTML --
PRINT html
PRINT body
PRINT h2Test1 - check this out/h2br
PRINT a href=\link1.html\Test link/a
PRINT /body
PRINT /html
%

If this works it means that all your html tags need to be included in a
Print statement

I hope this helps

Regards
Dimitris

On Sun, Feb 21, 2010 at 1:59 AM, Fabien Bodard gambas...@gmail.com wrote:

 i think a usuakky it come from ubuntu 9.10 ... some ppa repository create
 errors

 2010/2/21 Joshua Higgins joshigg...@googlemail.com:
  OK, I started from scratch, installed Ubuntu 9.10, compiled svn, and it
  works as expected.
 
  --
  joshua higgins
 --
 
 --
  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

--
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] automatic completion of textbox with mysql data

2010-02-13 Thread Dimitris Anogiatis
Vasilli,

perhaps you want to try this one

rs33 = MODMain.$Con.exec(select * from Aplianikis where  
Left$(Eponimia,1)   = '  Left$(tEponimia.Text, 1)  ')
ListBox1.Add = rs33!Eponimia

I hope this helps

Regards
Dimitris

On Sat, Feb 13, 2010 at 1:18 PM, Vassilis K vka...@otenet.gr wrote:

 I'm trying to make a routine that fills a dropdown menu of a textbox OR
 fills a listbox with data taken from mysql, with every keypress.
 So if the 1st key pressed is A it shows all data from A, if the second
 key pressed is b it shows only the data from Ab etc..

 I have made a few efforts with Left$:

 rs33 = MODMain.$Con.exec(select * from Aplianikis where Left
 $(Eponimia,1) = '  Left$(tEponimia.Text, 1)  ')
 ListBox1.Add = rs33!Eponimia

 but it fails with error:

 Query failed: FUNCTION Apodeixi1.Left$ does not exist

 

 Is there a simple way to use automatic completion in a program?






 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView.Count value differs using qt rather than gtk

2010-01-25 Thread Dimitris Anogiatis
Benoît,

Perhaps another approach would be to get rid of the Count property and
create a Count method that would count the children of a
given root in the control (and optionally all it's branches).

for example

/ (root)
item1
item2--item3
|-item4
|-item5
|-item6
item7

The way I propose the Count method to work would be something like this (if
my logic is not sound stop me anytime)

Count(root as String, branches as Boolean) AS integer

so if you were to call the method for Treeview1 with with the first root and
not counting the branches it would look something like this

countMyTreeItems = Treeview1.Count(/, false)
and for this example countMyTreeItems would be 3

but if you were to call the count method for item2 it would be like this

countMyTreeItems = Treeview1.Count(/, true)
and for this example countMyTreeItems would be 4

I don't know if you're still faced with the same obstacles in both GTK and
Qt

Hopefully this proposed approach makes sense and helps a bit more.

Regards,
Dimitris


2010/1/26 Benoît Minisini gam...@users.sourceforge.net

  Benoît,
 
  Just for that you should go with the GTK+ way :P
 
  Regards,
  Dimitris
 

 But is it really useful? We need to know how many root items a TreeView or
 a
 ColumnView has, too!

 --
 Benoît Minisini


 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the
 business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] TreeView.Count value differs using qt rather than gtk

2010-01-25 Thread Dimitris Anogiatis
Ooops,

Correction

on the second example it should read
countMyTreeItems = Treeview1.Count(item2, true)

Sorry guys it's a bit late over here

Regards
Dimitris

On Tue, Jan 26, 2010 at 12:49 AM, Dimitris Anogiatis dos...@gmail.comwrote:

 Benoît,

 Perhaps another approach would be to get rid of the Count property and
 create a Count method that would count the children of a
 given root in the control (and optionally all it's branches).

 for example

 / (root)
 item1
 item2--item3
 |-item4
 |-item5
 |-item6
 item7

 The way I propose the Count method to work would be something like this (if
 my logic is not sound stop me anytime)

 Count(root as String, branches as Boolean) AS integer

 so if you were to call the method for Treeview1 with with the first root
 and not counting the branches it would look something like this

 countMyTreeItems = Treeview1.Count(/, false)
 and for this example countMyTreeItems would be 3

 but if you were to call the count method for item2 it would be like this

 countMyTreeItems = Treeview1.Count(/, true)
 and for this example countMyTreeItems would be 4

 I don't know if you're still faced with the same obstacles in both GTK and
 Qt

 Hopefully this proposed approach makes sense and helps a bit more.

 Regards,
 Dimitris


 2010/1/26 Benoît Minisini gam...@users.sourceforge.net

  Benoît,

 
  Just for that you should go with the GTK+ way :P
 
  Regards,
  Dimitris
 

 But is it really useful? We need to know how many root items a TreeView or
 a
 ColumnView has, too!

 --
 Benoît Minisini


 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the
 business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gtk error when input greek letters in textbox

2010-01-21 Thread Dimitris Anogiatis
Demosthenes,

I think it is because Greek letters are unicode characters
and unicode characters count as double and therefore any split will
be difficult to work with the usual string manipulation functions

The recommended way to split a string including unicode characters
according to the documentation, in this page

http://www.gambasdoc.org/help/cat/string

is to use the String class.

The String Class is described in this part of the documentation

http://www.gambasdoc.org/help/comp/gb/string

I hope this helps
Keep up the good work

Regards,
Dimitris

2010/1/21 Demosthenes Koptsis demosthen...@gmail.com

 Hi,

 i use ubuntu 9.10 with gambas 2.13

 i have a TextBox and insert Greek letters
 i get its string and split it in an array

 but i get this error

 Anagramatismos:7312): Gtk-CRITICAL **: gtk_text_buffer_emit_insert:
 assertion `g_utf8_validate (text, len, NULL)' failed

 and the program do nothing.

 instead in English strings work fine.

 what is this?


 --

 Γεια χαρα σε όλους!!!

 Regards,

 Demosthenes Koptsis

 --
 Throughout its 18-year history, RSA Conference consistently attracts the
 world's best and brightest in the field, creating opportunities for
 Conference
 attendees to learn about information security's most important issues
 through
 interactions with peers, luminaries and emerging and established companies.
 http://p.sf.net/sfu/rsaconf-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] drove me crazy

2010-01-20 Thread Dimitris Anogiatis
Charlie, Benoit,

Wouldn't something like that usually work?

PUBLIC SUB Main()
DIM col1 AS NEW Collection
DIM col2 AS NEW Collection
DIM sKey AS String
Dim Counter as Integer
 col1.Add(1, one)
 col1.Add(2, two)
 col1.Add(3, three)
 col1.Add(4, four)
 PRINT Returns the key of the last read or last enumerated element. 
  FOR Counter = 0 to col1.Count
 sKey = col1[Counter].Key
 PRINT sKey   =   sElem
 col2.Add(sElem, sKey)
  NEXT
END

The documentation mentions that a Collection acts like a read/write array
so even though the workaround isn't very elegant, would it work?

Regards,
Dimitris

On Wed, Jan 20, 2010 at 11:17 AM, Charlie Reinl karl.re...@fen-net.dewrote:

 Am Mittwoch, den 20.01.2010, 17:27 +0100 schrieb Benoît Minisini:
   Am Dienstag, den 19.01.2010, 17:30 -0700 schrieb Dimitris Anogiatis:
Hey Charlie,
   
Try changing this line
   
 sKey = col1.Key
   
to
   
 sKey = sElem.Key
   
   
Hope this helps
   
Regards,
Dimitris
   
On Tue, Jan 19, 2010 at 4:09 PM, Charlie Reinl karl.re...@fen-
  net.dewrote:
 Salut Benoit,

 its about Collection KEY and Debug-Window on gambas2.

 If you run that project, and open col1 and col2 in a Debug-Window
 (DBl-Click on the var), the Collection Key is always the last
 enumerated element.

 If you run it without Debug-Window or only col2 in a Debug-Window ,
 the
 Collection Key is the last read.

 PUBLIC SUB Main()
 DIM col1 AS NEW Collection
 DIM col2 AS NEW Collection
 DIM sElem AS String
 DIM sKey AS String
  col1.Add(1, one)
  col1.Add(2, two)
  col1.Add(3, three)
  col1.Add(4, four)
  PRINT Returns the key of the last read or last enumerated
 element. 
   FOR EACH sElem IN col1
  sKey = col1.Key
  PRINT sKey   =   sElem
  col2.Add(sElem, sKey)
   NEXT
 END

 see attached project.
 --
 Amicalement
 Charlie

 [OperatingSystem]
 OperatingSystem=Linux
 KernelRelease=2.6.24-26-generic
 DistributionVendor=ubuntu
 DistributionRelease=Ubuntu 8.04.3 LTS

 [System]
 CPUArchitecture=i686
 TotalRam=506932 kB

 [Gambas]
 Gambas1=gbx-1.0.17
 Gambas1Path=/usr/bin/gbx

 Gambas2=2.19.0  rev.2613
 Gambas2Path=/usr/local/bin/gbx2

 Gambas3=2.99.0  rev.2602 (can't compile actually)
 Gambas3Path=/usr/local/bin/gbx3
  
   Salut Dimitris,
  
   no can't work like that , sElem is 'only' a String.
  
   It is like written in the doc,
   Returns the key of the last read or last enumerated element.
   The  problem is, I think, that the Debug-Window loops the collection,
   (every time I move in the collection), to refresh all members, so when
 I
   try to set the 'sKey = col1.Key' the last element was read and its KEY
   returned.
   The Watch-Window shows the right value. But also the col1 collection in
   the Watch-Window 'derange' to find the right col1.key
  
 
  Yes, that is exactly the problem. But I don't see any good fix for Gambas
 2 at
  the moment. For Gambas 3, I can change the behaviour of Collection.Key so
 that
  it returns the last enumerated element, not the last read one (the
 debugger
  does not enumerate the collection, it just read it).
 
  Regards,
 

 Salut Benoit,

 I'v looked in the IDE. I also don't see where we can stop/arrange that.
 So I think we should add a warning , to the documentation!


 --
 Amicalement
 Charlie



 --
 Throughout its 18-year history, RSA Conference consistently attracts the
 world's best and brightest in the field, creating opportunities for
 Conference
 attendees to learn about information security's most important issues
 through
 interactions with peers, luminaries and emerging and established companies.
 http://p.sf.net/sfu/rsaconf-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] drove me crazy

2010-01-19 Thread Dimitris Anogiatis
Hey Charlie,

Try changing this line

 sKey = col1.Key

to

 sKey = sElem.Key


Hope this helps

Regards,
Dimitris

On Tue, Jan 19, 2010 at 4:09 PM, Charlie Reinl karl.re...@fen-net.dewrote:

 Salut Benoit,

 its about Collection KEY and Debug-Window on gambas2.

 If you run that project, and open col1 and col2 in a Debug-Window
 (DBl-Click on the var), the Collection Key is always the last enumerated
 element.

 If you run it without Debug-Window or only col2 in a Debug-Window , the
 Collection Key is the last read.

 PUBLIC SUB Main()
 DIM col1 AS NEW Collection
 DIM col2 AS NEW Collection
 DIM sElem AS String
 DIM sKey AS String
  col1.Add(1, one)
  col1.Add(2, two)
  col1.Add(3, three)
  col1.Add(4, four)
  PRINT Returns the key of the last read or last enumerated element. 
   FOR EACH sElem IN col1
  sKey = col1.Key
  PRINT sKey   =   sElem
  col2.Add(sElem, sKey)
   NEXT
 END

 see attached project.
 --
 Amicalement
 Charlie

 [OperatingSystem]
 OperatingSystem=Linux
 KernelRelease=2.6.24-26-generic
 DistributionVendor=ubuntu
 DistributionRelease=Ubuntu 8.04.3 LTS

 [System]
 CPUArchitecture=i686
 TotalRam=506932 kB

 [Gambas]
 Gambas1=gbx-1.0.17
 Gambas1Path=/usr/bin/gbx

 Gambas2=2.19.0  rev.2613
 Gambas2Path=/usr/local/bin/gbx2

 Gambas3=2.99.0  rev.2602 (can't compile actually)
 Gambas3Path=/usr/local/bin/gbx3


 --
 Throughout its 18-year history, RSA Conference consistently attracts the
 world's best and brightest in the field, creating opportunities for
 Conference
 attendees to learn about information security's most important issues
 through
 interactions with peers, luminaries and emerging and established companies.
 http://p.sf.net/sfu/rsaconf-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] sdl.sound and total length of a track

2010-01-03 Thread Dimitris Anogiatis
Alessandro,
to get the length of an MP3 file (since gb.sdl.sound works primarily with
mp3s)
I would personally write an ID3Tag module to get the mp3's length and then
load it
through gb.sound.sdl afterward.

or if you want you could also explore the option of using an external player
for your
program...

For an internet radio program I wrote I used xmms2d to play the songs and
that's what I use to get
the length and the current position of the played mp3.

perhaps you can use something similar with either mplayer or mpg123

I hope this helps,
Regards
Dimitris

On Sun, Jan 3, 2010 at 6:04 PM, Alessandro Rinaldi 
alerina...@linuxzogno.org wrote:

 Ok, sorry.


 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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 Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambasdoc issues

2009-12-30 Thread Dimitris Anogiatis
Ron,

It works fine for me...

could you provide some visual feedback
so we can see what gambasdoc does on
your browser?

Regards, Merry Christmas (belated) and Happy New Year
Dimitris

On Wed, Dec 30, 2009 at 1:27 AM, Ron r...@cyberjunky.nl wrote:


 Ok.

 I know there wasn't a lot of documentation to begin with, but it's
 become even worse, the docs of gb.net.curl are gone.

 And they point to the wrong version too.

 http://www.gambasdoc.org/help/comp/gb.net.curl?v3
 Gives empty 2.0

 http://www.gambasdoc.org/help/comp/gb.net.curl?v2
 Gives empty 3.0

 Thats not funny!

 Regards,
 Ron.


 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 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 Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem with tableview when in edit mode

2009-12-03 Thread Dimitris Anogiatis
Doriano,

from the sample project you posted, I can verify the behavior you described
when you use the arrow keys.
If you click on individual cells it jumps fine. But if you try and type
something on one cell and then click on the next one
the text you typed before disappears.

So perhaps a few more changes happened in the tableview control from 2.0 to
2.15 (the one you upgraded to) that are
not yet documented and you just might have to consider using a different
approach.

I use Debian Lenny 5.0.3 and Gambas 2.16

I hope this helps.

Regards,
Dimitris

On Thu, Dec 3, 2009 at 8:49 AM, Doriano Blengino 
doriano.bleng...@fastwebnet.it wrote:

 I am modifying an old program, which uses a TableView to construct an
 invoice.
 The tableview is almost always in edit mode.

 With gambas version 2.0.0, the original version I used to write the
 program, there is no problem (not this one).

 Now I upgraded to gambas v. 2.15 (debian package gambas2 2.15.2-1), running
 on a debian stable release.

 When in the tableview (in edit mode) I press an arrow key, the cursor slips
 on every possible cell in the request direction, until it finds the end of
 the tableview. But this is not enough: if the cursor key is Left or Right,
 the cell walking goes even further, wrapping to the next or previous row and
 restarting.

 I created an executable, and it behaves the same.

 Then I copied the executable to another machine, having gbx2 version 2.0.0,
 and the problem does not show up.

 The program uses explicitly QT; both machines have libqt-mt.so.3.3.8
 installed, and the same debian stable os, and I use both machines from a
 third machine running an X11 server (XMing). So it seems the problem is
 related to gambas.

 I send a sample project that shows the problem. Launch the application,
 click on the Tableview to focus it, and press a cursor key. The cursor will
 travel in the requested direction 'til the end of the grid.

 What can I do about this? I was very very reluctant to upgrade gambas; but
 I reached a point where I could no more install or upgrade my system. Even
 when trying to install a simple htop(1) from debian repositories, I was told
 to upgrade some fu*ing library, which in turn meant to upgrade gambas, which
 in turn meant to upgrade QT, GTK, poppler, libc, libc-bin... well,
 *hundreds* of packages. I will contact the debian mantainer about this - I
 don't care about postgres, firebird, curl, smtp, opengl, sdl, v4l, xml and
 things. It seems that to install gambas on debian one must pull in all the
 world. The other machine, having the old version of gambas, has no problems
 - I copied the gambas binaries directly, instead of installing them from
 packages. I can install and upgrade, and everything runs smoothly. Sorry for
 the debian-related blow.

 Regards,
 Doriano



 --
 Join us December 9, 2009 for the Red Hat Virtual Experience,
 a free event focused on virtualization and cloud computing.
 Attend in-depth sessions from your desk. Your couch. Anywhere.
 http://p.sf.net/sfu/redhat-sfdev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Problem with tableview when in edit mode

2009-12-03 Thread Dimitris Anogiatis
Doriano,

On my system, when I use the mouse and click on a different cell it jumps
just fine.
The behavior (the error) that you described occurs when I use the cursor
keys.

What I meant by different approach was perhaps you should use something else
other than the GotFocus event and LAST.Edit.  if it works on 2.0 but doesn't
work
in 2.15, 2.16 and 2.18 (Charlie users 2.18, I use 2.16 and the problem is
probably
not solved in 2.17) then it seems to me (and it's just my opinion) that your
code
needs to be somewhat revised.

BTW 5.0.3 is the latest Debian stable (Check
http://www.debian.org/CD/http-ftp/#stable).
Perhaps we use different repositories.

Regards,
Dimitris

On Thu, Dec 3, 2009 at 10:47 AM, Doriano Blengino 
doriano.bleng...@fastwebnet.it wrote:

 Charlie Reinl ha scritto:
  Am Donnerstag, den 03.12.2009, 18:24 +0100 schrieb Doriano Blengino:
 
  Dimitris Anogiatis ha scritto:
 
  Doriano,
 
  from the sample project you posted, I can verify the behavior you
 described
  when you use the arrow keys.
  If you click on individual cells it jumps fine. But if you try and type
  something on one cell and then click on the next one
  the text you typed before disappears.
 
 
  Perhaps this is because there is no save event implemented. But the
  complain was about another error: even without writing, but simply
  changing the focused cell with the cursor keys, do you see something
  strange or not?


  So perhaps a few more changes happened in the tableview control from
 2.0 to
  2.15 (the one you upgraded to) that are
  not yet documented and you just might have to consider using a
 different
  approach.
 
 
  Which different approach? I would like to identify the cause of this
  problem. If it is gambas 2.15, and gambas 2.16 or 2.17 solves, I switch.
  If all gambas versions above 2.0.0 have the problem, I stick with 2.0.0.
  If the problem are QT libraries, I change them. But surely I don't want
  to change a painful code made to compile an invoice through a tableview
  with something else...


  I use Debian Lenny 5.0.3 and Gambas 2.16
 
  I hope this helps.
 
 
  ...it would help if you told me if the error is still there in 2.16 or
  not...
  BTW: my debian version (cat /etc/debian_version) shows 5.0.2, and is
  fully updated. How it goes you have 5.0.3?
 
 
 
 
  Regards,
  Dimitris
 
  On Thu, Dec 3, 2009 at 8:49 AM, Doriano Blengino 
  doriano.bleng...@fastwebnet.it wrote:
 
 
 
  I am modifying an old program, which uses a TableView to construct an
  invoice.
  The tableview is almost always in edit mode.
 
  With gambas version 2.0.0, the original version I used to write the
  program, there is no problem (not this one).
 
  Now I upgraded to gambas v. 2.15 (debian package gambas2 2.15.2-1),
 running
  on a debian stable release.
 
  When in the tableview (in edit mode) I press an arrow key, the cursor
 slips
  on every possible cell in the request direction, until it finds the
 end of
  the tableview. But this is not enough: if the cursor key is Left or
 Right,
  the cell walking goes even further, wrapping to the next or previous
 row and
  restarting.
 
  I created an executable, and it behaves the same.
 
  Then I copied the executable to another machine, having gbx2 version
 2.0.0,
  and the problem does not show up.
 
  The program uses explicitly QT; both machines have libqt-mt.so.3.3.8
  installed, and the same debian stable os, and I use both machines
 from a
  third machine running an X11 server (XMing). So it seems the problem
 is
  related to gambas.
 
  I send a sample project that shows the problem. Launch the
 application,
  click on the Tableview to focus it, and press a cursor key. The cursor
 will
  travel in the requested direction 'til the end of the grid.
 
  What can I do about this? I was very very reluctant to upgrade gambas;
 but
  I reached a point where I could no more install or upgrade my system.
 Even
  when trying to install a simple htop(1) from debian repositories, I
 was told
  to upgrade some fu*ing library, which in turn meant to upgrade gambas,
 which
  in turn meant to upgrade QT, GTK, poppler, libc, libc-bin... well,
  *hundreds* of packages. I will contact the debian mantainer about this
 - I
  don't care about postgres, firebird, curl, smtp, opengl, sdl, v4l, xml
 and
  things. It seems that to install gambas on debian one must pull in all
 the
  world. The other machine, having the old version of gambas, has no
 problems
  - I copied the gambas binaries directly, instead of installing them
 from
  packages. I can install and upgrade, and everything runs smoothly.
 Sorry for
  the debian-related blow.
 
  Regards,
  Doriano
 
 
 
  No same with
 
  2.18.0
  Revision: 2447
 
 
 
 Sorry Charlie - I don't understand... no what? :-)
 Does the cursor travel a lot, or the 2.18 version is exempt (ie, has no
 bug?)?

 Thank you,
 Doriano


 --
 Join us December 9, 2009 for the Red

Re: [Gambas-user] 2 forms closing at the same time. Is it a bug?

2009-11-14 Thread Dimitris Anogiatis
Hey Toni,

Fmail closes because it was loaded last.
If you move FMain.Show first ie

  FMain.Show
  Form1.Show
  Form1.closein(8)

then FMain remains after Form1 closes

I tried your program in Debian Lenny 5.0.3 in Gambas 2.16

It should work in 2.17 as well but give it a try

I hope this helps

Regards,
Dimitris

On Fri, Nov 13, 2009 at 6:27 PM, Toni ar...@tgi.es wrote:

 Hi,
 I'm not sure whether this is a bug or it's me doing something wrong...

 When I want to show two (or more) Forms from a module set as Startup
 class in its main function,  whenever a ME.close is called within one of
 the forms, the other(s) one gets closed too.
 To me this isn't the expected behavior... Just one of them should get
 closed (the ME part is what made me expect it).

 I attach a simple project to illustrate my point, but basically it's as
 follows:

 1st.- Module1 ( as startup class)
 PUBLIC FUNCTION Main()

  Form1.Show
  FMain.Show

 END

 2nd.- In Form1 ME.Close is executed

 3th.- The FMain form gets closed too and the application finishes.

 Instead I would expect Fmain not being closed and the application left
 running until Fmain gets closed by its own means.

 Regards,
 Toni


 P.S.: I'm testing it in an Ubuntu 8.10 64bits with Gambas version 2.17
 (revision 2415)



 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] string conversion

2009-11-12 Thread Dimitris Anogiatis
Hey Matti,

you might want to roll a string conversion function of your own.
The Replace function might be of particular use to you.

You can read about it over here
http://www.gambasdoc.org/help/lang/replace

and you can also find all the other string related functions over here
http://www.gambasdoc.org/help/cat/string

if for example you want to replace all the spaces in your string with %20
you would call

'String array that will hold the characters you want to replace
Dim tmpChar as NEW String[]
Dim iterator as Integer
Dim sFilename as String

'the value of your sFilename
sFilename = /home/username/Meine Bilder/öffentliche Fotos übertragen/015
das Schönste.jpg

'Add the characters you want to replace
tmpChar.Add(ö)
tmpChar.Add(ü)

'Loop through the array and replace the string characters that correspond to
the array characters
'with their hexadecimal values precedded by a % sign
FOR iterator = 0 to tmpChar.Count -1

'set the string equal to the resulting string from the Replace$ Function
 sFilename = Replace$( sFilename,tmpChar[iterator],% 
Hex$(Asc(tmpChar[iterator])))

NEXT

'to show you the finished string
PRINT sFilename

so you could also just make a small array with all the characters you want
to
change and then do a sequence of Replace$ calls replacing them with


I hope these guidelines help you more (and confuse you less)

Regards
Dimitris


On Thu, Nov 12, 2009 at 1:14 PM, Matti math.e...@t-online.de wrote:

 Well, after some thoughts, I can answer myself.

 I tried this example:

  sFilename = /home/username/Meine Bilder/öffentliche Fotos übertragen/015
 das Schönste.jpg
  i = 1
  WHILE i  Len(sFilename)
sChar = Mid$(sFilename, i, 1)
IF Asc(sChar)  122 THEN
  sFilename = Left$(sFilename, i - 1)  %  Hex$(Asc(sChar)) 
 Right$(sFilename, Len(sFilename) - i)
ELSE IF sChar =   THEN
  sFilename = Replace$(sFilename,  , %20)
ENDIF
i = i + 1
  WEND
  sOut = file://  sFilename
  PRINT sOut

 and it seems to work ok and reasonably fast.
 But if you have better ideas, you're welcome!



 Matti schrieb:
  Hi,
 
  I'm looking for a string conversion function for URIs.
  It should work like CGI.Encode, but
  - don't transform slashes /
  - transform spaces   not to + but to %20.
 
  Couldn't find anything in Gambas. Maybe a shell command?
 
  Thanks
  Matti


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Breaking processes

2009-11-04 Thread Dimitris Anogiatis
 Hey M,

to stop the execution of a for loop all you have to do is check for a
condition then use break

for example


PUBLIC SUB FCopy()
DIM i AS Integer
Dim stopLoop as Boolean
DIM filepaths AS String[]
' the array filepaths is filled with contents
FOR i=0 To filepaths.Count-1

if stopLoop = False THEN
   SHELL cp -ffilepaths[i]   /home/destination
Else
   BREAK
ENDIF
NEXT

I hope this helps

Regards,
Dimitris

On Wed, Nov 4, 2009 at 3:41 AM, M. Cs. mohar...@gmail.com wrote:

 How can I stop the execution of a loop which includes shell command for
 copying files?

 Example:
 PUBLIC SUB FCopy()
 DIM i AS Integer
 DIM filepaths AS String[]
 ' the array filepaths is filled with contents
 FOR i=0 To filepaths.Count-1
 SHELL cp -ffilepaths[i]   /home/destination
 NEXT

 END

 I'd like to add a Cancel button which would break the loop.Thanks!

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-18 Thread Dimitris Anogiatis
Vassili,

Going back and forth through the whole thread I can also see that
change_bgcolor is not
as efficient as it could be simply because it's doing a loop looking through
all the controls
trying to match the desired control's name.

for change_bgcolor  I would suggest this

 Public SUB change_bgcolor(pos as Integer)
   SELECT CASE pos
 CASE 1
Label1.Background = Color.Red
 CASE 2
Label2.Background = Color.Red
.
.
.
.
.
 CASE 100
   Label100.Backround = Color.Red
 CASE ELSE
   END SELECT
 END

I know this looks tedious to code but the reason why I recommend this is
that with the SELECT CASE, change_bgcolor would do 3 moves in every case
instead of going through the 100 labels you have in your Camp Ground
Scheduling application.

As for the Result Not Available message,

let's try this; replace everything from the WHILE line up to the WEND line
with this

   'while the record index is less than the total count of records
   DO WHILE rsThesi.Index  rsThesi.Count

   'change the background color of the label that's in a position reported
in rsThesi!thesi
change_bgcolor(CInt(rsThesi!thesi))

   'move to the next Record
  rsThesi.MoveNext()
   LOOP

if you still get the Result Not Available error then try replacing
rsThesi.Count with an integer
value less than your total records for this query (For example 10) and see
what you get for that.

I hope this helps. Keep up the good work
Hope we can see the finished project soon with screenshots and all :)

Regards,
Dimitris



On Sun, Oct 18, 2009 at 4:11 AM, Kad Mann nospam.nospam.nos...@gmail.comwrote:

 On Sun, 2009-10-18 at 10:47 +0200, Doriano Blengino wrote:
  Kad Mann ha scritto:
   On Sun, 2009-10-18 at 09:08 +0200, Doriano Blengino wrote:
  
   Kad Mann ha scritto:
  
   On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote:
  
  
  
   Dimitri I don't understand
  
  
   Why don't you take a look at the database example in Gambas?
  
   After creating the test table, if you type in an SQL command and
 click
   the run button, you will see a gridview with a myriad colours that
 can
   be changed based on the data. Surely something like that has to be
   easier than trying to work out how to manage a hundred labels on a
   screen, and surely it will offer you much better and easier control
 of
   future UI changes, and surely it will offer a more pleasing and
   intuitive presentation to your user.
  
  
   Surely something like that has to be easier and surely much better
   and easier control.
   Yes and no
  
  
   I didn't ask you.
  
  True, and neither Vassilis asked you something... you can't understand
  him, but I can understand you. In one of your last mail you noticed that
  data controls don't have all the properties as other textboxes, such
  alignment and so on. Be prepared for other surprises. Everybody would
  love to have controls with lots of properties in order to do everything
  you want, but this is impossible (can you believe it? Once you have put
  100 properties in a control, you will find someone asking for the #101).

 Of course, the point is, I didn't ask for the features. Did I? I asked
 is the limitation by design, are there plans to change it, and is there
 a workaround.

 Besides, do you feel it is unreasonable for someone to want a box used
 to show the contents of a Field or edit it, a data-bound control
 intended to save programming time, to have similar functionality to a
 TextBox?

  Real programmers prefer to do things their way, with few versatile
  mechanisms.

 So, who do you believe might not be a real programmer?

   The more a component gets complicated, the less people
  understand it; just now, many problems arise from the fact that people
  don't read documentation, and even when they do, they don't notice some
  important feature; and often that feature is not exactly you need.

 So, you feel that if a DataControl was given similar functionality to a
 TextBox, you might not understand it?

  To Vassilis: I don't know what more to say about your problem. Better to
  wait for Benoit.
 
  Regards to all,
 



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, 

Re: [Gambas-user] make Label background from Database field

2009-10-18 Thread Dimitris Anogiatis
Vassili,

Glad to hear that it's working for you :)

Keep up the good work :)

Regards,
Dimitris

On Sun, Oct 18, 2009 at 7:22 AM, Vassilis K vka...@otenet.gr wrote:

 It is Solved !!


 It works fine with: rsThesi.Count - 1

 DO WHILE rsThesi.Index  rsThesi.Count - 1
 change_bgcolor(CInt(rsThesi!thesi))
rsThesi.MoveNext()
 LOOP

 Thank you Dimitri and Doriano

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili,

Instead of change_bgcolor(Label  rsThesi!thesi) do

PRINT CStr(rsThesi!thesi)
PRINT CStr(rsThesi.Index)

to see where it stops make sure it actually prints the same results.

Keep in mind that the field name has to be EXACTLY the same as the one you
use in mysql.

worst comes to the worst take the MODMain.Connect() apart and line by line
make sure it works

Hope this helps

Regards,
Dimitris

On Sat, Oct 17, 2009 at 12:04 PM, Doriano Blengino 
doriano.bleng...@fastwebnet.it wrote:

 Vassilis K ha scritto:
  I have changed the Select of rsThesi to find only the records that thesi
  0
  as following:
  rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax = 0
  AND thesi  0 )
  Now it only counts 42 rows out of 70.
 
  But the error is the same as described in my previous email:
  Result is not available
  at line:
  change_bgcolor(Label  rsThesi!thesi)
 
 Try to

PRINT rsThesi!thesi
PRINT Label  rsThesi!thesi

 just before the line. I can not believe this... you can also try to use
 some intermediate temporary variable, like

iTemp = rsThesi!thesi
change_bgcolor(Label  iTemp)

 where iTemp is an integer local variable, or try the same but using a
 string sTemp.

 Can't believe...

 Regards,

 --
 Doriano Blengino

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



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili,

We're close...

try

IF rsThesi.Index  rsThesi.Count THEN
   rsThesi.MoveNext()
ENDIF

I hope this takes you a bit further in your project

Keep up the good work

Regards
Dimitris

On Sat, Oct 17, 2009 at 12:55 PM, Vassilis K vka...@otenet.gr wrote:

 And of cource on:

 PRINT rsThesi!thesi
 PRINT Label  rsThesi!thesi

 I get :
 2
 Label2
 12
 Label12
 57
 Label57
 47
 Label47
 33
 Label33
 56
 Label56
 44
 Label44
 11
 Label11
 78
 Label78
 3
 Label3

 etc.

 at Console window as described in my previous email and the code stops at

 PRINT rsThesi!thesi

 with

 result is not available !



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-17 Thread Dimitris Anogiatis
Vassili,

it should look something like this


PUBLIC SUB Form_Open()
 DIM i AS Integer
 DIM rsThesi AS Result

   'connect to the database
   MODMain.Connect()

   'Execute the SQL QueryI hope this helps.

   rsThesi = MODMain.$Con.EXEC(select * from egrafes where elenchosAnax = 0
AND thesi  0 )

   'move to the first record
   rsThesi.MoveFirst



   'while the record index is less than the total count of records
   WHILE rsThesi.Index  rsThesi.Count

   'change the background color of the label that's in a position reported
in rsThesi!thesi
   change_bgcolor(Label  CStr(rsThesi!thesi))

   PRINT Record:   CStr(rsThesi.Index) Result:  
CStr(rsThesi!thesi)

   'if we haven't reached the last record, move to the next one
   IF rsThesi.Index  rsThesi.Count THEN
  rsThesi.MoveNext()
   ENDIF

   WEND
END


Not sure if it will work (I might be missing a few key elements of your
code) but theoretically it should do the job

I hope this helps.
Keep up the good work

Regards,
Dimitris


On Sat, Oct 17, 2009 at 4:56 PM, Kad Mann nospam.nospam.nos...@gmail.comwrote:

 On Sat, 2009-10-17 at 22:46 +0300, Vassilis K wrote:

  Dimitri I don't understand

 Why don't you take a look at the database example in Gambas?

 After creating the test table, if you type in an SQL command and click
 the run button, you will see a gridview with a myriad colours that can
 be changed based on the data. Surely something like that has to be
 easier than trying to work out how to manage a hundred labels on a
 screen, and surely it will offer you much better and easier control of
 future UI changes, and surely it will offer a more pleasing and
 intuitive presentation to your user.



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Classes and Modules in Gambas Server Pages

2009-10-17 Thread Dimitris Anogiatis
Hey guys,

I know that in gambas server pages there's #USE that allows us to use gambas
components.

Is there something similar to PHPs include statement to be able to use
classes and modules?

and when making modules and classes for server pages are there any changes
we need to make
or points we need to be careful of?

Thanks in advance

Regards,
Dimitris
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas and cgi

2009-10-16 Thread Dimitris Anogiatis
Hey Marc,

gambas2-runtime and gambas2-gb-web might be enough to run a cgi
script on your webserver... however if you need to use any other libraries
you need to download then before you can actually use them.

You also need to set up your webserver to run gbw2 as a CGI executable
(like php-cgi is run to run php pages) and add cgi or another kind of
extension
for your gambas pages.

Personally I use gsp for Gambas Server Pages

I would also download gb.vb to use string functions that resemble those
of Visual Basic although it's pretty easy to manipulate strings in Gambas.

Take a look in the following link too

http://gambasdoc.org/help/doc/serverpage?view

I hope I helped
Keep up the good work

Regards,
Dimitris

On Thu, Oct 15, 2009 at 12:37 PM, Alarch ala...@yakati.org wrote:

 Hello,

 I would like some informations about gambas for cgi. I can't find tutorials
 about this aspect, in the wiki the link about web app in gambas is in
 italic (not yet existing).

 First of all, I am using debian, and I found the package gambas2-gb-web
 wich
 seems had hoc.

 if I dry run the install :

  # aptitude -s install  gambas2-gb-web

 Les NOUVEAUX paquets suivants vont être installés :
  gambas2-gb-web gambas2-runtime{a} libxtrap6{a} libxxf86misc1{a}
 shared-mime-info{a} x11-xserver-utils{a} xdg-utils{a}

 Is that enought for runing cgi on the server ? I suppose I need the runtime
 of course, but I don't know if the gambas cgi executable will use db-web on
 the serveur or is linked at compilation ? Maybe install gambas2-runtime
 will be enought ?

 Regards,

 --
 Marc






 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-16 Thread Dimitris Anogiatis
Vassili,

you might also want to take a look at

The Gridview control
http://www.gambasdoc.org/help/comp/gb.qt/gridview

and the Tableview control
http://www.gambasdoc.org/help/comp/gb.form/tableview

perhaps one of those two is a better approach than manipulating individual
labels

If you still want to experiment with your original label approach then this
might help

PUBLIC SUB Form_Open()
 DIM i AS Integer
 DIM rsThesi AS Result
 DIM iD AS Long
  MODMain.Connect()
   rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax =
0)

'Move rsThesi to the first position
rsThesi.MoveFirst
  WHILE rsThesi.Index  rsThesi.Count
   SELECT CASE rsThesi!thesi
   CASE 1
   Label1.Background = Color.Red
   CASE 2
   Label2.Background = Color.Red
   CASE 3
   Label3.Background = Color.Red
..etc up to Label100
   END SELECT
   'Move rsThesi to the next record
   rsThesi.MoveNext
   WEND

END

your previous code didn't work because you weren't moving through rsThesi's
records
one by one, you only checked the first one. this code should work...

if I may add my 2 cents worth of programming wisdom, 100 labels can easily
be replaced
by a gridview and it would be a bit more visually appealing to the end user
but it's up to you
and what works best for you.

I hope this helps
Keep up the good work

Regards
Dimitris




On Fri, Oct 16, 2009 at 12:11 PM, Vassilis K vka...@otenet.gr wrote:


 Since I did not want to make labels on run time, I got a solution to show
 red
 color as following:

 PUBLIC SUB Form_Open()
  DIM i AS Integer
  DIM rsThesi AS Result
  DIM iD AS Long
   MODMain.Connect()
rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax =
 0)
   WHILE iD  rsThesi.Count
SELECT CASE rsThesi!thesi
CASE 1
Label1.Background = Color.Red
CASE 2
Label2.Background = Color.Red
CASE 3
Label3.Background = Color.Red
 ..etc up to Label100
END SELECT
INC iD
WEND
MODMain.$Con.Commit()
 END

 This solution shows only the first found Label (or rsThesi.thesi value) as
 Red
 the others remain uncolored even though they have number values as 10, 25
 etc.
 I thing there is an error on the loop and it stops at the first found
 number
 of the field rsThesi!thesi.
 Any suggestions?


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] make Label background from Database field

2009-10-15 Thread Dimitris Anogiatis
Vassili,

I'm glad we caught 1 of the two errors now let's go for the next one :)


  $alblTime[iD] = NEW Label(ME)
FOR iD = 1 TO rsThesi.Count - 1
  $alblTime[iD].Background = Color.Red
   NEXT

ok this has to be

   FOR iD = 1 TO rsThesi.Count - 1
 $alblTime[iD] = NEW Label(ME)
  $alblTime[iD].Background = Color.Red
   NEXT

for it to work.

because in your approach you only add

  $alblTime[iD] = NEW Label(ME)

once... and then you run the for loop. Which will find an object in
$alblTime[iD]  for iD = 0 (since iD gets the value 0 by default)

but what about iD=1 or iD=2?

I would also try to see if $alblTime.Resize(rdThesi.Count) works for you

if it doesn't work I would change the loop to this and see if this works:

While iD  rsThesi.Count
 $alblTime.Add(NEW Label(Me))
  $alblTime[$alblTime.Count - 1].Background = Color.Red
 INC iD
WEND

it does the same thing as the for loop. And it should work... theoretically
:)

I hope it helps
Keep up the good work

Regards,
Dimitris

On Thu, Oct 15, 2009 at 3:51 PM, Vassilis K vka...@otenet.gr wrote:

 Here is the new routine with all the testings that I tried:

 PRIVATE $alblTime AS NEW Object[]

 PUBLIC SUB Form_Open()
  DIM i AS Integer
  DIM rsThesi AS Result
  DIM iD AS Long
   ME.Title = Σχέδιο θέσεων Camping
   MODMain.Connect()
rsThesi = MODMain.$Con.exec(select * from egrafes where elenchosAnax =
 0)
$alblTime.Resize(100)
   $alblTime[iD] = NEW Label(ME)
 FOR iD = 1 TO rsThesi.Count - 1
   $alblTime[iD].Background = Color.Red
 NEXT
MODMain.$Con.Commit()
 END

 I get the error c
 I 'll continue testing!

 You are right about the loop variant Dimitri. It must be rdThesi.Count-1.

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Normal behaviour for GTK+?

2009-10-13 Thread Dimitris Anogiatis
Ricardo,

If I may express my opinion I think it was a very wise choice on Benoit's
side to support both GTK+ and QT
(even though it seems like it's a rat race trying to debug both components
every time qt works gtk doesn't
and vice versa or both don't work at the same time)

I believe that both technologies have their merits and their uses, and using
either or is more of a a design choice
of the programmer to go with either or and I think that deprecating gb.gtk
would be a pretty big strategy mistake.

It's one of the things that I like about Gambas, that it makes my
application work in both of them.

Regards,
Dimitris


2009/10/13 Ricardo Díaz Martín oceanosoftlapa...@gmail.com

 When I started programing gambas I used gtk+ components because I'm gnome
 users. I like to try my apps in kde and gnome and it's a fact at the
 moment,
 the same code works different in both (and sometimes doen't work in gtk+).

 For this reason, and because I know Benoit use KDE I allways use qt
 components in my apps. Maybe it's possible gtk+ component will be
 deprecated.

 Regards,
 Ricardo

 2009/10/13 nospam.nospam.nos...@gmail.com nospam.nospam.nos...@gmail.com

  This has me pulling my hair out. I think I have narrowed the problem
  down to the GTK+ toolkit for Gambas.
 
  If I create a GTK+ project and put a TextBox and a ValueBox on a form
  and set their default values, when I tab to the TextBox I can over-type
  the text, but when I tab to the ValueBox, the number I type is appended:
 
  For example, if the ValueBox contains 5000 and I type 7, the value
  becomes 50007.
 
  However if I change the project to use a Qt GUI, it works as I expect,
  i.e. if the ValueBox contains 5000 and I type 7, the value becomes 7. I
  have been able to reproduce this behaviour.
 
  Is that normal for GTK+? Is there anything I can do short of using Qt?
  Am I doing something wrong?
 
  Also, I can't find any documentation why I might use Qt in Gambas as
  opposed to GTK+ in Gambas. Opinions on what is best and why will be
  appreciated.
 
 
 
 
 --
  Come build with us! The BlackBerry(R) Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and stay
  ahead of the curve. Join us from November 9 - 12, 2009. Register now!
  http://p.sf.net/sfu/devconference
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Right-click menu

2009-10-09 Thread Dimitris Anogiatis
M Cs,

try this:
create a Menu with name mnuGrid and make it hidden
then add this to the gridview's mousedown event

PUBLIC SUB gridview1_MouseDown()

  IF gridview1.Rows.Count  0 AND gvBackup.Column = 1
  SELECT Mouse.Right
  CASE TRUE
 mnuGrid.popup()
  CASE ELSE
  END SELECT
  ENDIF

END

This will popup your menu if you right click on the second column of any row
(besides the header) of the gridview.

I hope it helps

Regards,
Dimitris


On Fri, Oct 9, 2009 at 12:44 AM, M. Cs. mohar...@gmail.com wrote:

 Is it possible to assign a pop-up menu to an object?
 I mean I have a gridview and I would like to have a right-click menu with
 few options like select all, delete selected etc.
 It would be activated when the mouse's pointer is above the gridview and
 the
 right mouse button would be clicked. A similar possibility exist in Delphi.
 I'm on Gambas 2.13.
 Thanks!

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Right-click menu

2009-10-09 Thread Dimitris Anogiatis
oops... sorry gvbackup should be gridview1

Regards
Dimitris

On Fri, Oct 9, 2009 at 1:03 AM, Dimitris Anogiatis dos...@gmail.com wrote:

 M Cs,

 try this:
 create a Menu with name mnuGrid and make it hidden
 then add this to the gridview's mousedown event

 PUBLIC SUB gridview1_MouseDown()

   IF gridview1.Rows.Count  0 AND gvBackup.Column = 1
   SELECT Mouse.Right
   CASE TRUE
  mnuGrid.popup()
   CASE ELSE
   END SELECT
   ENDIF

 END

 This will popup your menu if you right click on the second column of any
 row (besides the header) of the gridview.

 I hope it helps

 Regards,
 Dimitris



 On Fri, Oct 9, 2009 at 12:44 AM, M. Cs. mohar...@gmail.com wrote:

 Is it possible to assign a pop-up menu to an object?
 I mean I have a gridview and I would like to have a right-click menu with
 few options like select all, delete selected etc.
 It would be activated when the mouse's pointer is above the gridview and
 the
 right mouse button would be clicked. A similar possibility exist in
 Delphi.
 I'm on Gambas 2.13.
 Thanks!

 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] write to folder in windows network

2009-10-09 Thread Dimitris Anogiatis
Doriano,

With all due respect, some people are in the process of relearning key
concepts that they are used to take
for granted in Windows. To them Linux is still uncharted territory and since
this mailing list is so helpful it's
easy to veer of a tad bit off subject... I've seen workarounds involving
external Linux commands being offered
all the time instead of native Gambas code, so to my point of view (and If I
am wrong please correct me)
a simple pointer to a page containing a workaround to that question, or a
simple Sorry my friend I don't know how
to help you with this will suffice.

I mean think about the replies to the call from Benoit about the compilation
error shell script; that wasn't
Gambas specific yet people volunteered to help... why is this any different?

Regards,
Dimitris

PS: this is in no way an attack of any sort, just my opinion

On Fri, Oct 9, 2009 at 10:51 AM, Doriano Blengino 
doriano.bleng...@fastwebnet.it wrote:

 Bill-Lancaster ha scritto:
  Thanks for the advice but how do I mount the path to the network
 directory?
  I've no doubt the answers is simple but I've tried everything I can think
  of.  Thanks in advance
  Bill Lancaster
 
  Bill-Lancaster wrote:
 
  My Gambas PC is attached to a Windows Network - how can I access files
  there from a Gambas application?
 
  Thanks
 
 This question is not gambas related: it is an operating system matter.
 Moreover it has no simple answer - it depends on what your linux system
 is, what file manager you use, what services are running. If you use
 konqueror, there is a special bookmark like Samba network or whatever
 (sorry, I don't remember the true name). If you use gnome, something
 similar should exist. You will see nothing if network parameters are
 wrong. If you use neither, then I don't know what to say. I could speak
 about command-line tools, but this would take us far away.

 Read documentation about linux, networking, and samba. Or, at least, be
 more precise and tell something more about your system.

 Take it easy, I am not flaming just you; but sometimes I see people who
 ask, in this list, questions not gambas-related, like this. I ask
 myself: where do these people come from, and where want they go, without
 knowing that gambas runs on linux? And, knowing that, do they think they
 can write applications without knowing what there is behind? I wonder of
 this: before wanting to write an application which accesses other
 computers (windows computers!) on the network, did you think just for a
 minute about trying to access them without gambas?

 Regards,
 Doriano



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] write to folder in windows network

2009-10-09 Thread Dimitris Anogiatis
Hey Bill,

I found this page, it might help you.

http://www.cyberciti.biz/tips/how-to-mount-remote-windows-partition-windows-share-under-linux.html

as people have suggested earlier, try opening a terminal and try the
commands that are shown in the
site that I gave you; make sure you can access files from the share using cp
(linux copy command),
before you use the share in your Gambas program

I hope it helps

Regards,
Dimitris

On Fri, Oct 9, 2009 at 1:43 PM, Lee McPherson leemcpher...@gmail.comwrote:

 Bill-Lancaster wrote:
  Thanks for the advice but how do I mount the path to the network
 directory?
  I've no doubt the answers is simple but I've tried everything I can think
  of.  Thanks in advance
  Bill Lancaster
 
  Bill-Lancaster wrote:
 
  My Gambas PC is attached to a Windows Network - how can I access files
  there from a Gambas application?
 
  Thanks
 
 
 Are you aware of the command line program:  smbmount?   Do a google
 search on it or use man pages but the basics are to use it like this
 (with your own options):

 smbmount //server/share /localdir -o
 username=user,password=pass,uid=500,gid=500


 There's a way to put it directly into your /etc/fstab so you don't have
 to run it manually each time you reboot but I forget the exact syntax at
 the moment.

 -Lee


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] invalid object error on variable of database queries

2009-10-08 Thread Dimitris Anogiatis
Vasilis,

if I'm reading your code correctly you're closing the result set before you
use rsAPOD!arithmosAp

you could assign the value of rsAPOD!arithmosAp in a variable and use that
in the print statement
or move MODMain.$Con.Close below the CLOSE hPrinter line.

that way the resultset can close properly.

I hope this helps

Regards,
Dimitris

On Thu, Oct 8, 2009 at 1:50 PM, Vassilis K vka...@otenet.gr wrote:

 Hello again,

 I have a strange little problem with my database (Mysql) queries.
 I make many queries and updates together with the click of a button.

 When I make the queries and updates without using any of the results then
 everything works fine !!
 When I want to use a part of the results I get the invalid object error and
 all of the results turn to red ( do not work).

 AT the example below I get the error message invalid object at the PRINT
 #hPrinter line and the problem is on the rsAPOD!arithmosAp  result which is
 LongInteger (at the end of the PRINT line).

 here is the code:

 PUBLIC SUB Kataxwrisi_Click()
DIM hPrinter AS File
DIM $Result5 AS Result
DIM $ResultAPOD AS Result
DIM rsAPOD AS Result
DIM rsGRAMMI AS Result
DIM $ResultE5 AS Result
DIM TrexousaGrammi AS Long
DIM proigoumenos AS Long

MODMain.Connect
MODMain.$Con.Begin()
 $Result5 = MODMain.$Con.Create(BiblioPortas)
 $Result5!trexousaHmerominia = Date(Now)
 $Result5!Poson = Val(TextBox2.Text)
 $Result5.Update()
MODMain.$Con.Commit()



MODMain.Connect()
  rsAPOD = MODMain.$Con.exec(select * from AApodixi order by
 arithmosAp desc)
MODMain.$Con.Close


MODMain.Connect
MODMain.$Con.Begin()
 $ResultE5 = MODMain.$Con.Create(Ektyposis)
 $ResultE5.Update()
MODMain.$Con.Commit()

   MODMain.Connect()
rsGRAMMI = MODMain.$Con.exec(select * from Ektyposis order by
 Grammi desc)
TrexousaGrammi = rsGRAMMI!Grammi
MODMain.$Con.Close

 hPrinter = OPEN /dev/lp1 FOR OUTPUT
hPrinter.EndOfLine = gb.Windows

   PRINT #hPrinter, Anaxorisi Format$(Date(Now), dd.mm.)  
 A/A   tArithmos.Text tEpitheto.Text tOnoma.Text
 tEthnikotita.Text Poson   TextBox2.Text   Ar.Apodixis  
 rsAPOD!arithmosAp

IF TrexousaGrammi MOD 55 = 0 THEN
PRINT #hPrinter, Chr$(12);
PRINT #hPrinter,  
PRINT #hPrinter,  
PRINT #hPrinter,  
PRINT #hPrinter,  
  ENDIF
CLOSE hPrinter


 MODMain.Connect
MODMain.$Con.Begin()
  'MODMain.$Con.exec(UPDATE `pelates`.`egrafes` SET
 `anaxwrisi` = '  Date(Now)  ' WHERE `egrafes`.`AA` = ' 
 tArithmos.Text 
 ' LIMIT 1 )
  MODMain.$Con.exec(UPDATE `pelates`.`egrafes` SET
 `egrafes`.`epitheto` = '  tEpitheto.Text 

 ',etc...',
 `egrafes`.`timifix` = '  CFloat(ttimifix.Text)  ' WHERE `egrafes`.`AA`
 =
 '  tArithmos.Text  '  LIMIT 1 )
  MODMain.$Con.exec(UPDATE `pelates`.`egrafes` SET
 `egrafes`.`ekptosi` = '  tekptosi.Text  ', `egrafes`.`elenchosAnax` =
 1,
 `egrafes`.`xreosi` =0, `egrafes`.`prokatavoli` = ' 
 CFloat(tprokatavoli.Text)  ' WHERE `egrafes`.`AA` = '  tArithmos.Text 
 '
 LIMIT 1 )
MODMain.$Con.Close

MODMain.Connect
MODMain.$Con.Begin()
 $ResultAPOD = MODMain.$Con.Create(AApodixi)
 $ResultAPOD!Hmerominia = Date(Now)
 $ResultAPOD!arithmosAp = rsAPOD!arithmosAp + 1
 $ResultAPOD.Update()
MODMain.$Con.Commit()

  ME.Close
 END



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Trash

2009-10-08 Thread Dimitris Anogiatis
hey Matti,

Ricardo was correct, almost :)
the correct path is to move the  files to is
/home/username/.local/share/Trash/files

I hope this helps

Regards,
Dimitris

On Thu, Oct 8, 2009 at 2:58 PM, Matti math.e...@t-online.de wrote:

 Thank you, that works.

 Just 1 question; This way, the deleted files/directories are not shown if
 the user
 clicks on his trash icon. How to manage that?


 Ricardo Díaz Martín schrieb:
  I tryed in ubuntu linux you can do EXEC [mv, pathandfiletoremove,
  /home/username/.local/share/Trash] and the file is moved to username
 trash
 
  Regards
 
  2009/10/8 Matti math.e...@t-online.de
 
  Is there any way to move files and directories to the user's trash bin?
 
  KILL and RMDIR really delete, but I'd rather use trash.
 
  Tried everything like MOVE TO system:/trash or
 user.local.share.Trash
  or trash.desktop, but all I get is the message
  Access forbidden. That's on a SuSe 11 system.
 
  Thanks
  Matti
 
 
 
 --
  Come build with us! The BlackBerry(R) Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and
 stay
  ahead of the curve. Join us from November 9 - 12, 2009. Register now!
  http://p.sf.net/sfu/devconference
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
  Come build with us! The BlackBerry(R) Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and stay
  ahead of the curve. Join us from November 9 - 12, 2009. Register now!
  http://p.sf.net/sfu/devconference
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] invalid object error on variable of database queries

2009-10-08 Thread Dimitris Anogiatis
Vasilli,

You're welcome I am glad I could help :)

Keep up the good work :)

Regards,
Dimitris

On Thu, Oct 8, 2009 at 3:12 PM, Vassilis K vka...@otenet.gr wrote:

 Thank you Dimitri

 That was it !!!

 I made so many efforts today to find out what was wrong.
 But most of the times the solution is in front of our eyes and we cannot
 see
 it !!!



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] stop file COPY

2009-10-07 Thread Dimitris Anogiatis
Benoît,

If I called COPY from a form and closed that form while the COPY command was
still copying a large file would that stop the action?
or would the command still copy the file in the background?

Regards,
Dimtiris

On Mon, Sep 28, 2009 at 7:10 AM, zerkowski sur bouquiniste.biz 
zerkow...@bouquiniste.biz wrote:



 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] equivalent to python dictionaries in gambas2?

2009-10-07 Thread Dimitris Anogiatis
Hey Moe,

You could use a Collection to achieve what you just described to us. Take a
look at the link below for more details

http://www.gambasdoc.org/help/comp/gb/collection

Regards,
Dimitris

On Wed, Oct 7, 2009 at 2:26 PM, M0E Lnx m0e@gmail.com wrote:

 Hi guys, I'm trying to figure out if there is a way to do this in gambas.

 In python, you can have a dictionary object (declared like list =
 [key1:value1,key2:value2,key3:value3])
 As you can see, it's like a string[] where each object is a key=value pair.

 I'm wondering if there is a way to emulate something like this in gambas2



 The idea is to have maybe a list like
 option1=window1
 option2=window2
 option3=window3

 Then in my app, the key value of each component would be a button and
 the value would be a window name which is to be opened when the user
 clicks the respective button

 Can someone think of a possible solution?


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] NNTP Class

2009-10-06 Thread Dimitris Anogiatis
Hey Anonymous,

you can open a sourceforge account and place your code in there (or host it
wherever else you think it might be better), and then you can upload your
program's URL and a screenshot and a simple description on the gambas wiki;

more details are on the gambas main page if you click on  the Some
Applications link on the left side of
http://gambas.sourceforge.net/en/main.html

Regards,
Dimitris

On Tue, Oct 6, 2009 at 12:33 AM, nospam.nospam.nos...@gmail.com 
nospam.nospam.nos...@gmail.com wrote:

 I have written a class that supports sending and retrieving articles
 to/from NNTP servers. I also have a small example GUI around it that
 uses the class to post usenet messages.

 The class, based on RFC 2980 and RFC 977, supports getting all groups,
 getting new groups, XOVER headers, posting, separate head and body
 retrieval to allow for filtering, plus articles can be retrieved by
 MessageID or ArticleID, and it handles authentication requests and
 server responses.

 Communication with the server is asynchronous and the class reports
 results back to the caller via events.

 Is there anyone I can send the code to with a view to having it included
 in future Gambas releases as an example project? Anyone interested?




 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] NNTP Class

2009-10-06 Thread Dimitris Anogiatis
You're very welcome, Anonymous,

I'm glad I helped

Just throwing this in there, it would make it easy for everyone in the
mailing list if you did happen to somehow identify yourself.
Even if you used a nickname it would be easier for someone that attempts to
help you with a gambas-related or even a linux-related problem, since posts
come from many people, it helps the conversation.

Just something to consider

Regards,
Dimitris

On Tue, Oct 6, 2009 at 4:32 AM, nospam.nospam.nos...@gmail.com 
nospam.nospam.nos...@gmail.com wrote:

 On Tue, 2009-10-06 at 01:17 -0600, Dimitris Anogiatis wrote:
  Hey Anonymous,
 
  you can open a sourceforge account and place your code in there (or host
 it
  wherever else you think it might be better), and then you can upload your
  program's URL and a screenshot and a simple description on the gambas
 wiki;
 
  more details are on the gambas main page if you click on  the Some
  Applications link on the left side of
  http://gambas.sourceforge.net/en/main.html

 Thanks. I found the gambas application repository at that link. I'll
 tidy up the comments and upload it there in a week or so. Your help was
 appreciated.

  Regards,
  Dimitris
 
  On Tue, Oct 6, 2009 at 12:33 AM, nospam.nospam.nos...@gmail.com 
  nospam.nospam.nos...@gmail.com wrote:
 
   I have written a class that supports sending and retrieving articles
   to/from NNTP servers. I also have a small example GUI around it that
   uses the class to post usenet messages.
  
   The class, based on RFC 2980 and RFC 977, supports getting all groups,
   getting new groups, XOVER headers, posting, separate head and body
   retrieval to allow for filtering, plus articles can be retrieved by
   MessageID or ArticleID, and it handles authentication requests and
   server responses.
  
   Communication with the server is asynchronous and the class reports
   results back to the caller via events.
  
   Is there anyone I can send the code to with a view to having it
 included
   in future Gambas releases as an example project? Anyone interested?
  
  
  
  
  
 --
   Come build with us! The BlackBerryreg; Developer Conference in SF, CA
   is the only developer event you need to attend this year. Jumpstart
 your
   developing skills, take BlackBerry mobile applications to market and
 stay
   ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
   http://p.sf.net/sfu/devconf
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 --
  Come build with us! The BlackBerryreg; Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and stay
  ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
  http://p.sf.net/sfu/devconf
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user



 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] stop file COPY

2009-09-28 Thread Dimitris Anogiatis
Hey guys,

Does anyone if it's possible to cancel a file COPY of a pretty big file
(a few hundred megabytes) in the middle of the action?

I'm trying to add this functionality to my backup project but I can't find
any parameters on the Copy command within the documentation.

Regards
Dimitris
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Closing X in Form event?

2009-09-25 Thread Dimitris Anogiatis
hey Rolf,

Is it a modal form a normal form or a dialog?

I think that in normal forms Form_Unload is the event you want but I'm not
entirely sure
could you give us a few more details on what you're trying to do?

Regards
Dimitris

On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert 
eilert-sprac...@t-online.de wrote:

 Hi all,

 which event refers to the closing X of the form?

 When I use Form_Close the code will be run even when clicking OK (and
 closing the form). What I want is the same reaction like when clicking
 the Cancel button without affecting OK.

 Maybe a stupid question, but 've never had this problem yet.

 Regards

 Rolf


 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Closing X in Form event?

2009-09-25 Thread Dimitris Anogiatis
You're right Rolf,

I was under the impression that there was such an event :)

sorry about that :)

when you get it working would you mind pasting the code here?

I'd like to take a look at it

Regards
Dimitris

On Fri, Sep 25, 2009 at 4:26 AM, Rolf-Werner Eilert 
eilert-sprac...@t-online.de wrote:

 Dimitris Anogiatis schrieb:
  hey Rolf,
 
  Is it a modal form a normal form or a dialog?

 It's a modal one

 
  I think that in normal forms Form_Unload is the event you want but I'm
 not
  entirely sure
  could you give us a few more details on what you're trying to do?

 Well, I can't find Form_Unload. Wasn't that VB? No, what I was looking
 for was an event referring to the X gadget of the window only.

 But I just remembered that I could do it using a flag which is set
 clicking OK and not set clicking Cancel or something else. This flag
 then is referenced during Form_Close. This would have the same effect
 (if my crude logic doesn't fool me today...) :-)

 Rolf

 
  Regards
  Dimitris
 
  On Fri, Sep 25, 2009 at 3:36 AM, Rolf-Werner Eilert 
  eilert-sprac...@t-online.de wrote:
 
  Hi all,
 
  which event refers to the closing X of the form?
 
  When I use Form_Close the code will be run even when clicking OK (and
  closing the form). What I want is the same reaction like when clicking
  the Cancel button without affecting OK.
 
  Maybe a stupid question, but 've never had this problem yet.
 
  Regards
 
  Rolf
 
 
 
 --
  Come build with us! The BlackBerryreg; Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and
 stay
  ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
  http://p.sf.net/sfu/devconf
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
  Come build with us! The BlackBerryreg; Developer Conference in SF, CA
  is the only developer event you need to attend this year. Jumpstart your
  developing skills, take BlackBerry mobile applications to market and stay
  ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
  http://p.sf.net/sfu/devconf
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 



 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] chop project

2009-09-22 Thread Dimitris Anogiatis
Hey JY,

One approach would be to create a main message-passing class, and link the
sub-projects to that class passing messages through a common set of
properties and methods

Another approach is to create the sub-projects with a class of common
properties and methods that pass the message from one
sub-project to the other.

The tricky part would be to dynamically load that sub-project in your main
project, effectivelly creating a sort of plugin.

I hope this helps

Regards
Dimitris

On Tue, Sep 22, 2009 at 8:22 PM, Jean-Yves F. Barbier 12u...@gmail.comwrote:

 Hi people,

 I wonder if it is possible to chop a big project into some smaller ones?

 My only problem is to keep a kinda global class linked to all sub-projects
 in oder to pass parms from one sub-project to another; is there a manner
 to do that or not?

 JY
 --
 Life is like an onion: you peel it off one layer at a time, and sometimes
 you weep.  -- Carl Sandburg


 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] how to start a file?

2009-09-14 Thread Dimitris Anogiatis
Hey Robi,

What I described above is a way to store information in a configuration
file. what you need is different

Files are going to be attached where? Where is the pdf going to be stored?
in the same computer where
the project is running? or in a website?

To open a file with the default application, try using the gb.desktop
component and Desktop.Open() as Benoit suggested.

call it like this  Desktop.Open(file:///myPDF.pdf) if it is for a file or
  Desktop.Open(http://myserver.com/myPDF.pdf;) if the
file is on a server somewhere on the internet.


On Mon, Sep 14, 2009 at 8:40 AM, Robert JUHASZ robert1juh...@gmail.comwrote:

 Hi Dimitris,

 Thanks for your answer.
 I'm not sure if this is exactly what I want but I'll check. I try to tell
 more concretly my need:
 I wanna make a small project follower application for my colleagues where
 they can follow some actions and attach files. For instance a pdf file with
 the customer spec.

 The data, I'll store in a mySQL database where I can put the path as well.

 When the user (or an other user) opens the project and clicks on the link,
 how can I tell to Gambas to open the file with the default application (in
 the example with acrobat reader). I just need the same effect as when I
 double click on the icon.

 If this is what you described just confirm please.

 Thanks,
 Robi

 2009/9/14 Dimitris Anogiatis dos...@gmail.com

  Hey Robi,
 
  one of the options is to use the gb.settings library.
 
  while you're on the IDE press CTRL and P then click on the Componets tab,
  find gb.settings and click on the box on the left side of the selection
  then
  press Ok
 
  now in your code you need to use this on top of your code (ie put this on
  the first line of your form or module)
 
  Public pathSettings AS NEW Settings(User.Home / Application.Name /
  Application.Name  .conf)
 
  this means that if your user account name is robi and your application's
  name is myApp then the settings
  file will be created in this path
 
  /home/robi/myApp/myapp.conf
 
  now to save settings you use pathSettings like this
 
  pathSettings[Files/LoadFrom]=your path
 
  this will create a category Files in your settings file and under that it
  will create a LoadFrom item
  where you can store your path's value
 
  to read that value all you have to do is
 
  myPath = pathSettings[Files/LoadFrom]
 
  I hope it helps
 
  Regards
  Dimitris
 
 
  On Sun, Sep 13, 2009 at 4:39 PM, yuhej robert1juh...@gmail.com wrote:
 
  
   Hello,
  
   I just start with Gambas (used VB before) and hopefully I found a place
   where I can get some answers.
   At this moment I wish to add an option of attaching files in my
  application
   (by saving the path) and to open them later.
   Can someone tell me how can I start a file from Gambas? For instance a
   spreadsheet with open office?
  
   Thanks for your help in advance.
  
   Robi
   --
   View this message in context:
   http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html
   Sent from the gambas-user mailing list archive at Nabble.com.
  
  
  
  
 
 --
   Let Crystal Reports handle the reporting - Free Crystal Reports 2008
  30-Day
   trial. Simplify your report design, integration and deployment - and
  focus
   on
   what you do best, core application coding. Discover what's new with
   Crystal Reports now.  http://p.sf.net/sfu/bobj-july
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus
  on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core

Re: [Gambas-user] What should executable open with?

2009-09-14 Thread Dimitris Anogiatis
CelticBhoy,

open a folder that contains a gambas file and right click on it
then click on the Open with tab and press the add button
click on the Use a custom command section and add gbr2

when you do that select the gbr2 in the open with tab and click ok

and next time you doubleclick on a gambas file it will automatically execute
it.

Hope this helps

Regards,
Dimitris


On Mon, Sep 14, 2009 at 8:28 AM, Jussi Lahtinen jussi.lahti...@gmail.comwrote:

 I think your system doesn't have gambas MIME type installed.
 Maybe you should try to install Gambas again.

 Jussi


 On Mon, Sep 14, 2009 at 17:14, Jussi Lahtinen jussi.lahti...@gmail.com
 wrote:
  gbr2 ProgramName.gambas
 
 
  Jussi
 
 
  On Mon, Sep 14, 2009 at 12:18, CelticBhoy weldon_g...@hotmail.com
 wrote:
 
  Really daft question, but on my Ubuntu system my compiled gambas app is
 set
  to open with wine for some reason. I just want to know what it should be
 set
  to, to enable it to run.
  --
  View this message in context:
 http://www.nabble.com/What-should-executable-open-with--tp25432680p25432680.html
  Sent from the gambas-user mailing list archive at Nabble.com.
 
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] how to start a file?

2009-09-13 Thread Dimitris Anogiatis
Hey Robi,

one of the options is to use the gb.settings library.

while you're on the IDE press CTRL and P then click on the Componets tab,
find gb.settings and click on the box on the left side of the selection then
press Ok

now in your code you need to use this on top of your code (ie put this on
the first line of your form or module)

Public pathSettings AS NEW Settings(User.Home / Application.Name /
Application.Name  .conf)

this means that if your user account name is robi and your application's
name is myApp then the settings
file will be created in this path

/home/robi/myApp/myapp.conf

now to save settings you use pathSettings like this

pathSettings[Files/LoadFrom]=your path

this will create a category Files in your settings file and under that it
will create a LoadFrom item
where you can store your path's value

to read that value all you have to do is

myPath = pathSettings[Files/LoadFrom]

I hope it helps

Regards
Dimitris


On Sun, Sep 13, 2009 at 4:39 PM, yuhej robert1juh...@gmail.com wrote:


 Hello,

 I just start with Gambas (used VB before) and hopefully I found a place
 where I can get some answers.
 At this moment I wish to add an option of attaching files in my application
 (by saving the path) and to open them later.
 Can someone tell me how can I start a file from Gambas? For instance a
 spreadsheet with open office?

 Thanks for your help in advance.

 Robi
 --
 View this message in context:
 http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html
 Sent from the gambas-user mailing list archive at Nabble.com.



 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] question about Dialog.SelectDirectory()

2009-09-10 Thread Dimitris Anogiatis
It's not a stupid question Charlie,

you can use the DirChooser control that's available in gb.form
You can have a form with that control come up as modal
(so you can't do anything else until you have chosen a directory
 and inside it you can put a dirchooser control

you can get the selected path like this:

tmpPath = DirChooser1.SelectedPath

I hope this helps

Regards
Dimitris

On Thu, Sep 10, 2009 at 12:49 PM, Charlie Reinl karl.re...@fen-net.dewrote:

 Salut Benoit,

 my be a very stupid question, but for what I'm looking for, is like the
 Dialog.SelectDirectory() but when I change into a folder/directory
 I would like to see also the files in that folder/directory.
 And as result the path to the folder/directory is returned.

 Reason:
 Choosing an SQLightn Database or I have to say where all the
 invoices have to be stored looking for the right one.


 --
 Amicalment
 Charlie



 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to get listbox selection?

2009-09-08 Thread Dimitris Anogiatis
Sorry Rolf,

It won't happen again, I just thought that since the question has already
been answered for another user in English
that it wouldn't be a problem to just repeat the same solution in a
different language as a courtesy for a fellow countryman;

Regards
Dimitris

On Tue, Sep 8, 2009 at 2:11 AM, Rolf Schmidt rolf.fr...@t-online.de wrote:

 Hallo Dimitris

 deine Mail ist sehr interessant, doch leider kann ich sie nicht lesen -
 komischer englischer Dialekt.

 Gruß
 Rolf

 PS: If you like to answer in a different language then english, the
 language
 of this list, do it as PM.

 
  An katalava kala thes na vlepeis oles tis epiloges pou exeis kanei
  sto listbox se multiple mode, etsi?
 
  Exo ftiaxei mia synartisi pou kanei akrivos afto to pragma.
 
 
 '--
 -- PUBLIC FUNCTION multipleSelections(targetLB
  AS ListBox) AS String
DIM targetCount AS Integer
DIM foundSelected AS Integer
DIM Res AS String
 
targetCount = 0
foundSelected = 0
DO WHILE targetCount  targetLB.Count
 IF targetLB[targetCount].selected = TRUE THEN
  Res = targetLB[targetCount].Text  |
  INC foundSelected
 ENDIF
INC targetCount
LOOP
 
  IF foundSelected = 0 THEN
  RETURN Nothing found
ELSE
  RETURN Left(Res, Len(Res) - 1)
  ENDIF
 
  END
 
 '--
 --
 
  gia na tin xrisimopoihseis tin kaleis me to parakato styl
 
  tmpStr = multipleSelections(myListbox)
 
  kai tha sou vgalei san apotelesma to exeis
 
  Item1|Item3|item5
 
  Pou einai ta onomata twn stoixeiwn pou dialexes sto listbox.
 
  an xreiazesai to index tou kathe stoixeiou prepei na kaneis allages stin
  synartisi.
 
  Elpizo na voithisa, kai oti allo xreiazetai pes mou.
 
  Regards,
  Dimitris
 
  2009/9/7 Demosthenes Koptsis demosthen...@gmail.com
 
   Hi to all,
  
   how can we get the selection of a multiple mode listbox?
  
   return an array of selected items or something?
  
   --
  
   Γεια χαρα σε όλους!!!
  
   Regards,
  
   Demosthenes Koptsis
  
  
  
 -
  - Let Crystal Reports handle the reporting - Free Crystal Reports
 2008
   30-Day trial. Simplify your report design, integration and deployment -
   and focus on
   what you do best, core application coding. Discover what's new with
   Crystal Reports now.  http://p.sf.net/sfu/bobj-july
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 ---
 --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
  30-Day trial. Simplify your report design, integration and deployment -
 and
  focus on what you do best, core application coding. Discover what's new
  with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user




 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] ReturnValue

2009-09-07 Thread Dimitris Anogiatis
Laurent,

How can someone detect the return value from an application that's
terminating,
(either in gambas or bash)

Thank you in advance

Regards,
Dimitris

On Mon, Sep 7, 2009 at 3:13 AM, Laurent Carlier lordhea...@gmail.comwrote:

 Le lundi 07 septembre 2009 10:19:40 Charlie Reinl, vous avez écrit :
  Am Sonntag, den 06.09.2009, 16:10 -0600 schrieb Dimitris Anogiatis:
   hey charlie,
  
   Are you talking about return values on a console-type?
I think all you have to do is use Print.
  
   It will also work on a gui-program if you run it through a terminal.
  
   I hope it helps (unless I missed something)
  
   Regards,
   Dimitris
  
   On Sun, Sep 6, 2009 at 2:33 PM, Charlie Reinl karl.re...@fen-net.de
 wrote:
Salut,
   
how can I have a returned Value from a gambas-program?
Something like a Filename.
   
I mean a can a gambas-program which closes returns a value.
   
--
Charlie
 
  Salut Dimitris,
 
  yes I talk about gui-program.
  I tried a simple RETURN Filename , but gambas2 had no idea to handle
  that.
 
  I asked for that, because I need a management for a program which stores
  his results in files on the disk.
 
  First I thouoght to call it with exec, so I can pass the File as
  argument, but I had no return if changes where made or the file saved
  under new name, or wich name if it is a new one.
 
  Now I will try to use the program as a component, I embed it into a form
  of the new management part, I can't pass the file as argu, but between
  NEW and Open I can pass the files name.
  So I will do for the return.
 
  Thanks anyway
  Charlie
 

 http://64.128.110.55/help/comp/gb/application/return

 Application.Return = 1

 ++


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] too many operands

2009-09-07 Thread Dimitris Anogiatis
I'm glad it worked MSulchan,

That's why I love gambas cause it makes things so much easier :)
even more than VB6 ever would :)

Keep up the good work

Regards,
Dimitris

On Mon, Sep 7, 2009 at 3:54 AM, MSulchan Darmawan bleke...@gmail.comwrote:

 Pada Mon, 7 Sep 2009 03:41:35 -0600
 Dimitris Anogiatis dos...@gmail.com menulis:

  Where is this coming from? Gambas or mysql?

 Gambas.

  if mysql doesn't return an error and accepts the insert command then
  you might want to break the sql string like this

 Thanks Dimitris, it work ! Well, at least it pass the F5.
 I didn't know how to break a long string into several lines before, so I
 use visualbasic style :D

 Thanks...
 --
 Cheers,
 [-Sulchan-]
 Terbang dengan claws-mail 3.7.2
 Mendarat di hardy heron 8.04.3 LTS


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Selection from a list

2009-09-03 Thread Dimitris Anogiatis
Alex,

Setting the mode to Multiple does allow that...

if for example you have 6 items on your listbox
if you execute these 2 lines the 1st  the 4th item
will be selected

listbox1[0].Selected = TRUE
listbox1[3].Selected = TRUE

(in Gambas 2.14 on my Debian Lenny it works as described)

If the user wants to change the selection, in order for them
not to lose the previous selection, they have to press CTRL
before they click on a new item or deselect one of the already
selected.

Now to check which items are selected on your listbox... Unless
I'm also missing some other easier way... I would suggest a function like
this

PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String
  DIM targetCount AS Integer
  DIM foundSelected AS Integer
  DIM Res AS String

  targetCount = 0
  foundSelected = 0
  DO WHILE targetCount  targetLB.Count
   IF targetLB[targetCount].selected = TRUE THEN
Res = targetLB[targetCount].Text  |
INC foundSelected
   ENDIF
  INC targetCount
  LOOP

IF foundSelected = 0 THEN
RETURN Nothing found
  ELSE
RETURN Left(Res, Len(Res) - 1)
ENDIF

END


You could use it like this:

Print multipleSelections(listbox1)

and as a result you would get this

Item 1|Item 4

(that's the text of the selected items)

if you want their indices you could modify it so you could
get the selected item indices in the same way

I hope this helps

Regards,
Dimitris



On Thu, Sep 3, 2009 at 5:04 AM, Aleksandrs Livshics alek...@mpe.lv wrote:

 Hallo to everyone.
 Can anyone tell me whether a ListBox can be used to
 display a list with several items preselected and then
 to allow a user to change some part of this selection?
 I think mode multiple must allow to do this. However
 I do not understand how to preselect more than one item
 and how to get the indexes of the finally selected items,
 if there are more then one of them.
 My difficulty is due to the fact that if I want to set some
 item as selected=TRUE I have to make it current by
 specifying the index. But by doing this I change the status
 of the item which was current before... It does not remain
 selected=TRUE , does it?
 I probably do not understand something.
 Alex


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] web browser.

2009-08-29 Thread Dimitris Anogiatis
Hey Steven,

it does work in gnome.

Because the webbrowser control is based on a KDE library
if you load the kbuildsycoca package (or the one that contains it)
and re-run the webbrowser code it might work.

I'm running it on a Debian Lenny and Gnome  2.22.3. And it works
just fine.

Regards,
Dimitris

On Fri, Aug 28, 2009 at 11:55 PM, Steven James Drinnan ste...@sjdsoft.hkwrote:

 Does not work in gnome, need KDE to run. You may want to add that to
 your requirements.



 Steven Drinnan

 On Fri, 2009-08-28 at 18:11 -0600, Dimitris Anogiatis wrote:
  abdurrahman
 
  it works pretty well,
  keep up the great work :)
 
  Regards
  Dimitris
 
  On Fri, Aug 28, 2009 at 3:45 PM, abdurrahman ulusoy uluso...@yahoo.com
 wrote:
 
   when i wait for opengl selection :) , i add some codes to webbrowser
 (in
   gambas examples).
  
   if you want to develope gambasweb codes here
  
http://code.google.com/p/gambasweb/
  
  
  
  
  
  ___
   Yahoo! Türkiye açıldı!  http://yahoo.com.tr
   İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
  
  
 --
   Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
   trial. Simplify your report design, integration and deployment - and
 focus
   on
   what you do best, core application coding. Discover what's new with
   Crystal Reports now.  http://p.sf.net/sfu/bobj-july
   ___
   Gambas-user mailing list
   Gambas-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/gambas-user
  
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 



 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] web browser.

2009-08-28 Thread Dimitris Anogiatis
abdurrahman

it works pretty well,
keep up the great work :)

Regards
Dimitris

On Fri, Aug 28, 2009 at 3:45 PM, abdurrahman ulusoy uluso...@yahoo.comwrote:

 when i wait for opengl selection :) , i add some codes to webbrowser (in
 gambas examples).

 if you want to develope gambasweb codes here

  http://code.google.com/p/gambasweb/




  ___
 Yahoo! Türkiye açıldı!  http://yahoo.com.tr
 İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] type mismatch: wanted integer, got string instead

2009-08-25 Thread Dimitris Anogiatis
MSulchan,

in http://www.gambasdoc.org/help/cat/datatypes you will find a breakdown of
the available data types
supported by Gambas2 and in http://www.gambasdoc.org/help/cat/conv the
available data conversion
functions. In this section of Gambasdoc
http://www.gambasdoc.org/help/cat/type   you will also find
datatype functions that can help you with the special cases... ie IsNULL
will detect if your variable
is null or not.

Now as for a strategy to deal with the floats...

Depending on the floating number's floating part (meaning if the number's
floating part is no more than 2 digits ie 0.90)
seeing as it represents percentage you could always multiply them * 100 and
turn them into an integer. If of course
you get a large number like 0.582694 multiplying it by 100 and turning
that into an integer, you'll end up with
rounded data. The other approach is to use a float type variable but then
you need to change your code to handle
floats.

With this new data about your project's input

You could try something like this...
'--
'if the value of sRain is NOT a null

if IsNull(Val(sRain)) = False  THEN

   'if the number is an integer just assign it to the iRain variable
   if IsInteger(Val(sRain)) = TRUE THEN
  iRain = Val(sRain)

 'if it's not an integer
   ELSE
  'check to see if it's a string
  SELECT CASE isString(sRain)
 CASE True

 'if it's a string check here to see which one of the
 'designated strings you have and assign a value to iRain

 if sRain = x then iRain = 0.4 'or anything else you want to
make it
 if sRain = - then iRain = 0 'or anything else you want to
make it
 CASE False

 ' if it's neither an integer nor a string, convert it into an
integer multiply it by 100 turn it assign it to the iRain variable
 iRain = Val(sRain) * 100
 CASE ELSE
  END SELECT
   ENDIF

'if the value of sRain is a null then just assign a negative integer to
iRain
ELSE
  iRain = -1
ENDIF
'--

I hope this helps a bit more

Regards
Dimitris


On Mon, Aug 24, 2009 at 11:40 PM, MSulchan Darmawan bleke...@gmail.comwrote:

 Pada Mon, 24 Aug 2009 23:00:07 -0600
 Dimitris Anogiatis dos...@gmail.com menulis:

  this way iRain would always have an integer and you wouldn't have to
  worry about
  the mismatch error... assuming 0, 1, 2, x, - and NULL are
  the only values
  used in your database.

 Thanks Dimitris and JY,

 Unfortunately, the possible values are more then that, it's just a
 sample.
 The values are amount of rainfall data, so it has numbers (0 to 400)
 also with floating number 0.5, 1.7, and so on.
 The field of old data on the database was set with string type, which
 x represent as a value less then 0.5, - represent as no rain, and
 NULL represent as no data.

 So, for temporary solution, I'll use TRY statement to exclude x, -,
 and NULL, but the problem is with the floating number.
 I don't know how to handle this yet.
 any idea how to solve this ?

 thanks in advance,
 Regards,
 Sulchan


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] type mismatch: wanted integer, got string instead

2009-08-25 Thread Dimitris Anogiatis
one small correction in this line
if sRain = x then iRain = 0.4 'or anything else you want to make it

it should be

if sRain = x then iRain = 40 'or anything else you want to make it

On Tue, Aug 25, 2009 at 12:50 AM, Dimitris Anogiatis dos...@gmail.comwrote:

 MSulchan,

 in http://www.gambasdoc.org/help/cat/datatypes you will find a breakdown
 of the available data types
 supported by Gambas2 and in http://www.gambasdoc.org/help/cat/conv the
 available data conversion
 functions. In this section of Gambasdoc
 http://www.gambasdoc.org/help/cat/type   you will also find
 datatype functions that can help you with the special cases... ie IsNULL
 will detect if your variable
 is null or not.

 Now as for a strategy to deal with the floats...

 Depending on the floating number's floating part (meaning if the number's
 floating part is no more than 2 digits ie 0.90)
 seeing as it represents percentage you could always multiply them * 100 and
 turn them into an integer. If of course
 you get a large number like 0.582694 multiplying it by 100 and turning
 that into an integer, you'll end up with
 rounded data. The other approach is to use a float type variable but then
 you need to change your code to handle
 floats.

 With this new data about your project's input

 You could try something like this...

 '--
 'if the value of sRain is NOT a null

 if IsNull(Val(sRain)) = False  THEN

'if the number is an integer just assign it to the iRain variable
if IsInteger(Val(sRain)) = TRUE THEN
   iRain = Val(sRain)

  'if it's not an integer
ELSE
   'check to see if it's a string
   SELECT CASE isString(sRain)
  CASE True

  'if it's a string check here to see which one of the
  'designated strings you have and assign a value to iRain

  if sRain = x then iRain = 0.4 'or anything else you want to
 make it
  if sRain = - then iRain = 0 'or anything else you want to
 make it
  CASE False

  ' if it's neither an integer nor a string, convert it into an
 integer multiply it by 100 turn it assign it to the iRain variable
  iRain = Val(sRain) * 100
  CASE ELSE
   END SELECT
ENDIF

 'if the value of sRain is a null then just assign a negative integer to
 iRain
 ELSE
   iRain = -1
 ENDIF

 '--

 I hope this helps a bit more

 Regards
 Dimitris


 On Mon, Aug 24, 2009 at 11:40 PM, MSulchan Darmawan bleke...@gmail.comwrote:

 Pada Mon, 24 Aug 2009 23:00:07 -0600
 Dimitris Anogiatis dos...@gmail.com menulis:

  this way iRain would always have an integer and you wouldn't have to
  worry about
  the mismatch error... assuming 0, 1, 2, x, - and NULL are
  the only values
  used in your database.

 Thanks Dimitris and JY,

 Unfortunately, the possible values are more then that, it's just a
 sample.
 The values are amount of rainfall data, so it has numbers (0 to 400)
 also with floating number 0.5, 1.7, and so on.
 The field of old data on the database was set with string type, which
 x represent as a value less then 0.5, - represent as no rain, and
 NULL represent as no data.

 So, for temporary solution, I'll use TRY statement to exclude x, -,
 and NULL, but the problem is with the floating number.
 I don't know how to handle this yet.
 any idea how to solve this ?

 thanks in advance,
 Regards,
 Sulchan


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] type mismatch: wanted integer, got string instead (solved)

2009-08-25 Thread Dimitris Anogiatis
You're welcome MSulchan :)

I'm glad you solved that problem
and I'm glad I helped :)

Keep up the good work :)

Regards
Dimitris

On Tue, Aug 25, 2009 at 8:01 PM, MSulchan Darmawan bleke...@gmail.comwrote:

 Pada Tue, 25 Aug 2009 04:29:32 -0600
 Dimitris Anogiatis dos...@gmail.com menulis:

  give it a try MSulchan and tell me if it works for you

 Thank you Dimitris, after a little try and error, I change the code
 into like this :

  IF IsNull(Val(sRain)) = FALSE THEN
IF InStr(LCase(sRain), x)  0 OR InStr(sRain, -)  0 OR
 InStr(sRain, .)  0 THEN
IF InStr(LCase(sRain), x)  0 THEN fRain = 0
IF InStr(sRain, -)  0 THEN fRain = 0
IF InStr(sRain, .)  0 THEN
  sRainy = Replace(sRain, ., ,)
  fRain = Val(sRainy)
ENDIF
ELSE
fRain = CFloat(Val(sRain))
ENDIF
  ELSE
fRain = -1
  ENDIF

 Decided to change iRain (integer) to fRain (float).
 As Fabien told that Val() use current localization, so I need to change
 the decimal separator from dot to comma.
 And I think it is fast enough :D

 Thanks again.

 --
 Cheers,
 [-Sulchan-]
 Terbang dengan claws-mail 3.7.2
 Mendarat di hardy heron 8.04.3 LTS


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] type mismatch: wanted integer, got string instead

2009-08-24 Thread Dimitris Anogiatis
Hey MSulchan,

if you're trying to convert either x, -, or NULL
to an integer you're correctly going to get a mismatch error

basically the mismatch error is a way of saying
I can't convert x into an integer, I don't know what number to convert
x to

what I would personally use instead of  iRain = CInt(sRain) is a Select
statement like this one

SELECT CASE sRain
   Case  0
 iRain = 0
   Case  1
 iRain = 1
   Case  2
 iRain = 2
   Case  x
 iRain = 3
   Case  -
 iRain = 4
   Case  ELSE  'this case would be used in case of anything else including
null
 iRain = -1
END SELECT

this way iRain would always have an integer and you wouldn't have to worry
about
the mismatch error... assuming 0, 1, 2, x, - and NULL are the only
values
used in your database.

I hope this helps

Regards
Dimitris

On Mon, Aug 24, 2009 at 10:35 PM, MSulchan Darmawan bleke...@gmail.comwrote:

 Dear sir,

 I have the following code :

  DIM sRain AS String
  DIM iRain AS Integer
  DIM iPos AS Integer
  DIM iYear AS String
  DIM iMonth AS String

  modMain.Connect
  hRes = modMain.$Con.Exec(SELECT * FROM table)

  FOR EACH hRes

iPos = hRes!id
iYear = hRes!yr
iMonth = hRes!mn
sRain = hRes!r1

' PRINT iPos, iYear, iMonth, sRain
iRain = CInt(sRain)
IF iRain  100 THEN PRINT iPos, iYear, iMonth

  NEXT

 on this line : iRain = CInt(sRain)
 I got the type mismatch error.
 This is my first try to program on gambas.
 So why the error happened ? Any suggestion to fix are welcome.

 FYI, the database connected successfully, hRes!r1 is a string, sRain is
 a string, and I'd like to get the integer value of sRain.
 The possible value of sRain is : 0, 1, 2, x, -, NULL.

 Help !
 I'm using gambas2 2.8.2 on linux mint 7.

 Thanks in advance.
 Regards,
 Sulchan


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] To the wish list...

2009-08-22 Thread Dimitris Anogiatis
Benoît,

Perhaps you could also enhance Find to accept regular expressions (or
something similar to what we can use with LIKE)

If it already does can you provide some more documentation about it in
Gambasdoc?


Regards
Dimitris

2009/8/22 Benoît Minisini gam...@users.sourceforge.net

  Jussi Lahtinen ha scritto:
   Meaning like this? Should be faster!
  
   Dim col As New Collection
  
   For ii = 0 To iMyArray.Max
   col.Add(iMyArray[ii],  iMyArray[ii])
   Next
  
   iMyArray.Clear()
  
   For Each ii In col
   iMyArray.Add(ii)
   Next
  
  
   Jussi
  
   2009/8/21 Benoît Minisini gam...@users.sourceforge.net:
   Now I use algorithm like this (maybe not optimal);
  
   Dim ii As Integer
   Dim jj As Integer
   Dim bRemove As Boolean
  
   While ii  iMyArray.Count
  
jj = 0
bRemove = False
While jj  iMyArray.Count
 If ii  jj And iMyArray[ii] = iMyArray[jj] Then
 iMyArray.Remove(ii)
 bRemove = True
 Else
 Inc jj
 Endif
Wend
  
   If bRemove = False Then
   Inc ii
   Endif
   Wend
  
  
   Good point Benôit. Array is populated from file, but maybe I should
 use
   .Find() before .Add().
  
  
   Jussi
  
   You should use a collection to detect duplicates, otherwise your
   algorithm is O(n^2)
 
  Another technique could be to keep the array (or collection, don't know)
  sorted while constructing it. If sorted, a single run can detect all the
  duplicates, giving O(n). If the logic behind requires the values in the
  original order, then this information should be kept in a parallel array.
 
  Just for fun...
 
  Regards,
  Doriano
 

 Yes. I wanted to add two methods: AddSorted() and FindSorted(), that will
 assume the array is sorted, and so will be fastest.

 Regards,

 --
 Benoît


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] To the wish list...

2009-08-22 Thread Dimitris Anogiatis
Thanks Benoît,

I will compile revision 2260 in a few days
since I got a few other things to take care of

Regards,
Dimitris

2009/8/22 Benoît Minisini gam...@users.sourceforge.net

   Benoît,
  
   Perhaps you could also enhance Find to accept regular expressions (or
   something similar to what we can use with LIKE)
  
   If it already does can you provide some more documentation about it in
   Gambasdoc?
  
  
   Regards
   Dimitris
 
  I'm not sure I will do that. But I'm not sure I won't.

 Hey, I did it in revision 2260:

 MyStringArray.Find(LIKE pattern, gb.Like) will use the LIKE instruction
 to
 search the array.

 --
 Benoît


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] To the wish list...

2009-08-21 Thread Dimitris Anogiatis
hey Jussi,

I've tried a similar technique filtering about 5230 filenames and with my
old HyperThreaded p...@3ghz
It works pretty good for me :)

 as I said give it a try :)

Regards
Dimitris

On Fri, Aug 21, 2009 at 1:49 PM, Jussi Lahtinen jussi.lahti...@gmail.comwrote:

 Usually string handling is slower than integer, although I haven't
 test that in Gambas.

 Jussi


 On Fri, Aug 21, 2009 at 22:43, Dimitris Anogiatisdos...@gmail.com wrote:
  Hey Jussi,
 
  If you want to find the duplicate values in an array... give this trick a
  try
 
  1) turn the array into a string
  2) store it in a temp string variable
  3) find the first occurence of the value you want
  4) put the rest of the string in another temp variable
  5) do a replace(tempString, what you want to replace,, )
  6) concat the 2 temp strings together
  7) split the string back into an array
 
  If you notice in step 5 I included the coma in the string you want to
  replace
  and that's because we don't want any duplicate comas it'll screw up the
  splitting process at the end
 
  It's less cpu intensive than doing a for loop to find the duplicates
  (At least I think so, correct me if I'm wrong)
 
  I've used a similar technique to filter certain items from a string array
  don't think this technique would work on other kinds of arrays
 
  I hope it helps
 
  Regards
  Dimitris
 
  On Fri, Aug 21, 2009 at 1:34 PM, M0E Lnx m0e@gmail.com wrote:
 
  What I do also to avoid duplicates is check the array before you add
  the new entry to it
 
  IF MyArray.Find(YourString) = -1 THEN MyArray.Add(YourString)
 
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus
  on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] To the wish list...

2009-08-21 Thread Dimitris Anogiatis
hey Jussi,

if of course you prefer the integer approach rather than my approach
you could try this one.

--

Dim tmpInitial as Integer

tmpInitial = iMyArray.Find(my item)

iMyArray[tmpInitial] = -beginning

While iMyArray.Find(my item) -1

iMyArray.Remove(iMyArray.Find(my item))

Wend

iMyArray[tmpInitial] = left(iMyArray[tmpInitial],-10)

--

I think this approach might speed up things for you since you only
go to the duplicate items and remove them one by one instead of
going through the whole array.

the string approach might also be of use to you

try either one and see which one fits very well in your project :)

I hope this helps

Regards
Dimitris

On Fri, Aug 21, 2009 at 1:54 PM, Dimitris Anogiatis dos...@gmail.comwrote:

 hey Jussi,

 I've tried a similar technique filtering about 5230 filenames and with my
 old HyperThreaded p...@3ghz
 It works pretty good for me :)

  as I said give it a try :)

 Regards
 Dimitris


 On Fri, Aug 21, 2009 at 1:49 PM, Jussi Lahtinen 
 jussi.lahti...@gmail.comwrote:

 Usually string handling is slower than integer, although I haven't
 test that in Gambas.

 Jussi


 On Fri, Aug 21, 2009 at 22:43, Dimitris Anogiatisdos...@gmail.com
 wrote:
  Hey Jussi,
 
  If you want to find the duplicate values in an array... give this trick
 a
  try
 
  1) turn the array into a string
  2) store it in a temp string variable
  3) find the first occurence of the value you want
  4) put the rest of the string in another temp variable
  5) do a replace(tempString, what you want to replace,, )
  6) concat the 2 temp strings together
  7) split the string back into an array
 
  If you notice in step 5 I included the coma in the string you want to
  replace
  and that's because we don't want any duplicate comas it'll screw up the
  splitting process at the end
 
  It's less cpu intensive than doing a for loop to find the duplicates
  (At least I think so, correct me if I'm wrong)
 
  I've used a similar technique to filter certain items from a string
 array
  don't think this technique would work on other kinds of arrays
 
  I hope it helps
 
  Regards
  Dimitris
 
  On Fri, Aug 21, 2009 at 1:34 PM, M0E Lnx m0e@gmail.com wrote:
 
  What I do also to avoid duplicates is check the array before you add
  the new entry to it
 
  IF MyArray.Find(YourString) = -1 THEN MyArray.Add(YourString)
 
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus
  on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 
 --
  Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
  trial. Simplify your report design, integration and deployment - and
 focus on
  what you do best, core application coding. Discover what's new with
  Crystal Reports now.  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


  1   2   >