[Gambas-devel] gambas editor added PrettyPrinter

Benoit Minisini gambas at ...1...
Wed Jul 14 21:39:31 CEST 2004


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




More information about the Devel mailing list