Re: [Gambas-user] Compilation error when building Gambas 3.2.0
On Sat, 07 Jul 2012, Sebastian Kulesz wrote: Hi! I'm getting a compilation error when building the official Gambas 3.2.0 release. Happens both on a clean chroot or on my dirty system. The full output is here: [http://pastebin.com/nvjLUuBV] sebi@sebi:~/Builds/gambas3-pkg/gambas3-3.2.0/main/lib/signal$ LANGUAGE=en gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /build/src/gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release Thread model: posix gcc version 4.7.1 (GCC) sebi@sebi:~/Builds/gambas3-pkg/gambas3-3.2.0/main/lib/signal$ uname -a Linux sebi 3.4.4-3-ARCH #1 SMP PREEMPT Tue Jul 3 14:36:44 UTC 2012 x86_64 GNU/Linux If there is any more info i should provide please let me know. Thanks! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, the same here, too. Seems to be like the system headers here (Arch x86_64) typedef already (an anonymous struct). Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Compilation error when building Gambas 3.2.0
On Sat, 07 Jul 2012, Sebastian Kulesz wrote: Using trunk worked until yesterday, and main/lib/signal/csignal.c has not been updated in 8 weeks. I'm using the [testing] repo, and updated glibc along with some other packages of the toolchain today. Is it possible to patch the file to avoid a new release? On Sat, Jul 7, 2012 at 6:55 PM, tobi tobiasboeg...@googlemail.com wrote: On Sat, 07 Jul 2012, Sebastian Kulesz wrote: Hi! I'm getting a compilation error when building the official Gambas 3.2.0 release. Happens both on a clean chroot or on my dirty system. The full output is here: [http://pastebin.com/nvjLUuBV] sebi@sebi:~/Builds/gambas3-pkg/gambas3-3.2.0/main/lib/signal$ LANGUAGE=en gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /build/src/gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release Thread model: posix gcc version 4.7.1 (GCC) sebi@sebi:~/Builds/gambas3-pkg/gambas3-3.2.0/main/lib/signal$ uname -a Linux sebi 3.4.4-3-ARCH #1 SMP PREEMPT Tue Jul 3 14:36:44 UTC 2012 x86_64 GNU/Linux If there is any more info i should provide please let me know. Thanks! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, the same here, too. Seems to be like the system headers here (Arch x86_64) typedef already (an anonymous struct). Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Well, with the following patch, it compiles at least. I haven't studied the sources but I don't think that removing the typedef in the gambas sources, when there is one in the system headers, will break something... We should await, of course, someone who knows better but here it is: [csignal.patch] --8--- Index: csignal.c === --- csignal.c (revision 4901) +++ csignal.c (working copy) @@ -40,7 +40,7 @@ #define SIGPWR -1 #endif -#if !defined(OS_BSD) !defined(OS_CYGWIN) +#if 0 typedef struct siginfo siginfo_t; #endif --8--- (as you can see, the patch file lies in main/lib/signal/ on my system and is hence relative to this directory...) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http
Re: [Gambas-user] gb3: using array of structures with dimensions unknown until runtime
On Wed, 04 Jul 2012, Kevin Fishburne wrote: On 07/04/2012 05:42 AM, Emil Lenngren wrote: When you are declaring the array by writing A[3] As Single you declare an inline array, i.e. NOT a reference to an array. So you cannot write ThatStruct.A = AnArray. Instead you have to copy the contents from AnArray into A. I'm not sure how to go about copying the contents, as even this gives me a null object error: Public Struct Surface_Normal N As Single[] End Struct Dim NormalsA As New Surface_Normal[TileGrid.Size + 2, TileGrid.Size + 2] NormalsA[0, 0].N[0] = 0 I spent about an hour last night trying every combination of declarations and assignments I could think of, all with various errors. Initially I wanted a structure so I could have a 2D array with each element having an A and B vector, but now I'm searching for ANY way to get it done. How can I declare a 2D array whose element is a 1D array of three singles? Despite reading the docs again and again I'm not clear on the syntax. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user You could have a one-dimensional Variant[] which contains other Variant[] (and so on n times) to get an n-dimensional matrix... -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gridview_ColumnClick(). How...
On Mon, 25 Jun 2012, Ru Vuott wrote: Hello, I have a Gridview with an horizontal Header. I saw there would be an event that it rises when I click on a cell of the Header: GridView1_ColumnClick() ...the documentatio says: Event ColumnClick ( Column As Integer ) Sorry, I didn't understand, can you write a little example ? Thanks -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi, you get the number of the column that was clicked on as the Column argument, so that you can design actions depending on the column number (like sorting after the type of data in that column, e.g.) How you use it, depends on your application but generally speaking: Public Sub GridView1_ColumnClick(Column As Integer) Print You clicked on column #;; Column End Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Signal #11 when overriding Variant[] - Bug revived?
On Fri, 22 Jun 2012, Benoît Minisini wrote: Le 20/06/2012 21:38, tobi a écrit : Hi Benoît, this afternoon, we discovered that with a newer revision the program I wrote to demonstrate sorting of multi-dimensioned Variant[] broke. I again get Segfault when exporting an overridden Variant[] class from my project (wasn't there a discussion about this recently?) When I developed this program, I reported a bug which results in a Segfault that was fixed in rev#4715. This seemed to be the result of [main/gbx/gbx_class.c] --8--- [...] 1345 CLASS *array_type = (CLASS *)class-array_type; [...] --8--- where array_type gets 0xc (GB_T_VARIANT or something like that) and is used as a pointer without further checking when overriding the Variant[] class (other native array classes may suffer from similar problems). I don't know how you made this working for me (just tried to get back to that revision to see, if something changed in that function but found nothing). Can you remember? - the subject of the mails was Segfault when overriding Variant[] (1st May 2012). Can you tell me something about the state of affairs? Regards, Tobi Please send me the project that shows that bug again. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user The demonstration project for our website is attached. I removed the Form containing a GridView to sort and some stuff and replaced it by a simple module file to test it with the latest revision, problem still present. Regards, Tobi GridSort2.tar Description: Unix tar archive -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Signal #11 when overriding Variant[] - Bug revived?
On Sun, 24 Jun 2012, Benoît Minisini wrote: Le 24/06/2012 12:40, tobi a écrit : The demonstration project for our website is attached. I removed the Form containing a GridView to sort and some stuff and replaced it by a simple module file to test it with the latest revision, problem still present. Regards, Tobi Can you check revision #4856? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Alright, works. I wonder how a bugfix could disappear but thanks. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Signal #11 when overriding Variant[] - Bug revived?
Hi Benoît, this afternoon, we discovered that with a newer revision the program I wrote to demonstrate sorting of multi-dimensioned Variant[] broke. I again get Segfault when exporting an overridden Variant[] class from my project (wasn't there a discussion about this recently?) When I developed this program, I reported a bug which results in a Segfault that was fixed in rev#4715. This seemed to be the result of [main/gbx/gbx_class.c] --8--- [...] 1345 CLASS *array_type = (CLASS *)class-array_type; [...] --8--- where array_type gets 0xc (GB_T_VARIANT or something like that) and is used as a pointer without further checking when overriding the Variant[] class (other native array classes may suffer from similar problems). I don't know how you made this working for me (just tried to get back to that revision to see, if something changed in that function but found nothing). Can you remember? - the subject of the mails was Segfault when overriding Variant[] (1st May 2012). Can you tell me something about the state of affairs? Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
On Mon, 18 Jun 2012, Benoît Minisini wrote: Le 18/06/2012 19:15, Jussi Lahtinen a écrit : Maybe it would be possible to write a graphical su entirely in Gambas? The first difficulty I see is how to know if we must use 'su' or 'sudo' to run the command... I have never run into need for su, I always use sudo. Example in Ubuntu as default, you cannot do su root. So su is useful only if you need to change to some other user, but the keyword in Gambas is RunAsRoot. Is there something where sudo would fail? Jussi Some systems do not use sudo. Maybe they find it unsecure. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user So, it was talked about a pure Gambas way of asking for the password. To address Benoît's recent thought: Why not have a form like this: +Run as Root-+ || | Choose method: [ComboBox:] | | | Sudo | | | | Su| | || | Password: [TextBox...] | | [Button: OK] | ++ This way, the experienced, aware user could choose (not really if it was detected by the class that no sudo was found in PATH...) and the others most likely have sudo installed. It would equally well end the discussion of the preferred graphical frontend - only disadvantage I can see: in this draft, there is no configuration possible, except for the method of privilege elevation. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How do I override an Array class?
On Sun, 17 Jun 2012, Bruce wrote: I would like to override the Variant[] class to extend it with a small set of special interest methods. The gambas IDE complains when I try to call my class Variant[]. I cannot find anything in the help that seems to preclude this, apart from the class naming rules. Is this possible? (More detail: I am trying to restructure a large parsing project that works with hundreds of arrays of tokens, there is a huge amount of redundant code in it that repeats the same operations on the array. What I first tried doing was creating a class that inherits Variant[] and adds a few of the required methods, called MyVariant. Then going through the parser project and replacing each As Variant[] with As MyVariant. This has raised a problem (of my own making!) where the classes in the parser inherit others in the project, I need to change the declarations in each inheritance chain in a single step. This makes it fairly difficult to isolate each use of the redundant code and change it to use the standardised code in MyVariant. So, I figured that if I could just override the Variant[] class then I could work on one of the parser classes at a time, clean it up and move on and not be bugged by the continual compile/fix/compile/fix cycles I am causing while not even getting far with the real goal.) Bruce -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I have done overriding Variant[] successfully (extended it by a specific Sort() method) but it caused an interpreter complaint (I do not use the IDE) until (excluding) rev #4715 so it would be interesting what message you get and what revision you use... (and maybe what the critical code looks like) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How do I override an Array class?
On Sun, 17 Jun 2012, Benoît Minisini wrote: Le 17/06/2012 08:22, Bruce a écrit : I would like to override the Variant[] class to extend it with a small set of special interest methods. The gambas IDE complains when I try to call my class Variant[]. I cannot find anything in the help that seems to preclude this, apart from the class naming rules. Is this possible? (More detail: I am trying to restructure a large parsing project that works with hundreds of arrays of tokens, there is a huge amount of redundant code in it that repeats the same operations on the array. What I first tried doing was creating a class that inherits Variant[] and adds a few of the required methods, called MyVariant. Then going through the parser project and replacing each As Variant[] with As MyVariant. This has raised a problem (of my own making!) where the classes in the parser inherit others in the project, I need to change the declarations in each inheritance chain in a single step. This makes it fairly difficult to isolate each use of the redundant code and change it to use the standardised code in MyVariant. So, I figured that if I could just override the Variant[] class then I could work on one of the parser classes at a time, clean it up and move on and not be bugged by the continual compile/fix/compile/fix cycles I am causing while not even getting far with the real goal.) Bruce You can't override Variant[] because '[' and ']' are not allowed in project file names. You can do that by creating the source file by hand, but you may have problems - This is the reason why it is forbidden. :-) I don't see what the real problem is with replacing all occurences of Variant[] by something like MyTokenArray. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Wow, didn't know that. Is there any piece of documentation to quote when telling this someone? Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access global variable from other .class
On Fri, 15 Jun 2012, Jussi Lahtinen wrote: If I remember correctly, you can even save more work by using gb.desktop, Desktop.RunAsRoot() which builds on top of the portland xdg scripts. Before writing anything I should always check what gb.desktop contains... But there seems to be bugs. I tried 'Desktop.RunAsRoot(whoami)'. All I got is: xdg-su: no graphical method available for invoking 'whoami' as 'root' I have gksudo installed ( in /usr/bin/gksudo ) and working. So perhaps Gambas ships broken version of this script..? Also xdg-screensaver activate doesn't work (Desktop.ScreenSaver.Activate). Either the version of that script already installed to my system (xdg-su wasn't installed at all). Xubuntu 12.04 64 bit. Screensaver in use is XScreenSaver 5.15, and GKsu is version 2.0.2. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, I was surprised, too, when I saw lately how gb.desktop grew since I last had a look at it. There seem to be a lot of people who want to run programs as root, it's always the same problem to solve... I don't know about the scripts, I personally didn't need them so far but they are distributed in the gb.desktop/src/gb.desktop/xdg-utils/ directory in the source tree. If there is a bug, you might be able to spot it yourself - at least xdg-su seems not really complicated, even to me who is not used to shell scripting to that extend. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] C like #include for Gambas
On Tue, 12 Jun 2012, Rolf-Werner Eilert wrote: Am 12.06.2012 13:41, schrieb Benoît Minisini: Le 12/06/2012 13:01, jm a écrit : On Tue, 2012-06-12 at 12:03 +0200, Rolf-Werner Eilert wrote: You already have at your disposal a program which fully understands what to do with #include (and all the other pre-processor directives which have been mentioned). Have you tried it out yet? Is it possible to insert the C pre-processor into the Play-Button function of the Gambas IDE, maybe the way you can insert filters into kprinter? That would be ideal here. Just an idea... :-) Rolf Wow! Thinking about it, that is even more powerful to cooperate with external preprocessor than just adding preprocesor functionality on its own. A simple check box in project properties dialog box to enable/disable preprocessing can turn the feature on/off. Some programs you may just not want to allow preprocessing and so checking it off here will allow the compiler to complain bitterly to go get it fixed. Now, let me add these few thoughts: I'm talking about code subsitution, not the features currently implemented in the Gambas compiler, that just allow compiling one part of the code or another. (Are there any? Didn't even know that...) Moreover, preprocessing makes programs mostly unreadable, can create very difficult bugs, make the source code impossible to analyze (bye-bye automatic completion...), and so on. Yes, automatic completion would mean browsing all #included files each time to search for keywords, but how do IDEs for C programming handle this? You talked about IDEs but also vim as an editor can be made using ctags for this purpose Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] C like #include for Gambas
On Mon, 11 Jun 2012, Jussi Lahtinen wrote: As I see it include is a pre-processing directive. It simply replaces the #include statement with the contents of an external file. This is a project management consideration and not a programming paradigm i.e. OOP, Functional, Procedural, etc.. I agree, but I think with OOP, C style #include is obsolete management choice. The include statement in C/C++ was intended to allow libraries of code to be pulled into the current project. Here is the main point. In Gambas we already have Extern, Export etc commands for external libraries, whether they are written with Gambas, C or whatever. Allowing the developer to split a large project up into smaller, more manageable files. With OOP I don't think you need to do that with files, you do it with classes. But maybe someone want to write code with non-OO style. Contrast this to Ada's use of packages. I don't know Ada, so I cannot say anything it being useful in Gambas. As for includes, I think this could be a useful tool for some but wonder why simply refactoring the program into more manageable class' wouldn't give a better solution. IMHO, doing so would make the project more maintainable over the long haul I agree. Jussi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi, I first didn't want to interfere but there recently was a related thread here. Benoît stated back then that only the really needed features will be implemented in the Gambas Preprocessor and scolded me for my proposition to use the CPP instead. Nonetheless, if you really want to use the #include directive and other c-style things in your own dark chamber, nobody would care if you maintain your sources split, merge them via #include and then push them through the gbc3. As indirectly quoted above, it is not a solution for future gambas and I would strongly prefer OO over this but if you need it, why not... Uhh, too late to respond to Randall's last post but I totally recommend his last point. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Configuration issue with gb.desktop
On Sat, 09 Jun 2012, Benoît Minisini wrote: Le 06/06/2012 20:12, tobi a écrit : Hi, I just moved to a new machine and tried to compile gambas3 again. On make, I get with gb.desktop: make[5]: Entering directory `/home/woodap/sources/gambas3/gb.desktop/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c -o gb_desktop_la-main.lo `test -f 'main.c' || echo './'`main.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c main.c -fPIC -DPIC -o .libs/gb_desktop_la-main.o In file included from main.c:26:0: x11.h:27:22: fatal error: X11/Xlib.h: No such file or directory compilation terminated. Yes! I never had any X on this machine (unlike on the old one where everything got compiled). Shouldn't the component be disabled by the configure script when required headers are not found? Regards, Tobi I fixed things in the configuration process in revision #4815. Can you try it? It should correctly disable gb.desktop there X11 is not there. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, disables now. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Configuration issue with gb.desktop
Hi, I just moved to a new machine and tried to compile gambas3 again. On make, I get with gb.desktop: make[5]: Entering directory `/home/woodap/sources/gambas3/gb.desktop/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c -o gb_desktop_la-main.lo `test -f 'main.c' || echo './'`main.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -MT gb_desktop_la-main.lo -MD -MP -MF .deps/gb_desktop_la-main.Tpo -c main.c -fPIC -DPIC -o .libs/gb_desktop_la-main.o In file included from main.c:26:0: x11.h:27:22: fatal error: X11/Xlib.h: No such file or directory compilation terminated. Yes! I never had any X on this machine (unlike on the old one where everything got compiled). Shouldn't the component be disabled by the configure script when required headers are not found? Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] My Raspberry Pi has arrived!
On Wed, 30 May 2012, Benoît Minisini wrote: Le 30/05/2012 13:08, jm a écrit : On Wed, 2012-05-30 at 10:55 +0200, Benoît Minisini wrote: Le 30/05/2012 10:48, Caveat a écrit : Anyone need specific tests carried out, just let me know! OK, OK, I really just wanted to let everyone know it's here! Kind regards, Caveat These privileged people... :-) I was thinking: maybe I must find a way to let the IDE debug programs remotely. I mean: developing the program on the PC, click on the start button, and magically the program is run on the Raspberry and debugged remotely. But I don't know what could be the best solution for that. Give your ideas people... I just received mine from Farnell. Wanted 5 got 1 on allocation :( Still its here and getting Gambas and Ubuntu going on it is high on the priority list. For remote operation of gambas IDE, I normally spend time on lab and access the main desktop in office with ssh -X. ssh -X username@ip_address_of_pc If running Ubuntu I can do this: ssh -X username@pc_host_name.local (saves having to remember ipaddress) I compile/run gambas IDE on office PC as needed from Lab PC with no loss of speed or effectiveness. In effect ssh -X does the full remote developer thing. So I imagine if Raspberry had going inside it X, gambas and ssh, and it was connected by ethernet, then ssh -X will work, and the full testing and debugging can be carried out from a remote PC with no code changes to Gambas! Ahhh the wonders of Linux! :-) [p.s. There are a couple of pointers to Gambas3 and Rasberry, but does anyone have some knowledge of Ubuntu + Gambas3 working and available as downloadable image file for SDCard?] I'd like to just do the debugging remotely. Maybe ssh is the better solution. So the user would have to enter a login, a password and an host/ip in the IDE, the IDE will connect to the RPi that way, and will be able to run the project in debugging mode. Now I must find a way to let the project in debugging mode communicate with the IDE on the PC. It should be a matter of having a socket go through the ssh connection. A bit like 'ssh -X' I imagine, but I don't know exactly how it should be done. If nobody tells me, I will ask google! -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Don't know how remote debugging programs like gdb or something work with this, but a naive and the more annoying-to-write approach could be a socket on the other side which receives commands. There are passed through a function that selects the debugging functions by identifiers (strings would be best, I think). Depending on what is possible with the current debugger, parameter(s) are required (pointers? names?) and a way to obtain them from the debugger over there (this could be the only addition to the debugger process interface). The socket over there writes back the data so that the IDE here can display the stuff as if it was received from the debugger... This is a technically not that complicated protocol, I think. Quickly googled, the gdb seems to have implemented a GDB remote protocol, too - what else? (Written freely without security considerations) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] My Raspberry Pi has arrived!
On Wed, 30 May 2012, Benoît Minisini wrote: Le 30/05/2012 15:04, tobi a écrit : Don't know how remote debugging programs like gdb or something work with this, but a naive and the more annoying-to-write approach could be a socket on the other side which receives commands. There are passed through a function that selects the debugging functions by identifiers (strings would be best, I think). Depending on what is possible with the current debugger, parameter(s) are required (pointers? names?) and a way to obtain them from the debugger over there (this could be the only addition to the debugger process interface). The socket over there writes back the data so that the IDE here can display the stuff as if it was received from the debugger... This is a technically not that complicated protocol, I think. Quickly googled, the gdb seems to have implemented a GDB remote protocol, too - what else? (Written freely without security considerations) Regards, Tobi Actually the Gambas debugger already works like that, except that it is based on a local named pipe, and not a socket. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Doesn't make this things (or, at least, my suggestion) even simpler? One only has to build some TCP (I assume that's what things will work on) code around it...? The only problem that I see would be to find a clever way to have both for either local or remote to affect the minimum amount of other software but you know the code and where to start. So, what's the problem here then? Do you find that solution awkward? (I bet you do not as the debugger already works like this ;)) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Error in Left$ and Mid$ functions to the gb.ncurses component
On Sun, 20 May 2012, tobi wrote: On Sun, 20 May 2012, Benoît Minisini wrote: Le 20/05/2012 16:26, William Cabrera a écrit : Hi, I have been testing the component ncurses and so far everything well, but the functions mentioned in the title simply do not work. Below is a sample code: #!/usr/bin/env gbs3 USE gb.ncurses dim hwin As Window dim cadena, cad as string cadena = Hola Mundo cad = left(cadena) hwin = New Window(0, 0, 20, 30) hwin.Background = Color.Blue hwin.show() hwin.Full() hwin.print(right$(cadena), 0, 0) hwin.print(right$(cadena, 3), 0, 1) hwin.print(right$(cadena, -3), 0, 2) hwin.print(left$(cadena), 0, 3) hwin.print(left$(cadena, 3), 0, 4) hwin.print(left$(cadena, -3), 0, 5) hwin.print(mid$(cadena, 2, 2), 0, 6) hwin.WaitKey() And this is the output o ndo a Mundo Hola Mundo Hola Mundo Hola Mundo ola Mundo [System] OperatingSystem=Linux Kernel=3.2.0-1-686-pae Architecture=i686 Memory=2065228 kB DistributionVendor=Asturix DistributionRelease=Asturix 4 Desktop=Gnome [Gambas 3] Version=3.1.90 Path=/usr/local/bin/gbx3 [Libraries] Qt4=libQtCore.so.4.8.1 GTK+=libgtk-x11-2.0.so.0.2400.10 P.D. Sorry for my english, this is not my native language -- William Cabrera http://willicab.gnu.org.ve This is a bug in the gb.ncurses component whose methods do not read their string arguments correctly. Tobi are you here? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I'm here and working! Sorry, haven't read the subject entirely when I first saw the incoming mail... So you expect this output in the window, right?: o ndo a Mundo H Hol Hola Mu ol So my question bounces to Benoît: It's said in the docs that the three string functions used above are optimised so that they don't duplicate strings. Does that mean or is it a general fact that I cannot rely on the STRING() macro to extract a NUL-terminated string from a given GB_STRING argument? At least there doesn't seem to be a NUL byte which causes the component to print everything that follows until the end of the original string... Brief explanation and after lunch, it's done. Regards, Tobi There was an accumulation of changes due to an unfinished feature but I finally commited the fix for that issue - component is still broken. Printing should work as expected now. But don't try to use events in the meantime until. However, thank you for pointing that out. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Data Structures like C++
On Thu, 24 May 2012, Bruce wrote: On Wed, 2012-05-23 at 17:19 +0200, tobi wrote: On Thu, 24 May 2012, Bruce wrote: On Mon, 2012-05-21 at 22:25 +0200, Benoît Minisini wrote: * Tree * Graph Native implementation of that would be interesting. Any volunteer? :-) I think trees are easily implemented directly in gambas using Emil's suggestions regarding object references as a general n-tree can be implemented as a B-tree using something like Class CNode public data as Variant public left as CNode public right as CNode Public Sub PreOrder() as Variant[] blah blah ... etc according to Mr Knuth End where left is the first child and right is the first sibling. Read Knuth Vol 3 for the truth (I had to go searching through the attic to find my copy.) Now Graphs are M U C H more interesting! Someone said that they couldn't think of a use for them. Well here's one, UML diagrams are all directed graphs. In fact much of OO thinking is actually (mathematically) directed graphs. Nodes and edges. From use cases through structural models, component models, in fact the whole she-bang. Getting back to trees. The funny thing is that I had a real need to construct a n-tree this week to solve a problem I had with populating a gambas treeview from a persistence store where the nodes where out of order, i.e. the parents were later in the storage than the children (the code is a hack and I choose not to share it.) Suffice to say that Demosthenes original post prompted me to go searching through the attic. .. found some interesting stuff, by the way .. (No, lets not go there.) Getting back to the point, I think a gb.datastructures component is an excellent idea. I can't help much on the dev side as I'm pretty poor at C/C++ (can read only) and am totally lost with Benoit's macros but I'd be willing to put in much effort at testing and proving. Ah! Linked lists, how many times have I needed them and built them from scratch. Bruce -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi, so what syntax did you desire for an n-tree then? You presented a b-tree above, this appears generic to me... I certainly lack theory on those things. But shouldn't it be less annoying to get to level 3 than Root.left.left.left ? There are a lot of purposes and designs of trees (graphs), right? To implement a certain idea would not be too difficult but instead to implement only one of those as a generic tree (graph) which is then able to be inherited and specialised, maybe in gambas, - that's what I find difficult (no wonder without theory). Regards, Tobi Hi Tobi, I probably didn't make it clear. Any n-tree can be transformed into a b-tree where the left branch is the first child and the right branch is the first sibling. To be more correct I should have said Any k-ary tree can be represented as a binary tree where the left branch is the first child and the right branch is the next sibling. The theory is in wikipedia here: http://en.wikipedia.org/wiki/Binary_tree#Encoding_general_trees_as_binary_trees. These binary trees have well known (Knuth and others) algrorithms for different actions to be used on the binary tree, insertions, deletions, (graft and prune), traversals in particular orders, searches, sorts etc etc. The application of a binary tree structure to suit a particular problem is a different matter. This is what you can use the tree for or how to apply the tree structure to solve a particular problem. In my case, which was a set of rows in a database containing a data component and a parent value that I was trying to populate a treeview with (1800 records) where the rows were out of order with respect to building the treeview. It was an n-level table of contents thing. Rather than try to traverse the database several times and resolve getting each toc level resolved, I just read the whole thing as a single db.result and created a binary tree of the above type, creating dummy parent nodes as soon as I had a need for them and setting their data to a placebo value. When I later located the real parent row in the db.result iteration all I had
Re: [Gambas-user] Data Structures like C++
On Thu, 24 May 2012, Bruce wrote: On Thu, 2012-05-24 at 11:07 +0200, tobi wrote: (Completely giving up anything I knew about binary trees now, because it wasn't much and it wasn't even from a book): You said that you can traverse from any node in the tree. No, any node can be considered as a root for a subtree. Anynode.parent provides what I think your saying. Consequently every node has to provide such functionality. (Aside, I think that separating the functionality from the node is the key of what I was trying to say. But that is a side issue.) What I, however, was trying to say is: every node can be the root of a tree and at the same time a node within another tree, in that point, we already met, right? So there has to be _one_ node class for the generic node above (that can possess both attributes) that implements methods which resemble the tree algorithms. That way we could have a basic tree datastructure - if it is that simple. This basic datastructure can be inherited, overridden, etc. If the node class is aware of these both attributes (being root node of a tree and itself node in a tree at the same time) one can easily concatenate trees and that's what I wanted to show with my code above. (Sorry if I re-invent the wheel here) What you were out for, if I got you right, was only providing a datastructure for nodes and a separate class with code to handle them? Like pluggable algorithms on the same structures? I don't deem it necessary to distinguish between root and other nodes. Only in that the tree happens to be a directed graph that has one special node. I told you graphs were interesting. The codeis only once there anyway. It could even have helped in your case to em-parent (sorry, not a native English speaker) a node that you formerly assumed to be the root like NewNode.Left = RootNode RootNode = NewNode As interesting as it sounds, I'm probably not the right person to work on this. I don't have much time for (I don't think so but from a pure conscientiousness point I need to prepare my A-level a bit) and nobody else wants to wait until I finish the theory ;) Having been born some time in the middle of the last century, I have no idea what an A-level is. I hope it's not painful. :-) Regards, Tobi and regards from me too! But if A-levels are what I think they are, I can recall thinking some 40 years ago, calculus, as if I am ever going to need that in my life, ha!. Wrong. :-) Now get back to those books! (Hrm, regarding your timezone you must be somewhere near Autralia...) The word can be another one down there, it is the highest school graduation level here and really far from painful, almost simplistic. But back to the topic. It would be nice if there was someone to implement that natively. I'm not going to promise anything but I have a book lying around here with a relatively short chapter on graphs (and trees) and almost half a week of holidays left... :) If only, it could be preliminary work to gb.datastructures (even if I find that the name could be improved) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Data Structures like C++
On Thu, 24 May 2012, Bruce wrote: On Mon, 2012-05-21 at 22:25 +0200, Benoît Minisini wrote: * Tree * Graph Native implementation of that would be interesting. Any volunteer? :-) I think trees are easily implemented directly in gambas using Emil's suggestions regarding object references as a general n-tree can be implemented as a B-tree using something like Class CNode public data as Variant public left as CNode public right as CNode Public Sub PreOrder() as Variant[] blah blah ... etc according to Mr Knuth End where left is the first child and right is the first sibling. Read Knuth Vol 3 for the truth (I had to go searching through the attic to find my copy.) Now Graphs are M U C H more interesting! Someone said that they couldn't think of a use for them. Well here's one, UML diagrams are all directed graphs. In fact much of OO thinking is actually (mathematically) directed graphs. Nodes and edges. From use cases through structural models, component models, in fact the whole she-bang. Getting back to trees. The funny thing is that I had a real need to construct a n-tree this week to solve a problem I had with populating a gambas treeview from a persistence store where the nodes where out of order, i.e. the parents were later in the storage than the children (the code is a hack and I choose not to share it.) Suffice to say that Demosthenes original post prompted me to go searching through the attic. .. found some interesting stuff, by the way .. (No, lets not go there.) Getting back to the point, I think a gb.datastructures component is an excellent idea. I can't help much on the dev side as I'm pretty poor at C/C++ (can read only) and am totally lost with Benoit's macros but I'd be willing to put in much effort at testing and proving. Ah! Linked lists, how many times have I needed them and built them from scratch. Bruce -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi, so what syntax did you desire for an n-tree then? You presented a b-tree above, this appears generic to me... I certainly lack theory on those things. But shouldn't it be less annoying to get to level 3 than Root.left.left.left ? There are a lot of purposes and designs of trees (graphs), right? To implement a certain idea would not be too difficult but instead to implement only one of those as a generic tree (graph) which is then able to be inherited and specialised, maybe in gambas, - that's what I find difficult (no wonder without theory). Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] New JIT Compiler, but.....
On Thu, 24 May 2012, Emil Lenngren wrote: On ubuntu, the llvm-3.0 package (which does not work for me) provides a llvm-config in the directory /usr/lib/llvm-3.0/bin/llvm-config, and not in /usr/bin. That directory was not in my $PATH. And how to link to a library in a directory other than /usr/lib? I always have to set the environment flag LD_LIBRARY_PATH=... before running a program linked to such a library. 2012/5/24 Benoît Minisini gam...@users.sourceforge.net Le 24/05/2012 00:26, Emil Lenngren a écrit : Go to the gb.jit directory. Then try to run ./configure without the -C flag. If it doesn't work, please post the full output from the configure script. I think it is hard to make a good configure script for llvm, because it is not standardized where llvm put its files (llvm from svn puts it somewhere, gentoo in a special folder, and ubuntu in another folder ...). /Emil Then the distribution should provide a pkg-config file, or a llvm-config executable, or both. -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user On my system I used /etc/ld.so.conf to store a custom library search path. This file corresponds to ldconfig(8). Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Shell with wait does not wait till work complettion
On Mon, 21 May 2012, sundar j wrote: In my application I need to copy folder content to other folder using shell cp command (since gambas does not support COPY recurse) with wait option. When copying is in progress TextLabel will indicate Copy in Progress .nbsp; Once copying is complete then TextLable will indicate something else. For some reason wait option in shell command does nothing and I am not able to set the textnbsp; Copy in Progress in TextLabel properly. Is it bug or am I missing some code? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user What do you mean by wait option [...] does nothing? Does the shell give an error? I assume that you have something like: TextLabel.Text = Copy in progress Shell cp -r src dst Wait If I remember correctly, using this construct prevents the GUI from refreshing itself, so you won't see anything until the command completes and a new event loop is entered? I think one could help better with more information. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Fw: Shell with wait does not wait till work complettion
On Mon, 21 May 2012, sundar j wrote: TextLabel.Text = Copy in progress Shell cp -r lt;srcgt; lt;dstgt; Wait TextLabel.Text = Completed. I used above code in my application. Shell indicated that all files are being copied one-by-one. But TextLable did not display Copy in progress. I did lot of experiment with the above code. Finaly i got it working by adding time delay just before shell command. Now my code looks like this :- TextLabel.Text = Copy in progress wait 0.1 Shell cp -r lt;srcgt; lt;dstgt; Wait TextLabel.Text = Completed. I really have no cluenbsp; why code worked after inserting time delay. For public again: Actually, it does not depend on the *delay*. If you use the WAIT instruction, the interpreter re-enters its event loop. Only in this loop, changes to the GUI are made effective. So just call Wait without any parameter so that the interpreter spends only as long there as it needs to process all the pending events and refresh the GUI. You can read that on: http://www.gambasdoc.org/help/cat/eventloop?v3 Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Data Structures like C++
On Mon, 21 May 2012, Demosthenes Koptsis wrote: Basic languages have simple data structures like vars and arrays but other languages like c++ with the help of pointers can have advanced data structures like containers etc... see a full list here http://en.wikipedia.org/wiki/List_of_data_structures i wonder if such data structures can be implemented with gambas with pointers and if such an action have any mean for real life applications? Is it possible to have such data structures in gambas? How about some of these to be part of the core libraries? Abstract data types http://en.wikipedia.org/wiki/Abstract_data_types * Container http://en.wikipedia.org/wiki/Container_%28data_structure%29 * Map/Associative array/Dictionary http://en.wikipedia.org/wiki/Associative_array * Multimap http://en.wikipedia.org/wiki/Multimap * List http://en.wikipedia.org/wiki/List_%28abstract_data_type%29 * Set http://en.wikipedia.org/wiki/Set_%28computer_science%29 * Multiset http://en.wikipedia.org/wiki/Set_%28computer_science%29#Multiset * Priority queue http://en.wikipedia.org/wiki/Priority_queue * Queue http://en.wikipedia.org/wiki/Queue_%28data_structure%29 * Deque http://en.wikipedia.org/wiki/Deque * Stack http://en.wikipedia.org/wiki/Stack_%28data_structure%29 * String http://en.wikipedia.org/wiki/String_%28computer_science%29 * Tree http://en.wikipedia.org/wiki/Tree_%28computer_science%29 * Graph http://en.wikipedia.org/wiki/Graph_%28data_structure%29 * Hash http://en.wikipedia.org/wiki/Hash_Table -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user When you mean data structure like [in] C++ you mean those things we can do with gambas Objects? I could make a bunch of the ones listed above from scratch using classes - I tend to detest C++ but I think, the ones above are nothing else? (Maybe gambas lacks templates or something) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Data Structures like C++
On Mon, 21 May 2012, Demosthenes Koptsis wrote: Στις 21/5/2012 22:56, ο/η tobi έγραψε: On Mon, 21 May 2012, Demosthenes Koptsis wrote: Basic languages have simple data structures like vars and arrays but other languages like c++ with the help of pointers can have advanced data structures like containers etc... see a full list here http://en.wikipedia.org/wiki/List_of_data_structures i wonder if such data structures can be implemented with gambas with pointers and if such an action have any mean for real life applications? Is it possible to have such data structures in gambas? How about some of these to be part of the core libraries? Abstract data typeshttp://en.wikipedia.org/wiki/Abstract_data_types * Containerhttp://en.wikipedia.org/wiki/Container_%28data_structure%29 * Map/Associative array/Dictionary http://en.wikipedia.org/wiki/Associative_array * Multimaphttp://en.wikipedia.org/wiki/Multimap * Listhttp://en.wikipedia.org/wiki/List_%28abstract_data_type%29 * Sethttp://en.wikipedia.org/wiki/Set_%28computer_science%29 * Multiset http://en.wikipedia.org/wiki/Set_%28computer_science%29#Multiset * Priority queuehttp://en.wikipedia.org/wiki/Priority_queue * Queuehttp://en.wikipedia.org/wiki/Queue_%28data_structure%29 * Dequehttp://en.wikipedia.org/wiki/Deque * Stackhttp://en.wikipedia.org/wiki/Stack_%28data_structure%29 * Stringhttp://en.wikipedia.org/wiki/String_%28computer_science%29 * Treehttp://en.wikipedia.org/wiki/Tree_%28computer_science%29 * Graphhttp://en.wikipedia.org/wiki/Graph_%28data_structure%29 * Hashhttp://en.wikipedia.org/wiki/Hash_Table -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user When you mean data structure like [in] C++ you mean those things we can do with gambas Objects? I could make a bunch of the ones listed above from scratch using classes - I tend to detest C++ but I think, the ones above are nothing else? (Maybe gambas lacks templates or something) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user i mean to have a Binary Tree or a List with linked pointers etc ... i think most of them could be objects. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user You don't need pointers in a C/C++ manner. In Gambas every Object is a reference: TreeNode.class: --8--- Property Value As Variant Property Read Parent As TreeNode Property Read LeftChild As TreeNode Property Read RightChild As TreeNode Public Sub _new() [...] End Public Sub CreateChildren() [...] End [...] --8--- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Error in Left$ and Mid$ functions to the gb.ncurses component
On Sun, 20 May 2012, Benoît Minisini wrote: Le 20/05/2012 16:26, William Cabrera a écrit : Hi, I have been testing the component ncurses and so far everything well, but the functions mentioned in the title simply do not work. Below is a sample code: #!/usr/bin/env gbs3 USE gb.ncurses dim hwin As Window dim cadena, cad as string cadena = Hola Mundo cad = left(cadena) hwin = New Window(0, 0, 20, 30) hwin.Background = Color.Blue hwin.show() hwin.Full() hwin.print(right$(cadena), 0, 0) hwin.print(right$(cadena, 3), 0, 1) hwin.print(right$(cadena, -3), 0, 2) hwin.print(left$(cadena), 0, 3) hwin.print(left$(cadena, 3), 0, 4) hwin.print(left$(cadena, -3), 0, 5) hwin.print(mid$(cadena, 2, 2), 0, 6) hwin.WaitKey() And this is the output o ndo a Mundo Hola Mundo Hola Mundo Hola Mundo ola Mundo [System] OperatingSystem=Linux Kernel=3.2.0-1-686-pae Architecture=i686 Memory=2065228 kB DistributionVendor=Asturix DistributionRelease=Asturix 4 Desktop=Gnome [Gambas 3] Version=3.1.90 Path=/usr/local/bin/gbx3 [Libraries] Qt4=libQtCore.so.4.8.1 GTK+=libgtk-x11-2.0.so.0.2400.10 P.D. Sorry for my english, this is not my native language -- William Cabrera http://willicab.gnu.org.ve This is a bug in the gb.ncurses component whose methods do not read their string arguments correctly. Tobi are you here? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I'm here and working! Sorry, haven't read the subject entirely when I first saw the incoming mail... So you expect this output in the window, right?: o ndo a Mundo H Hol Hola Mu ol So my question bounces to Benoît: It's said in the docs that the three string functions used above are optimised so that they don't duplicate strings. Does that mean or is it a general fact that I cannot rely on the STRING() macro to extract a NUL-terminated string from a given GB_STRING argument? At least there doesn't seem to be a NUL byte which causes the component to print everything that follows until the end of the original string... Brief explanation and after lunch, it's done. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug on Gambas official website
On Sun, 20 May 2012, Randall Morgan wrote: Then the page should be changed to infer that as at the moment the page infers scrolling since the content continues past the page bottom. From a UI perspective this is not good communication with the user Well, I got the intention promptly and IMHO it looks nice - strange though for the first moment when you realise that half of a line is cut away and you cannot scroll. Alright, it's not good for a UI but this box is just a preview of things that are anyway only presented and as that, it's purpose is to look good. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Strange file modes
Hi, some time ago, I noticed in the sources file modes that appear strange to me: [gambas3]$ find . -executable -type f -regextype egrep -regex '.*\.(c|h|cpp|hpp)' -printf %M\t%P\n -rwxr-xr-x main/lib/option/main.c -rwxr-xr-x main/lib/option/getoptions.c -rwxr-xr-x main/lib/option/getoptions.h -rwxr-xr-x main/lib/option/main.h -rwxr-xr-x main/gbx/gbx_local.h -rwxr-xr-x main/gbx/gbx_subr_file.c -rwxr-xr-x gb.xml/src/xslt/CXSLT.cpp -rwxr-xr-x gb.xml/src/xslt/CXSLT.h -rwxr-xr-x gb.xml/src/xslt/main.h -rwxr-xr-x gb.xml/src/xslt/main.cpp -rwxr-xr-x gb.qt4/src/CContainer.cpp There may be more... I just wanted to filter away the shell scripts and stuff that ought to be executable (that's what I mean by strange file modes because I don't think those files above have to be executable) quickly. I noticed them only on C/C++ source files, so far and you see, there are a few (that's why I decided to search for those in the above command). Nothing interesting but sometimes I startle up when listing directory entries :) (One may improve the command line and filter out the scripts used by the build system by their names or something if this is really considered a security issue - I don't think so but I'm, too, not very familiar with what could be done. I just want things clean) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two bugs/issues noted
On Mon, 14 May 2012, Christer Johansson wrote: Noted some issues last night... First one is with Date(now). If assigned to a variable (or printed) it adds placeholders for time as zeroes like... 05/14/2012 00:00:00 Second is regarding the Shell command. If I execute the following code on my NAS nothing happens, same code works OK in Xubuntu running on x86... ... Shell clear Wait ... Simple repro code for both issues in attachement. Maybe I'm missing something that changed in Gambas3 but above did not happen in Gambas2 2.23.1. I'm running Gambas3 #4702 under Debian 5.03 on ARM. PS: I apologize if this is the wrong way to report bugs/issues. If thats the case please let me know where/how to report issues. /CJ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user But in a shell, the clear command works as expected? Where do you run the program from exactly? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Is gambasdoc.org down?
On Sat, 12 May 2012, Christer Johansson wrote: Anyone else having problem reaching http://gambasdoc.org? Been down whole day for me... /CJ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Same for me, noticed at midday today... -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug trying to use gb.ncurses component
On Fri, 11 May 2012, linuxos wrote: Hi all, I'm trying to use then gb.ncurses component but I have the following message: See attached screenshot I load a project in the IDE and I select gb.ncurses to use. The message appear when I start running the project. Does anyone have the same problem or not ? Thanks - Gambas3 rev#4720 [System] OperatingSystem=Linux Kernel=2.6.35.14-106.fc14.i686 Architecture=i686 Memory=2060036 kB DistributionVendor=redhat DistributionRelease=Fedora release 14 (Laughlin) Desktop=Gnome [Gambas 2] Version=2.23.0 Path=/usr/local/bin/gbx2 [Gambas 3] Version=3.1.90 Path=/usr/bin/gbx3 [Libraries] Qt4=libQtCore.so.4.7.4 GTK+=libgtk-x11-2.0.so.0.2200.0 -- Olivier Cruilles Mail: linu...@club-internet.fr -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi, if I could read it correctly (you know why I began developing gb.ncurses? I have no X running, I had to use my framebuffer web browser to view the image, so I hope, it rendered the picture entirely) that, utilising my little french knowledge, Window.Top was incorrectly overridden, right? According to that message, there must be another Window class already loaded that gets overridden by gb.ncurses' Window class (or vice versa). Do you use any GUI-related components? I haven't found in the docs any Window.Top symbol but I may be wrong (there are .Top symbols in the graphical components, don't know if they are somehow involved). I have never tried to run gb.ncurses in the IDE and I suppose further that it would not work since ncurses wants a terminal to run in - AFAIK - and I really can't say if the IDE console is a PTY or something that ncurses accepts. However, if you have enabled GUI components, try to disable them. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Bug trying to use gb.ncurses component
On Fri, 11 May 2012, Benoît Minisini wrote: Le 11/05/2012 20:29, tobi a écrit : Hi, if I could read it correctly (you know why I began developing gb.ncurses? I have no X running, I had to use my framebuffer web browser to view the image, so I hope, it rendered the picture entirely) that, utilising my little french knowledge, Window.Top was incorrectly overridden, right? According to that message, there must be another Window class already loaded that gets overridden by gb.ncurses' Window class (or vice versa). Do you use any GUI-related components? I haven't found in the docs any Window.Top symbol but I may be wrong (there are .Top symbols in the graphical components, don't know if they are somehow involved). I have never tried to run gb.ncurses in the IDE and I suppose further that it would not work since ncurses wants a terminal to run in - AFAIK - and I really can't say if the IDE console is a PTY or something that ncurses accepts. However, if you have enabled GUI components, try to disable them. Regards, Tobi By the way, I suggest that you rename the Top() and Bottom() methods as Raise() and Lower(), to mimic the GUI components. Methods should normally be verbs, and properties names. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I thought, the corresponding GUI Windows had such _methods_. Sorry for that. Will be done in the next commit which will appear when the component is not broken anymore here ;) (Testing the GB.Signal API but errors seem to arise from my code) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.xml.html: Cannot find -lgb.xml
On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 14:01, Emanuele Sottocorno a écrit : *** Warning: Linking the shared library gb.xml.html.la against the loadable module *** gb.xml.so is not portable! libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtbeginS.o .libs/gb_xml_html_la-main.o .libs/gb_xml_html_la-document.o .libs/gb_xml_html_la-element.o .libs/gb_xml_html_la-CDocument.o .libs/gb_xml_html_la-CElement.o -Wl,-rpath -Wl,/usr/local/lib/gambas3 -L/usr/local/lib/gambas3 -lgb.xml -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0 -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crtn.o -Os -Wl,-soname -Wl,gb.xml.html.so.0 -o .libs/gb.xml.html.so.0.0.0 /usr/bin/ld: cannot find -lgb.xml collect2: error: ld returned 1 exit status libtool: install: error: relink `gb.xml.html.la' with the above command before installing it [...] Has anyone else problems with that? I have no use for the last sentence in the above output... I don't know if it is even possible to link against the gambas components. I was taught that a shared library _has_ to follow the lib name .so name pattern in order to be recognised by the linker which is not true for gambas components? I also don't know if other components do similar, so I have to rely on what I think to know about library names... (But I suppose, you and anyone else got this stuff installed...) Regards, Tobi Same problem here. Ubuntu 12.04 Is it better with revision #4716? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Heh. Having seen that you altered the Makefile.am, I did a ./configure and noticed that I haven't had installed libxslt? Must be a new dependency in the configure.ac sicne a Makefile was generated by the last run (or my local copy was still confused by the gb.xml - gb.libxml changes) - however, strange, but compiles and installs now (after a reconf)! Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.xml.html: Cannot find -lgb.xml
On Sun, 06 May 2012, Fabien Bodard wrote: 2012/5/6 tobi tobiasboeg...@googlemail.com On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 14:01, Emanuele Sottocorno a écrit : *** Warning: Linking the shared library gb.xml.html.la against the loadable module *** gb.xml.so is not portable! libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtbeginS.o .libs/gb_xml_html_la-main.o .libs/gb_xml_html_la-document.o .libs/gb_xml_html_la-element.o .libs/gb_xml_html_la-CDocument.o .libs/gb_xml_html_la-CElement.o -Wl,-rpath -Wl,/usr/local/lib/gambas3 -L/usr/local/lib/gambas3 -lgb.xml -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0 -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crtn.o -Os -Wl,-soname -Wl,gb.xml.html.so.0 -o .libs/gb.xml.html.so.0.0.0 /usr/bin/ld: cannot find -lgb.xml collect2: error: ld returned 1 exit status libtool: install: error: relink `gb.xml.html.la' with the above command before installing it [...] Has anyone else problems with that? I have no use for the last sentence in the above output... I don't know if it is even possible to link against the gambas components. I was taught that a shared library _has_ to follow the lib name .so name pattern in order to be recognised by the linker which is not true for gambas components? I also don't know if other components do similar, so I have to rely on what I think to know about library names... (But I suppose, you and anyone else got this stuff installed...) Regards, Tobi Same problem here. Ubuntu 12.04 Is it better with revision #4716? -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Heh. Having seen that you altered the Makefile.am, I did a ./configure and noticed that I haven't had installed libxslt? Must be a new dependency in the configure.ac sicne a Makefile was generated by the last run (or my local copy was still confused by the gb.xml - gb.libxml changes) - however, strange, but compiles and installs now (after a reconf)! Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user have you done a trunk/reconf-all ? -- Fabien Bodard -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user No. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.xml.html: Cannot find -lgb.xml
On Sun, 06 May 2012, Fabien Bodard wrote: do it ! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Why? Everything already works fine here. (But, on the other hand, why not? Can't hurt) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] About library and component packaging in Gambas 3
On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 03:42, Bruce Bruen a écrit : On Sat, 2012-05-05 at 02:45 +0200, Benoît Minisini wrote: Le 04/05/2012 23:34, Benoît Minisini a écrit : I don't like any of those solution at the moment. And if I define a compilation constant that will tell the compiler if we are making an executable or not? That way, you will just have to add a #If Executable (or something like that) to compile or not compile the startup function ? This is the solution I implemented in revision #4715. Tell me if it fits your needs. Regards, Benoît, I'm trying it but I need a bit of help on usage. (I'm using a library that has a startup form not a module. Is this a bad idea?) Public Sub Form_Open() #If Executable Me.Center LoadInfos #Else Error This is a library.\nPlease do not run it directly Message.Title = Don't do that! Message.Error(This is a library.\nPlease do not run it directly, OK) Quit #Endif End If I compile the project and run it via gbx3, I get the expected Don't do that messages, but if I run it in the IDE I get the same thing. Bruce The constant is Exec. I try to use Gambas keywords, because it is easier for the preprocessor (that is not entirely finished). Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Concerning the preprocessor... What about utilising the cpp just as a command that runs over each class and module file before seen by the compiler code? It's already powerful enough or is that too much for gambas? (It would break existing code due to character case in the gambas preprocessor directives...) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb.xml.html: Cannot find -lgb.xml
Hi Adrien, I get the following when trying to _install_ gb.xml.html: [html]$ sudo make install [...] *** Warning: Linking the shared library gb.xml.html.la against the loadable module *** gb.xml.so is not portable! libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtbeginS.o .libs/gb_xml_html_la-main.o .libs/gb_xml_html_la-document.o .libs/gb_xml_html_la-element.o .libs/gb_xml_html_la-CDocument.o .libs/gb_xml_html_la-CElement.o -Wl,-rpath -Wl,/usr/local/lib/gambas3 -L/usr/local/lib/gambas3 -lgb.xml -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0 -L/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../crtn.o -Os -Wl,-soname -Wl,gb.xml.html.so.0 -o .libs/gb.xml.html.so.0.0.0 /usr/bin/ld: cannot find -lgb.xml collect2: error: ld returned 1 exit status libtool: install: error: relink `gb.xml.html.la' with the above command before installing it [...] Has anyone else problems with that? I have no use for the last sentence in the above output... I don't know if it is even possible to link against the gambas components. I was taught that a shared library _has_ to follow the lib name .so name pattern in order to be recognised by the linker which is not true for gambas components? I also don't know if other components do similar, so I have to rely on what I think to know about library names... (But I suppose, you and anyone else got this stuff installed...) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault when overriding Variant[]
On Sat, 05 May 2012, Benoît Minisini wrote: Le 04/05/2012 21:59, tobi a écrit : On Tue, 01 May 2012, tobi wrote: Hu hu. It should be possible to override any class, but please provide a project so that I can debug! -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Again, the attached project is not created with the IDE, I keep copying the project structure of one to another for months ;) But it works fine with gbc3 and gbx3... Could you reproduce? I don't want to appear unpatient - I already do, I know ;) - but we really want to override Variant[] over here to finish a chapter in our book. The bug should have been fixed in revision #4715. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Works great! Now I can easily sort a two-dimensional Variant matrix and Hans will finish his texts :) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] About library and component packaging in Gambas 3
On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 08:51, tobi a écrit : Concerning the preprocessor... What about utilising the cpp just as a command that runs over each class and module file before seen by the compiler code? It's already powerful enough or is that too much for gambas? (It would break existing code due to character case in the gambas preprocessor directives...) Yes, it will slow down the compiler and break everything (because the code becomes impossible to analyze) Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user OK. But just for interest, what do you mean by impossible to analyze? Excuse me, but I haven't read anything from the compiler yet. (When you say analyze, I think of line numbers and stuff (optimisation can be done later, too, right?), but line numbers would be possible, I'm almost a bit certain, to report to the IDE, if that is what you mean) I just tested it and found that cpp warns at ['] the gambas comment character which, of course, may not ahve any closing ['] one and thus confuses the program but it fearlessly ignores that and continues as expected. As an example, consider these actions: $ ls -AR .: .gambas .project .src .startup ./.gambas: ./.src: MMain.module myfunc.function $ cp .src/MMain.module .src/MMain.module.old $ cat .src/MMain.module ' Gambas module file #ifndef NOPREPROC #define PREPROC #endif #include myfunc.function Public Sub Main() #ifdef PREPROC /* * I can use these comments when c-preprocessed, of course! */ Print This is cool myfunc() #endif Print This is normal End $ cpp .src/MMain.module.old | sed 's/^#.*$//' .src/MMain.module .src/MMain.module:1:1: warning: missing terminating ' character [enabled by default] $ gbc3 -ga OK $ cp .src/MMain.module.old .src/MMain.module $ gbx3 This is cool preprocessing This is normal $ cpp -DNOPREPROC .src/MMain.module.old | sed 's/^#.*$//' .src/MMain.module $ gbc3 -ga OK $ gbx3 This is normal It works! Used by people at least a bit familiar with the basics of the cpp won't have any problems, the only thing is the translation of the cpp line control which I have discarded gracefully using sed because I don't make any mistakes ;) It's clear that it would slow down the compiler and that most people won't need those fancy tricks as gambas is basic and has advanced enough compiling mechanisms, I'm convinced, but: a simple line on the top of a file to enable the cpp for the rest of people that may utilise it wouldn't hurt?: ' Gambas class file ' :use cpp Please, explain your worries. A more intrusive feature would be the ability of using that c-/c++-style comments /**/, // within gambas when cpp'ed... I have no reason to write this post (never needed to used conditional compilation or something from within gambas) except to save you work. Reagards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Announcement: gambas-buch.de officially started
Hi gambas-users, at http://www.gambas-buch.de you will find a website on which a book on the Gambas programming language will be published. After over 3 years of intensive research, now the first chapters are published. We place value on good description of the classes and components of Gambas as well as on the practical implementation of the theory in concrete Gambas projects. For each document, there is a PDF version to download and all the projects referred to and built from the article. Progressively, all projects will be ported to, developed and tested in GB3. The authors hope for animated cooperation with the readers of the online book. A contact form is available to receive comments and hints and to improve the texts and projects at place. Best regards, Hans and Tobias -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] About library and component packaging in Gambas 3
On Sat, 05 May 2012, tobi wrote: On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 08:51, tobi a écrit : Concerning the preprocessor... What about utilising the cpp just as a command that runs over each class and module file before seen by the compiler code? It's already powerful enough or is that too much for gambas? (It would break existing code due to character case in the gambas preprocessor directives...) Yes, it will slow down the compiler and break everything (because the code becomes impossible to analyze) Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user OK. But just for interest, what do you mean by impossible to analyze? Excuse me, but I haven't read anything from the compiler yet. (When you say analyze, I think of line numbers and stuff (optimisation can be done later, too, right?), but line numbers would be possible, I'm almost a bit certain, to report to the IDE, if that is what you mean) I just tested it and found that cpp warns at ['] the gambas comment character which, of course, may not ahve any closing ['] one and thus confuses the program but it fearlessly ignores that and continues as expected. As an example, consider these actions: $ ls -AR .: .gambas .project .src .startup ./.gambas: ./.src: MMain.module myfunc.function $ cp .src/MMain.module .src/MMain.module.old $ cat .src/MMain.module ' Gambas module file #ifndef NOPREPROC #define PREPROC #endif #include myfunc.function Public Sub Main() #ifdef PREPROC /* * I can use these comments when c-preprocessed, of course! */ Print This is cool myfunc() #endif Print This is normal End $ cpp .src/MMain.module.old | sed 's/^#.*$//' .src/MMain.module .src/MMain.module:1:1: warning: missing terminating ' character [enabled by default] $ gbc3 -ga OK $ cp .src/MMain.module.old .src/MMain.module $ gbx3 This is cool preprocessing This is normal $ cpp -DNOPREPROC .src/MMain.module.old | sed 's/^#.*$//' .src/MMain.module $ gbc3 -ga OK $ gbx3 This is normal It works! Used by people at least a bit familiar with the basics of the cpp won't have any problems, the only thing is the translation of the cpp line control which I have discarded gracefully using sed because I don't make any mistakes ;) It's clear that it would slow down the compiler and that most people won't need those fancy tricks as gambas is basic and has advanced enough compiling mechanisms, I'm convinced, but: a simple line on the top of a file to enable the cpp for the rest of people that may utilise it wouldn't hurt?: ' Gambas class file ' :use cpp Please, explain your worries. A more intrusive feature would be the ability of using that c-/c++-style comments /**/, // within gambas when cpp'ed... I have no reason to write this post (never needed to used conditional compilation or something from within gambas) except to save you work. Reagards, Tobi Oh, you should know: $ cat .src/myfunc.function #ifdef PREPROC Private Sub myfunc() Print preprocessing End #endif And forget that $ cp .src/MMain.module.old .src/MMain.module above, it is useless. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Announcement: gambas-buch.de officially started
On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 17:15, tobi a écrit : Hi gambas-users, at http://www.gambas-buch.de you will find a website on which a book on the Gambas programming language will be published. After over 3 years of intensive research, now the first chapters are published. We place value on good description of the classes and components of Gambas as well as on the practical implementation of the theory in concrete Gambas projects. For each document, there is a PDF version to download and all the projects referred to and built from the article. Progressively, all projects will be ported to, developed and tested in GB3. The authors hope for animated cooperation with the readers of the online book. A contact form is available to receive comments and hints and to improve the texts and projects at place. Best regards, Hans and Tobias Sorry, I can't read german (except a few words), so it will be hard for me to help you fixing the possible mistakes! -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user The sentence about improving and hints is meant for those who read the book. That excludes you, consequently, don't worry ;) If I remember correctly, there are a few german people around here and all are gambas-users which may find this - even if german - interesting... (I remember of a dutchman to whom the german language of a text was the same) When I had a problem, I always came to the mailing list and what goes through my hands will usually be proven. This inevitably leads to involving you all _in English_ when something would go wrong. The lack of translation - has there ever been a project that was translated from the beginning? - comes from: a) Hans who is not used to English b) Me because it would be too much to translate the texts Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] About library and component packaging in Gambas 3
On Sat, 05 May 2012, Benoît Minisini wrote: Le 05/05/2012 15:30, tobi a écrit : OK. But just for interest, what do you mean by impossible to analyze? Excuse me, but I haven't read anything from the compiler yet. (When you say analyze, I think of line numbers and stuff (optimisation can be done later, too, right?), but line numbers would be possible, I'm almost a bit certain, to report to the IDE, if that is what you mean) I just tested it and found that cpp warns at ['] the gambas comment character which, of course, may not ahve any closing ['] one and thus confuses the program but it fearlessly ignores that and continues as expected. ... cpp means C PreProcessor. This program was designed (not always intelligently) for the C-language. This is the reason why there is a preprocessor inside the Gambas compiler dedicated to the Gambas language. But this preprocessor is very rudimentary, only the really needed features being implemented. When I say impossible to analyze, I mean that a preprocessor like cpp is really obfuscating the real code, and so it will prevent the development from analyzing the code. Then you can say bye-bye to automatic completion, method arguments popups and so on. Regards, -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Yes, and even the manpage warns about using cpp with other languages and recommends one that is built especially for the certain language. (Although, I find it rather powerful apart from C) I didn't know the preprocessor was responsible for these nifty things. It seems to already play a great role - I was entirely focused on the directives it provides which permit to think that it wasn't that important and could be easily replaced. Sorry for the noise. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault when overriding Variant[]
On Tue, 01 May 2012, tobi wrote: Hu hu. It should be possible to override any class, but please provide a project so that I can debug! -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Again, the attached project is not created with the IDE, I keep copying the project structure of one to another for months ;) But it works fine with gbc3 and gbx3... Could you reproduce? I don't want to appear unpatient - I already do, I know ;) - but we really want to override Variant[] over here to finish a chapter in our book. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Segfault when overriding Variant[]
Hi, I promptly get a segfault when I try to create an instance of my extended Variant[]: .src/Variant[].class --8- ' Gambas class file Export Public Sub _compare(hV As Variant[]) As Integer Return 0 End --8- .src/MMain.module --8- ' Gambas module file Public Sub Main() Dim hV As New Variant[] End --8- I hope that it's possible to override native classes? Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault when overriding Variant[]
On Tue, 01 May 2012, tobi wrote: Hi, I promptly get a segfault when I try to create an instance of my extended Variant[]: .src/Variant[].class --8- ' Gambas class file Export Public Sub _compare(hV As Variant[]) As Integer Return 0 End --8- .src/MMain.module --8- ' Gambas module file Public Sub Main() Dim hV As New Variant[] End --8- I hope that it's possible to override native classes? Regards, Tobi Oh, I should look first and then post... Segfault comes from gbx_class.c:1358: array_type-array_class = class; but before that in the same function: CLASS *array_type = (CLASS *)class-array_type; and look at: (gdb) print class-array_type $2 = 12 which is GB_T_VARIANT, as supposed to be since I exported a Variant[]. I think creating that as a pointer is a bug. (Creating arrays of native datatypes not expected?) The article about Gambas object model says that gb.qt Application extends gb Application so, I am allowed to extend native classes! Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault when overriding Variant[]
On Tue, 01 May 2012, Benoît Minisini wrote: Le 01/05/2012 10:47, tobi a écrit : On Tue, 01 May 2012, tobi wrote: Hi, I promptly get a segfault when I try to create an instance of my extended Variant[]: .src/Variant[].class --8- ' Gambas class file Export Public Sub _compare(hV As Variant[]) As Integer Return 0 End --8- .src/MMain.module --8- ' Gambas module file Public Sub Main() Dim hV As New Variant[] End --8- I hope that it's possible to override native classes? Regards, Tobi Oh, I should look first and then post... Segfault comes from gbx_class.c:1358: array_type-array_class = class; but before that in the same function: CLASS *array_type = (CLASS *)class-array_type; and look at: (gdb) print class-array_type $2 = 12 which is GB_T_VARIANT, as supposed to be since I exported a Variant[]. I think creating that as a pointer is a bug. (Creating arrays of native datatypes not expected?) The article about Gambas object model says that gb.qt Application extends gb Application so, I am allowed to extend native classes! Regards, Tobi Hu hu. It should be possible to override any class, but please provide a project so that I can debug! -- Benoît Minisini -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Again, the attached project is not created with the IDE, I keep copying the project structure of one to another for months ;) But it works fine with gbc3 and gbx3... test4.tar Description: Unix tar archive -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Using qsort with Objects
Hi, I want to sort an Array of Arrays as Variant[][] that may contain different datatypes in each member of an array but the arrays are all homogenous (think of a Database, it's not the actual subject but the same idea). That's what I thought of: - Write a class that Inherits Variant[] (that will act as the Array containing Variant[], so I could also Inherits Object[]?) - Create a Sort() method for that class that takes an integer N for the member to sort by (Variant[][N]) (When Inherits Object[], I get error messages on incorrectly overriding Object[].Sort(). The parameter?) - Call qsort(Super.Data, Super.Count, SizeOf(gb.Pointer), MyCompare) -- _Right?_ - MyCompare consequently takes two Pointers. How may I treat them as being references to Variant[]? Any casts possible? After that, it would be easy to use TypeOf(Variant[][N]) and call a datatype-specific routine to compare the two values. I tried to Private Sub MyCompare(V1 As Variant[], V2 As Variant[]) and got a Segfault after one line of wrong results when, in MyCompare, Print V1[0], V1[1] which are valid. Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Regexp based highlighting
Hi, it's some time since I last used the Highlight class together with the gb.qt4.ext Editor and I personally found it quite painful in the beginning. I hope, I did nothing wrong when I constructed a large Editor_Highlight() handler? However, my question is about a Regexp based Highlighting. Does it already exists? A sample I can provide for that, is vim. I think about implementing that (at least) when I extend the gb.ncurses component to TextBoxes and stuff (what the ncurses forms library provides), it may be of help in the GUI world, too, I'm almost sure. Remarks? (From Benoît perhaps? I saw that there exist several Highlight* classes that do the job for quite some languages, so I _suppose_ that there's no such automatism?) Regards, Tobi -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Grab command
On Sat, 21 Apr 2012, trat50 wrote: But Tobi, I have been drawing just fine on a DrawingArea. The DrawingArea named Sky is the picture posted above... I switched from a PictureBox to a DrawingArea because I couldn't draw on a PictureBox. Now I am back to the original problem... how to draw on a PictureBox. When I attempt to draw on PictureBox, I get error message: not a drawable object. It sounds like I should be able to draw on a PictureBox - but I must be doing it wrong. tobi-15 wrote: It's quite easy to draw on a DrawingArea. You have to take the DrawgingArea as a drawing device: Draw.Begin(DrawingArea) Draw.Picture(myPicture) Draw.End() (typed from scratch, no warranty, but it should be close to these lines) -- -- View this message in context: http://old.nabble.com/Grab-command-tp33715676p33727690.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user You don't need to draw on a PictureBox. Just draw on a Picture object and then place that drawn Picture in the PictureBox: Draw.Begin(myPicture) ... Draw.End() myPictureBox.Picture = myPicture -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Grab command
On Fri, 20 Apr 2012, trat50 wrote: Thanks Tobi, Yes you are correct - this is on Gambas2. I'll have to try that on a PictureBox. Initially I had everything for this app on a PictureBox, but I didn't know how to draw on those. I'll see what I can find in the texts, or maybe someone will chime in. tobi-15 wrote: On Fri, 20 Apr 2012, trat50 wrote: Hi Tobi, I just tried that - but it still blacks out anything not visible on the computer monitor. tobi-15 wrote: If you are talking about GB2, you can do: DrawingArea.Grab().Save(Path, [Quality]) However, in GB3, the Grab method is entirely different. Refer to http://www.gambasdoc.org/help/comp/gb.qt4/control/grab?v3 Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/Grab-command-tp33715676p33721340.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I assume that you are using GB2? I can't help you with that aspect of the routine, I don't want to bother myself with downloading the GB2 source tree just to look up how Control.Grab() works, there are people around here that can tell you from memory if you are patient ;) (In fact, I haven't read the other mails you sent before replying to your first one, sorry) A suggestion: It is often better to draw on a Picture object and put that into a DrawingArea for display only, as I never found a way to get the internal Picture that is used by the DrawingArea mentioned in the docs. (Perhaps I just didn't look at the right places or something, but if you can, you could go this way) Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/Grab-command-tp33715676p33723445.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user It's quite easy to draw on a DrawingArea. You have to take the DrawgingArea as a drawing device: Draw.Begin(DrawingArea) Draw.Picture(myPicture) Draw.End() (typed from scratch, no warranty, but it should be close to these lines) -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] rev. 4651 and new gb.xml
On Sat, 21 Apr 2012, Karl Reinl wrote: Salut Benoît, the new gb.xml broke my project which used before gb.xml and gb.xml.xslt. As I can see, you wrote a gambas component also called gb.xml, which replaced the old. Now I struggle at xml.FromString() where xml is a XmlDocument, while you forgot FromString, hope ther are not others. -- Amicalement Charlie -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user If I am correct, the component gb.libxml is what you used before and kept for compatibility. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] rev. 4651 and new gb.xml
On Sat, 21 Apr 2012, Charlie Reinl wrote: Am Samstag, den 21.04.2012, 21:35 +0200 schrieb tobi: On Sat, 21 Apr 2012, Karl Reinl wrote: Salut Benoît, the new gb.xml broke my project which used before gb.xml and gb.xml.xslt. As I can see, you wrote a gambas component also called gb.xml, which replaced the old. Now I struggle at xml.FromString() where xml is a XmlDocument, while you forgot FromString, hope ther are not others. -- Amicalement Charlie -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user If I am correct, the component gb.libxml is what you used before and kept for compatibility. Salut, no, sorry for that, Iv to investigate that, and it is not xml.FromString(). No, Tobi I always used gb.xml and gb.xml.xslt. I used it in gambas1 and gambas2 and gambas3. In gambas3, yesterday at about 03:01:49 with Revision: 4640 gb.libxml came up by replacing gb.xml for making place to gb.xml 22h later. -- Amicalement Charlie -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I can clearly see in gb.libxml/src/CXMLDocument.c that there is a FromString() routine. I personally never used that component and I'm sorry if I'm mistaken or misunderstood you. (As for gb.libxml.xslt and gb.libxml.rpc they seem to be removed, as indicated by the revision logs). Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Grab command
On Thu, 19 Apr 2012, trat50 wrote: I would like some help the syntax of the Grab command. I want to save a DrawingArea as a png or jpg file. Would someone please post a short example. Thank you. -- View this message in context: http://old.nabble.com/Grab-command-tp33715676p33715676.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user If you are talking about GB2, you can do: DrawingArea.Grab().Save(Path, [Quality]) However, in GB3, the Grab method is entirely different. Refer to http://www.gambasdoc.org/help/comp/gb.qt4/control/grab?v3 Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to Me.Close with Shell or Exec?
On Fri, 20 Apr 2012, abbat wrote: Thank you very very very much )) Now it works as i need. minthaka wrote: What about Quit instead Me.Close? 2012/4/20, abbat abbat...@mail.ru: It does not CLOSE. Just try F5 If True then Exec [ls] Me.Close EndIf DOES NOT CLOSE (you have to push stop button), AND: If True then 'Exec [ls] Me.Close EndIf WORKS GMail-79 wrote: On Fri, 2012-04-20 at 03:13 -0700, abbat wrote: Hi, Public Sub Form_Open() Dim a As String = 4 Dim b As String = 4 If a b Then Else 'Shell ls Exec [ls] Me.Close Endif End How to Me.Close Thanks Removing irrelevant code, I get Public Sub Form_Open() If True then Exec [ls] Me.Close EndIf End or better Public Sub Form_Open() Exec [ls] Me.Close End both of which seem to execute perfectly well (i.e. as expected) here. Please explain your problem again. cheers Bruce -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719872.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719937.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user One remark: According to http://www.gambasdoc.org/help/lang/quit you are strongly advised to not call Quit in a GUI application. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Grab command
On Fri, 20 Apr 2012, trat50 wrote: Hi Tobi, I just tried that - but it still blacks out anything not visible on the computer monitor. tobi-15 wrote: If you are talking about GB2, you can do: DrawingArea.Grab().Save(Path, [Quality]) However, in GB3, the Grab method is entirely different. Refer to http://www.gambasdoc.org/help/comp/gb.qt4/control/grab?v3 Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/Grab-command-tp33715676p33721340.html Sent from the gambas-user mailing list archive at Nabble.com. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I assume that you are using GB2? I can't help you with that aspect of the routine, I don't want to bother myself with downloading the GB2 source tree just to look up how Control.Grab() works, there are people around here that can tell you from memory if you are patient ;) (In fact, I haven't read the other mails you sent before replying to your first one, sorry) A suggestion: It is often better to draw on a Picture object and put that into a DrawingArea for display only, as I never found a way to get the internal Picture that is used by the DrawingArea mentioned in the docs. (Perhaps I just didn't look at the right places or something, but if you can, you could go this way) Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Documentation
On Fri, 20 Apr 2012, Willy Raets wrote: On do, 2012-04-19 at 22:06 +0100, Steve wrote: Are there any docs to help To try out gambasforge example How to setup a gambas cgi webserver Steve All I could find is this: http://gambasdoc.org/help/doc/serverpage?view I would love to find some good example on how to set it up all Willy -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I think, I already answered such a question and it was mainly about: We have a German paper on that topic (apache2 with gambas cgi on debian, if I remember correctly). If it is of any use for someone, I could try to locate it? -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Documentation
On Fri, 20 Apr 2012, Steve wrote: Please I think, I already answered such a question and it was mainly about: We have a German paper on that topic (apache2 with gambas cgi on debian, if I remember correctly). If it is of any use for someone, I could try to locate it? - For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user O.k., now I know why I sent the archive directly to Ron last time: It's approx. 1.2MiB in size and - reasonably - the mailinglist is tuned down to attachments of 512KiB. For I don't want to bother some moderator nor take up more space than required, you get another email. For those also seeking for the paper, I will push Hans to put it on http://www.gambas-buch.de/. Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Function/code for close icon?
On Sun, 15 Apr 2012, sundar j wrote: Is there any way that we can write function/code for close icon (top right corner of the window). When my program run it creates temp files which needs to be cleared when user click on this icon. Any help? -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user For this purpose, you have the Window_Close() event. Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Setting at zero more byte in a file by Byte[]
On Sun, 08 Apr 2012, Ru Vuott wrote: Hello, I'ld like to set at zero more subsequent byte (e.g. the FIRST four) in a file, using that code: *** Public Sub Button1_Click() Dim aFl As File Dim buff As New Byte[4] Dim b As Byte aFl = Open /tmp/my_file For Write For Each b In buff b = 0 Next Write #aFl, buff As Byte[] aFl.Close End *** But I obtain a strange result. In fact if I control the result of file by an exad. editor, I see the byte are: 41 02 04 00 00 00 00 .. I have three strange byte (41 02 04) end 'then' the four zero ! If I want to set at zero five byte, those three exad. number will be: 41 02 05 It seems it memorized and wrote the array pointer instead of its contents (the four zero) ! Isn't it ? Vuott -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user If you Write #File, aArr As Array then Gambas has to be able to aArr = Read #File As Array the data back. To do so, the type of array and its size must be available and thus are written before the actual data. You may want to use the Write #File, \x00\x00\x00\x00, 4 syntax. Haven't tried but should work. Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Excluding components from build process
Hi, I know a pretty bunch of components that I don't intend to compile on my system (because I don't want my box to satisfy their dependencies). May it be possible to explicitly exclude them from the reconf-all, configure, make process? I know that despite the make part this is a quite rare task but nevertheless a pain on my machine. I'm not very familiar with those autoconf and friends and seriously: The files they generate are unreadable, at least to me. I don't want to steal someone's time (the dictionary says, the correct idiom would be something with monkeys?) explaining me what goes on but a yes/no/look at the stuff answer. Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Excluding components from build process
On Sat, 07 Apr 2012, Charlie Reinl wrote: Am Samstag, den 07.04.2012, 20:06 +0200 schrieb tobi: Hi, I know a pretty bunch of components that I don't intend to compile on my system (because I don't want my box to satisfy their dependencies). May it be possible to explicitly exclude them from the reconf-all, configure, make process? I know that despite the make part this is a quite rare task but nevertheless a pain on my machine. I'm not very familiar with those autoconf and friends and seriously: The files they generate are unreadable, at least to me. I don't want to steal someone's time (the dictionary says, the correct idiom would be something with monkeys?) explaining me what goes on but a yes/no/look at the stuff answer. Regards, Tobi --8--- Salut Tobi, you can disable them , instead of ./configure -C do a ./configure -C --disable-pdf --disable-net --disable-gsl -- Amicalement Charlie -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Great! That's pretty easy, I should have invested a minute or two to study its options... However, I can't find that in the INSTALL file. It's certainly not _that_ important... Regards, Tobi -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Load hidden file to variable?
On Mon, 02 Apr 2012, sundar j wrote: Print Error is False for both if statement and file.load function. I have checked file permission and it is root. I think file permission is not an issue here since it does not even detect file. Also i have tested the same with other file (root permission) and it works perfectly. Again i need not have to edit the file. wow, mail citation gets weird now. could we quickly recall? to clarify things to me, too... this all works as expected (gives True): Print Exist(~/) Print Access(~/, gb.Read) and Print File.Load(~/) insistently fails? regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Load hidden file to variable?
hi, On Sat, 31 Mar 2012, sundar j wrote: I need to load file to a variable which is residing in side a hidden folder. So i tried to load it like If Exist(~/.applicationtempfile/.hiddendir/file) = True Then search = File.Load(~/.applicationtempfile/.hiddendir/file) ... rest of coding ... However obove code does not work. Any help??? -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user actually, it should, there is no difference between normal and hidden files. it works for me. maybe you messed around with the variable? try Print File.Load(~/.applica...) to see the content, it really should work. regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ncurses component
hi, On Mon, 26 Mar 2012, tobi wrote: On Mon, 26 Mar 2012, Rolf-Werner Eilert wrote: Am 25.03.2012 14:42, schrieb tobi: Benoît, do you think an ncurses component would be useful? i abandoned the X server with the beginning of the year and when i noticed that i would need a console ide for gambas, i began writing one (cut down to my personal needs of course) using ncurses library. as it went more complicated i appended it to the long queue of to-do projects ;) but yesterday i realised that having an ncurses component in gambas would make things a lot easier, the console ide could be written in gambas (what an idea!) on the other hand: who needs ncurses nowadays? what do you think, is it a waste of time or a valuable addition? (hope, the accent works, i searched about an hour for that - and can't even see the result) regards, tobi The accent works :-) And I like the ncurses idea, in fact I had such an idea some time ago. Don't remember what I wanted to do with it, but after realizing the complexity, I simply wrote some routines for colours and stuff, the rest was purely playing around a bit. Nothing serious. Rolf well, i'd volunteer but i can't estimate any time needed for a basically usable result. i'm an 11th grade student so more important things may pop up in near future... (in case you worry, i think (as a least instance) i'm capable of writing clean (concerning memory), structured and reliable code -- but as the ncurses faq says, the library doesn't like to free(3) its internal stuff for it may be needed later; unless you configure it to do so...) as soon as i figured out how to write components for gambas using the c interface, i'll start anyway... regards, tobi don't want to be annoying but: after having to read about those nifty configure scripts, i'm to face the first obstacle. this code works: - ' Gambas module file Public Sub Main() NCurses.On() NCurses.Print(this is text, 10, 10) NCurses.Attributes = NCurses.Bold Or NCurses.Reverse Print this is a brave test. NCurses.Print(next line, , 11) NCurses.WaitKey() NCurses.Off() End - but as the docs about programming components in c/c++ reasonably say, this is rather c-style and not suitable for the gambas language. (at the moment, there is one static object NCurses - i want to discover the api further before writing any serious classes). the Print() _function_ takes optionally x,y coordinates from which to print the text using ncurses. i thought, it would be better to just use the Print instruction to print text instead of this function all over again - this is just not aesthetic (but bearable?). while the Print _instruction_ works fine for that - tried also with multiple ncurses WINDOWs present - it always prints after the current cursor position, no matter what's there. that's the same with the ncurses functions, the main problem is that i turned on some attributes which are handled by the library, too. the text from the Print instruction doesn't get bold and video reversed. consequently, one may never use Print instruction to stdout in ncurses mode and this option has departed... i had the weirdest ideas of redirecting stdout, to which Print prints, to a stream object inside the ncurses component, reading from that and printing the data with the ncurses functions, but that's quite too strange... any suggestions/ideas about a suitable interface for something that fundamental? or may the above code fit? (i appear to not often use the ncurses mvwprintw() in any bigger thing without having built a wrapper around it or controlled it via a loop, so this may really fit as is...) regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ncurses component
On Wed, 28 Mar 2012, Benoît Minisini wrote: Le 28/03/2012 21:29, tobi a écrit : hi, On Mon, 26 Mar 2012, tobi wrote: On Mon, 26 Mar 2012, Rolf-Werner Eilert wrote: Am 25.03.2012 14:42, schrieb tobi: Benoît, do you think an ncurses component would be useful? i abandoned the X server with the beginning of the year and when i noticed that i would need a console ide for gambas, i began writing one (cut down to my personal needs of course) using ncurses library. as it went more complicated i appended it to the long queue of to-do projects ;) but yesterday i realised that having an ncurses component in gambas would make things a lot easier, the console ide could be written in gambas (what an idea!) on the other hand: who needs ncurses nowadays? what do you think, is it a waste of time or a valuable addition? (hope, the accent works, i searched about an hour for that - and can't even see the result) regards, tobi The accent works :-) And I like the ncurses idea, in fact I had such an idea some time ago. Don't remember what I wanted to do with it, but after realizing the complexity, I simply wrote some routines for colours and stuff, the rest was purely playing around a bit. Nothing serious. Rolf well, i'd volunteer but i can't estimate any time needed for a basically usable result. i'm an 11th grade student so more important things may pop up in near future... (in case you worry, i think (as a least instance) i'm capable of writing clean (concerning memory), structured and reliable code -- but as the ncurses faq says, the library doesn't like to free(3) its internal stuff for it may be needed later; unless you configure it to do so...) as soon as i figured out how to write components for gambas using the c interface, i'll start anyway... regards, tobi don't want to be annoying but: after having to read about those nifty configure scripts, i'm to face the first obstacle. this code works: - ' Gambas module file Public Sub Main() NCurses.On() NCurses.Print(this is text, 10, 10) NCurses.Attributes = NCurses.Bold Or NCurses.Reverse Print this is a brave test. NCurses.Print(next line, , 11) NCurses.WaitKey() NCurses.Off() End - but as the docs about programming components in c/c++ reasonably say, this is rather c-style and not suitable for the gambas language. (at the moment, there is one static object NCurses - i want to discover the api further before writing any serious classes). the Print() _function_ takes optionally x,y coordinates from which to print the text using ncurses. i thought, it would be better to just use the Print instruction to print text instead of this function all over again - this is just not aesthetic (but bearable?). while the Print _instruction_ works fine for that - tried also with multiple ncurses WINDOWs present - it always prints after the current cursor position, no matter what's there. that's the same with the ncurses functions, the main problem is that i turned on some attributes which are handled by the library, too. the text from the Print instruction doesn't get bold and video reversed. consequently, one may never use Print instruction to stdout in ncurses mode and this option has departed... i had the weirdest ideas of redirecting stdout, to which Print prints, to a stream object inside the ncurses component, reading from that and printing the data with the ncurses functions, but that's quite too strange... any suggestions/ideas about a suitable interface for something that fundamental? or may the above code fit? (i appear to not often use the ncurses mvwprintw() in any bigger thing without having built a wrapper around it or controlled it via a loop, so this may really fit as is...) regards, tobi Can we talk about that on the gambas-devel mailing-list please? -- Benoît Minisini -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user i heard of that list, but never seen it. i'll subscribe... -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Delete sentance between words in a file.
hi, On Mon, 26 Mar 2012, sundar j wrote: How do i delete a sentence/line between two matching words? For example i have a long paragraph starting with ABC-Start and ending with XYZ-End. I need to delete all the words including ABC-Start amp; XYZ-End. I have gone through the gambas documentation and found replace string function. However it did not do the job as i expected. Any help is appreciated. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user i'd tend to use the Mid$() function. if you got the positions of the two delimiters it is as easy as concatenating the string on the left of the beginning delimiter and the string on the right of the right delimiter. code is beyond words: Dim iStart, iEnd As Integer Dim sRest As String iStart = InStr(sWholeText, sBegDelim) iEnd = InStr(sWholeText, sEndDelim, iStart) + Len(sEndDelim) sRest = Mid$(sWholeText, 0, iStart - 1) Mid$(sWholeText, iEnd) which then is the parts before and after the found strings. there may be off-by-one errors, i couldn't try it, but you get the idea. regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] ncurses component
On Mon, 26 Mar 2012, Rolf-Werner Eilert wrote: Am 25.03.2012 14:42, schrieb tobi: Benoît, do you think an ncurses component would be useful? i abandoned the X server with the beginning of the year and when i noticed that i would need a console ide for gambas, i began writing one (cut down to my personal needs of course) using ncurses library. as it went more complicated i appended it to the long queue of to-do projects ;) but yesterday i realised that having an ncurses component in gambas would make things a lot easier, the console ide could be written in gambas (what an idea!) on the other hand: who needs ncurses nowadays? what do you think, is it a waste of time or a valuable addition? (hope, the accent works, i searched about an hour for that - and can't even see the result) regards, tobi The accent works :-) And I like the ncurses idea, in fact I had such an idea some time ago. Don't remember what I wanted to do with it, but after realizing the complexity, I simply wrote some routines for colours and stuff, the rest was purely playing around a bit. Nothing serious. Rolf well, i'd volunteer but i can't estimate any time needed for a basically usable result. i'm an 11th grade student so more important things may pop up in near future... (in case you worry, i think (as a least instance) i'm capable of writing clean (concerning memory), structured and reliable code -- but as the ncurses faq says, the library doesn't like to free(3) its internal stuff for it may be needed later; unless you configure it to do so...) as soon as i figured out how to write components for gambas using the c interface, i'll start anyway... regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] ncurses component
Benoît, do you think an ncurses component would be useful? i abandoned the X server with the beginning of the year and when i noticed that i would need a console ide for gambas, i began writing one (cut down to my personal needs of course) using ncurses library. as it went more complicated i appended it to the long queue of to-do projects ;) but yesterday i realised that having an ncurses component in gambas would make things a lot easier, the console ide could be written in gambas (what an idea!) on the other hand: who needs ncurses nowadays? what do you think, is it a waste of time or a valuable addition? (hope, the accent works, i searched about an hour for that - and can't even see the result) regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] WebPage support in Gambas (2)
hi, On Sat, 24 Mar 2012, Benoît Minisini wrote: Hi, I have added two syntaxes in WebPage. The first one is: %:OtherWebPage% This includes the OtherWebPage contents inside the current WebPage. That syntax can take attributes, like an HTML markup. %:OtherWebPage name=value name2=value2% Beware the the contents of an attribute does not follow the HTML syntax (as it is rendered on the server). To get the value of an attribute in OtherWebPage, you must use the second added syntax: %!name% So, now, you have four server-side syntaxes in a Gambas WebPage: 1) % ... % to include any code. 2) %= ... % to render HTML from a Gambas expression. 3) %: ... % to include another WebPage, passing attributes optionnaly. 4) %! ... % to get the value of an attribute. To render a specific WebPage, you have to call the Render() method. Now I have a question: would it be useful to have a mechanism that will automatically choose a WebPage to render from the URL contents? -- Benoît Minisini -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user you mean from a gambas application containing several WebPages? a mini per-application cms? without restrictions this may introduce security risks on particular programs, right? (i think of a login program from which one may get a privileged Page when implemented without restrictions) in this regard, i would prefer some special subroutine that may or may not be overwritten (if not, WebPages may be chosen automatically, which is often a good service!) in that application to evaluate parameters. i haven't used any WebPage so far, i just read about it here, so i may have a wrong understanding of how it works and where it would be used. sorry if that's the case. regards, tobi -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] wlan ready?
hi, On Sat, 17 Mar 2012, Randall Morgan wrote: You could call ping on a know external server and then examine the results... Or simply loop trying to use curl to connect to an external server. On Sat, Mar 17, 2012 at 5:05 AM, Bill-Lancaster bill-lancas...@lineone.netwrote: Gambas 3, Ubuntu 12.04, kde Is there a way to check if my wlan is connected? I want to run a project at startup that needs the wlan which sometime takes a little while to connect. I could use delay() but that is not very elegant! Bill Lancaster -- View this message in context: http://old.nabble.com/wlan-ready--tp33522345p33522345.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ 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? -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user that's a question, very difficult to answer. do you want to know if you have access to the internet or just connected to a router? the internet thing won't be possible without relying on an external server (right?) which may have downtimes... however, there should be system files/logs that indicate the current status. apart from logfiles (on my arch linux setup, i could use /var/log/boot), there could be kde-specific things; i don't know. what works for me and seems to be an acceptable idea (?) is checking if i have a route associated with my wlan device: $ cat /proc/net/route or alternatively $ cat /proc/net/wireless (if present - i have it) which gives information about the wireless devices, here the status field may be interesting. i read that iwconfig(1) reads the same info, but it displays it nicelier. i think, this information is more reliable than ping(1)ing some servers. there is so much that can happen between you and it - and moreover, what can you - as a regular user - do besides checking if you are connected to a gateway/router? that's the only thing you can control. sorry, i'm not very far into those network things... -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Read and arrays
On Mon, 12 Mar 2012, Jussi Lahtinen wrote: I was thinking quicker way to read large binary files to memory. And I noticed this; The returned datatype can be one of the following: NULL, Boolean, Byte, Short, Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, Collection or structure. http://gambasdoc.org/help/lang/read?v3 So, I wonder whether it is quicker to read data as array, instead of looping one (short) integer at time. But how to do that? Did I misunderstand something? tmpArr = Read hFile As Short[2000] Doesn't compile (unexpected '[')... or does this work only for data written as array, and read as Short[] without given bounds? Jussi -- Try before you buy = See our experts in action! 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-dev2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user i once watched the format of files to which arrays/collections were written. they consist, if i remember correctly, of an identifier followed by the size and then the data. if you write an array to a file you can only read that array back, i think. so it works on datatype base, not on raw memory base if you Read As Datatype. reading as much as possible in one call is definitely faster (that is the reason for which the standard libc streams are buffered by default). reading raw memory arrays of fixed size may be done using memory streams...? do they persist in gambas3? i can't check anything now. regards, tobi -- Try before you buy = See our experts in action! 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-dev2 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Strange Keyboard Behavior
hi, On Sat, 10 Mar 2012, Bill-Lancaster wrote: OK Ran the code but no change, e.g. part of a line of code is 1005 AND TransDate = ' if I delete the D in TransDate I get 1005 AND TransDte = ' mGen At this point, the cursor is not representing the point of editing. I'm going to try to copy this project into a new one. New projects don't deem to have this problem. Thanks Jussi well, this completely is speculation but there are two things coming to my mind: 1. are you sure there are no control characters in your sources that may confuse the editor control? some source migration/conversion or whatever problem? 2. you said that your project is rather large. i think i remember editing a large file (huge line lengths and overall size) when similar problems occured (not sure whether i didn't just dream it) but this was completely outside gambas so the problem may be elsewhere. to follow this assumption we must know anyway if your sources match the above characteristics (long lines/huge source files). regards, tobi -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] R: Process in TableVew and to Kill a Process - RECTIUS
hi, On Thu, 01 Mar 2012, Ru Vuott wrote: By trying: Exec [killall program_name] it gives me an error: Cannot run child process: cannot exec program: resource temporarily unavailable But by using: SHELL killall program_name it's OK . --- Gio 1/3/12, Emil Lenngren emil.lenng...@gmail.com ha scritto: Da: Emil Lenngren emil.lenng...@gmail.com Oggetto: Re: [Gambas-user] R: Process in TableVew and to Kill a Process - RECTIUS A: mailing list for gambas users gambas-user@lists.sourceforge.net Data: Giovedì 1 marzo 2012, 00:54 Try this: Exec(killall program_name) 2012/3/1 abbat abbat...@mail.ru It works only if I use Button1 (If we execute an app ourselves). But how to kill process if we know only Name? Thanks Vuott wrote: ' Gambas class file Private hpro As Process Public Sub Button1_Click() ' An application start, i.e. “ Gedit “ hpro = Exec [gedit] As hpro End Public Sub button2_Click() ' it closes application process hpro.kill End ' this event is raised, when process is closed: Public Sub hpro_Kill() Print Process closed ! End -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://old.nabble.com/Process-in-TableVew-and-to-Kill-a-Process-tp33417515p33417896.html Sent from the gambas-user mailing list archive at Nabble.com. -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user if i remember correctly EXEC is an interface to the exec family of syscalls. so writing EXEC [killall prgname] will result in the program killall prgname to be executed. i suggest that none of your programs is named like that (i can't interpret the error message for it is not in the manual of the exec family of functions, so i may be wrong with all this). you could try using EXEC [killall, prgname] which will call the program killall with prgname as parameter. regards, tobi -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas runtime
hi, On Thu, 01 Mar 2012, Willy Raets wrote: Hi, I'm trying to figure out if it is possible to detect the gambas runtime version in a command line manner, to be used in EXEC? Any ideas? Willy -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user won't gbx3 --version (or gbx2) do the trick? i don't consider it that important but shouldn't it be accessible from within, like from a constant in the interpreter? regards, tobi -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to organize dependent lists
hi, On Tue, 28 Feb 2012, Rolf-Werner Eilert wrote: Hi folks, I would be interested in your opinions. In a project I've got two lists of data and further data which are mutually dependent, such as item 1: item 1 a data 1 aa data 1 ab item 1 b data 1 ba data 1 bb and so on, which could be seen like a tree or directory structure. Now my question is, how would YOU organize this internally? I mean, what kind of data structure would you prefer to be able to easily find your way through it? In the GUI, it looks like two ListBoxes and two TextBoxes: List1 List2 TextBox1 TextBox2 If you choose item1 in List1, List2 will show item1a and item1b. When you choose item1a, the Textboxes show data1aa and data1ab. If you choose item1b, the Textboxes show data1ba and data1bb. Of course, I could make a matrix of item1 item1a data1aa item1 item1a data1ab item1 item1b data1ba item1 item1b data1bb but how would my program EASILY find which data to show if the user clicks item1a for instance? Another idea was to leave out repetitions: item1 item1a data1aa data1ab item1b data1ba data1bb This shows the tree-like structure better, but is it a professional approach? Thanks for your ideas. Rolf -- 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 well, my approach would be using a class that has an array of instances of the same class (reminds me of linked lists). i don't know if it is possible in gambas, haven't tried or read about it but it may look like: --- CNode.class: Public Children As CNode[] --- or, which may be more intuitive in later usage: --- CNode.class: Inherits Array Public Children As CNode[] Public Function _get(iInd As Integer) As CNode Return Me.Children[iInd] End --- in fact, i haven't programmed in Gambas for about a month and have no possibility to check my suggestions but i think you see the point. regards, tobi -- 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] Help for Image and Picture Colors
On Fri, 10 Feb 2012, Benoît Minisini wrote: Le 06/02/2012 21:19, tobias a écrit : hi, Benoît Minisini wrote: Le 04/02/2012 01:19, tobias a écrit : On 04.02.2012 01:12, tobias wrote: Hi, I really need help. There's a lot of work with colors in Images and Pictures in a project and between these classes. This is generally speaking as follows: I have a class which has an 8*8px Image which is manipulated (due to the easy of accessing pixels directly). Using a property of my class, I provide access to a scaled version of the Image as a Picture (which is created when requested). So I do some things and when manually resizing the Image to get the prototype of the Picture to return (it is needed as bigger version of the Image without anti-aliasing, I don't get this result with Image.Stretch(), and doing it manually is not a problem) there seem to appear problems with transparency. I read that Pictures do not have an alpha channel and I noticed that colors from the ColorChooser or Color class are given with alpha channel set to 0x00 which will be transparent for the Image class... so I tried addingHff00to whatever color is assigned to any pixel in the 8*8px Image or not to do it and some other experiments but nothing worked on the entire project. there's always something transparent or black or whatever. I really go nuts with this. Anyone to my rescue? Regards, Tobi wait a minute. I forgot to say that I don't even need the transparency feature of the Image class. I only use Image - as I said - because of Image[x, y] pixel access. For the meantime - or as a final solution? there may be a lot of those accesses and I thought using Image[x, y] will be the most efficient way to go - I switch to using an 8*8px Picture and Draw.Pixel() instead but I would really appreciate anyone clarify this topic to me. I understand nothing. Maybe because I'm a little sick, but if you can be clearer... it's a messy explanation, i just recalled too... the situation is as follows: i have a class that takes care of designing a picture for me according to user input. because of the ease of accessing pixels with the image class i took an image behind the scenes but it has to be converted to a picture for display in a PictureBox at the front end. moreover it has to be resized which i do manually and is no big deal for my format. i used to import pictures and images into the class, etc. which overall introduces as big back and forth of image- picture conversion, resizing, etc. the problem first came up when i incorporated palettes created by another program and stored in binary files. i noticed that these were in ARGB format with the A component set to 0x00 all the time (colors came from a ColorChooser, later i noticed that the constants in the Color class do likewise). while this works (color is displayed) when drawing it to a picture, it doesn't when writing it to an image pixel. i tried conversion functions and everything that came in my mind. at the end i rewrote the class to use pictures. those pictures are created with the Transparent = False instanciation parameter. from those i can derive Picture.Image on which i operate to speed things up. this is sort of solved and the program works fine now. i seem to repress the memory of what i tried (pathetic programmer's brain :) ) but i can tell that nothing worked on the entire project (which was certainly a fault due to my quick fixes or project infrastructure) but to clarify things: it resulted in transparency in all kinds of places in the whole program originally introduced by reading colors from standard components that had their alpha channel zeroed which according to the docs signaled the image class that this color is fully transparent. i hope it didn't get as complicated but recalling the situation pointed me to the fact that actually i do not know why it is working now (seems to rely on the Transparent = False picture instanciation?)... regards, tobi Mff... If you need to create a Picture, start from an Image, and convert it to a Picture at the last step. Do not use the Transparent property of Pictures. As for transparency: it is inverted between pixels in memory and Gambas color values. If you use the Image class and the [] operator, then this is taken into account transparently. This is all I can say: I hope it will help you! -- Benoît Minisini -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https