Re: [Gambas-user] Compiling Gambas 3 svn on Ubuntu

2009-08-10 Thread Ricardo Díaz Martín
Excuse me Nick, now it's no possible because now the server is in production
and it's no possible to downgrade again libtool (at the end I decided to
install pakage from ubuntu repositories).

Server was a 32 bit PC with Ubuntu 9.04 and I was trying to install gambas
2.15

At the next installation (probably this week - in deploying a gambas project
in a customer with 3 differents offices and I'm now in the second - I'll
send the output)

Regards



2009/8/7 Nick Rathke n...@sci.utah.edu

 Hi Ricardo

 could you send the output of libtool ---version so I could match your
 version of 1.5 ?

 That would be a big help .

 --
 Nick Rathke
 Scientific Computing and Imaging Institute
 Sr. Systems Administrator
 n...@sci.utah.edu
 www.sci.utah.edu
 801-587-9933
 801-557-3832

 I came I saw I made it possible Royal Bliss - Here They Come




 Ricardo Díaz Martín wrote:
  I confirm that Gambas2 from svn doesn't compile without having to
 downgrade
  to libtool 1.5 in ubunto 9.04 32 bits out of box.
 
  If you make downgrade of libtool compile with no problems.
 
  Regards
 
  2009/8/6 Benoît Minisini gam...@users.sourceforge.net
 
 
  Nick Rathke wrote:
 
  Sorry about that it looks like copy/paste didn't take from my Suse 11.1
  VM on a Mac.
 
  Here is the same error block as the Ubuntu system(s)
 
  /bin/sh ../libtool --tag=CC   --mode=link gcc -DGBX_INFO -I../share
  -D_REENTRANT -I../libltdl  -O0  -module -O1 -z defs  -Lno  -o gb.la
  -rpath /usr/local/lib/gambas3 gb_la-gbx_c_class.lo
  gb_la-gbx_c_collection.lo gb_la-gbx_c_error.lo gb_la-gbx_c_gambas.lo
  gb_la-gbx_c_file.lo gb_la-gbx_c_application.lo gb_la-gbx_c_array.lo
  gb_la-gbx_c_process.lo gb_la-gbx_c_string.lo
  gb_la-gbx_c_subcollection.lo gb_la-gbx_c_enum.lo gb_la-gbx_c_timer.lo
  gb_la-gbx_class_info.lo -lm-ldl -lpthread
  ../libtool: line 5001: cd: no: No such file or directory
  libtool: link: cannot determine absolute directory name of `no'
  make[4]: *** [gb.la] Error 1
  make[4]: Leaving directory `/root/Desktop/gambas3/main/gbx'
  make[3]: *** [all-recursive] Error 1
  make[3]: Leaving directory `/root/Desktop/gambas3/main'
  make[2]: *** [all] Error 2
  make[2]: Leaving directory `/root/Desktop/gambas3/main'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/root/Desktop/gambas3'
  make: *** [all] Error 2
 
  -Nick
 
 
  Can you send the the output of './reconf' and './configure'?
 
  --
  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
 




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

2009-08-10 Thread Laurent Carlier
Le dimanche 09 août 2009 22:12:42 abdurrahman ulusoy, vous avez écrit :
 i know this docs.  i dont know C and docs. examaples and description for  C
 code. so i cant use in gambas.


Selection and picking code is missing from opengl component, so currently i'm 
adding them. After i will too port some example c code to provide you some 
help.

++

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


[Gambas-user] qt4 and form.controls

2009-08-10 Thread nero

hi , 

I'm trying some of my code on gambas3 to be ready when it's done.

I've some problem with form controls using qt4 , i've a form with n controls 
and want to enumerate them .

I'm using somethink like:


Public Sub Button1_Click()
Dim ch As Object

  For Each ch In Me.Controls
ta.Insert(ch.name  \n)
  Next

End

( ta is a textarea)



using qt3 i see all controls , but with qt4 i get nothink and also no error.

I'm using svn 2229.

thanks, 
marco.




-- 
Il successo copre una miriade di errori.
-- G. B. Shaw



--
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] COPY does not always copy chgrp and chown

