home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/python
- #
- # Copyright (c) 1996 by Lele Gaifax. All Rights Reserved
- #
- # This file is part of Nothing (yet).
- #
- # $RCSfile: AlertPanel.py,v $
- # $Revision: 1.1.1.1 $
- # $Date: 1996/09/30 06:06:48 $
- #
- # Created Wed Sep 4 15:36:04 1996.
- #
-
- import ObjC
-
- NXBundle = ObjC.lookup_class ('NXBundle')
-
- def my_callback (status):
- print "This is callback! Called with status %d" % status
- # end def
-
- ap_bundle = NXBundle.alloc().initForDirectory__ ('AlertPanel.bundle')
- AlertPanel = ap_bundle.principalClass()
-
- if AlertPanel:
- simple = AlertPanel.alloc().initWithTitle__ ('Simple Panel')
- simple.setAction__ (my_callback)
- simple.run()
-
- do_u_c_me = AlertPanel.alloc()
- do_u_c_me.initWithTitle__message__defaultButton__altButton__otherButton__ ('Alert Panel Test',
- 'Do you see me?',
- 'Yes, very well',
- "No, but I'm pressing the mouse button everywhere",
- "Why do you wanna know?")
- do_u_c_me.run()
- print do_u_c_me.buttonTitle()
- else:
- print "Did you compiled the bundle first?"
- # end if
-
-
-