xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] bypassing argc and argcv


From: Patrick
Subject: Re: [XForms] bypassing argc and argcv
Date: Wed, 26 Aug 2015 21:54:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

On 08/26/2015 03:47 PM, Jens Thoms Toerring wrote:
Hi Patrick,

On Wed, Aug 26, 2015 at 02:36:29PM -0400, Patrick wrote:
I would like to call fl_initialize from another program that is
main()
I guess you meant from anoyther function that isn't main()?

but sending fl_initialize(0, NULL, 0, 0, 0);

does not work.

I found this post:
http://xforms-toolkit.org/old-archive/2000/0481.html

but it did not cover this. Does xforms assume it will be initialized
from main?
You can call fl_initialize() from anywhere if you feel like
it. But it needs at least on argument (which is tyically the
name of the program) and doesn't accept none at all. But
should be able to get around that by doing e.g.

void myfunct( void )
{
        int cnt = 1;
        char *args[ 2 ] = { "", NULL };
        fl_initilize( &cnt, args, 0, 0, 0 );
}

That way fl_initialize() gets what it wants. But you then
should be aware that with this the user will not be able
to set XForms specific flags (e.g. the display the program
is to use, and several others). If you don't want that you
have to pass the arguments main() received somehow to your
function that then calls fl_initialize() with them.

                            Best regards, Jens
Hi Jens

Thanks very much.

I have used GTK, QT, FLTK and Tcl/TK for small projects along with many bindings. I am actually pretty excited about xforms. Many toolkits are written in c++ and it wants to be the center of the universe. GTK is not but it is very large and covered in macros and Tk is okay but closely linked to Tcl. With a possible exception of Python most bindings are not very good as writing them is a monumental task.

I am actually trying to call into xforms from GnuCOBOL. I have tons of other questions but I will try to figure them out with the documentation.

Have a great day and thanks for keeping xforms alive and well-Patrick






















reply via email to

[Prev in Thread] Current Thread [Next in Thread]