2009-08-10 Thread Benoît Minisini
 Benoît Minisini schrieb:
  Just found this (Gambas 2 project) when copying several students from
  one class into another. For each student, there are about 6 files to be
  copied from one directory into another. The first one will always get
  standard chgrp and chown of the application's user. The other files
  SOMETIMES are copied with correct group and ownership, MOSTLY not.
 
  All files have special group and ownership, controlling if teachers or
  only the office can access the data.
 
  Now, this is the function that does the actual copy:
 
 
 
  'kopiert alle Dateien eines Namens in eine andere Kartei
  '- ziel ist der Zielpfad
  '- wenn eine gleichnamige Datei schon vorhanden ist, kommt -1 zurück
  '- wenn es geklappt hat, kommt 0 zurück
 
  'wird z. B. von dlgNamenKopieren benutzt
 
  PUBLIC FUNCTION NamenKopieren(schlyssel AS String, ziel AS String) AS
  Integer
  DIM original AS String
  DIM odatei AS String
  DIM opfad AS String
  DIM datei AS String
 
 original = getFilename(schlyssel)
 
 odatei = file.BaseName(original)
 opfad = file.Dir(original)
 
 IF Exist(ziel / odatei  .felder) THEN
   RETURN -1
 END IF
 
 FOR EACH datei IN Dir(opfad, odatei  .*)
   COPY opfad / datei TO ziel / datei
 NEXT
 
 RETURN 0
 
  END
 
 
  Do you see anything wrong here? As it sometimes works correctly I would
  actually think that it's a bug in copy.
 
  The filesystem is ext3.
 
  Regards
 
  Rolf
 
  COPY actually does the same thing as opening the input file, opening the
  output file, reading the data, writing the data, closing the input gile,
  closing the output file.
 
  So the output file will have the same authorizations as the input file,
  except that they are filtered by the umask (man umask) and that the
  file will be owned by the process who wrote the file.
 
  COPY is there just for simple cases.
 
  I suggest you use the cp command, using the --preserve option.
 
  Regards,

 Ahh - ok. Wouldn't it be possible to pimp COPY giving it a special
 preserve option which would take care about this?


Yes but no. Why trying to rewrite cp? I even don't know why I wrote COPY. 
:-)

I don't want the interpreter to be too big. So maybe a component dedicated to 
file operations?

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


Re: [Gambas-user] COPY does not always copy chgrp and chown

2009-08-10 Thread Rolf-Werner Eilert
Benoît Minisini schrieb:
 Benoît Minisini schrieb:
 Just found this (Gambas 2 project) when copying several students from
 one class into another. For each student, there are about 6 files to be
 copied from one directory into another. The first one will always get
 standard chgrp and chown of the application's user. The other files
 SOMETIMES are copied with correct group and ownership, MOSTLY not.

 All files have special group and ownership, controlling if teachers or
 only the office can access the data.

 Now, this is the function that does the actual copy:



 'kopiert alle Dateien eines Namens in eine andere Kartei
 '- ziel ist der Zielpfad
 '- wenn eine gleichnamige Datei schon vorhanden ist, kommt -1 zurück
 '- wenn es geklappt hat, kommt 0 zurück

 'wird z. B. von dlgNamenKopieren benutzt

 PUBLIC FUNCTION NamenKopieren(schlyssel AS String, ziel AS String) AS
 Integer
 DIM original AS String
 DIM odatei AS String
 DIM opfad AS String
 DIM datei AS String

original = getFilename(schlyssel)

odatei = file.BaseName(original)
opfad = file.Dir(original)

IF Exist(ziel / odatei  .felder) THEN
  RETURN -1
END IF

FOR EACH datei IN Dir(opfad, odatei  .*)
  COPY opfad / datei TO ziel / datei
NEXT

RETURN 0

 END


 Do you see anything wrong here? As it sometimes works correctly I would
 actually think that it's a bug in copy.

 The filesystem is ext3.

 Regards

 Rolf
 COPY actually does the same thing as opening the input file, opening the
 output file, reading the data, writing the data, closing the input gile,
 closing the output file.

 So the output file will have the same authorizations as the input file,
 except that they are filtered by the umask (man umask) and that the
 file will be owned by the process who wrote the file.

 COPY is there just for simple cases.

 I suggest you use the cp command, using the --preserve option.

 Regards,
 Ahh - ok. Wouldn't it be possible to pimp COPY giving it a special
 preserve option which would take care about this?

 
 Yes but no. Why trying to rewrite cp? I even don't know why I wrote COPY. 
 :-)
 
 I don't want the interpreter to be too big. So maybe a component dedicated to 
 file operations?
 


