[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1108.0. "What is an "application context"?" by ORACLE::WATERS () Fri Jul 14 1989 16:31

    Sorry...  This is probably a dumb question.
    The VMS DECw docs don't mention "application context" objects.
    The related routines (XtCreateApplicationContext, XtAppAddInput,
    etc.) don't describe the purpose of the application_context argument
    either.

    What's in an application-context object?  Why is it useful, beyond
    the usual client_data argument for every callback (which I presume
    can be a pointer to a dynamic object, or a static cell to hold such
    a pointer)?

    --gw

T.RTitleUserPersonal
Name
DateLines
1108.1KP7, etc.POOL::HALLYBThe Smart Money was on GoliathFri Jul 14 1989 16:564
    See 4TRACK::DECWINDOWS_DOCUMENTATION note 196.  I don't get it either.
    
      John

1108.2...ORACLE::WATERSSun Jul 16 1989 20:076
>>    See 4TRACK::DECWINDOWS_DOCUMENTATION note 196.  I don't get it either.

    Btw, note 196.* does not answer the question.  Just points out the
    lack of explanatory documentation.  So can someone in this conference
    describe the purpose and benefits of using multiple application_contexts?

1108.3Is this a start?EPIK::BUEHLERAn education teaches you why you need oneMon Jul 17 1989 12:226
    I don't know why you'd create multiple application contexts, but you
    would create one application context if you wanted display connections
    to more than one machine and you also wanted to use the toolkit.
    
John

1108.4KYOA::MIANOO.K. so who cares about the METS?Mon Jul 17 1989 13:2321
RE:                      <<< Note 1108.0 by ORACLE::WATERS >>>

>    The VMS DECw docs don't mention "application context" objects.
>    The related routines (XtCreateApplicationContext, XtAppAddInput,
>    etc.) don't describe the purpose of the application_context argument
>    either.

According to the MIT X documentation there are several "obsolete"
routines that are replaced by routines that use an application_context
argument.  I have not found this mentioned anywhere in the DECwindow
documentation and most of the examples in the self-paced instruction
course use the obsolete routines.

I found out about the obsolete routines because I could not get
XtAddInput to work.  I looked in the MIT documentation and saw that it
was listed a obsolete and had been replaced by XtApplAddInput.  I then
changed the program to use the XtAppl routines and the program worked on
the first try. 

John

1108.5SDSVAX::SWEENEYHoney, I iconified the kidsMon Jul 17 1989 13:4712
    XtAppAddInput is described on page 2-39 of VMS DECwindows Toolkit
    Routines Reference Manual AA-MG23A-TE.
    
    The matter of using non-App'ed intrinsic routines in VMS DECwindows
    Guide to Application Programming probably has more to do with the
    timing of X11R3 and DECwindows V1 field tests than a conscious decision
    to use the obsolete routines.  Would you have liked to see DECwindows
    V1 delayed?
    
    Is it too late to have the examples for the V2 documentation updated?
    I don't know.

1108.6Maybe a little help?EXLIB::DLUGOSZNever try to prove what nobody doubtsMon Jul 17 1989 14:5513
    The only thing that I've been able to scrounge up about application
    contexts (other than the 'canned' line about them allowing multiple
    logical aplications in a single address space and that every 'program'
    needs at least one) is that you only need more than one if you are
    dealing with multiple threads in one process (does this mean that
    the server also has to be mutithreaded?). 
    
    Also the app context maintains a list of of the displays opened
    by XtOpenDisplay.
    
    Ron
    

1108.7LEOVAX::TREGGIARIMon Jul 24 1989 09:3431
>    The only thing that I've been able to scrounge up about application
>    contexts (other than the 'canned' line about them allowing multiple
>    logical aplications in a single address space and that every 'program'
>    needs at least one) is that you only need more than one if you are
>    dealing with multiple threads in one process (does this mean that
>    the server also has to be mutithreaded?). 

The R4 Intrinsics specification is removing the wording around "allowing
multiple logical applications in a single address space".  It seems that
no one (meaning the various Intrinsics vendors) is convinced that it works
nor is willing to commit to it working.  If anyone has used multiple
application contexts successfully, I'd like to hear about it.

The following paragraph is my first pass at a definition for application
contexts.  Comments are welcome:

An application context is an Intrinsics data structure which contains
much of the "global" state of the Intrinsics.  For example, it contains
the list of open displays and the list of registered work procedures.
Each application using the Intrinsics has a application context.
It can be created explicitly by the application by calling the routine
XtCreateApplicationContext.  The Intrinsics routine XtInitialize
creates a default application context.  Many Intrinsics routines have
two interfaces; one that takes an application context as its first
argument, and one that does not.  An example is XtAddTimeOut and
XtAppAddTimeOut.  The routines without the application context argument
use the default application context.  The Intrinsics standard suggests
the use of the routines with the application context argument.  The
other routines have been placed in an appendix of the standard.
However, either set of routines can be used by a DECtoolkit application.

1108.8EPIK::BUEHLERThe IRS believes in effort: tax yourselfMon Jul 24 1989 10:1414
>two interfaces; one that takes an application context as its first
>argument, and one that does not.  An example is XtAddTimeOut and
>XtAppAddTimeOut.  The routines without the application context argument
    
    A piddly change.  I suggest that you swap the ordering of XtAddTimeOut
    and XtAppAddTimeOut so that they match the wording of the previous
    sentence.
    
    I didn't have any problem with understanding the definition, but that's
    largely because it matches my prior understanding of application
    contexts.
    
John

1108.9More primitive questionPOOL::HALLYBThe Smart Money was on GoliathTue Jul 25 1989 09:5710
.7> Each application using the Intrinsics has a application context.
    
    What's an "application" in this context?  No pun intended.
    Is it a pseudonym for "process" in the VMS sense?
    
    I'm working on an "application" that currently involves two processes,
    may grow to more, so the question is nontrivial.
    
      John

1108.10LEOVAX::TREGGIARITue Jul 25 1989 11:096
>    Is it a pseudonym for "process" in the VMS sense?

Yes, as far as I understand VMS processes (but I'm not an expert...), it is.  

Leo