[patch] LayoutManager.add() fix, demo/ttt2.py fix

Sascha Silbe <[email protected]> Wed, 27 Aug 2003 15:24:28 +0200
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
Hi!

LayoutManager:
   Fixed the add() method to add the new component to the managed 
container.

demo/ttt2.py:
   Removed the superflous and broken call of _ensure_text.


Now demo/ttt2.py works fine again.

CU/Lnx Sascha

-- 
Registered Linux User #77587 (http://counter.li.org/)

bomb terrorist afghanistan PGP encrypt CIA FBI BND MAD StaSi anschlag 
strike sex pussy xxx kill bj hitler Gates MS Windows ZV ZDV
anygui-layoutmanager-add-fix.patch (text/plain, 340 B)
--- orig/lib/anygui/LayoutManagers.py
+++ mod/lib/anygui/LayoutManagers.py
@@ -60,6 +60,7 @@
         for item in items:
             if item not in self.container.contents:
                 item.container=self.container
+                self.container.contents.append(item)
 
         if options:
             options.__dict__.update(kws)
anygui-demo-ttt2-_ensure_text.patch (text/plain, 181 B)
--- orig/demo/ttt2.py
+++ mod/demo/ttt2.py
@@ -76,7 +76,6 @@
         return
 
     btns[the_btn].text = 'x'
-    btns[the_btn]._ensure_text()
     if checkWin():
         return
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/TLEMFu2Z2HTlz4cRAvrKAJ0fYPNDxuXdDjoQ5L6vbH7iIk9F8QCgt5wn
tLEs6f6p7fYUhCgM8g5rn6c=
=eIPk
-----END PGP SIGNATURE-----