Good idea! There is already File.Save, File.Load etc. Maybe just an 
ammendment/extension/pimp to this?


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

2009-08-10 Thread abdurrahman ulusoy
Thank you . i'm  wating.

--- 10/08/09 Pzt tarihinde Laurent Carlier lordhea...@gmail.com şöyle yazıyor:

Kimden: Laurent Carlier lordhea...@gmail.com
Konu: Re: [Gambas-user] glut
Kime: mailing list for gambas users gambas-user@lists.sourceforge.net
Tarihi: 10 Ağustos 2009 Pazartesi, 10:24

Le dimanche 09 août 2009 22:12:42 abdurrahman ulusoy, vous avez écrit :
 i know this docs.  i dont know C and docs. examaples and description for  C
 code. so i cant use in gambas.


Selection and picking code is missing from opengl component, so currently i'm 
adding them. After i will too port some example c code to provide you some 
help.

++

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



  ___
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


[Gambas-user] File dialog question ?can one multi-select

2009-08-10 Thread richard terry
I want to popup a file dialog and multi-select files and return these say in a 
collection, but can't see any way to do this.

My code looks like this at present, and allows 1 file:
 
Dialog.Title = Select Image File
Dialog.Filter = [*.png, Image Files, *, All files]
  
If Dialog.OpenFile() Then Return

do something with the file..

Thanks in anticipation.

Richard


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


[Gambas-user] Comparing 2 pictures

2009-08-10 Thread richard terry
Hi all,

i wondered if anyone could tell me how to comparea picture1 to picture 2 and 
tell if they were different (ie one had been changed in some way?

thanks in anticipation.

Richard

--
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] Compiling Gambas 3 svn on Ubuntu

2009-08-10 Thread Nick Rathke
Not to worry. I got Gambas(svn) to compile over the the weekend on 
Ubuntu 9.04 x86_64 with no more issues using libtool 1.5-26

Thanks for the feed back.

-Nick


