[Zope-dev] Using the monitor_client

2000-10-31 Thread Morten W. Petersen

When using the monitor_client, I do this:

-- Start monitor_client usage

python monitor_client.py localhost 8099
Enter Password:
warning: unhandled connect event
Python 1.5.2 (#1, Mar 11 2000, 13:03:53)  [GCC 2.95.2 19991024 (release)]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Welcome to secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80
 import Zope
 app=Zope.app()
 app.addDTMLMethod
Traceback (innermost last):
  File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator
result = eval (co, self.local_env)
  File "secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80", line 0, in ?
AttributeError: addDTMLMethod
 app.manage_addDTMLMEthod
Traceback (innermost last):
  File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator
result = eval (co, self.local_env)
  File "secure_monitor_channel connected 127.0.0.1:2959 at 88fbf80", line 0, in ?
AttributeError: manage_addDTMLMEthod
 app.manage_addDTMLMethod
Python Method object at 82ee058
 app.manage_addDTMLMethod('tester','tester','tester')
''
 app._p_jar.sync()
 get_transaction().commit()
 warning: unhandled close event

closed.
morten@slakka:/usr/local/Zope/ZServer/medusa 

-- End monitor_client usage

However, when I enter the management screen of the Zope instance, no DTMLMethod
called tester is listed..

(I used http://www.zope.org/Documentation/Misc/DEBUGGING.txt as a guide..)

Can anyone see what I'm doing wrong?

Thanks in advance.

-Morten

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Using the monitor_client

2000-10-31 Thread Morten W. Petersen

[Yves-Eric Martin]

| - Zope.app() gives you a *copy* of the *real* application object.
| - app._p_jar.sync() reloads your copy with the real (losing your changes)

Ah, there it is; sync discards the changes made from the monitor, and then
reloads...

An extra thanks for the thorough (not-very-newbie-like) explanation, much
appreciated!  =)

-Morten

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Using the monitor_client

2000-10-31 Thread Shane Hathaway

Yves-Eric Martin wrote:
 I am no Zope monitor expert, but maybe you will find my newbie point

For some definition of newbie... :-)

 of view helpful. Here is my understanding of the magic of this very
 helpful tool:
 
 - Zope.app() gives you a *copy* of the *real* application object.
 - app._p_jar.sync() reloads your copy with the real (losing your changes)
 - get_transaction().commit() writes your copy to the real (applying your
 changes)

I didn't realize sync() was there.  Thanks for the tip!

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )