[Gambas-devel] Question of parameters
Nigel Gerrard
nigel at ...2...
Mon Jul 5 10:44:45 CEST 2004
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" <Karl.Reinl at ...16...>
To: "gambas-devel" <gambas-devel at lists.sourceforge.net>
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
More information about the Devel
mailing list