diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-08 00:31:25 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-08 00:31:25 +0000 |
commit | 858405cd45d4824c2288f2e53eb2c6860504ccfd (patch) | |
tree | 1e1b841af7a4d63109e2a80f92418b216988ca48 /TAO/tests/Xt_Stopwatch | |
parent | c39f02e150db62146cbe64df0d61e1fb9984edd4 (diff) | |
download | ATCD-858405cd45d4824c2288f2e53eb2c6860504ccfd.tar.gz |
ChangeLogTag:Wed Jul 7 19:24:00 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tests/Xt_Stopwatch')
-rw-r--r-- | TAO/tests/Xt_Stopwatch/client.cpp | 15 | ||||
-rw-r--r-- | TAO/tests/Xt_Stopwatch/server.cpp | 11 | ||||
-rw-r--r-- | TAO/tests/Xt_Stopwatch/svc.conf | 2 |
3 files changed, 17 insertions, 11 deletions
diff --git a/TAO/tests/Xt_Stopwatch/client.cpp b/TAO/tests/Xt_Stopwatch/client.cpp index d7eca00515c..999f288ab15 100644 --- a/TAO/tests/Xt_Stopwatch/client.cpp +++ b/TAO/tests/Xt_Stopwatch/client.cpp @@ -3,7 +3,7 @@ #include "testC.h" #include "ace/Get_Opt.h" -ACE_RCSID(FL_Cube, client, "$Id$") +ACE_RCSID(Xt_Stopwatch, client, "$Id$") #if !defined (ACE_HAS_XT) @@ -18,15 +18,18 @@ int main (int, char *[]) #include "Control.h" #include "Client.h" +#include "tao/xt_resource.h" -int -main (int argc, +int +main (int argc, char* argv[]) { XtAppContext app; Widget toplevel = XtAppInitialize ( &app, "Start & Stop", NULL, 0, &argc, argv, NULL, NULL, 0 ); + TAO_XT_Resource_Factory::set_context (app); + Control control (toplevel); ACE_DECLARE_NEW_CORBA_ENV; @@ -41,7 +44,7 @@ main (int argc, client.parse_args (argc, argv, ACE_TRY_ENV); ACE_TRY_CHECK; - + client.add_callback (control); // Manage the widgets @@ -97,7 +100,7 @@ Client::parse_args (int argc, char *argv[], this->server_ = Stopwatch::_narrow (object.in (), ACE_TRY_ENV); ACE_CHECK; - + if (CORBA::is_nil(this->server_.in ())) { ACE_DEBUG ((LM_DEBUG, @@ -115,7 +118,7 @@ Client::add_callback (Control &ctrl) XmNactivateCallback, &Client::start_callback, client_data); - + XtAddCallback ( ctrl.stopwidget (), XmNactivateCallback, &Client::stop_callback, diff --git a/TAO/tests/Xt_Stopwatch/server.cpp b/TAO/tests/Xt_Stopwatch/server.cpp index e82c4416a6a..49248c80b47 100644 --- a/TAO/tests/Xt_Stopwatch/server.cpp +++ b/TAO/tests/Xt_Stopwatch/server.cpp @@ -3,7 +3,7 @@ #include "test_i.h" #include "ace/Get_Opt.h" -ACE_RCSID(FL_Cube, server, "$Id$") +ACE_RCSID(Xt_Stopwatch, server, "$Id$") #if !defined (ACE_HAS_XT) @@ -18,6 +18,7 @@ int main (int, char *[]) #include <Xm/Xm.h> #include "Stopwatch_display.h" +#include "tao/xt_resource.h" const char *ior_output_file = 0; @@ -50,7 +51,7 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - // We do the command line parsing first + // We do the command line parsing first if (parse_args (argc, argv) != 0) return 1; @@ -58,6 +59,8 @@ main (int argc, char *argv[]) Widget toplevel = XtAppInitialize ( &app, "Stopwatch", NULL, 0, &argc, argv, NULL, NULL, 0 ); + TAO_XT_Resource_Factory::set_context (app); + Stopwatch_display stopwatch (toplevel); ACE_DECLARE_NEW_CORBA_ENV; @@ -72,7 +75,7 @@ main (int argc, char *argv[]) CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - + if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), @@ -113,7 +116,7 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - + XtRealizeWidget (toplevel ); XtAppMainLoop ( app ); } diff --git a/TAO/tests/Xt_Stopwatch/svc.conf b/TAO/tests/Xt_Stopwatch/svc.conf index 1b435a29df8..9d6894193c4 100644 --- a/TAO/tests/Xt_Stopwatch/svc.conf +++ b/TAO/tests/Xt_Stopwatch/svc.conf @@ -1,3 +1,3 @@ # $Id$ # -static Resource_Factory "-ORBReactorType xt" +dynamic Resource_Factory Service_Object * TAO:_make_TAO_XT_Resource_Factory() "" |