[Top][All Lists]

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

Re: [XForms] bypassing argc and argcv

From: Jens Thoms Toerring
Subject: Re: [XForms] bypassing argc and argcv
Date: Wed, 26 Aug 2015 21:47:36 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

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