Ricardo Díaz Martín wrote:
 Excuse me Nick, now it's no possible because now the server is in production
 and it's no possible to downgrade again libtool (at the end I decided to
 install pakage from ubuntu repositories).

 Server was a 32 bit PC with Ubuntu 9.04 and I was trying to install gambas
 2.15

 At the next installation (probably this week - in deploying a gambas project
 in a customer with 3 differents offices and I'm now in the second - I'll
 send the output)

 Regards



 2009/8/7 Nick Rathke n...@sci.utah.edu

   
 Hi Ricardo

 could you send the output of libtool ---version so I could match your
 version of 1.5 ?

 That would be a big help .

 --
 Nick Rathke
 Scientific Computing and Imaging Institute
 Sr. Systems Administrator
 n...@sci.utah.edu
 www.sci.utah.edu
 801-587-9933
 801-557-3832

 I came I saw I made it possible Royal Bliss - Here They Come




 Ricardo Díaz Martín wrote:
 
 I confirm that Gambas2 from svn doesn't compile without having to
   
 downgrade
 
 to libtool 1.5 in ubunto 9.04 32 bits out of box.

 If you make downgrade of libtool compile with no problems.

 Regards

 2009/8/6 Benoît Minisini gam...@users.sourceforge.net


   
 Nick Rathke wrote:

 Sorry about that it looks like copy/paste didn't take from my Suse 11.1
 VM on a Mac.

 Here is the same error block as the Ubuntu system(s)

 /bin/sh ../libtool --tag=CC   --mode=link gcc -DGBX_INFO -I../share
 -D_REENTRANT -I../libltdl  -O0  -module -O1 -z defs  -Lno  -o gb.la
 -rpath /usr/local/lib/gambas3 gb_la-gbx_c_class.lo
 gb_la-gbx_c_collection.lo gb_la-gbx_c_error.lo gb_la-gbx_c_gambas.lo
 gb_la-gbx_c_file.lo gb_la-gbx_c_application.lo gb_la-gbx_c_array.lo
 gb_la-gbx_c_process.lo gb_la-gbx_c_string.lo
 gb_la-gbx_c_subcollection.lo gb_la-gbx_c_enum.lo gb_la-gbx_c_timer.lo
 gb_la-gbx_class_info.lo -lm-ldl -lpthread
 ../libtool: line 5001: cd: no: No such file or directory
 libtool: link: cannot determine absolute directory name of `no'
 make[4]: *** [gb.la] Error 1
 make[4]: Leaving directory `/root/Desktop/gambas3/main/gbx'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/root/Desktop/gambas3/main'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory `/root/Desktop/gambas3/main'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/root/Desktop/gambas3'
 make: *** [all] Error 2

 -Nick


   
 Can you send the the output of './reconf' and './configure'?

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

   


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

Re: [Gambas-user] Comparing 2 pictures

2009-08-10 Thread Werner
richard terry wrote:
 Hi all,

 i wondered if anyone could tell me how to comparea picture1 to picture 2 and 
 tell if they were different (ie one had been changed in some way?

 thanks in anticipation.

 Richard

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

   
If they are supposed to be identical and the size matches maybe md5sum?

--
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] Comparing 2 pictures

2009-08-10 Thread richard terry
On Mon, 10 Aug 2009 10:15:20 pm Werner wrote:
 richard terry wrote:
  Hi all,
 
  i wondered if anyone could tell me how to comparea picture1 to picture 2
  and tell if they were different (ie one had been changed in some way?
 
  thanks in anticipation.
 
  Richard
 
  -
 - 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

 If they are supposed to be identical and the size matches maybe md5sum?

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

good idea, I'll try that.

I'm just writing my skin excision module and I've set it up so that I can load 
a photo-graph into the drawing editor and add lines etc, or shapes to outline 
the exicision, but want to be able to know if there were actually any 
changes.

Will post how I got on.

Regards

richard


--
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] Comparing 2 pictures

2009-08-10 Thread Jean-Yves F. Barbier
richard berry a écrit :
... 
 good idea, I'll try that.
 
 I'm just writing my skin excision module and I've set it up so that I can 
 load 
 a photo-graph into the drawing editor and add lines etc, or shapes to outline 
 the exicision, but want to be able to know if there were actually any 
 changes.

none of these methods will work if your files doesn't have the same size;
in this case you'll be obliged to use something somewhat subtil, such as
files' atime; or keep a backtrack of modifications in a special file.

-- 
I choked Linda Lovelace.

--
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] Comparing 2 pictures

2009-08-10 Thread Jean-Yves F. Barbier
richard terry a écrit :
 Hi all,
 
 i wondered if anyone could tell me how to comparea picture1 to picture 2 and 
 tell if they were different (ie one had been changed in some way?

The fastest way is to use cmp (comes from 'diff' package): 
cmp pic1 pic2
and test the returned value

-- 
Do what thou wilt shall be the whole of the Law.
-- Aleister Crowley

--
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] Comparing 2 pictures

2009-08-10 Thread Doriano Blengino
richard terry ha scritto:
 Hi all,

 i wondered if anyone could tell me how to comparea picture1 to picture 2 and 
 tell if they were different (ie one had been changed in some way?
   
This is very difficult, if your images are slightly different but a 
human would say they are the same.

I explain better. If two images differ by only one pixel, then a binary 
comparison fails. So a binary comparison can not work, unless you know 
your two images should be *exactly* the same (I think no...)

There is a program called GQView (and probably others) which have 
algorithms to compare two images in the right way - ie scale them to 
same size, compress colors and normalize them, then compare pixel by 
pixel using a good tolerance.
I did something similar, it is  a pascal source (if I only remember 
where I put it); or you can download those sources and look into them (C 
sources, I suppose).

My algorithm works well enough if the images are about the same, but it 
is fooled if one image has a colored frame around and the other not, or 
if one image is contained in the other, or one is a shifted version of 
the other, and so on. May be that GQView has better way to recognize. 
But I repeat, it is difficult and CPU demanding, perhaps too much for an 
interpreted language.

Regards,
Doriano


--
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] Comparing 2 pictures

2009-08-10 Thread Werner
richard terry wrote:
 On Mon, 10 Aug 2009 10:15:20 pm Werner wrote:
   
 richard terry wrote:
 
 Hi all,

 i wondered if anyone could tell me how to comparea picture1 to picture 2
 and tell if they were different (ie one had been changed in some way?

 thanks in anticipation.

 Richard

   
 If they are supposed to be identical and the size matches maybe md5sum?

 
 good idea, I'll try that.

 I'm just writing my skin excision module and I've set it up so that I can 
 load 
 a photo-graph into the drawing editor and add lines etc, or shapes to outline 
 the exicision, but want to be able to know if there were actually any 
 changes.

 Will post how I got on.

 Regards

 richard

   
There was a discussion covering picture similarity on slashdot recently.
http://ask.slashdot.org/story/09/07/16/2154238/Choosing-Better-Quality-JPEG-Images-With-Software?art_pos=26

Regards
Werner


--
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] Comparing 2 pictures

2009-08-10 Thread Rob
On Monday 10 August 2009 08:42 am, Doriano Blengino wrote:
 There is a program called GQView (and probably others) which have
 algorithms to compare two images in the right way - ie scale them to
 same size, compress colors and normalize them, then compare pixel by
 pixel using a good tolerance.
 I did something similar, it is  a pascal source (if I only remember
 where I put it); or you can download those sources and look into them (C
 sources, I suppose).

I did the same thing in Perl about 9 years ago, circa Mandrake 7.  Don't 
know if it would even run with current versions of everything, and it's 
heavily dependent on Imagemagick for the normalizing, but here it is:

http://www.kudla.org/raindog/perl/ 

(see findimagedupes, the first entry on that page)  Also includes someone 
else's C++ implementation of the comparison function which sped it up by 
several orders of magnitude.

But if both pictures are guaranteed to be the same size, something as 
simple as converting each one to text-based PPM format and using diff 
should be sufficient.

Rob


--
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] Comparing 2 pictures

2009-08-10 Thread richard terry
On Mon, 10 Aug 2009 11:38:02 pm Rob wrote:
 On Monday 10 August 2009 08:42 am, Doriano Blengino wrote:
  There is a program called GQView (and probably others) which have
  algorithms to compare two images in the right way - ie scale them to
  same size, compress colors and normalize them, then compare pixel by
  pixel using a good tolerance.
  I did something similar, it is  a pascal source (if I only remember
  where I put it); or you can download those sources and look into them (C
  sources, I suppose).

 I did the same thing in Perl about 9 years ago, circa Mandrake 7.  Don't
 know if it would even run with current versions of everything, and it's
 heavily dependent on Imagemagick for the normalizing, but here it is:

 http://www.kudla.org/raindog/perl/

 (see findimagedupes, the first entry on that page)  Also includes someone
 else's C++ implementation of the comparison function which sped it up by
 several orders of magnitude.

 But if both pictures are guaranteed to be the same size, something as
 simple as converting each one to text-based PPM format and using diff
 should be sufficient.
thanks, but whats a PPM format? (sorry I'm image illiterate)

Richard


 Rob


 ---
--- 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] Comparing 2 pictures

2009-08-10 Thread Rob
On Monday 10 August 2009 09:58 am, richard terry wrote:
  But if both pictures are guaranteed to be the same size, something as
  simple as converting each one to text-based PPM format and using diff
  should be sufficient.

 thanks, but whats a PPM format? (sorry I'm image illiterate)

It's just another format like PNG or JPG, but it can be optionally text-
based.  Assuming you have ImageMagick installed on your system, if you go

convert myimage.jpg -compress none test.ppm

and then less test.ppm, you'll see that it's written as a plain text 
file.

Rob


--
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] Gambas in Science ?

2009-08-10 Thread Nick Rathke
Jean-Yves F. Barbier wrote:
 Nick Rathke a écrit :
   
 Hi Gambas users,

 I was wondering if any one is using Gambas for Science related work ?
 

 No, I tried to rule the world through Gambas, but it didn't worked (yet:)
  
   
 Would Gambas modules fo OpenMPI, OpenMP, CUDA be useful ? How about BLAS 
 or Lapack ?
 

 May be it is not the right way to consider it, AFAIK these have also command 
 line
 possibilities, so may be writing a nice GUI with Gambas and call/retrieve 
 with it
 is the solution -
True to some degree. They are all also c/c++ libraries with proper 
API's. CUDA is a bit of a different animal with it's own compiler 
however, there are wrappers for other languages ie jCUDA and pyCUDA. So 
next maybe gb.CUDA ?

  Yours involve inclusion of alien programming that will call for
 too much dependencies (and compilation/optimization problems) and trying to 
 see
 things by Benoît's eyes: its hard enough to maintain AND develop one whole 
 language
 to loose time with alien inclusions/evolutions.
   
Point very well taken. I do note that the gb.opengl components are 
maintained Laurent Carlier and I am sure there are a few othere 
developers involved with many of the other components as well.

Granted I am very very new to Gambas but it seems like a very open and 
modular system. So personally I see no reason why Benoît would need to 
support or in anyway be involved with maintaining third party components. 
 JY

   
Thanks for the feed back!
 -- 
 Nick Rathke
 Scientific Computing and Imaging Institute
 Sr. Systems Administrator
 n...@sci.utah.edu
 www.sci.utah.edu
 801-587-9933
 801-557-3832

 I came I saw I made it possible Royal Bliss - Here They Come 
   

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


[Gambas-user] can't change colour in a DataControl

2009-08-10 Thread Jean-Yves F. Barbier
Hi list,

Under a Databrowser, I've got some DataControls I'd like to change background's 
color.

However, it don't work at all: 
dtc_label.Background = H00FF00 
or  dtc_label.Background = HFF00
don't change anything (and trying to escape the '' gives me an error: 
unexpected '\')

JY
-- 
BOFH excuse #285:
Telecommunications is upgrading. 

--
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] Gambas in Science ?

2009-08-10 Thread Jean-Yves F. Barbier
Nick Rathke a écrit :
...
 May be it is not the right way to consider it, AFAIK these have also command 
 line
 possibilities, so may be writing a nice GUI with Gambas and call/retrieve 
 with it
 is the solution -
 True to some degree. They are all also c/c++ libraries with proper 
 API's. CUDA is a bit of a different animal with it's own compiler 
 however, there are wrappers for other languages ie jCUDA and pyCUDA. So 
 next maybe gb.CUDA ?

why not, as far as you are ready to keep it up to date.
The more domains Gambas will cover, the more people will be brought to know  
use it :)

JY
-- 
My mind is a potato field ...

--
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] can't change colour in a DataControl - oops huh?

2009-08-10 Thread Jean-Yves F. Barbier
Jean-Yves F. Barbier a écrit :
 Hi list,
 
 Under a Databrowser, I've got some DataControls I'd like to change 
 background's color.
 
 However, it don't work at all: 
 dtc_label.Background = H00FF00 
 or  dtc_label.Background = HFF00
 don't change anything (and trying to escape the '' gives me an error: 
 unexpected '\')

Oops: I forgot to say I'm under Gambas V. 2.15.2
Huh?: It even don't work as native (if I change BG colour in properties)!?

JY
-- 
Q:  What do monsters eat?
A:  Things.
Q:  What do monsters drink?
A:  Coke.  (Because Things go better with Coke.)

--
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] File dialog question ?can one multi-select

2009-08-10 Thread Stefano Palmeri
Il lunedì 10 agosto 2009 12:50:07 richard terry ha scritto:
 I want to popup a file dialog and multi-select files and return these say
 in a collection, but can't see any way to do this.

 My code looks like this at present, and allows 1 file:

 Dialog.Title = Select Image File
 Dialog.Filter = [*.png, Image Files, *, All files]

 If Dialog.OpenFile() Then Return

 do something with the file..

 Thanks in anticipation.

 Richard


Using Dialog.OpenFile(TRUE) means you want to select
multifile. Then to read the paths you have to use the dialog property paths, 
(Dialog.Paths) that returns an array of selected paths. See OpenFile help
under Dialog for more info.

Stefano



 ---
--- 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] File dialog question ?can one multi-select

2009-08-10 Thread werner 007

Maybe i can help you with a example how i use it in a Project.
I use TRY because the user can toggle between Multi- and Single- select

TRY fcRoot = File.Dir(fcDialog.SelectedPaths[0])
   IF error = 0 then
FOR i = 0 TO fcDialog.SelectedPaths.Count - 1
   ' loop trough filelist
  doSomethingWith( fcDialog.SelectedPaths[I] )
NEXT 
  ELSE 
TRY fcRoot = File.Dir(fcDialog.SelectedPath)
   ' use single selection
doSomethingWith( fcDialog.SelectedPath )
  END IF
 
Regards, Wene007




richard terry-5 wrote:
 
 I want to popup a file dialog and multi-select files and return these say
 in a 
 collection, but can't see any way to do this.
 
 My code looks like this at present, and allows 1 file:
  
 Dialog.Title = Select Image File
 Dialog.Filter = [*.png, Image Files, *, All files]
   
 If Dialog.OpenFile() Then Return
 
 do something with the file..
 
 Thanks in anticipation.
 
 Richard
 
 
 --
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/File-dialog-question--can-one-multi-select-tp24897686p24906701.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


Re: [Gambas-user] Combobox returns item and item_key

2009-08-10 Thread richard terry
On Tue, 11 Aug 2009 12:49:10 pm Hugo Chillon wrote:
 For people who looks for a combobox to show items from a database table
 column but need combobox returns item_key from another column, this is a
 class for them:

 ' Gambas class file
 '**
* '*  ComboBoxPlus class
 '*
 '* Autor: Hugo Chillon Estefanell
 '* Date: 09/08/2009
 '*
 '* ComboBoxPlus is a class designed to allow a ComboBox works with 2
 '* columns from a database table. First column for the key_item, second
 '* column for the item. Combobox shows item and ComboBoxPlus.ItemId()
 '* returns key_item

 '* This class call a class (MysqlConnection) to access a database and
 obtain '* a Result object with data. You should use your own method to
 obtain the '* Result object
 '**

 PRIVATE cboBase AS NEW Object[]
 PRIVATE cbo AS ComboBox


 PUBLIC SUB _New(combo AS ComboBox)
 cbo = combo
 END


 PUBLIC SUB Populate(strTable AS String, strIndex AS String, strValue AS
 String, strWhere AS String)

 DIM conn AS MysqlConnection
 DIM strSQL AS String
 DIM res AS Result

 strSQL = SELECT   strIndex  ,   strValue   FROM   strTable 
strWhere

 conn = NEW MysqlConnection
 res = conn.RunDSQ(strSQL)
 IF res.Count  1 THEN
 res.MoveFirst
 cbo.Add()
 cboBase.Add([, ])
 DO WHILE res.Available
 cbo.Add(res[1])
 cboBase.Add([res[0], res[1]])
 res.MoveNext
 LOOP
 ENDIF
 END


 PUBLIC FUNCTION ItemId() AS Integer

 DIM intValue AS Integer

 intValue = cboBase[cbo.Index][0]
 RETURN intValue

 END

Cool, I'll  have a look at this sometime as this lack of being able to save 
the index  has been one of my main gripes about combo-boxes.


Richard

--
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] Combobox returns item and item_key

2009-08-10 Thread Doriano Blengino
Hugo Chillon ha scritto:
 For people who looks for a combobox to show items from a database table
 column but need combobox returns item_key from another column, this is a
 class for them:

 ' Gambas class file
 '***
 '*  ComboBoxPlus class
 '*
 '* Autor: Hugo Chillon Estefanell
 '* Date: 09/08/2009
 '*
 '* ComboBoxPlus is a class designed to allow a ComboBox works with 2
 '* columns from a database table. First column for the key_item, second
 '* column for the item. Combobox shows item and ComboBoxPlus.ItemId()
 '* returns key_item

 '* This class call a class (MysqlConnection) to access a database and obtain
 '* a Result object with data. You should use your own method to obtain the
 '* Result object
 '**

 PRIVATE cboBase AS NEW Object[]
 PRIVATE cbo AS ComboBox


 PUBLIC SUB _New(combo AS ComboBox)
 cbo = combo 
 END


 PUBLIC SUB Populate(strTable AS String, strIndex AS String, strValue AS
 String, strWhere AS String)
 
 DIM conn AS MysqlConnection
 DIM strSQL AS String
 DIM res AS Result
 
 strSQL = SELECT   strIndex  ,   strValue   FROM   strTable 
strWhere
 
 conn = NEW MysqlConnection
 res = conn.RunDSQ(strSQL)
 IF res.Count  1 THEN 
   

  Should'nt it be res.Count  0? What happens if a table 
contains just one row? Just a thought... :-)

 res.MoveFirst
 cbo.Add()
 cboBase.Add([, ])
 DO WHILE res.Available
 cbo.Add(res[1])
 cboBase.Add([res[0], res[1]])
 res.MoveNext
 LOOP
 ENDIF
 END


 PUBLIC FUNCTION ItemId() AS Integer
   
 DIM intValue AS Integer
 
 intValue = cboBase[cbo.Index][0]
 RETURN intValue
   
 END
   

Regards,

-- 
Doriano Blengino

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


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