[Gambas-user] ubuntu 12.04 error with libvtkzip or vtkzlib ?
Hi, I have been running precise pangolin for few months now, gambas3 compiled well... Today first time I have got this error, I can't find this libvtkzlib, any help ? regards Henri -- make[4]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2/src » make[4]: entrant dans le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » make[4]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » Making all in gb.compress.zlib make[2]: entrant dans le répertoire « /home/riri/svn/trunk/gb.compress.zlib » make all-recursive make[3]: entrant dans le répertoire « /home/riri/svn/trunk/gb.compress.zlib » Making all in src make[4]: entrant dans le répertoire « /home/riri/svn/trunk/gb.compress.zlib/src » /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF .deps/main.Tpo -c -o main.lo main.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF .deps/main.Tpo -c main.c -fPIC -DPIC -o .libs/main.o In file included from /usr/local/include/vtk-5.8/vtkzlib/zlib.h:34:0, from main.c:35: /usr/local/include/vtk-5.8/vtkzlib/zconf.h:15:35: fatal error: vtkzlib/zlibDllConfig.h: No such file or directory compilation terminated. make[4]: *** [main.lo] Erreur 1 make[4]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib/src » make[3]: *** [all-recursive] Erreur 1 make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » make[2]: *** [all] Erreur 2 make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » make[1]: *** [all-recursive] Erreur 1 make[1]: quittant le répertoire « /home/riri/svn/trunk » make: *** [all] Erreur 2 -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Help
Hi Everyone, I am looking for a good example of an exponential algorithm. It seems that everyone uses the Towers of Hanoi problem. I need something simple for my section on algorithms however, I am wanting something other than the usual TOH demo. Any ideas? Thanks for your help! -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ubuntu 12.04 error with libvtkzip or vtkzlib ?
Le 18/01/2012 09:32, Girard Henri a écrit : > Hi, > > I have been running precise pangolin for few months now, gambas3 > compiled well... Today first time I have got this error, I can't find > this libvtkzlib, any help ? > regards > Henri > > -- > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2/src » > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > make[4]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > Making all in gb.compress.zlib > make[2]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > make all-recursive > make[3]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > Making all in src > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall > -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT main.lo > -MD -MP -MF .deps/main.Tpo -c -o main.lo main.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. > -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value > -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF > .deps/main.Tpo -c main.c -fPIC -DPIC -o .libs/main.o > In file included from /usr/local/include/vtk-5.8/vtkzlib/zlib.h:34:0, >from main.c:35: > /usr/local/include/vtk-5.8/vtkzlib/zconf.h:15:35: fatal error: > vtkzlib/zlibDllConfig.h: No such file or directory > compilation terminated. > make[4]: *** [main.lo] Erreur 1 > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > make[3]: *** [all-recursive] Erreur 1 > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[2]: *** [all] Erreur 2 > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[1]: *** [all-recursive] Erreur 1 > make[1]: quittant le répertoire « /home/riri/svn/trunk » > make: *** [all] Erreur 2 > Apparently something located in /usr/local is incorrectly taken for the zlib.h header. If you remove it, things will go nicer. If you can't remove it, you will have to use "./configure" flags to tell where zlib.h is located. Regards, -- Benoît Minisini -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ubuntu 12.04 error with libvtkzip or vtkzlib ?
After I have been searching : files are in the right place but not found... Le 18/01/2012 09:32, Girard Henri a écrit : > Hi, > > I have been running precise pangolin for few months now, gambas3 > compiled well... Today first time I have got this error, I can't find > this libvtkzlib, any help ? > regards > Henri > > -- > > > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2/src » > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > make[3]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > make[2]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > Making all in gb.compress.zlib > make[2]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > make all-recursive > make[3]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > Making all in src > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall > -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT > main.lo -MD -MP -MF .deps/main.Tpo -c -o main.lo main.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. > -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value > -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF > .deps/main.Tpo -c main.c -fPIC -DPIC -o .libs/main.o > In file included from /usr/local/include/vtk-5.8/vtkzlib/zlib.h:34:0, > from main.c:35: > /usr/local/include/vtk-5.8/vtkzlib/zconf.h:15:35: fatal error: > vtkzlib/zlibDllConfig.h: No such file or directory > compilation terminated. > make[4]: *** [main.lo] Erreur 1 > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > make[3]: *** [all-recursive] Erreur 1 > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[2]: *** [all] Erreur 2 > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[1]: *** [all-recursive] Erreur 1 > make[1]: quittant le répertoire « /home/riri/svn/trunk » > make: *** [all] Erreur 2 > -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Database question
Hi! Is there any built in function in Gambas3 which can secure the database connection from the errors caused by special characters? I have written functions for replacing the dangerous characters like ', +, . and so on, but I'd like to know whether there is a way to make queries secure from failures. Thanks! -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ubuntu 12.04 error with libvtkzip or vtkzlib ?
Perhaps a permissions problem? You can sometimes get a not-found error for a file (in a dir) you have no permission to read... ls -l should tell you all you need to know... Also, I have gotten in the habit of doing a ./reconf-all before reporting compile errors as that sometimes helps sort out the problem. Regards, Caveat On Wed, 2012-01-18 at 14:09 +0100, Girard Henri wrote: > After I have been searching : files are in the right place but not found... > > Le 18/01/2012 09:32, Girard Henri a écrit : > > Hi, > > > > I have been running precise pangolin for few months now, gambas3 > > compiled well... Today first time I have got this error, I can't find > > this libvtkzlib, any help ? > > regards > > Henri > > > > -- > > > > > > make[4]: quittant le répertoire « > > /home/riri/svn/trunk/gb.compress.bzlib2/src » > > make[4]: entrant dans le répertoire « > > /home/riri/svn/trunk/gb.compress.bzlib2 » > > make[4]: quittant le répertoire « > > /home/riri/svn/trunk/gb.compress.bzlib2 » > > make[3]: quittant le répertoire « > > /home/riri/svn/trunk/gb.compress.bzlib2 » > > make[2]: quittant le répertoire « > > /home/riri/svn/trunk/gb.compress.bzlib2 » > > Making all in gb.compress.zlib > > make[2]: entrant dans le répertoire « > > /home/riri/svn/trunk/gb.compress.zlib » > > make all-recursive > > make[3]: entrant dans le répertoire « > > /home/riri/svn/trunk/gb.compress.zlib » > > Making all in src > > make[4]: entrant dans le répertoire « > > /home/riri/svn/trunk/gb.compress.zlib/src » > > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > > -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall > > -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT > > main.lo -MD -MP -MF .deps/main.Tpo -c -o main.lo main.c > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. > > -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value > > -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF > > .deps/main.Tpo -c main.c -fPIC -DPIC -o .libs/main.o > > In file included from /usr/local/include/vtk-5.8/vtkzlib/zlib.h:34:0, > > from main.c:35: > > /usr/local/include/vtk-5.8/vtkzlib/zconf.h:15:35: fatal error: > > vtkzlib/zlibDllConfig.h: No such file or directory > > compilation terminated. > > make[4]: *** [main.lo] Erreur 1 > > make[4]: quittant le répertoire « > > /home/riri/svn/trunk/gb.compress.zlib/src » > > make[3]: *** [all-recursive] Erreur 1 > > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > > make[2]: *** [all] Erreur 2 > > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > > make[1]: *** [all-recursive] Erreur 1 > > make[1]: quittant le répertoire « /home/riri/svn/trunk » > > make: *** [all] Erreur 2 > > > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Database question
M. Cs. wrote: > Hi! > Is there any built in function in Gambas3 which can secure the > database connection from the errors caused by special characters? > > I have written functions for replacing the dangerous characters like > ', +, . and so on, but I'd like to know whether there is a way to make > queries secure from failures. > > Thanks! > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user there was (once? in gb2) a Quote class in gb that implemented a Shell function used for quoting a string for use in a shell. do you mean something like that? (preventing sql injection?) btw, where has this class gone in gb3? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Suppressing display of hidden files by Dialog's OpenFile & SaveFile functions
When I use Dialog's OpenFile & SaveFile functions, the popup always shows hidden files. Is there a way of suppressing their display? If not, where is the best place for suggesting improvements to Gambas? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Which container to use for Draw Image?
Алексей Беспалов schrieb: > Hi! > Please help me. > > > Which container to use for Draw Image? > So you can determine which of Image Clicked. > > I used to DrawArea at HPanel. But I do not know how to identify the object in > the event DrawArea Click (). > > This is part my code: > > -- > Public Sub DrawImages(mhImage As Image[], Parent As Container, SizeArea As > Integer) > Dim hImage As Image > Dim hArea As DrawingArea > > MVars.mAreas.Clear() > Parent.Children.Clear() > > For Each hImage In mhImage > hArea = New DrawingArea(Parent) > Object.Attach(hArea, FMain, "hArea") > MVars.mAreas.Add(hArea) > > hArea.Cached = True > hArea.Border = 2 > > DrawImage(hImage, hArea, SizeArea) 'Draw Image on hArea > Next > End > > > In FMain code: > > > Public Sub hArea_DblClick() > Message.Info("!!!") > End > > It is work. But can i determine which of Image i Clicked?? > since you create multiple DrawingAreas with the same event name, so all objects individually will raise the hArea_DblClick event. but there is one trick: the object that raised a particular event can be referred to from within the event handler by using the Last object. consequently Last will be a reference to the particular DrawingArea dblclicked. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Which container to use for Draw Image?
Thank you, tobias! But I do not quite understand what you mean. Could give an example of code? 18 января 2012 г. 21:58 пользователь tobias написал: > Алексей Беспалов schrieb: > > Hi! > > Please help me. > > > > > > Which container to use for Draw Image? > > So you can determine which of Image Clicked. > > > > I used to DrawArea at HPanel. But I do not know how to identify the > object in > > the event DrawArea Click (). > > > > This is part my code: > > > > -- > > Public Sub DrawImages(mhImage As Image[], Parent As Container, SizeArea > As > > Integer) > > Dim hImage As Image > > Dim hArea As DrawingArea > > > > MVars.mAreas.Clear() > > Parent.Children.Clear() > > > > For Each hImage In mhImage > > hArea = New DrawingArea(Parent) > > Object.Attach(hArea, FMain, "hArea") > > MVars.mAreas.Add(hArea) > > > > hArea.Cached = True > > hArea.Border = 2 > > > > DrawImage(hImage, hArea, SizeArea) 'Draw Image on hArea > > Next > > End > > > > > > In FMain code: > > > > > > Public Sub hArea_DblClick() > > Message.Info("!!!") > > End > > > > It is work. But can i determine which of Image i Clicked?? > > > > since you create multiple DrawingAreas with the same event name, so all > objects individually will raise the hArea_DblClick event. > but there is one trick: the object that raised a particular event can be > referred to from within the event handler by using the Last object. > consequently Last will be a reference to the particular DrawingArea > dblclicked. > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- С уважением Алексей. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Which container to use for Draw Image?
Алексей Беспалов schrieb: > Thank you, tobias! > But I do not quite understand what you mean. > Could give an example of code? > > 18 января 2012 г. 21:58 пользователь tobias написал: > >> Алексей Беспалов schrieb: >>> Hi! >>> Please help me. >>> >>> >>> Which container to use for Draw Image? >>> So you can determine which of Image Clicked. >>> >>> I used to DrawArea at HPanel. But I do not know how to identify the >> object in >>> the event DrawArea Click (). >>> >>> This is part my code: >>> >>> -- >>> Public Sub DrawImages(mhImage As Image[], Parent As Container, SizeArea >> As >>> Integer) >>> Dim hImage As Image >>> Dim hArea As DrawingArea >>> >>> MVars.mAreas.Clear() >>> Parent.Children.Clear() >>> >>> For Each hImage In mhImage >>> hArea = New DrawingArea(Parent) >>> Object.Attach(hArea, FMain, "hArea") >>> MVars.mAreas.Add(hArea) >>> >>> hArea.Cached = True >>> hArea.Border = 2 >>> >>> DrawImage(hImage, hArea, SizeArea) 'Draw Image on hArea >>> Next >>> End >>> >>> >>> In FMain code: >>> >>> >>> Public Sub hArea_DblClick() >>> Message.Info("!!!") >>> End >>> >>> It is work. But can i determine which of Image i Clicked?? >>> >> since you create multiple DrawingAreas with the same event name, so all >> objects individually will raise the hArea_DblClick event. >> but there is one trick: the object that raised a particular event can be >> referred to from within the event handler by using the Last object. >> consequently Last will be a reference to the particular DrawingArea >> dblclicked. >> >> i think source code was originally invented to break the language barrier ;) Public Sub hArea_DblClick() Print Last.Cached End this will print out the value of the particular DrawingArea.Cached property. (sry, nothing useful came into my mind with the DrawingArea class...). see gambasdoc.org/help/lang/last?v3 for details. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Which container to use for Draw Image?
Thank you, this is what I need. I will try. 18 января 2012 г. 22:18 пользователь tobias написал: > Алексей Беспалов schrieb: > > Thank you, tobias! > > But I do not quite understand what you mean. > > Could give an example of code? > > > > 18 января 2012 г. 21:58 пользователь tobias написал: > > > >> Алексей Беспалов schrieb: > >>> Hi! > >>> Please help me. > >>> > >>> > >>> Which container to use for Draw Image? > >>> So you can determine which of Image Clicked. > >>> > >>> I used to DrawArea at HPanel. But I do not know how to identify the > >> object in > >>> the event DrawArea Click (). > >>> > >>> This is part my code: > >>> > >>> -- > >>> Public Sub DrawImages(mhImage As Image[], Parent As Container, SizeArea > >> As > >>> Integer) > >>> Dim hImage As Image > >>> Dim hArea As DrawingArea > >>> > >>> MVars.mAreas.Clear() > >>> Parent.Children.Clear() > >>> > >>> For Each hImage In mhImage > >>> hArea = New DrawingArea(Parent) > >>> Object.Attach(hArea, FMain, "hArea") > >>> MVars.mAreas.Add(hArea) > >>> > >>> hArea.Cached = True > >>> hArea.Border = 2 > >>> > >>> DrawImage(hImage, hArea, SizeArea) 'Draw Image on hArea > >>> Next > >>> End > >>> > >>> > >>> In FMain code: > >>> > >>> > >>> Public Sub hArea_DblClick() > >>> Message.Info("!!!") > >>> End > >>> > >>> It is work. But can i determine which of Image i Clicked?? > >>> > >> since you create multiple DrawingAreas with the same event name, so all > >> objects individually will raise the hArea_DblClick event. > >> but there is one trick: the object that raised a particular event can be > >> referred to from within the event handler by using the Last object. > >> consequently Last will be a reference to the particular DrawingArea > >> dblclicked. > >> > >> > > i think source code was originally invented to break the language barrier > ;) > > Public Sub hArea_DblClick() > Print Last.Cached > End > > this will print out the value of the particular DrawingArea.Cached > property. (sry, nothing useful came into my mind with the DrawingArea > class...). see gambasdoc.org/help/lang/last?v3 for details. > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- С уважением Алексей. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Database question
The function you are talking about is Shell(string). But it's useless in this case, as it escapes spaces and other characters others than the needed to avoid sql injection techniques. -Original Message- From: tobias Date: Wed, 18 Jan 2012 14:49:29 To: mailing list for gambas users Reply-To: mailing list for gambas users Subject: Re: [Gambas-user] Database question M. Cs. wrote: > Hi! > Is there any built in function in Gambas3 which can secure the > database connection from the errors caused by special characters? > > I have written functions for replacing the dangerous characters like > ', +, . and so on, but I'd like to know whether there is a way to make > queries secure from failures. > > Thanks! > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user there was (once? in gb2) a Quote class in gb that implemented a Shell function used for quoting a string for use in a shell. do you mean something like that? (preventing sql injection?) btw, where has this class gone in gb3? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Database question
Le 18/01/2012 14:17, M. Cs. a écrit : > Hi! > Is there any built in function in Gambas3 which can secure the > database connection from the errors caused by special characters? > > I have written functions for replacing the dangerous characters like > ', +, . and so on, but I'd like to know whether there is a way to make > queries secure from failures. > > Thanks! > SQL quoting is automatically done by the following methods of the Connection class: Exec(), Find(), Edit(), Delete(), Subst(), provided that: - You use "&1", "&2"... inside the request string to tell where quoted arguments must be inserted. - You actually pass these arguments. Is it what you need? -- Benoît Minisini -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Database question
Yes, Benoit. I'll check the documentation, since I always used the Myconnection.Exec("SELECT FROM table WHERE field='"& myvar & "';) form of the querying, and now I would like to change it to a more convenient way, since I always had to assure myvar is safe. 2012/1/18, Benoît Minisini : > Le 18/01/2012 14:17, M. Cs. a écrit : >> Hi! >> Is there any built in function in Gambas3 which can secure the >> database connection from the errors caused by special characters? >> >> I have written functions for replacing the dangerous characters like >> ', +, . and so on, but I'd like to know whether there is a way to make >> queries secure from failures. >> >> Thanks! >> > > SQL quoting is automatically done by the following methods of the > Connection class: Exec(), Find(), Edit(), Delete(), Subst(), provided that: > > - You use "&1", "&2"... inside the request string to tell where quoted > arguments must be inserted. > > - You actually pass these arguments. > > Is it what you need? > > -- > Benoît Minisini > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] 'Null object' when loading image from a .jpg file
I get a popup window containing 'Null object' at runtime (which unfortunately does not point at problem line of code, though I think that it must be 'image = Image.Load(Dialog.Path)') with following code, when I click ButtonImportImage: CodePublic Sub ButtonImportImage_Click() Dim image As Image Inc Application.Busy Dialog.Filter = ImageFileFilter(True) Dialog.Title = "Import Image" ' load image If Dialog.OpenFile() Then Return Print "import image path=", Dialog.Path image = Image.Load(Dialog.Path) ' save image & thumb to temp files SaveImageAndThumb(image) ButtonExportImage.Enabled = True Finally Dec Application.Busy Catch Message.Warning(ERROR.Text) End On execution, TempImagePath is valid and points to a .jpg file which loads with Graphics apps such as gThumbThumbViewer. I'm baffled as to the cause. Any ideas? Grasping at straws: I'm using Gambas3 with SQLite 3.6.22. I just noticed that Gambas3 has a new component gb.image.io - image loading & saving. If I try and select it (in Project Properties) it seems to be incompatible with gb.gui, gb.gtk & gb.qt4. Perhaps it's needed for the Image.Load line - I need to load an Image for the SaveImageAndThumb procedure (which is working when called by another Sub). -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] 'Null object' when loading image from a .jpg file
Le 18/01/2012 19:42, John Rose a écrit : > I get a popup window containing 'Null object' at runtime (which > unfortunately does not point at problem line of code, though I think that > it must be 'image = Image.Load(Dialog.Path)') with following code, when I > click ButtonImportImage: > CodePublic Sub ButtonImportImage_Click() >Dim image As Image >Inc Application.Busy >Dialog.Filter = ImageFileFilter(True) >Dialog.Title = "Import Image" >' load image >If Dialog.OpenFile() Then Return >Print "import image path=", Dialog.Path >image = Image.Load(Dialog.Path) >' save image& thumb to temp files >SaveImageAndThumb(image) >ButtonExportImage.Enabled = True > Finally >Dec Application.Busy > Catch >Message.Warning(ERROR.Text) > End > On execution, TempImagePath is valid and points to a .jpg file which loads > with Graphics apps such as gThumbThumbViewer. I'm baffled as to the cause. > Any ideas? > > Grasping at straws: I'm using Gambas3 with SQLite 3.6.22. I just noticed > that Gambas3 has a new component gb.image.io - image loading& saving. If I > try and select it (in Project Properties) it seems to be incompatible with > gb.gui, gb.gtk& gb.qt4. Perhaps it's needed for the Image.Load line - I > need to load an Image for the SaveImageAndThumb procedure (which is working > when called by another Sub). Please provide a full project that reproduces your problem. Regards, -- Benoît Minisini -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ubuntu 12.04 error with libvtkzip or vtkzlib ?
I reinstalled from scrash pangolin and there is no more problem... I guess a bad vtk installation ? Le 18/01/2012 09:32, Girard Henri a écrit : > Hi, > > I have been running precise pangolin for few months now, gambas3 > compiled well... Today first time I have got this error, I can't find > this libvtkzlib, any help ? > regards > Henri > > -- > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2/src » > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.bzlib2 » > make[4]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.bzlib2 » > Making all in gb.compress.zlib > make[2]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > make all-recursive > make[3]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib » > Making all in src > make[4]: entrant dans le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I.. -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall > -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -MT main.lo > -MD -MP -MF .deps/main.Tpo -c -o main.lo main.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. > -I/usr/local/include/vtk-5.8/vtkzlib/ -pipe -Wall -Wno-unused-value > -fsigned-char -fvisibility=hidden -g -Os -MT main.lo -MD -MP -MF > .deps/main.Tpo -c main.c -fPIC -DPIC -o .libs/main.o > In file included from /usr/local/include/vtk-5.8/vtkzlib/zlib.h:34:0, >from main.c:35: > /usr/local/include/vtk-5.8/vtkzlib/zconf.h:15:35: fatal error: > vtkzlib/zlibDllConfig.h: No such file or directory > compilation terminated. > make[4]: *** [main.lo] Erreur 1 > make[4]: quittant le répertoire « > /home/riri/svn/trunk/gb.compress.zlib/src » > make[3]: *** [all-recursive] Erreur 1 > make[3]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[2]: *** [all] Erreur 2 > make[2]: quittant le répertoire « /home/riri/svn/trunk/gb.compress.zlib » > make[1]: *** [all-recursive] Erreur 1 > make[1]: quittant le répertoire « /home/riri/svn/trunk » > make: *** [all] Erreur 2 > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Issue 194 in gambas: "IIf" is buggy
Status: New Owner: Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 194 by emil.len...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 1) Describe the problem. IIf does not do the correct job when the true part and false part are of different types. 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r4404 3) Provide a little project that reproduces the bug or the crash. Dim i As Integer For i = 1 To 2 Print Int(IIf(i = 1, 1.0, 1)) Next 5) Explain clearly how to reproduce the bug or the crash. Running the code above prints out 1 0 when 1 1 is expected. This is due to that first time IIf returns a Float, but second time an Integer. IIf should convert the return value to the one that SUBR_check_good_type returns or something..., that is almost already implemented ;) This is the current code: void SUBR_if(ushort code) { TYPE type; SUBR_ENTER_PARAM(3); VALUE_conv_boolean(PARAM); switch (code & 0x1F) { case 0: type = SUBR_check_good_type(&PARAM[1], 2); if (type != T_VARIANT) { *PC |= 1; goto __TYPE; } else { *PC |= 2; goto __VARIANT; } case 1: __TYPE: *RETURN = PARAM->_boolean.value ? PARAM[1] : PARAM[2]; break; case 2: __VARIANT: if (PARAM->_boolean.value) { VALUE_conv_variant(&PARAM[1]); *RETURN = PARAM[1]; } else { VALUE_conv_variant(&PARAM[2]); *RETURN = PARAM[2]; } break; } SUBR_LEAVE(); } -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] 'Null object' when loading image from a .jpg file
Project attached as requested. JewishHeritage.tar.gz Description: GNU Zip compressed data -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
I think the result is correct. I would expect a result of 1,0 as 1 is equal to 1 but 2 is not equal to 1. On Wed, Jan 18, 2012 at 2:22 PM, wrote: > Status: New > Owner: > Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any > Desktop-Any GUI-Any > > New issue 194 by emil.len...@gmail.com: "IIf" is buggy > http://code.google.com/p/gambas/issues/detail?id=194 > > 1) Describe the problem. > IIf does not do the correct job when the true part and false part are of > different types. > > 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): > > Version: TRUNK > Revision: r4404 > > 3) Provide a little project that reproduces the bug or the crash. > Dim i As Integer > For i = 1 To 2 > Print Int(IIf(i = 1, 1.0, 1)) > Next > > 5) Explain clearly how to reproduce the bug or the crash. > Running the code above prints out > 1 > 0 > when > 1 > 1 > is expected. This is due to that first time IIf returns a Float, but second > time an Integer. IIf should convert the return value to the one that > SUBR_check_good_type returns or something..., that is almost already > implemented ;) > > This is the current code: > > void SUBR_if(ushort code) > { >TYPE type; > SUBR_ENTER_PARAM(3); > > VALUE_conv_boolean(PARAM); > >switch (code & 0x1F) >{ >case 0: > >type = SUBR_check_good_type(&PARAM[1], 2); >if (type != T_VARIANT) >{ >*PC |= 1; >goto __TYPE; >} >else >{ >*PC |= 2; >goto __VARIANT; >} > >case 1: >__TYPE: > >*RETURN = PARAM->_boolean.value ? PARAM[1] : > PARAM[2]; > >break; > >case 2: >__VARIANT: > >if (PARAM->_boolean.value) >{ >VALUE_conv_variant(&PARAM[1]); >*RETURN = PARAM[1]; >} >else >{ >VALUE_conv_variant(&PARAM[2]); >*RETURN = PARAM[2]; >} > >break; >} > > SUBR_LEAVE(); > } > > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
No :) It should print the same as: Print IIf(True, 1.0, 1) Print IIf(False, 1.0, 1) which prints 1 1 2012/1/18 Randall Morgan > I think the result is correct. I would expect a result of 1,0 as 1 is equal > to 1 but 2 is not equal to 1. > > On Wed, Jan 18, 2012 at 2:22 PM, wrote: > > > Status: New > > Owner: > > Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any > > Desktop-Any GUI-Any > > > > New issue 194 by emil.len...@gmail.com: "IIf" is buggy > > http://code.google.com/p/gambas/issues/detail?id=194 > > > > 1) Describe the problem. > > IIf does not do the correct job when the true part and false part are of > > different types. > > > > 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): > > > > Version: TRUNK > > Revision: r4404 > > > > 3) Provide a little project that reproduces the bug or the crash. > > Dim i As Integer > > For i = 1 To 2 > > Print Int(IIf(i = 1, 1.0, 1)) > > Next > > > > 5) Explain clearly how to reproduce the bug or the crash. > > Running the code above prints out > > 1 > > 0 > > when > > 1 > > 1 > > is expected. This is due to that first time IIf returns a Float, but > second > > time an Integer. IIf should convert the return value to the one that > > SUBR_check_good_type returns or something..., that is almost already > > implemented ;) > > > > This is the current code: > > > > void SUBR_if(ushort code) > > { > >TYPE type; > > SUBR_ENTER_PARAM(3); > > > > VALUE_conv_boolean(PARAM); > > > >switch (code & 0x1F) > >{ > >case 0: > > > >type = SUBR_check_good_type(&PARAM[1], 2); > >if (type != T_VARIANT) > >{ > >*PC |= 1; > >goto __TYPE; > >} > >else > >{ > >*PC |= 2; > >goto __VARIANT; > >} > > > >case 1: > >__TYPE: > > > >*RETURN = PARAM->_boolean.value ? PARAM[1] : > > PARAM[2]; > > > >break; > > > >case 2: > >__VARIANT: > > > >if (PARAM->_boolean.value) > >{ > >VALUE_conv_variant(&PARAM[1]); > >*RETURN = PARAM[1]; > >} > >else > >{ > >VALUE_conv_variant(&PARAM[2]); > >*RETURN = PARAM[2]; > >} > > > >break; > >} > > > > SUBR_LEAVE(); > > } > > > > > > > > > -- > > Keep Your Developer Skills Current with LearnDevNow! > > The most comprehensive online learning library for Microsoft developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > > Metro Style Apps, more. Free future releases when you subscribe now! > > http://p.sf.net/sfu/learndevnow-d2d > > ___ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > If you ask me if it can be done. The answer is YES, it can always be done. > The correct questions however are... What will it cost, and how long will > it take? > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Yes, you're right. I didn't look at your code close enough before I stuck my foot in my mouth ;-) On Wed, Jan 18, 2012 at 3:04 PM, Emil Lenngren wrote: > No :) > It should print the same as: >Print IIf(True, 1.0, 1) >Print IIf(False, 1.0, 1) > which prints > 1 > 1 > > 2012/1/18 Randall Morgan > > > I think the result is correct. I would expect a result of 1,0 as 1 is > equal > > to 1 but 2 is not equal to 1. > > > > On Wed, Jan 18, 2012 at 2:22 PM, wrote: > > > > > Status: New > > > Owner: > > > Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any > > > Desktop-Any GUI-Any > > > > > > New issue 194 by emil.len...@gmail.com: "IIf" is buggy > > > http://code.google.com/p/gambas/issues/detail?id=194 > > > > > > 1) Describe the problem. > > > IIf does not do the correct job when the true part and false part are > of > > > different types. > > > > > > 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): > > > > > > Version: TRUNK > > > Revision: r4404 > > > > > > 3) Provide a little project that reproduces the bug or the crash. > > > Dim i As Integer > > > For i = 1 To 2 > > > Print Int(IIf(i = 1, 1.0, 1)) > > > Next > > > > > > 5) Explain clearly how to reproduce the bug or the crash. > > > Running the code above prints out > > > 1 > > > 0 > > > when > > > 1 > > > 1 > > > is expected. This is due to that first time IIf returns a Float, but > > second > > > time an Integer. IIf should convert the return value to the one that > > > SUBR_check_good_type returns or something..., that is almost already > > > implemented ;) > > > > > > This is the current code: > > > > > > void SUBR_if(ushort code) > > > { > > >TYPE type; > > > SUBR_ENTER_PARAM(3); > > > > > > VALUE_conv_boolean(PARAM); > > > > > >switch (code & 0x1F) > > >{ > > >case 0: > > > > > >type = SUBR_check_good_type(&PARAM[1], 2); > > >if (type != T_VARIANT) > > >{ > > >*PC |= 1; > > >goto __TYPE; > > >} > > >else > > >{ > > >*PC |= 2; > > >goto __VARIANT; > > >} > > > > > >case 1: > > >__TYPE: > > > > > >*RETURN = PARAM->_boolean.value ? PARAM[1] : > > > PARAM[2]; > > > > > >break; > > > > > >case 2: > > >__VARIANT: > > > > > >if (PARAM->_boolean.value) > > >{ > > >VALUE_conv_variant(&PARAM[1]); > > >*RETURN = PARAM[1]; > > >} > > >else > > >{ > > >VALUE_conv_variant(&PARAM[2]); > > >*RETURN = PARAM[2]; > > >} > > > > > >break; > > >} > > > > > > SUBR_LEAVE(); > > > } > > > > > > > > > > > > > > > -- > > > Keep Your Developer Skills Current with LearnDevNow! > > > The most comprehensive online learning library for Microsoft developers > > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, > MVC3, > > > Metro Style Apps, more. Free future releases when you subscribe now! > > > http://p.sf.net/sfu/learndevnow-d2d > > > ___ > > > Gambas-user mailing list > > > Gambas-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > -- > > If you ask me if it can be done. The answer is YES, it can always be > done. > > The correct questions however are... What will it cost, and how long will > > it take? > > > > > -- > > Keep Your Developer Skills Current with LearnDevNow! > > The most comprehensive online learning library for Microsoft developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > > Metro Style Apps, more. Free future releases when you subscribe now! > > http://p.sf.net/sfu/learndevnow-d2d > > ___ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d >
[Gambas-user] Issue 195 in gambas: The bit manipulation functions does not work correctly on Shorts when negative values are returned
Status: New Owner: Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 195 by emil.len...@gmail.com: The bit manipulation functions does not work correctly on Shorts when negative values are returned http://code.google.com/p/gambas/issues/detail?id=195 1) Describe the problem. The bit manipulation functions at http://gambasdoc.org/help/cat/bit?v3 does not work correctly when negative Shorts are returned. If, for example, the return value should be -1, it actually returns a Short with the value 65535 (which is outside the Short range!). 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r4404 3) Provide a little project that reproduces the bug or the crash. Print Asr(CShort(-4), 1) '=> 65534 Print BSet(CShort(-2), 0) '=> 65535 Print Ror(CShort(1), 1) '=> 32768 Print Shl(CShort(-1), 0) '=> 65535 And a little tip for the Shr/Asr implementation: Are this kind of code really needed? val = (((int)val >> bit) & 0x7FFF) | (((int)val) & 0x8000); Wouldn't it be enough with: val = ((int)val >> bit); since >> with signed datatypes in C already keeps the sign? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Updates: Status: Accepted Labels: -Version Version-TRUNK Comment #1 on issue 194 by benoit.m...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 (No comment was entered for this change.) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 4 in gambas: Autosizing and centering a label does not center a label
Updates: Labels: GUI-Any Comment #4 on issue 4 by benoit.m...@gmail.com: Autosizing and centering a label does not center a label http://code.google.com/p/gambas/issues/detail?id=4 (No comment was entered for this change.) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 5 in gambas: GUI crash on menu editor
Updates: Labels: GUI-Any Comment #4 on issue 5 by benoit.m...@gmail.com: GUI crash on menu editor http://code.google.com/p/gambas/issues/detail?id=5 (No comment was entered for this change.) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 12 in gambas: Disabled timer keep running
Updates: Status: WontFix Comment #2 on issue 12 by benoit.m...@gmail.com: Disabled timer keep running http://code.google.com/p/gambas/issues/detail?id=12 No news from one year, I close the issue! -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Updates: Status: Fixed Comment #2 on issue 194 by benoit.m...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 It should be fixed in revision #4405. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 195 in gambas: The bit manipulation functions does not work correctly on Shorts when negative values are returned
Updates: Status: Accepted Labels: -Version Version-TRUNK Comment #1 on issue 195 by benoit.m...@gmail.com: The bit manipulation functions does not work correctly on Shorts when negative values are returned http://code.google.com/p/gambas/issues/detail?id=195 (No comment was entered for this change.) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 195 in gambas: The bit manipulation functions does not work correctly on Shorts when negative values are returned
Updates: Status: Fixed Comment #2 on issue 195 by benoit.m...@gmail.com: The bit manipulation functions does not work correctly on Shorts when negative values are returned http://code.google.com/p/gambas/issues/detail?id=195 It should be fixed in revision #4406. As for your tip: apparently you are right, but I must check why I did that before - I don't remember. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Comment #3 on issue 194 by emil.len...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 I'm afraid that fix does not work for pure objects? (A truncated class-pointer will be sent to VALUE_convert, and it will overwrite the higher bits of *PC). I think setting (code & 0x1F) to a special value (maybe 0x1F) indicating that both operands are of the same type, i.e. no conversion has to be done, can be a good idea to prevent this... -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Issue 196 in gambas: Inline arrays with different types
Status: New Owner: Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 196 by emil.len...@gmail.com: Inline arrays with different types http://code.google.com/p/gambas/issues/detail?id=196 1) Describe the problem. There are some cases where different types prevent an inline array from being created. 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r4406 3) Provide a little project that reproduces the bug or the crash. Dim a As New Integer[1] Dim b As New Float[1] Print [a, b, 1] It thinks Object[] is the correct array-type to create, resulting in bad conversion (runtime error) from Integer to Object. The correct array-type would be a Variant[]. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Updates: Status: Accepted Comment #4 on issue 194 by benoit.m...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 Is it better with revision #4407? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 194 in gambas: "IIf" is buggy
Comment #5 on issue 194 by benoit.m...@gmail.com: "IIf" is buggy http://code.google.com/p/gambas/issues/detail?id=194 And yes, I should use a different function that SUBR_check_good_type() in the IIf() implementation. That function was made for inline arrays detection. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Issue 196 in gambas: Inline arrays with different types
Updates: Status: Fixed Labels: -Version Version-TRUNK Comment #1 on issue 196 by benoit.m...@gmail.com: Inline arrays with different types http://code.google.com/p/gambas/issues/detail?id=196 It should be fixed in revision #4408. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb3: "Mathematic error"
On 01/17/2012 12:38 PM, Fabien Bodard wrote: > Le 17 janvier 2012 16:22, Benoît Minisini > a écrit : >> Le 17/01/2012 11:35, Kevin Fishburne a écrit : >>> On 01/17/2012 05:18 AM, Kevin Fishburne wrote: On 01/16/2012 02:33 AM, Benoît Minisini wrote: > Le 16/01/2012 08:05, Kevin Fishburne a écrit : >> On 01/16/2012 01:43 AM, Kevin Fishburne wrote: >>> Why would I get the runtime error "Mathematic error" in this function: >>> >>> Public Function Distance(x1 As Single, y1 As Single, x2 As Single, y2 As >>> Single) As Single >>> Return Abs(Sqr((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))) >>> End >>> >>> The values of the variables are: >>> >>> ?x2&""&x1&""&x2&""&x1& >>> ""&y2&""&y1&""&y2& >>> ""&y1 >>> >>> 174.248779296875 2.40799128109576E-41 174.248779296875 >>> 2.40799128109576E-41 146.759170532227 7.19552647834628E+27 >>> 146.759170532227 7.19552647834628E+27 >>> >>> Using GAMBAS 3, revision unknown. I'm recompiling now to see if it makes >>> a difference, but please let me know what this error means and what >>> could cause it. >>> >> I changed the first line (old one) to the second: >> >> 'Return Abs(Sqr((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))) >> Return Sqr((x2 - x1) ^ 2 + (y2 - y1) ^ 2) >> >> and it gives me no problems. Seems like I really screwed up the distance >> calculation, but even so this may be a bug so hopefully I've contributed >> to a solution. Still curious of course as to what the error might mean. >> Maybe it should just say "You suck at math." :) >> > You get a mathematic error because of an overflow. (y2 - y1) * (y2 - y1) > cannot be expressed by a Single in your example. > > The "^" operator deals with Float internally, so you don't get an error. > > Anyway, to compute a distance, you can use the Hyp() or the Mag() > function. It will be faster. Sometimes it calculates without error, other times it doesn't. Changing all the datatypes to float doesn't make any difference either. Thanks for the efficiency tip on Hyp() and Mag(), but it still looks like there's a problem with math here. How should a manual distance calculation be expressed without overflow if that's the problem? >>> Just discovered it has to do with one of the passed values being zero. >>> Why is that? >>> >> Apparently you are not shocked by a coordinate of 7.19E+27... That >> causes the overflow with Single (not Float). > :) > Sorry guys. It was that time of the night when one sees two of everything. I called it a night and picked it up the next day with no problems. Bad data was being fed to the function as a result of something unrelated. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user