From Karl.Reinl at ...16... Sat Jul 3 21:52:58 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sat, 3 Jul 2004 21:52:58 +0200 Subject: [Gambas-devel] Question to the C-workers. Message-ID: <200407032152.58889.Karl.Reinl@...16...> Salut, I started, and for the first time on Linux to work with C/C++ . (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor ). Till now I user KWrite to edit the sources, read the output from make and use printf to see values. When I was in touch with C, that was in 1993 , I worked with Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE (like you can with gambas). Has anybody some hints for me about tools like that or better ? How do you work ? Amicalement Charlie From daniel.campos at ...103... Sat Jul 3 23:02:59 2004 From: daniel.campos at ...103... (Daniel) Date: Sat, 03 Jul 2004 23:02:59 +0200 Subject: [Gambas-devel] Question to the C-workers. In-Reply-To: <200407032152.58889.Karl.Reinl@...16...> References: <200407032152.58889.Karl.Reinl@...16...> Message-ID: <1088888579.3235.2.camel@...102...> well, I use "kate" in which you can manage a complete project (source files, I mean). You can also use Kdevelop, but I didn't find any way to attach my code to the debugger using kdevelop and a test project... Regards, Daniel Campos El s?b, 03-07-2004 a las 21:52, Charlie Reinl escribi?: > Salut, > > I started, and for the first time on Linux to work with C/C++ . > (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor ). > > Till now I user KWrite to edit the sources, read the output from make and use > printf to see values. > > When I was in touch with C, that was in 1993 , I worked with > Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE > (like you can with gambas). > > Has anybody some hints for me about tools like that or better ? > How do you work ? > > Amicalement > Charlie > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Sun Jul 4 01:28:30 2004 From: gambas at ...1... (Benoit Minisini) Date: Sun, 4 Jul 2004 01:28:30 +0200 Subject: [Gambas-devel] Question to the C-workers. In-Reply-To: <200407032152.58889.Karl.Reinl@...16...> References: <200407032152.58889.Karl.Reinl@...16...> Message-ID: <200407040128.30752.gambas@...1...> On Saturday 03 July 2004 21:52, Charlie Reinl wrote: > Salut, > > I started, and for the first time on Linux to work with C/C++ . > (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor > ). > > Till now I user KWrite to edit the sources, read the output from make and > use printf to see values. > > When I was in touch with C, that was in 1993 , I worked with > Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE > (like you can with gambas). > > Has anybody some hints for me about tools like that or better ? > How do you work ? > > Amicalement > Charlie > I use Kate as source code editor. To debug your code, you have three possibilities: - Use gdb in text mode, sometimes the only way that works. - Use the kdbg program, which is a graphical front-end to gdb: the old version provided in Mandrake 10 does not work with recent gdb, but you can compile a more recent one from the kdbg web site (search in google). - Use ddd: it is an old graphical front-end to gdb, but that uses the Motif toolkit, and so is not very practical to use. A fourth possibility would make your own graphical front-end to gdb in Gambas, which would be a great idea! :-) As for Kdevelop, I don't use it, so I don't know what you can do with it. Otherwise, look at valgrind: this is a marvelous tool that run your code in a x86 emulator, and that tells you when you make bad memory access, or bad allocations, when you use unitialized variables as soon they are done. It tells you which functions are take the most time to execute, via a KDE program named kcachegrind, so that you know what to optimize in your code. And it can do surely many other things! Regards, -- Benoit Minisini mailto:gambas at ...1... From olivier.guenard at ...138... Sun Jul 4 12:27:31 2004 From: olivier.guenard at ...138... (=?iso-8859-1?Q?Olivier_Gu=E9nard?=) Date: Sun, 4 Jul 2004 12:27:31 +0200 Subject: [Gambas-devel] Question to the C-workers. References: <200407032152.58889.Karl.Reinl@...16...> Message-ID: <001e01c461b1$83c5a3d0$f4659c53@...139...> I'm not sure but i think that with "linux delphi" Kylix, you can also make programs in C (C++?)... I have a look on kylix and there is a shell to run IDE in C. Someone tells me he can use Kylix in C (and he made very fast application when the Pascal programs runs slowly)... Olivier Guenard ----- Original Message ----- From: "Charlie Reinl" To: Sent: Saturday, July 03, 2004 9:52 PM Subject: [Gambas-devel] Question to the C-workers. > Salut, > > I started, and for the first time on Linux to work with C/C++ . > (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor ). > > Till now I user KWrite to edit the sources, read the output from make and use > printf to see values. > > When I was in touch with C, that was in 1993 , I worked with > Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE > (like you can with gambas). > > Has anybody some hints for me about tools like that or better ? > How do you work ? > > Amicalement > Charlie > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > From eng_ak at ...43... Sun Jul 4 12:32:38 2004 From: eng_ak at ...43... (Ahmed Kamal) Date: Sun, 4 Jul 2004 13:32:38 +0300 Subject: [Gambas-devel] Question to the C-workers. Message-ID: <0C51CB064292C647BE2FF317A92BB6C388960F@...104...> Perhaps this is of interest http://www.eclipse.org/cdt/ Also search sf.net for c++ IDE, you should find some interesting stuff. -----Original Message----- From: gambas-devel-admin at lists.sourceforge.net on behalf of Olivier Gu?nard Sent: Sun 7/4/2004 1:27 PM To: gambas-devel at lists.sourceforge.net Cc: Subject: Re: [Gambas-devel] Question to the C-workers. I'm not sure but i think that with "linux delphi" Kylix, you can also make programs in C (C++?)... I have a look on kylix and there is a shell to run IDE in C. Someone tells me he can use Kylix in C (and he made very fast application when the Pascal programs runs slowly)... Olivier Guenard ----- Original Message ----- From: "Charlie Reinl" To: Sent: Saturday, July 03, 2004 9:52 PM Subject: [Gambas-devel] Question to the C-workers. > Salut, > > I started, and for the first time on Linux to work with C/C++ . > (I play with the gambas SRC and added my PrettyPrinter to the gb.qt.editor ). > > Till now I user KWrite to edit the sources, read the output from make and use > printf to see values. > > When I was in touch with C, that was in 1993 , I worked with > Borland Tourbo C 2 (??), you could write, compile and debug with in the IDE > (like you can with gambas). > > Has anybody some hints for me about tools like that or better ? > How do you work ? > > Amicalement > Charlie > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3718 bytes Desc: not available URL: From gambas at ...1... Sun Jul 4 13:33:08 2004 From: gambas at ...1... (Benoit Minisini) Date: Sun, 4 Jul 2004 13:33:08 +0200 Subject: [Gambas-devel] Database Updates In-Reply-To: <1088449167.10076.2.camel@...128...> References: <1088337619.23734.7.camel@...128...> <200406281344.18712.gambas@...1...> <1088449167.10076.2.camel@...128...> Message-ID: <200407041333.09417.gambas@...1...> On Monday 28 June 2004 20:59, Nigel Gerrard wrote: > Benoit, > > Everything compiles ok for me. Here is a tar of my complete db > structure. > > Perhaps I have missed one of the changed files in the sqlite driver. > Please try comparing with what I have here. > > Nigel > Hi, Nigel I took your sqlite directory, and now everything compiles. :-) I saw in Changelog that you added the possibility to open a memory-only database. Interesting! I have just fixed a problem in Gambas, that concerns the database drivers: strcasecmp() and strncasecmp() use the local encoding, and so, if your language is turkish, then you have problems, because toupper('i') <> 'I' ! So if you strcasecmp() a field named "myfield" with "MYFIELD", it does not match. The workaround I choosed is to rewrite strcasecmp() and strncasecmp() so that they always use US encoding, and to add the rewrited function to the GB interface. The tolower() and toupper() functions are concerned too. I will replace in the database drivers every occurrence of strcasecmp() and strncasecmp() by GB.strcasecmp() and GB.strncasecmp(). Well. Finally, I think I will rework the database component after the 1.0. I think we should use C++ instead of C for writing database drivers, because of the code each driver shares. Each driver will inherits a common virtual driver class. And here are the things I want to modify in the database component: * Adding an option string when connecting to a database. * Replace "virtual" collections by true collections when getting databases, users, tables, fields, ... * Merge user security properties of postgresql and mysql in a unique interface. If possible. Anyway, the current User class is too simple. * Add an ODBC driver (by reading the ODBC driver source code of Qt). What do you think about that ? What features should we add too ? Thanks in advance for your answers. Regards, -- Benoit Minisini mailto:gambas at ...1... From Karl.Reinl at ...16... Sun Jul 4 21:42:00 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 4 Jul 2004 21:42:00 +0200 Subject: [Gambas-devel] C-Workers Message-ID: <200407042142.00365.Karl.Reinl@...16...> Salut, thank you all for your responses. Had a look to Kate, have not yet an idea how Projects work (and found no help), but he has the same bad thing like KWrite :-( if you use the MouseWeel you can easily copy the Copybuffer to the document, how can I stop this ? About Eclipse think I will have a go . Amicalement Charlie From Karl.Reinl at ...16... Sun Jul 4 22:06:59 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 4 Jul 2004 22:06:59 +0200 Subject: [Gambas-devel] Question of parameters Message-ID: <200407042206.59849.Karl.Reinl@...16...> Salut Benoit, I added to the following files what you see below to add my PrettyPrinter Metode to the gb.qt.editor and it works. BUT... TO->CEditor.cpp GB_METHOD("PrettyPrinter", NULL, CEDITOR_PrettyPrinter, NULL), // and BEGIN_METHOD_VOID(CEDITOR_PrettyPrinter) { WIDGET->PrettyPrinter(); } END_METHOD TO->qeditor.h void PrettyPrinter(); TO->qeditor.cpp void QEditor::PrettyPrinter() But I need up to 7 parameters to pass ( 6 bool and 1 int), but I seams that I can pass only one , IS that right, or where I failed. (The Parameters are not in the upper lines, but I dit like I remember and like I saw in the sources to pass prameters) Amicalement Charlie From gambasfr at ...4... Sun Jul 4 22:40:47 2004 From: gambasfr at ...4... (Fabien Bodard) Date: Sun, 4 Jul 2004 22:40:47 +0200 Subject: [Gambas-devel] C-Workers In-Reply-To: <200407042142.00365.Karl.Reinl@...16...> References: <200407042142.00365.Karl.Reinl@...16...> Message-ID: <200407042240.48043.gambasfr@...4...> Le dimanche 4 Juillet 2004 21:42, Charlie Reinl a ?crit : > Salut, > > thank you all for your responses. > Had a look to Kate, have not yet an idea how Projects work (and found no > help), > but he has the same bad thing like KWrite :-( if you use the MouseWeel you > can easily copy the Copybuffer to the document, how can I stop this ? > > About Eclipse think I will have a go . > > Amicalement > Charlie in fact these feature is in all linux major desktop... you select something, the you go where you want and just do a middle mouse click. So you can put in konsole something and copy it in gimp...(bad exemple) Fabien > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From nigel at ...2... Mon Jul 5 10:44:45 2004 From: nigel at ...2... (Nigel Gerrard) Date: Mon, 5 Jul 2004 09:44:45 +0100 Subject: [Gambas-devel] Question of parameters References: <200407042206.59849.Karl.Reinl@...16...> Message-ID: <000601c4626c$536c6820$4fc84f51@...97...> Charlie, There are lots of examples of passing more than one parameter in CEditor.cpp: GB_METHOD("SetFlag", NULL, CEDITOR_line_set_flag, "(Line)i(Flag)i(Value)b") - Always 3 parameters passed BEGIN_METHOD(CEDITOR_line_set_flag, GB_INTEGER line; GB_INTEGER flag; GB_BOOLEAN value) or GB_METHOD("Set", NULL, CEDITOR_sel_select,"[(start)i(Length)i]") - Optionally 0 parameters, 1 parameter or two. BEGIN_METHOD(CEDITOR_sel_select, GB_INTEGER start; GB_INTEGER length) Nigel ----- Original Message ----- From: "Charlie Reinl" To: "gambas-devel" Sent: Sunday, July 04, 2004 9:06 PM Subject: [Gambas-devel] Question of parameters > Salut Benoit, > > I added to the following files what you see below to add my PrettyPrinter > Metode to the gb.qt.editor and it works. BUT... > > TO->CEditor.cpp > GB_METHOD("PrettyPrinter", NULL, CEDITOR_PrettyPrinter, NULL), > // and > BEGIN_METHOD_VOID(CEDITOR_PrettyPrinter) > { > WIDGET->PrettyPrinter(); > } > END_METHOD > > TO->qeditor.h > void PrettyPrinter(); > > TO->qeditor.cpp > void QEditor::PrettyPrinter() > > But I need up to 7 parameters to pass ( 6 bool and 1 int), but I seams that I > can pass only one , IS that right, or where I failed. > (The Parameters are not in the upper lines, but I dit like I remember and > like I saw in the sources to pass prameters) > > Amicalement > Charlie > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From nigel at ...2... Mon Jul 5 18:34:29 2004 From: nigel at ...2... (Nigel Gerrard) Date: Mon, 5 Jul 2004 17:34:29 +0100 Subject: [Gambas-devel] Database Updates References: <1088337619.23734.7.camel@...128...> <200406281344.18712.gambas@...1...> <1088449167.10076.2.camel@...128...> <200407041333.09417.gambas@...1...> Message-ID: <004b01c462ad$f4389670$4fc84f51@...97...> Benoit, I haven't done a lot of thinking about a new interface. I've had a look at unixODBC-2.2.8 to investigate what API's are available and they seem to be very restrictive :-) which means a port is going to need a little more work. I've also done some thinking about Object Relational Databases and Object Orientated Databases. http://www.garret.ru/~knizhnik/cpp.html But again I believe the interface would need changes. Also, what I would like to see from the gambas side (other than making the database components available at design time :-) is a couple of database forms similiar to those available in the database manger that will be part of the utility library, and can be used to quickly allow editing of tables etc...rather like the form components in VB. The thought is that they can be associated with a table or a query. I just can't get round to doing it. :-) Nigel ----- Original Message ----- From: "Benoit Minisini" To: Sent: Sunday, July 04, 2004 12:33 PM Subject: Re: [Gambas-devel] Database Updates > On Monday 28 June 2004 20:59, Nigel Gerrard wrote: > > Benoit, > > > > Everything compiles ok for me. Here is a tar of my complete db > > structure. > > > > Perhaps I have missed one of the changed files in the sqlite driver. > > Please try comparing with what I have here. > > > > Nigel > > > > Hi, Nigel > > I took your sqlite directory, and now everything compiles. :-) > > I saw in Changelog that you added the possibility to open a memory-only > database. Interesting! > > I have just fixed a problem in Gambas, that concerns the database drivers: > strcasecmp() and strncasecmp() use the local encoding, and so, if your > language is turkish, then you have problems, because toupper('i') <> 'I' ! > So if you strcasecmp() a field named "myfield" with "MYFIELD", it does not > match. > > The workaround I choosed is to rewrite strcasecmp() and strncasecmp() so that > they always use US encoding, and to add the rewrited function to the GB > interface. The tolower() and toupper() functions are concerned too. > > I will replace in the database drivers every occurrence of strcasecmp() and > strncasecmp() by GB.strcasecmp() and GB.strncasecmp(). > > Well. Finally, I think I will rework the database component after the 1.0. > > I think we should use C++ instead of C for writing database drivers, because > of the code each driver shares. Each driver will inherits a common virtual > driver class. > > And here are the things I want to modify in the database component: > > * Adding an option string when connecting to a database. > > * Replace "virtual" collections by true collections when getting databases, > users, tables, fields, ... > > * Merge user security properties of postgresql and mysql in a unique > interface. If possible. Anyway, the current User class is too simple. > > * Add an ODBC driver (by reading the ODBC driver source code of Qt). > > What do you think about that ? What features should we add too ? > > Thanks in advance for your answers. > > Regards, > > -- > Benoit Minisini > mailto:gambas at ...1... > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Mon Jul 5 20:41:11 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 5 Jul 2004 20:41:11 +0200 Subject: [Gambas-devel] Database Updates In-Reply-To: <004b01c462ad$f4389670$4fc84f51@...97...> References: <1088337619.23734.7.camel@...128...> <200407041333.09417.gambas@...1...> <004b01c462ad$f4389670$4fc84f51@...97...> Message-ID: <200407052041.11137.gambas@...1...> On Monday 05 July 2004 18:34, Nigel Gerrard wrote: > Benoit, > > I haven't done a lot of thinking about a new interface. I've had a look at > unixODBC-2.2.8 > to investigate what API's are available and they seem to be very > restrictive > > :-) which means > > a port is going to need a little more work. Maybe we can get some code from the ODBC qt database driver. I used postgresql qt database driver to write the gambas one. > > I've also done some thinking about Object Relational Databases and Object > Orientated Databases. > > http://www.garret.ru/~knizhnik/cpp.html > > But again I believe the interface would need changes. I have something more ambitious for storing objects: go to http://www.prevayler.org. > > Also, what I would like to see from the gambas side (other than making the > database components > available at design time :-) is a couple of database forms similiar to > those available in the database manger > that will be part of the utility library, and can be used to quickly allow > editing of tables etc...rather like the > form components in VB. The thought is that they can be associated with a > table or a query. I just can't get > round to doing it. :-) I agree with you. I want to do such controls directly in Gambas, because doing them in Qt is a brain-damaged thing, and because I want to use them with the gb.gtk component! But at the moment it is not really possible - It just a matter of allowing the interpreter to use a gambas executable as a gambas component, and changing some things in the IDE. -- Benoit Minisini mailto:gambas at ...1... From Karl.Reinl at ...16... Sun Jul 4 21:46:12 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 4 Jul 2004 19:46:12 +0000 Subject: [Gambas-devel] Question of parameters (2) Message-ID: <200407041946.12739.Karl.Reinl@...16...> Salut , Thank you Nigel.I can't take it, if you could just have a look to that, again. I reactivated the code where I try to pass the paameters: IN->CEditor.cpp GB_METHOD("PrettyPrinter", NULL, CEDITOR_PrettyPrinter, "[(bSpace)b(iSpace)i(bEvery)b(bEveryWithOutDim)b(bAlignComments)b(bWithInCase)b(bDelEmptyLines)b]"), // and /* bSpace = TRUE iSpace (from 1 to 9 ) is one Indent bSpace = FALSE iSpace is one Editor.TabLength to Indent or "\t" bool bEvery = TRUE ; //=> Everything is Indeted // if bEvery = FALSE => bEveryWithOutDim will be FALSE too // if bEvery = FALSE => bAlignComments also will be FALSE bool bEveryWithOutDim = TRUE ; // => Everything is Indeted, but NOT Declarations bool bAlignComments = TRUE ; // => Comments are align to the folowing line bool bWithInCase = TRUE ; // => lines between 'CASE x' will be indented too // is not implemented yet bool bDelEmptyLines = TRUE ; // => empty lines will be striped off */ BEGIN_METHOD_VOID(CEDITOR_PrettyPrinter, GB_BOOLEAN bSpace; GB_INTEGER iSpace; GB_BOOLEAN bEvery; GB_BOOLEAN bEveryWithOutDim; GB_BOOLEAN bAlignComments; GB_BOOLEAN bWithInCase; GB_BOOLEAN bDelEmptyLines) { if (MISSING(bSpace)) bSpace = TRUE; if (MISSING(iSpace)) iSpace = tabSpace(); if (MISSING(bEvery)) bEvery = TRUE; if (MISSING(bEveryWithOutDim)) bEveryWithOutDim = TRUE; if (MISSING(bAlignComments)) bAlignComments = TRUE; if (MISSING(bWithInCase)) bWithInCase = FALSE; // is not implemented yet else bWithInCase = FALSE; // is not implemented yet if (MISSING(bDelEmptyLines)) bDelEmptyLines = TRUE; if (!bEvery) { bEveryWithOutDim = FALSE; bAlignComments = FALSE; } WIDGET->PrettyPrinter(bSpace,iSpace,bEvery,bEveryWithOutDim,bAlignComments,bWithInCase,bDelEmptyLines); } END_METHOD IN->qeditor.h void PrettyPrinter(bool bSpace,int iSpace,bool bEvery,bool bEveryWithOutDim,bool bAlignComments,bool bWithInCase,bool bDelEmptyLines); IN->qeditor.cpp void QEditor::PrettyPrinter(bool bSpace,int iSpace,bool bEvery,bool bEveryWithOutDim,bool bAlignComments,bool bWithInCase,bool bDelEmptyLines) make shows me the following Output: CEditor.cpp:564:204: macro "BEGIN_METHOD_VOID" passed 2 arguments, but takes just 1 CEditor.cpp:565: error: syntax error before `{' token CEditor.cpp:586: error: ISO C++ forbids declaration of `bAlignComments' with no type CEditor.cpp:587: error: parse error before `}' token CEditor.cpp:588: error: parse error before `*' token CEditor.cpp:771: error: `CEDITOR_PrettyPrinter' was not declared in this scope make: *** [CEditor.lo] Error 1 if I change CEditor.cpp:564:204: macro "BEGIN_METHOD_VOID" to "BEGIN_METHOD" I get that. CEditor.cpp: In function `void CEDITOR_PrettyPrinter(void*, void*)': CEditor.cpp:567: error: `bSpace' undeclared (first use this function) CEditor.cpp:567: error: (Each undeclared identifier is reported only once for each function it appears in.) CEditor.cpp:569: error: `iSpace' undeclared (first use this function) CEditor.cpp:569: error: `tabSpace' undeclared (first use this function) CEditor.cpp:571: error: `bEvery' undeclared (first use this function) CEditor.cpp:573: error: `bEveryWithOutDim' undeclared (first use this function) CEditor.cpp:575: error: `bAlignComments' undeclared (first use this function) CEditor.cpp:577: error: `bWithInCase' undeclared (first use this function) CEditor.cpp:581: error: `bDelEmptyLines' undeclared (first use this function) make: *** [CEditor.lo] Error 1 Where I'm wrong, I can't find Amicalement Charlie From gambas at ...1... Mon Jul 5 21:47:11 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 5 Jul 2004 21:47:11 +0200 Subject: [Gambas-devel] Question of parameters (2) In-Reply-To: <200407041946.12739.Karl.Reinl@...16...> References: <200407041946.12739.Karl.Reinl@...16...> Message-ID: <200407052147.11398.gambas@...1...> On Sunday 04 July 2004 21:46, Charlie Reinl wrote: > Salut , > > Thank you Nigel.I can't take it, if you could just have a look to that, > again. > > I reactivated the code where I try to pass the paameters: > > IN->CEditor.cpp > > GB_METHOD("PrettyPrinter", NULL, CEDITOR_PrettyPrinter, > "[(bSpace)b(iSpace)i(bEvery)b(bEveryWithOutDim)b(bAlignComments)b(bWithInCa >se)b(bDelEmptyLines)b]"), > > // and > /* > bSpace = TRUE > iSpace (from 1 to 9 ) is one Indent > bSpace = FALSE > iSpace is one Editor.TabLength to Indent > or "\t" > bool bEvery = TRUE ; //=> Everything is Indeted > // if bEvery = FALSE => bEveryWithOutDim will be FALSE too > // if bEvery = FALSE => bAlignComments also will be FALSE > bool bEveryWithOutDim = TRUE ; // => Everything is Indeted, but NOT > Declarations > bool bAlignComments = TRUE ; // => Comments are align to the folowing > line bool bWithInCase = TRUE ; // => lines between 'CASE x' will be > indented too // is not implemented yet > bool bDelEmptyLines = TRUE ; // => empty lines will be striped off > */ > BEGIN_METHOD_VOID(CEDITOR_PrettyPrinter, GB_BOOLEAN bSpace; GB_INTEGER > iSpace; GB_BOOLEAN bEvery; GB_BOOLEAN bEveryWithOutDim; GB_BOOLEAN > bAlignComments; GB_BOOLEAN bWithInCase; GB_BOOLEAN bDelEmptyLines) > { > if (MISSING(bSpace)) > bSpace = TRUE; > if (MISSING(iSpace)) > iSpace = tabSpace(); > if (MISSING(bEvery)) > bEvery = TRUE; > if (MISSING(bEveryWithOutDim)) > bEveryWithOutDim = TRUE; > if (MISSING(bAlignComments)) > bAlignComments = TRUE; > if (MISSING(bWithInCase)) > bWithInCase = FALSE; // is not implemented yet > else > bWithInCase = FALSE; // is not implemented yet > if (MISSING(bDelEmptyLines)) > bDelEmptyLines = TRUE; > > if (!bEvery) > { > bEveryWithOutDim = FALSE; > bAlignComments = FALSE; > } > > WIDGET->PrettyPrinter(bSpace,iSpace,bEvery,bEveryWithOutDim,bAlignComments, >bWithInCase,bDelEmptyLines); } > END_METHOD > > > IN->qeditor.h > > void PrettyPrinter(bool bSpace,int iSpace,bool bEvery,bool > bEveryWithOutDim,bool bAlignComments,bool bWithInCase,bool bDelEmptyLines); > > IN->qeditor.cpp > > void QEditor::PrettyPrinter(bool bSpace,int iSpace,bool bEvery,bool > bEveryWithOutDim,bool bAlignComments,bool bWithInCase,bool bDelEmptyLines) > > make shows me the following Output: > > CEditor.cpp:564:204: macro "BEGIN_METHOD_VOID" passed 2 arguments, but > takes just 1 > CEditor.cpp:565: error: syntax error before `{' token > CEditor.cpp:586: error: ISO C++ forbids declaration of `bAlignComments' > with no > type > CEditor.cpp:587: error: parse error before `}' token > CEditor.cpp:588: error: parse error before `*' token > CEditor.cpp:771: error: `CEDITOR_PrettyPrinter' was not declared in this > scope make: *** [CEditor.lo] Error 1 > > if I change CEditor.cpp:564:204: macro "BEGIN_METHOD_VOID" to > "BEGIN_METHOD" I get that. > > CEditor.cpp: In function `void CEDITOR_PrettyPrinter(void*, void*)': > CEditor.cpp:567: error: `bSpace' undeclared (first use this function) > CEditor.cpp:567: error: (Each undeclared identifier is reported only once > for each function it appears in.) > CEditor.cpp:569: error: `iSpace' undeclared (first use this function) > CEditor.cpp:569: error: `tabSpace' undeclared (first use this function) > CEditor.cpp:571: error: `bEvery' undeclared (first use this function) > CEditor.cpp:573: error: `bEveryWithOutDim' undeclared (first use this > function) > CEditor.cpp:575: error: `bAlignComments' undeclared (first use this > function) CEditor.cpp:577: error: `bWithInCase' undeclared (first use this > function) CEditor.cpp:581: error: `bDelEmptyLines' undeclared (first use > this function) make: *** [CEditor.lo] Error 1 > > Where I'm wrong, I can't find > > Amicalement > Charlie > You should read the How To Write Components in the wiki first, to know how to use the macros, and to understand what you are doing. The arguments passed to implementation methods are actually the arguments pushed on the interpreter stack, so you must use macros to access them. Look in the wiki the following macros: ARG(), VARG(), VARGOPT() and MISSING(). And look the implementation of methods having the same syntax than yours in the gambas source code. Regards, -- Benoit Minisini mailto:gambas at ...1... From mauriiiii3001 at ...112... Thu Jul 8 19:56:57 2004 From: mauriiiii3001 at ...112... (Pozzo) Date: Thu, 08 Jul 2004 19:56:57 +0200 Subject: [Gambas-devel] Ita tranlation 0.94a Message-ID: <40ED8AE9.4070106@...112...> Here is the italian translation. I have noticed some problems of visualization so i've attached the screenshots -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: gambas-it.po URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error.jpg Type: image/jpeg Size: 15314 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error2.jpg Type: image/jpeg Size: 19308 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error3.jpg Type: image/jpeg Size: 17203 bytes Desc: not available URL: From gambas at ...1... Sun Jul 11 16:26:30 2004 From: gambas at ...1... (Benoit Minisini) Date: Sun, 11 Jul 2004 16:26:30 +0200 Subject: [Gambas-devel] Re: Gambas In-Reply-To: <1088074627.9307.4.camel@...140...> References: <1088022315.10196.1.camel@...140...> <200406241223.28194.gambas@...1...> <1088074627.9307.4.camel@...140...> Message-ID: <200407111626.30202.gambas@...1...> Hi, Sorry for my late answer! On Thursday 24 June 2004 12:57, you wrote: > > > I want to port ASP to the GNU/Linux (and Unix) system and I will use > > > your Virtual Machine/Interpreter. > > > > Why porting ASP to GNU/Linux ? Why not making something less stupid and > > more powerful ? > > Ok, I want to "port" ASP but making it more powerfull, not just port. I > will port and I will make more efficient (and less stupid XD ) > > > > How can I do it? > > > > I don't know. First, you should write an Apache module than can send a > > dynamic page to the Gambas interpreter and get the result. > > First? First I need to create a simple program that can parse the ASP > source and makes calls to the Gambas interpreter, but I need to embed > it. How? I don't known. I found in the gambas web site a note such as : I think this can be done this way: Create a new type of module named "*.gsp" ;-). This kind of module will be processed by the compiler in a special manner so that the special character sequences '<%'...'%>' and '<%='...'%>' will be replaced by Gambas code that send the HTML in the response. The ASP syntax must be extended. A syntax should allow automatic HTML encoding. Then create an Apache module (how ??) that calls a persistant gambas interpreter to get the pages, and that manages (how ??) a Application and a Session object. Or don't create an Apache module. Create instead a Gambas component that transforms the interpreter in a http server transparently, and that manages Application and Session objects. > > > Gambas as a scripting engine > > > How about integrating Gambas into other softwares, so they become > scriptable? (Office suites, browsers, and any application that could > require scripting) > > > -- NelsonFerraz - 14 Aug 2003 > > This is just that I want. This is just I DON'T want, because making applications internally scriptable like all Microsoft things lead to the virus nightmare. > > > You must find how to keep > > the gambas interpreter persistent, by not lauching it each time you > > translate a page. I never studied the problem, and I don't know what you > > programming skill are, It is hard for me to give you more details. > > Is here a class such as CInterpreter, CBasicInterpreter, CGambasParser, > etc...? > No. -- Benoit Minisini mailto:gambas at ...1... From Karl.Reinl at ...16... Mon Jul 12 00:46:13 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 11 Jul 2004 22:46:13 +0000 Subject: [Gambas-devel] gambas editor added PrettyPrinter Message-ID: <200407112246.13619.Karl.Reinl@...16...> Salut, based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. ( editor.TabLength return a int now, I changed it for this version) I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the *.cpp and *.h files I changed (editor_new.tar.gz) , copy them to /.../gambas-0.94/src/lib/qt/editor/ then compile/install it. The PrettyPrinter does not make the sourcecode only readable, he also detects Errors . When sourcecode loos his Structure a if/endif , for/next etc. is not closed correctly. Please let me know what you think about. Amicalement Charlie PS: Try to post that mail since yesterday late night , and had problems till now -------------- next part -------------- A non-text attachment was scrubbed... Name: Indenter4-0.0.4.tar.gz Type: application/x-tgz Size: 7335 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: editor_new.tar.gz Type: application/x-tgz Size: 41403 bytes Desc: not available URL: From linus at ...2... Wed Jul 14 16:13:03 2004 From: linus at ...2... (Nigel Gerrard) Date: Wed, 14 Jul 2004 15:13:03 +0100 Subject: [Gambas-devel] DateAdd and DateDiff Message-ID: <1089814382.2136.11.camel@...128...> Benoit, A few weeks ago there was mention of the VB function DateAdd. Attached is an implementation for Gambas. DateDiff is also included. I'm not sure whether this is where you planned to go - I had a thought that maybe if all Datatypes were classes then we could have implemented this type of functionality as a method. e.g. myDate AS DATE mydate = Date myDate.Add(period, interval) But I could be talking rubbish :-) Nigel -------------- next part -------------- A non-text attachment was scrubbed... Name: DateAdd.tar Type: application/x-tar Size: 20480 bytes Desc: not available URL: From gambas at ...1... Wed Jul 14 21:39:31 2004 From: gambas at ...1... (Benoit Minisini) Date: Wed, 14 Jul 2004 21:39:31 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter In-Reply-To: <200407112246.13619.Karl.Reinl@...16...> References: <200407112246.13619.Karl.Reinl@...16...> Message-ID: <200407142139.31786.gambas@...1...> On Monday 12 July 2004 00:46, Charlie Reinl wrote: > Salut, > > based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. > ( editor.TabLength return a int now, I changed it for this version) > > I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the > *.cpp and *.h files I changed (editor_new.tar.gz) , copy them to > /.../gambas-0.94/src/lib/qt/editor/ then compile/install it. > > The PrettyPrinter does not make the sourcecode only readable, he also > detects Errors . > When sourcecode loos his Structure a if/endif , for/next etc. is not closed > correctly. > > Please let me know what you think about. > > Amicalement > Charlie > PS: Try to post that mail since yesterday late night , and had problems > till now When you have an optional parameter in a method implementation, you must not do: if (MISSING(bUseTab)) VARG(bUseTab) = TRUE; because you are modifying the interpreter stack, and this could be dangerous! You should use the macro VARGOPT instead: VARGOPT(bUseTab, TRUE) Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Wed Jul 14 21:49:00 2004 From: gambas at ...1... (Benoit Minisini) Date: Wed, 14 Jul 2004 21:49:00 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter In-Reply-To: <200407112246.13619.Karl.Reinl@...16...> References: <200407112246.13619.Karl.Reinl@...16...> Message-ID: <200407142149.00327.gambas@...1...> On Monday 12 July 2004 00:46, Charlie Reinl wrote: > Salut, > > based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. > ( editor.TabLength return a int now, I changed it for this version) > > I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the > *.cpp and *.h files I changed (editor_new.tar.gz) , copy them to > /.../gambas-0.94/src/lib/qt/editor/ then compile/install it. > > The PrettyPrinter does not make the sourcecode only readable, he also > detects Errors . > When sourcecode loos his Structure a if/endif , for/next etc. is not closed > correctly. > > Please let me know what you think about. > > Amicalement > Charlie > PS: Try to post that mail since yesterday late night , and had problems > till now Hi, Charlie Having a pretty printer is a good idea, but I think that the way you implemented it is not the good way! You should have told me before... The good way would have been using the gb.eval component that includes the gambas compiler parser in its code. With a few changes in the parser code (just to keep the spaces in a beginning of a line), rewriting a line of code from its result is very simple! As for the detection of error in code structure, the compiler already detect that, so it is not useful to add it in the pretty-printer. It is not its role. If you are interested, look at ./lib/eval/eval_read.c or ./comp/gbc_read.c. Add #define DEBUG at the beginning of ./comp/gbc_read.c and the compiler will display the result of the parser at each compilation. Regards, -- Benoit Minisini mailto:gambas at ...1... From karl.reinl at ...16... Tue Jul 13 22:36:33 2004 From: karl.reinl at ...16... (Charlie) Date: Tue, 13 Jul 2004 22:36:33 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter References: <200407112246.13619.Karl.Reinl@...16...> <200407142139.31786.gambas@...1...> Message-ID: <40F447D1.10007@...16...> Benoit Minisini schrieb: >On Monday 12 July 2004 00:46, Charlie Reinl wrote: > > >>Salut, >> >>based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. >>( editor.TabLength return a int now, I changed it for this version) >> >>I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the >>*.cpp and *.h files I changed (editor_new.tar.gz) , copy them to >>/.../gambas-0.94/src/lib/qt/editor/ then compile/install it. >> >>The PrettyPrinter does not make the sourcecode only readable, he also >>detects Errors . >>When sourcecode loos his Structure a if/endif , for/next etc. is not closed >>correctly. >> >>Please let me know what you think about. >> >>Amicalement >>Charlie >>PS: Try to post that mail since yesterday late night , and had problems >>till now >> >> > >When you have an optional parameter in a method implementation, you must not >do: > > if (MISSING(bUseTab)) > VARG(bUseTab) = TRUE; > >because you are modifying the interpreter stack, and this could be dangerous! > >You should use the macro VARGOPT instead: VARGOPT(bUseTab, TRUE) > >Regards, > > > Salut, I do not understand well, what you say. Means that instead: if (MISSING(bUseTab)) VARG(bUseTab) = TRUE; I can say : VARGOPT(bUseTab, TRUE); or should ' VARGOPT(bUseTab, TRUE); replace the VARG(bUseTab) = TRUE; Amicalement Charlie From karl.reinl at ...16... Tue Jul 13 22:49:25 2004 From: karl.reinl at ...16... (Charlie) Date: Tue, 13 Jul 2004 22:49:25 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter References: <200407112246.13619.Karl.Reinl@...16...> <200407142149.00327.gambas@...1...> Message-ID: <40F44AD5.2030202@...16...> Benoit Minisini schrieb: >On Monday 12 July 2004 00:46, Charlie Reinl wrote: > > >>Salut, >> >>based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. >>( editor.TabLength return a int now, I changed it for this version) >> >>I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the >>*.cpp and *.h files I changed (editor_new.tar.gz) , copy them to >>/.../gambas-0.94/src/lib/qt/editor/ then compile/install it. >> >>The PrettyPrinter does not make the sourcecode only readable, he also >>detects Errors . >>When sourcecode loos his Structure a if/endif , for/next etc. is not closed >>correctly. >> >>Please let me know what you think about. >> >>Amicalement >>Charlie >>PS: Try to post that mail since yesterday late night , and had problems >>till now >> >> > >Hi, Charlie > >Having a pretty printer is a good idea, but I think that the way you >implemented it is not the good way! You should have told me before... > >The good way would have been using the gb.eval component that includes the >gambas compiler parser in its code. With a few changes in the parser code >(just to keep the spaces in a beginning of a line), rewriting a line of code >from its result is very simple! > Yeah, thats the info I parsed the gambas sourcecode for, but to close to 'compile' >As for the detection of error in code structure, the compiler already detect >that, so it is not useful to add it in the pretty-printer. It is not its >role. > > Yes it does, but with PrettyPrinter it will be visual. >If you are interested, look at ./lib/eval/eval_read.c or ./comp/gbc_read.c. >Add #define DEBUG at the beginning of ./comp/gbc_read.c and the compiler will >display the result of the parser at each compilation. > > Thanks for your hint, I'm just a beginner (once again) in C. And I use my old knowlege. >Regards, > > Amicalement Charlie From danielcampos at ...45... Thu Jul 15 19:26:26 2004 From: danielcampos at ...45... (Daniel Campos) Date: Thu, 15 Jul 2004 19:26:26 +0200 Subject: [Gambas-devel] Spanish documentation Message-ID: <1089912386.11218.9.camel@...102...> Hi Benoit: Thanks to your program and some more scripts (gambas scripts, I don't like Perl:-), I'm beggining to translate documentation from http://wiki.gnulinex.org/gambas to a static format. Have you planned any way to distribute documentation in other laguages that english, or should I distribute it from my web site (I have a place to do it) Regards, -- Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: spanish.png Type: image/png Size: 98448 bytes Desc: not available URL: From gambas at ...1... Thu Jul 15 22:48:09 2004 From: gambas at ...1... (Benoit Minisini) Date: Thu, 15 Jul 2004 22:48:09 +0200 Subject: [Gambas-devel] DateAdd and DateDiff In-Reply-To: <1089814382.2136.11.camel@...128...> References: <1089814382.2136.11.camel@...128...> Message-ID: <200407152248.09356.gambas@...1...> On Wednesday 14 July 2004 16:13, Nigel Gerrard wrote: > Benoit, > > A few weeks ago there was mention of the VB function DateAdd. Attached > is an implementation for Gambas. DateDiff is also included. > > I'm not sure whether this is where you planned to go - I had a thought > that maybe if all Datatypes were classes then we could have implemented > this type of functionality as a method. > e.g. myDate AS DATE > mydate = Date > myDate.Add(period, interval) > > But I could be talking rubbish :-) > > Nigel Hi, Nigel. I don't know how you could test them if you didn't modify the compiler too. Could you insert your two functions in the gb.vb component ? Because you used the vb syntax, and I'm not sure that I won't find a better one for Gambas ;-) When I will, I will backport your code in the interpreter. Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Thu Jul 15 22:49:54 2004 From: gambas at ...1... (Benoit Minisini) Date: Thu, 15 Jul 2004 22:49:54 +0200 Subject: [Gambas-devel] Spanish documentation In-Reply-To: <1089912386.11218.9.camel@...102...> References: <1089912386.11218.9.camel@...102...> Message-ID: <200407152249.54707.gambas@...1...> On Thursday 15 July 2004 19:26, Daniel Campos wrote: > Hi Benoit: > > Thanks to your program and some more scripts (gambas scripts, I don't > like Perl:-), I'm beggining to translate documentation from > http://wiki.gnulinex.org/gambas to a static format. Have you planned > any way to distribute documentation in other laguages that english, or > should I distribute it from my web site (I have a place to do it) > > Regards, Hi Daniel, Ask Rob Kudla, because he should have made wiki in other languages. Personnally, I can only manage the english one. Regards, -- Benoit Minisini mailto:gambas at ...1... From nigel at ...2... Fri Jul 16 11:04:52 2004 From: nigel at ...2... (Nigel Gerrard) Date: Fri, 16 Jul 2004 10:04:52 +0100 Subject: [Gambas-devel] DateAdd and DateDiff References: <1089814382.2136.11.camel@...128...> <200407152248.09356.gambas@...1...> Message-ID: <003c01c46b13$f59156b0$01f04d51@...97...> On Thursday, July 15, 2004 9:48, Benoit Minisini wrote: Subject: Re: [Gambas-devel] DateAdd and DateDiff > > I don't know how you could test them if you didn't modify the compiler too. > I didn't touch anything within the compiler folder - you have all the changes. My understanding from the code was that the compiler would just compile the pcode using the COMP_subr_info array that was changed within gb_reserved_temp.h. All the real work is done within Exec. [Good modular programming :-] Well, atleast it works for me! > Could you insert your two functions in the gb.vb component ? Because you used > the vb syntax, and I'm not sure that I won't find a better one for Gambas ;-) I will try and move it into the VB module as it would be a more logical place perhaps to have it. The disadvantage is that I might have to duplicate private code such as the date_is_valid function in the VB component (hopefully it is the only one.) Nigel From daniel.campos at ...103... Fri Jul 16 16:36:18 2004 From: daniel.campos at ...103... (Daniel) Date: Fri, 16 Jul 2004 16:36:18 +0200 Subject: [Gambas-devel] Spanish documentation In-Reply-To: <200407152249.54707.gambas@...1...> References: <1089912386.11218.9.camel@...102...> <200407152249.54707.gambas@...1...> Message-ID: <1089988578.3274.3.camel@...102...> > > Hi Daniel, > > Ask Rob Kudla, because he should have made wiki in other languages. > Personnally, I can only manage the english one. Mmmh... may be you didn't understand me. What I mean is that I'll be able to provide static versions of the spanish documentation, and the idea would be to include it as a part of the Gambas package. For example, "man" does it, it provides the official page (in english), but if a translated page exists (man-es, man-fr...), the "man browser" shows you automatically the translated page instead of the original one. Gambas help system could do something like this, or may be ask the user during the make process if he desires a translated version of the docs. Regards, Daniel Campos > > Regards, From sourceforge-raindog2 at ...19... Fri Jul 16 18:44:30 2004 From: sourceforge-raindog2 at ...19... (Rob) Date: Fri, 16 Jul 2004 12:44:30 -0400 Subject: [Gambas-devel] Spanish documentation In-Reply-To: <200407152249.54707.gambas@...1...> References: <1089912386.11218.9.camel@...102...> <200407152249.54707.gambas@...1...> Message-ID: <200407161244.31030.sourceforge-raindog2@...19...> On Thursday 15 July 2004 16:49, Benoit Minisini wrote: > > Thanks to your program and some more scripts (gambas > > scripts, I don't like Perl:-), I'm beggining to translate > > documentation from http://wiki.gnulinex.org/gambas to a > > static format. Have you planned any way to distribute > > documentation in other laguages that english, or should I > > distribute it from my web site (I have a place to do it) > Ask Rob Kudla, because he should have made wiki in other > languages. Personnally, I can only manage the english one. I actually did make a GambasEspanol wiki, as well as GambasFrancais and GambasItaliano and GambasDeutsch, but when I moved the wiki to the new server I noticed there had been no updates to any of the other language wikis since last June, so I deleted them rather than have bad information available. It sounds like Daniel is making a static version of the documentation, in which case I would encourage him to email me a tarball (or upload it to the wiki somewhere) and I will take it and put it in its own directory on the server. I am on holiday as I type this, though, with a very slow connection, so it may need to wait till sunday or monday. Rob From gambas at ...1... Fri Jul 16 21:51:20 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 16 Jul 2004 21:51:20 +0200 Subject: [Gambas-devel] DateAdd and DateDiff In-Reply-To: <003c01c46b13$f59156b0$01f04d51@...97...> References: <1089814382.2136.11.camel@...128...> <200407152248.09356.gambas@...1...> <003c01c46b13$f59156b0$01f04d51@...97...> Message-ID: <200407162151.20886.gambas@...1...> On Friday 16 July 2004 11:04, Nigel Gerrard wrote: > On Thursday, July 15, 2004 9:48, Benoit Minisini wrote: > Subject: Re: [Gambas-devel] DateAdd and DateDiff > > > I don't know how you could test them if you didn't modify the compiler > > too. > > > I didn't touch anything within the compiler folder - you have all the > changes. My understanding > from the code was that the compiler would just compile the pcode using the > COMP_subr_info array that was changed > within gb_reserved_temp.h. All the real work is done within Exec. [Good > modular programming :-] > Well, atleast it works for me! > > > Could you insert your two functions in the gb.vb component ? Because you > > used > > > the vb syntax, and I'm not sure that I won't find a better one for Gambas > > ;-) > > I will try and move it into the VB module as it would be a more logical > place perhaps to have it. The disadvantage is > that I might have to duplicate private code such as the date_is_valid > function in the VB component (hopefully it is the > only one.) > > Nigel > It is a temporary situation. As I said, I will backport your code to the interpreter when I finish the many other things I must do for the 1.0! Regards, -- Benoit Minisini mailto:gambas at ...1... From Karl.Reinl at ...16... Fri Jul 16 02:26:45 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Fri, 16 Jul 2004 00:26:45 +0000 Subject: [Gambas-devel] don't understand...WHO I'm wrong ?? Message-ID: <200407160026.45563.Karl.Reinl@...16...> Salut, from file:/opt/gambas/share/gambas/help/ApiVARGOPT.html --------------------------------------------------------------------------------------------------------------------------------- VARGOPT #define VARGOPT ( name , default ) (MISSING( name ) ? ( default ) : VARG( name )) Returns the value of an argument from its name, or a default value if this argument is missing. name is the name of the argument. default is the default value. This is a useful combination of the macros MISSING and VARG. --------------------------------------------------------------------------------------------------------------------------------- I mean : ????????????????????????????? but can someone explaine me what that mean ! I dit: if (MISSING(bUseTab)) VARGOPT(bUseTab,FALSE); //VARG(bUseTab) = FALSE; if (MISSING(iSpace)) //VARG(iSpace) = (WIDGET->tabSpace()); VARGOPT(iSpace,(WIDGET->tabSpace())); if (MISSING(bEvery)) //VARG(bEvery) = TRUE; VARGOPT(bEvery,TRUE); if (MISSING(bEveryWithOutDim)) //VARG(bEveryWithOutDim) = TRUE; VARGOPT(bEveryWithOutDim,TRUE); if (MISSING(bAlignComments)) //VARG(bAlignComments) = TRUE; VARGOPT(bAlignComments,TRUE); if (MISSING(bWithInCase)) //VARG(bWithInCase) = TRUE; VARGOPT(bWithInCase,TRUE); if (MISSING(bDelEmptyLines)) //VARG(bDelEmptyLines) = TRUE; VARGOPT(bDelEmptyLines,TRUE); if (!VARG(bEvery)) { //VARG(bEveryWithOutDim) = FALSE; VARGOPT(bEveryWithOutDim,FALSE); //VARG(bAlignComments) = FALSE; VARGOPT(bAlignComments,FALSE); } I'v got : /bin/sh ../../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../src/share -I/usr/qt/3/include/ -D_REENTRANT -g -O2 -pipe -Wall -fno-exceptions -g -Os -c CEditor.cpp g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../src/share -I/usr/qt/3/include/ -D_REENTRANT -g -O2 -pipe -Wall -fno-exceptions -g -Os -c CEditor.cpp -fPIC -DPIC -o CEditor.lo CEditor.cpp: In function `void CEDITOR_PrettyPrinter(void*, void*)': CEditor.cpp:557: warning: statement with no effect CEditor.cpp:564: warning: statement with no effect CEditor.cpp:567: warning: statement with no effect CEditor.cpp:570: warning: statement with no effect CEditor.cpp:573: warning: statement with no effect CEditor.cpp:576: warning: statement with no effect CEditor.cpp:581: warning: statement with no effect CEditor.cpp:583: warning: statement with no effect AND I'v heart that : ..... because you are modifying the interpreter stack, and this could be dangerous! WHO I'm wrong ?? Amicalement Charlie From gambas at ...1... Sat Jul 17 01:11:20 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 17 Jul 2004 01:11:20 +0200 Subject: [Gambas-devel] don't understand...WHO I'm wrong ?? In-Reply-To: <200407160026.45563.Karl.Reinl@...16...> References: <200407160026.45563.Karl.Reinl@...16...> Message-ID: <200407170111.20705.gambas@...1...> On Friday 16 July 2004 02:26, Charlie Reinl wrote: > Salut, > > from file:/opt/gambas/share/gambas/help/ApiVARGOPT.html > --------------------------------------------------------------------------- >------------------------------------------------------ VARGOPT > > > #define VARGOPT ( name , default ) (MISSING( name ) ? ( default ) : > VARG( name )) > > > Returns the value of an argument from its name, or a default value if this > argument is missing. > > name is the name of the argument. > default is the default value. > > This is a useful combination of the macros MISSING and VARG. > --------------------------------------------------------------------------- >------------------------------------------------------ I mean : > ????????????????????????????? > > but can someone explaine me what that mean ! > > I dit: > if (MISSING(bUseTab)) > VARGOPT(bUseTab,FALSE); > //VARG(bUseTab) = FALSE; > if (MISSING(iSpace)) > //VARG(iSpace) = (WIDGET->tabSpace()); > VARGOPT(iSpace,(WIDGET->tabSpace())); > if (MISSING(bEvery)) > //VARG(bEvery) = TRUE; > VARGOPT(bEvery,TRUE); > if (MISSING(bEveryWithOutDim)) > //VARG(bEveryWithOutDim) = TRUE; > VARGOPT(bEveryWithOutDim,TRUE); > if (MISSING(bAlignComments)) > //VARG(bAlignComments) = TRUE; > VARGOPT(bAlignComments,TRUE); > if (MISSING(bWithInCase)) > //VARG(bWithInCase) = TRUE; > VARGOPT(bWithInCase,TRUE); > if (MISSING(bDelEmptyLines)) > //VARG(bDelEmptyLines) = TRUE; > VARGOPT(bDelEmptyLines,TRUE); > > if (!VARG(bEvery)) > { > //VARG(bEveryWithOutDim) = FALSE; > VARGOPT(bEveryWithOutDim,FALSE); > //VARG(bAlignComments) = FALSE; > VARGOPT(bAlignComments,FALSE); > } > > I'v got : > > /bin/sh ../../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. > -I../../../.. -I../../../../src/share -I/usr/qt/3/include/ -D_REENTRANT > -g -O2 -pipe -Wall -fno-exceptions -g -Os -c CEditor.cpp > g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../src/share > -I/usr/qt/3/include/ -D_REENTRANT -g -O2 -pipe -Wall -fno-exceptions -g -Os > -c CEditor.cpp -fPIC -DPIC -o CEditor.lo > CEditor.cpp: In function `void CEDITOR_PrettyPrinter(void*, void*)': > CEditor.cpp:557: warning: statement with no effect > CEditor.cpp:564: warning: statement with no effect > CEditor.cpp:567: warning: statement with no effect > CEditor.cpp:570: warning: statement with no effect > CEditor.cpp:573: warning: statement with no effect > CEditor.cpp:576: warning: statement with no effect > CEditor.cpp:581: warning: statement with no effect > CEditor.cpp:583: warning: statement with no effect > > AND I'v heart that : > ..... because you are modifying the interpreter stack, and this could be > dangerous! > > WHO I'm wrong ?? > > Amicalement > Charlie > > Maybe I was not very clear. You must use VARG() to return a value from the stack, not to set it. If you have an optional argument, read it with VARGOPT(), the second parameter being the optional value. In other words, you have three ways to get an optional argument: 1) Use VARGOPT() each time you read it. CallMyPrettyPrinter(VARG(bUseTab, FALSE), VARG(iTabSpace, WIDGET->tabSpace()), ...) 2) Or use a temporary local variable, if you must read the same parameter many times. bool useTab = VARGOPT(bUseTab, FALSE); int tabSpace = VARGOPT(iTabSpace, WIDGET->tabSpace()); ... CallMyPrettyPrinter(useTab, tabSpace, ...); 3) Use MISSING() directly, which is finally equivalent. I suggest you find a good book that explain you how works the C preprocessor. If you really have problems with it, you can use the '-E' option of gcc, that allows you to see the code generated by the preprocessor just before it is compiled. Regards, -- Benoit Minisini mailto:gambas at ...1... From karl.reinl at ...16... Sat Jul 17 17:47:57 2004 From: karl.reinl at ...16... (Charlie) Date: Sat, 17 Jul 2004 17:47:57 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter References: <200407112246.13619.Karl.Reinl@...16...> <200407142149.00327.gambas@...1...> Message-ID: <40F94A2D.90707@...16...> Benoit Minisini schrieb: > On Monday 12 July 2004 00:46, Charlie Reinl wrote: > >> Salut, >> >> based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. >> ( editor.TabLength return a int now, I changed it for this version) >> >> ......................... >> > Hi, Charlie > > Having a pretty printer is a good idea, but I think that the way you > implemented it is not the good way! You should have told me before... > > The good way would have been using the gb.eval component that includes > the gambas compiler parser in its code. With a few changes in the > parser code (just to keep the spaces in a beginning of a line), > rewriting a line of code from its result is very simple! > > As for the detection of error in code structure, the compiler already > detect that, so it is not useful to add it in the pretty-printer. It > is not its role. > > If you are interested, look at ./lib/eval/eval_read.c or > ./comp/gbc_read.c. Add #define DEBUG at the beginning of > ./comp/gbc_read.c and the compiler will display the result of the > parser at each compilation. > > Regards, > > Salut Beno?t, first thanks for your patience with me. I had a look to /comp/gbc_read.c and the output too. Every valid line commes out word for word and is qualified last of line is a NEWLINE. So for some parts I could use it begin and end of Sub and Function . But I also have to know Is the line a declaration of an Variable starts or ends a: If / Then / Endif section or a For/next section or a While / Wend etc. Because I have to indent the line for one unit or unindent one unit. For that I use my lists, it would be better to use a common resource. for the detection of error : if one of these sections are not closed correctly, the END of the Function or Sub will not be at left, or the last Line(s) are also at left and you can follow up backwarts to find your missing/plus ENDIF etc.. in this Example the compiler say, you have an unclosed ENDIF at the line where are the END of the Sub. PUBLIC SUB mySub() IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN ENDIF ENDIF ENDIF 'ENDIF ' this one is comment out ENDIF ENDIF END The PrettyPrinter will give you that: PUBLIC SUB mySub() IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN ENDIF ENDIF ENDIF 'ENDIF ' this one is comment out ENDIF ENDIF END PUBLIC SUB mySub() IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN IF TRUE THEN ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF' this one is to much END So you can find easier the missing/plus ENDIF. Very usefull in Sub/Function which are very long. Amicalemnet Charlie From karl.reinl at ...16... Sat Jul 17 18:07:23 2004 From: karl.reinl at ...16... (Charlie) Date: Sat, 17 Jul 2004 18:07:23 +0200 Subject: [Gambas-devel] gambas editor added PrettyPrinter References: <200407112246.13619.Karl.Reinl@...16...> <200407142139.31786.gambas@...1...> Message-ID: <40F94EBB.2060005@...16...> Benoit Minisini schrieb: >On Monday 12 July 2004 00:46, Charlie Reinl wrote: > > >>Salut, >> >>based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter. >>( editor.TabLength return a int now, I changed it for this version) >>............................ >> >When you have an optional parameter in a method implementation, you must not >do: > > if (MISSING(bUseTab)) > VARG(bUseTab) = TRUE; > >because you are modifying the interpreter stack, and this could be dangerous! > >You should use the macro VARGOPT instead: VARGOPT(bUseTab, TRUE) > >Regards, > > > Salut Beno?t, Thanks for your help, now I don't modify the interpreter stack anymore,(So I hope) I send you a gambas project (Indenter4-0.0.5.tar.gz) to test it and the *.cpp and *.h files I changed (editor_PP2.tar.gz) , copy them to /.../gambas-0.94/src/lib/qt/editor/ then compile/install it. I changed the part with the optional parameters and left a bug, who skipt the leading Var-declarations outside of proc/sub/functions. Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Indenter4-0.0.5.tar.gz Type: application/x-tar Size: 15679 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: editor_PP2.tar.gz Type: application/x-tar Size: 41556 bytes Desc: not available URL: From danielcampos at ...45... Tue Jul 20 00:05:27 2004 From: danielcampos at ...45... (Daniel Campos) Date: Tue, 20 Jul 2004 00:05:27 +0200 Subject: [Gambas-devel] Spanish translation 0.95 Message-ID: <1090274727.30244.0.camel@...102...> Here's spanish translation for gambas, and gambas-db-manager Regards, -- Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas-es-0.95.po Type: text/x-po Size: 61421 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas-database-manager-es-0.95.po Type: text/x-po Size: 15113 bytes Desc: not available URL: From gambas at ...1... Tue Jul 20 00:08:01 2004 From: gambas at ...1... (Benoit Minisini) Date: Tue, 20 Jul 2004 00:08:01 +0200 Subject: [Gambas-devel] Spanish translation 0.95 In-Reply-To: <1090274727.30244.0.camel@...102...> References: <1090274727.30244.0.camel@...102...> Message-ID: <200407200008.01188.gambas@...1...> On Tuesday 20 July 2004 00:05, Daniel Campos wrote: > Here's spanish translation for gambas, and gambas-db-manager > > Regards, So soon ! :-) -- Benoit Minisini mailto:gambas at ...1... From Karl.Reinl at ...16... Wed Jul 21 01:34:04 2004 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Tue, 20 Jul 2004 23:34:04 +0000 Subject: [Gambas-devel] gambas-0.95 Message-ID: <200407202334.04613.Karl.Reinl@...16...> Salut, works well on gentoo. But where are the Debug Tools from the Debug - Window ? Can't find them. Amicalement Charlie From lordheavy at ...141... Tue Jul 20 23:46:53 2004 From: lordheavy at ...141... (Laurent Carlier) Date: Tue, 20 Jul 2004 23:46:53 +0200 Subject: [Gambas-devel] gambas-0.95 In-Reply-To: <200407202334.04613.Karl.Reinl@...16...> References: <200407202334.04613.Karl.Reinl@...16...> Message-ID: <200407202346.53654.lordheavy@...141...> > > But where are the Debug Tools from the Debug - Window ? > Can't find them. > > Amicalement > Charlie > read the changelog ( tips : look at the main window toolbar) :) ps : thks for your little app emergetool psps : it segfault on my gentoo box :( -- Laurent Carlier From karl.reinl at ...16... Wed Jul 21 21:28:34 2004 From: karl.reinl at ...16... (Charlie) Date: Wed, 21 Jul 2004 21:28:34 +0200 Subject: [Gambas-devel] gambas-0.95 References: <200407202334.04613.Karl.Reinl@...16...> <200407202346.53654.lordheavy@...141...> Message-ID: <40FEC3E2.5070808@...16...> Laurent Carlier schrieb: >>But where are the Debug Tools from the Debug - Window ? >>Can't find them. >> >>Amicalement >>Charlie >> >> >> > >read the changelog ( tips : look at the main window toolbar) :) > I dit, and now I dit it again, during debugging I clicked all Windows-like symbols , and not the hand (sais' Debugging') Thank you -- found > >ps : thks for your little app emergetool > - even after a 'Compile All' , I use only gb and qt.gb and I call kdesu while creating Inputfile. - Can you load it into the IDE ? - delete FMain.conf (Workpath and Windowpos is saved there, oh yhea I use 2 screens and work mostly on the left of main screen) - is Util reachable ? If not (should for IDE) then strip Use "Util" and all lines with mxConfig - delete the .lang - And if nothings help , create a new project , build an empty form FMain and copy (not in IDE) form Fmain to .class and .form > >psps : it segfault on my gentoo box :( > > > > > From linus at ...2... Wed Jul 21 19:25:56 2004 From: linus at ...2... (Nigel Gerrard) Date: Wed, 21 Jul 2004 18:25:56 +0100 Subject: [Gambas-devel] vb.DateAdd and vb.DateDiff Message-ID: <1090430755.2203.2.camel@...128...> Benoit, Here is the vb component with the additional DateAdd and DateDiff functions. Nigel -------------- next part -------------- A non-text attachment was scrubbed... Name: vb.tar.gz Type: application/x-compressed-tar Size: 4321 bytes Desc: not available URL: From gambas at ...1... Thu Jul 22 00:01:02 2004 From: gambas at ...1... (Benoit Minisini) Date: Thu, 22 Jul 2004 00:01:02 +0200 Subject: [Gambas-devel] vb.DateAdd and vb.DateDiff In-Reply-To: <1090430755.2203.2.camel@...128...> References: <1090430755.2203.2.camel@...128...> Message-ID: <200407220001.02707.gambas@...1...> On Wednesday 21 July 2004 19:25, Nigel Gerrard wrote: > Benoit, > > Here is the vb component with the additional DateAdd and DateDiff > functions. > > > Nigel Thanks, Nigel. I included it in the sources. -- Benoit Minisini mailto:gambas at ...1... From linus at ...2... Fri Jul 23 16:53:05 2004 From: linus at ...2... (Nigel Gerrard) Date: Fri, 23 Jul 2004 15:53:05 +0100 Subject: [Gambas-devel] BUG solution Message-ID: <1090594384.3591.6.camel@...128...> Benoit, Could you please apply this patch to the mysql driver before release 0.96. It solves the problem that Leo had with finding the field when trying to show the grants of user at ...142... Thanks Nigel -------------- next part -------------- A non-text attachment was scrubbed... Name: main.c.diff Type: text/x-patch Size: 1281 bytes Desc: not available URL: From gambas at ...1... Fri Jul 23 21:44:08 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 23 Jul 2004 21:44:08 +0200 Subject: [Gambas-devel] BUG solution In-Reply-To: <1090594384.3591.6.camel@...128...> References: <1090594384.3591.6.camel@...128...> Message-ID: <200407232144.08731.gambas@...1...> On Friday 23 July 2004 16:53, Nigel Gerrard wrote: > Benoit, > > Could you please apply this patch to the mysql driver before release > 0.96. It solves the problem that Leo had with finding the field when > trying to show the grants of user at ...142... > > Thanks > > Nigel OK. I will merge it. I'm currently redesigning the database component interface, to get rid of the pseudo-collections. I created a new Class named ".SubClass" that you can inherits to easily implement a sub-object of a class. For example, a Connection object has now three sub-collections: Databases, Users, and Tables. Table and Result objects will have Fields sub-collections. The named ".SubClass" is not very good, so I may change it. But this is the idea... Maybe I will try to enhance the User class interface too, so that we can express the detail of MySQL/PostgreSQL user rights. But this last point implies modifiying the database drivers, so I'm not sure I will do it. Regards, -- Benoit Minisini mailto:gambas at ...1...