mdzjblack: what about gcc?12:01
SteveAI was in favour of keeping gcc out of desktop12:01
SteveAbut, I'm against splitting the python standard library12:01
jblackmdz: iirc, gcc didn't come in desktop.12:01
=== SteveA must go to bed now, it being 1am and all that
mdzdifferent issue, to my mind12:01
jblackI'll buy that.12:01
sabdfli'm happy to discuss distutils again12:13
mdzsabdfl: it's 600k of .py files12:33
mdzno sensible reason to split it from the main python package that I see12:33
mdzit seems historical, since they had previously been distributed separately12:33
sabdflmain concern to me is its function12:33
sabdflgiven that i want python to be a first class citizen on ubuntu12:34
sabdfllet's switch to -devel12:34
=== BradB [~bradb@modemcable165.196-131-66.mc.videotron.ca] has joined #launchpad
=== BradB [~bradb@modemcable165.196-131-66.mc.videotron.ca] has joined #launchpad
=== kiko [~kiko@200-206-134-238.async.com.br] has joined #launchpad
BradBkiko: dude, panther ROCKS02:16
kikoBradB, tla speed pr0n ?02:16
BradBnot yet02:16
BradBinstalling other stuff, but there will be much porn soon02:16
BradBgot a new powerbook today02:16
BradB15", 1.5 GHz w/ superdrive, uNF02:17
BradBi keep saying to myself "sheesh, it feels like i got a new computer", then i'm like "oh yeah, i did"02:17
kikoBradB, how much did it cost?02:18
BradB$4K CAD02:18
BradBi doubled my hardware specs02:18
kikohow much is that US$?02:19
BradB1.5 GHz G4, 80 G, 512 MB RAM, Panther, built-in bluetooth.02:19
BradBthese days? $4K. :)02:19
=== BradB checks
kikoyou know02:20
BradBabout 325002:20
kikoI've been wanting to buy a powerbook for a long time now02:20
kikobut they are so damn expensive!02:20
BradBthis one was worth it02:20
kikoI wonder02:20
BradBdude, this thing adjusts to ambient lighting02:20
kikocan you get a cheap one down there?02:21
BradBif you turn of the lights, the screen dims02:21
kikothat's killer02:21
BradBturn em back on, goes brighter again02:21
BradBit's insane02:21
BradBcheap one down where?02:21
kikoup in canada I guess. :)02:21
BradBi can get one for the price i got one, that's about it02:22
BradBthis was the souped up 15" though02:22
BradBthe other 15" is like 600 cheaper02:22
=== BradB gathers some Z3 unit test pr0n
=== jblack [~jblack@static-209-158-45-74.scr.east.verizon.net] has joined #launchpad
=== lifeless [~robertc@dsl-] has joined #launchpad
=== SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad
=== elmo [~james@] has joined #launchpad
=== dilys [daf@muse.19inch.net] has joined #launchpad
=== daf [daf@muse.19inch.net] has joined #launchpad
=== spiv [~andrew@fuchsia.puzzling.org] has joined #launchpad
=== sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
=== kiko [~kiko@200-206-134-238.async.com.br] has joined #launchpad
=== mako [~mako@micha.hampshire.edu] has joined #launchpad
BradBkiko: several of the apps are way, way better now too02:25
BradBboth at the good ole unix level, and os x's apps02:25
BradBe.g. i hated that ls -h or df -h didn't work in jaguar. tar didn't even have --exclude02:26
BradBnow they're all sane again02:26
BradBMail.app is actually looking like a reasonable (eye-candy) replacement for mutt.02:26
BradBit does cool little things too, like when i make a new rule, and i choose a header on which to make that rule, it auto-fills it with the value from the email i'm looking at02:27
BradBand does what appears to be good threading finally02:27
kikoneat that the unix apps are coming forward02:28
kikoso 02:28
kikohow much is a cheap PB up there?02:28
BradBthe hardware's way better too. i don't have to knock over my beer anymore trying to finagle my iPod's firewire into the back of the machine, because all the ports are along the sides.02:28
BradBkiko: are you trying to get the newest model?02:28
kikothe cheapest model that is still decent02:28
BradBthat'd probably be the other pb i have. i'm not looking to sell that one though. not sure.02:29
kikoit can be 12-13i02:29
BradBk, you mean? :)02:29
BradBer, no02:30
kikoi for inches :)02:30
BradBthere's only a 12, i guess02:30
kikothere's a sony 13i wide-screen that runs at 1280 which rocks02:30
BradByou can get a brand new 12-inch for 2099 CAD02:30
kikobut since I need something powerpc..02:30
BradBsomehow i paid $50 less than that page advertises for my pb02:31
BradB"Free Shipping", heh.02:32
kikothat's not too expensive, is it?02:37
BradBno point getting used02:38
kikohey, if used is half-price, there is :)02:38
BradBwell, yeah :)02:38
kikoare there such good deals?02:39
BradBthere might be, but none that i know of offhand, mainly because waiting until a good deal comes along was not really an option for me02:40
BradB(because having exactly one machine on which to work was hectic)02:40
sabdflBradB: drool02:41
sabdflsounds awesome02:42
BradBheh heh02:42
sabdflis the fs better in panther?02:42
BradBit's the same one02:42
BradBi'm benchmarking running z3 unit tests right now02:42
sabdflwhat's the diff between hfs+ and ufs?02:42
sabdflfor a new Z3 context object, should I subclass anything other than (object)?02:44
BradBthere are several: what you call the thing that you mount, the path separator, case sensitivity, etc.02:44
BradB"context object"?02:45
BradBcontext is just something; something is a fairly vague thing02:45
BradByou mean a content class?02:45
-dmwaters(dmwaters@dmwaters-gentoo.staff.freenode)- {global notice} Hi all! We appologize for that uh interuption. a script was ran that accidently restarted several of the ircds. Blame alindeman :) Thank you for your patience, and thank you for using freenode!02:47
sabdflyes, a content class02:48
sabdfli've got a content class that works fine, except that I can't use set_schema02:48
sabdflit doesn't work02:48
sabdflbut it works fine if i use set_attributes02:48
BradBit needs to implement a schema02:48
BradBor, maybe it doesn't02:48
sabdflit does02:49
BradBwhat's the error?02:49
=== kiko is now known as kiko-afk
sabdflforbidden attribute02:52
BradBare you sure the things you mention in set_schema are in the schema?02:52
sabdflworks just fine with set_attrbutes="x y z"02:52
sabdflyes, as Attribute()'s02:53
BradBhttp://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/contentobject.html explains it in more detail. Maybe you need to inherit from IContained.02:56
BradBwe probably want to be using set_schema consistently02:56
BradBbut hm, SQLBase is ultimately just inheriting from SQLObject.02:59
sabdfli think this is an egg-man bug03:09
=== BradB is now known as BradB|out
jblackI'm trying to do that blasted zope3 tutorial again. I've got an import problem on the buddydemo. Any zope guys conversant with it? 04:33
jblackOk. figured it out. the programmer tutorial is wrong. It shouldn't go in src/buddydemo, it should go in lib/python/buddydemo05:30
=== BradB|out is now known as BradB
BradBjblack: sounds like you're using a release. perhaps it was assuming an svn checkout.05:31
jblackBradB: You know zope3? 05:45
BradBI know how to do some things in Zope 3.05:45
jblackPossibly enough to tell me what went wrong in the programmer tutorial this time? 05:47
jblackI'm getting a gripe in buddyemo/configure.zcml, line 6.0 "NameError: name 'zope' is not defined05:47
jblackI just did slides 11-2005:48
jblack(and I'm more than happy to scp up the instance to your machine for you to look at05:48
sabdflBradB: figured out a little bit of the zope3 widget machinery05:49
BradBsabdfl: Able to use things that inherit from object, hopefully.05:49
BradB(with set_schema)05:49
BradBjblack: it'd be easier if you just paste your buddydemo/configure.zcml at paste.husk.org05:50
sabdflBradB: no, didn't get that right05:50
BradBjblack: I bought a new powerbook btw. It's shiny.05:51
sabdfli do suspect a zope3 issue there05:51
BradBsabdfl: What things did you learn about widgets?05:51
sabdflbasically, how to subclass Text, and the TextAreaWidget, so that the bug edit form is a bit neater05:51
sabdflit's a shitload of work for a very small bit of neater05:52
BradBah, from the chapters in the Z3DG?05:52
jblackbradb: Yeah05:52
sabdflbut i suppose once it's done it's done05:52
sabdfli'm trying to figure out how we make the generated forms look as good as the handcrafted ones05:53
sabdflif it can be done, then i'll buy into the autogenerated thing05:53
BradBsabdfl: I think it's very, very doable. Afterall, for 80-90% if the add/edit forms we haven't, there probably isn't a need for them to look really customized (uniformity and consistency are, afterall, Good Things)...it's just a matter of figuring out what visual knobs can be turned with CSS and the like.05:54
BradBs/we haven't/we have/05:54
sabdflsame is probably true of the forms we haven't :-)05:55
sabdfli've figured out the actual widget bit05:55
sabdflnow need to figure out the wrapper05:55
sabdflthe bit that puts the summary etc there05:55
sabdflthe text05:55
sabdflright now it uses the title05:55
BradBjblack: it's one of two problems. either your pythonpath isn't correct or you need to import that module specifically in zcml.05:55
sabdflbut the hand crafted fields look a lot better, present more info05:56
BradBjblack: (probably the latter)05:56
sabdfli'm going to try to figure out the rest tomorrow05:56
jblackYeah. Odds are that ubuntu has a sane importpath.05:56
jblackpardon. sane pythonpath.05:56
BradBsabdfl: sounds promising though05:56
jblackit would be odd that a zope instance doesn't import zope though, wouldn't it? 05:57
sabdflnight all05:57
BradBnight sabdfl 05:57
jblacksleep well boss.05:58
BradBjblack: there are easy ways of testing this though05:58
BradBmm, no, scratch that (there are, but scratch that)05:59
jblackI haven't gotten the unit testing working yet either.05:59
jblackOhhh, yes I have.05:59
jblackThough something still ain't right there. 06:01
jblack  >>> bud = Buddy('Bob', 'Smith')06:01
jblack  >>> bud.name()06:01
BradBjblack: how are you starting z3?06:01
jblackI was trying bin/runzope06:02
jblackbtw, before I added the interface stuff, I was able to add buddies in the web interface.06:04
BradBcan you paste the whole traceback? i'm learning here too, because i've never seen an error like that, but it's almost surely something really straightforward, given enough context.06:05
dilysMerge to rocketfuel@canonical.com/launchpad--devel--0: a basic widget for bug summaries (patch-678)06:08
BradBjblack: for one, you've got a syntax error in the zcml06:11
BradBfor ".interfaces.IBuddy"06:11
jblackI believe you, but that's a straight paste from the tutorial06:12
BradBthrough an = sign in there and see if that changes anything06:13
BradBafter than, try commenting out that require and see what happens06:13
jblack(thats slide 16)06:15
jblackThere's nothing in the name method. Maybe the slide cut it.06:15
BradBnope, it's an interface06:16
BradBbut there's either a syntax error in that python code as well (indentation error), or a mix of tabs and spaces.06:16
jblackI did find the missing = in configure.zcml though06:18
jblackoh. found a missing import06:21
jblackand a missing import re, and it works. 06:21
jblackNow if I could just figure out why it stopped listening on port 8081...06:23
jblackThanks for the help bradb. I'm back on track06:28
BradBcool, no prob06:29
jblackWHoo! 06:37
=== BradB is now known as BradB|zzz
=== netjoined: irc.freenode.net -> sendak.freenode.net
=== ChanServ [ChanServ@services.] has joined #launchpad
=== mako [~mako@micha.hampshire.edu] has joined #launchpad
=== sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
=== spiv [~andrew@fuchsia.puzzling.org] has joined #launchpad
=== daf [daf@muse.19inch.net] has joined #launchpad
=== dilys [daf@muse.19inch.net] has joined #launchpad
=== elmo [~james@] has joined #launchpad
=== SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad
=== lifeless [~robertc@dsl-] has joined #launchpad
=== jblack [~jblack@static-209-158-45-74.scr.east.verizon.net] has joined #launchpad
=== mdz [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad
=== netjoined: irc.freenode.net -> sendak.freenode.net
=== ChanServ [ChanServ@services.] has joined #launchpad
=== mako [~mako@micha.hampshire.edu] has joined #launchpad
=== sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad
=== spiv [~andrew@fuchsia.puzzling.org] has joined #launchpad
=== daf [daf@muse.19inch.net] has joined #launchpad
=== dilys [daf@muse.19inch.net] has joined #launchpad
=== elmo [~james@] has joined #launchpad
=== SteveA [~steve@adsl-213-190-44-43.takas.lt] has joined #launchpad
=== lifeless [~robertc@dsl-] has joined #launchpad
=== jblack [~jblack@static-209-158-45-74.scr.east.verizon.net] has joined #launchpad
=== mdz [~mdz@69-167-148-207.vnnyca.adelphia.net] has joined #launchpad
=== carlos_ [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad
=== carlos_ is now known as carlos
=== ddaa [~ddaa@nemesis.xlii.org] has joined #launchpad
=== BradB|zzz is now known as BradB
=== BradB [~bradb@modemcable165.196-131-66.mc.videotron.ca] has joined #launchpad
sabdflSteveA: around?05:12
=== BradB is now known as BradB|out
=== carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad
SteveAhey sabdfl09:01
sabdflhiya SteveA09:01
sabdflwell it's been an interesting tour of zope3 form autogeneration this weekend :-)09:02
SteveAis it hot or not?09:02
sabdfli'm trying to establish if i can get some of our autogenerated forms to looks as god as the hand-crafted ones09:02
sabdfllarge amounts of effort for little return so far09:02
sabdflskimpy docs, the usual09:02
sabdflwanted to lob a few eggs in your direction but didn't want to disturb the w/e09:03
SteveAwhen I used it on a project a while ago, I ended up nor using the standard "edit form" stuff, but using a custom variant on it.09:03
sabdflseems that stub knows a bit about it and has been laying the foundations in malone09:03
SteveAI haven't kept up with changes to it, though09:03
sabdflyou would be better placed than me to do custom variants on machinery that's a little outside my immediate ken :-)09:04
sabdflanyhow, i'm slowly coming to grips with it09:04
SteveAthe thing I found was that is was very easy to waste a lot of time making a particular form work, if that form goes outside one of the assumptions behind the autogenerated form machinery.09:05
SteveAif you notice these soon enough, and do them manually, it's okay09:05
SteveAif you don't... lots of painful and non-obvious coding around things09:05
sabdflwell, limi has set the bar quite high in terms of the look we should expect from our forms09:06
sabdfli think we are going to have to produce a set of custom field and widget classes09:06
sabdfli want to hammer on this a while and then we can discuss a general system for the team09:06
sabdfli am thinking at the moment that we might produce a mixin class for widget and field09:07
sabdflbecause mainly i want to put the same decoration on any kind of field09:07
sabdflbut there are also potentially custom requirements for context-aware fields09:07
SteveAnot sure we'd need new fields, except where we've got a truely new kind of thing09:07
SteveAI think pov have done a lot of work on these09:08
SteveAcertainly marius has been filing and fixing bugs in it recently09:08
sabdflcurrent fields allow for title, description, required09:08
sabdflyes, found him on a couple of proposals related to this09:08
sabdflwhich sounded rather sane09:09
sabdflyou have a good weekend?09:10
SteveAnot bad.  more of a lazy weekend, catching up on sleep and generally hanging out09:10
sabdfltried to sleep but had total insomnia09:11
SteveAtry more exercise?09:12
SteveAthen again, I find if I exercise too much, it stops me from sleeping09:13
sabdflyes i think i'm the latter stage09:14
sabdfltoo much to think about at the moment09:14
sabdflok, so i'm using the normal addform machinery09:14
sabdflwith a custom pt09:15
sabdflthere's this sort of useful-looking hook:09:16
sabdfl        <div metal:define-slot="extra_info" tal:replace="nothing">09:16
sabdfl        </div>09:16
sabdflhow do i pass information to that?09:16
SteveAdo you know about METAL ?09:16
SteveAIf not, I should explain just a little about that first.09:16
SteveAwe use two namespaces in page templates: tal: and metal:09:17
SteveAthe metal: is for "macro processing".  The metal directives get processed first, and then the resulting template is treated as a whole for tal: expressions.09:17
SteveAthink of it like #includes.09:18
SteveAThe div above defines a slot called "extra_info".  You can fill it from your template with <div metal:fill-slot="extra_info">09:19
sabdflThis is at the top of the pt:09:20
sabdfl      metal:use-macro="context/@@malone_template/master"09:20
SteveAwhere is that hook that you pasted?09:20
sabdflabout halfway into the page09:21
SteveAin which page?09:21
sabdfli've actually copied it to bug-addform and started to use that09:22
sabdfli'm adding some of the plone-style widget decoration09:23
sabdflfieldset etc09:23
sabdflalso, i'll want to figure out this line:09:25
sabdfl        <div metal:use-macro="context/@@form_macros/widget_rows" />09:25
sabdflwhere is widget_rows defined?09:25
sabdflhey it's sunday don't boil too many eggs on my account09:26
sabdflok, i found widget_macros.pt09:27
sabdflin lib/zope/app/form/browser09:28
sabdfli'll want to customise that, how do i do that?09:28
=== sabdfl can hear the hamster's wheel spinning
SteveAin the zcml directive for addforms, there's a 'template' attribute, and a 'default_template' attribute09:29
sabdflthe template is what i'm customising already09:33
sabdflwhat's the default template?09:33
SteveAoh, red-herring09:33
SteveAas far as I can tell, the extra_info slot is for when you're using the standard zope template, and you want to be able to do certain customizations without coming up with a new template of your own.09:35
sabdflcan the view push data into the slots at all?09:35
sabdfloh, so the standard rendering of this uses another template and fills that slot?09:35
SteveAI think the way you're supposed to provide your own template for this is that you write a minmal template that uses macros from the default template09:36
sabdflhow about the second question, about customising widget_macros.pt09:36
sabdfloh right09:36
SteveAso, you don't end up copy-pasting the code from zope, but just including the bits you want09:36
sabdflso instead of copying it09:36
SteveAwish there were docs on this, though09:36
sabdfljust write a really small one that pushes in heading and extra info etc09:37
sabdflok, that's quite nice09:37
sabdflbecause we can do a single master addform template for launchpad09:37
SteveAyeah, I guess so.  I think you'd need some way of specifying that you want to use macros from the standard add form09:37
SteveAyeah, that would work09:37
SteveAin fact, we'd need a StandardMacros object then09:37
sabdflnow, about the second questions09:37
sabdflhow do i override that to be something else?09:38
SteveAthat's what we did in zope3 -- rather than have to remember which template exactly has the macros you want, you have an object that collects macros from a bunch of useful "basic" template09:38
=== SteveA looks at widget_macros.pt
sabdfli want to redefine widget_rows09:39
SteveAin the configure.zcml of that package, I see that you can get the widget_macros.pt template as a view on anything, called widget_macros09:39
SteveAwell, there are two ways to do this09:40
SteveAyou can redefine the widget_macros view for the launchpad layer09:40
SteveAmost straightforward way is to make your own copy-paste-altered version of widget_macros.py09:41
sabdflright, just copy it and customise it and make it available under a different name09:41
SteveAer .pt09:41
SteveAbut, make it available under the *same name*09:41
SteveAbut in the launchpad layer09:41
SteveAby using the launchpad layer, we're saying "we can override the defaults in zope in the context of the launchpad application"09:42
SteveArosetta and malone layers extend the launchpad layer09:42
sabdflhow do i register it for the launchpad layer?09:42
SteveA  <browser:page09:43
SteveA      for="*"09:43
SteveA      name="widget_macros"09:43
SteveA      layer="canonical.launchpad.layers/LaunchpadLayer"09:43
SteveA      permission="zope.Public"09:43
SteveA      template="widget_macros.pt"09:43
SteveA      />09:43
sabdfli'm going to put the registration into zcml/bug.zcml for the moment, because those are the add/edit forms i want to fix first09:43
SteveAwith the template in the correct place, of course09:43
SteveAso, whatever is currently using widget_macros will get it as context/@@widget_macros09:43
sabdflis there a more appropriate zcml file for this?09:43
SteveAand, it will automatically get your version inside launchpad09:44
SteveAlaunchpadlayer-stuff.zcml ?09:44
SteveAlaunchpad-widgets.zcml ?  launchpad-forms.zcml ?09:44
SteveAthe latter, I suppose09:44
SteveAthis is all about how we want forms to look in launchpad09:45
sabdfllet me get it right in the bug stuff, then we can move it09:46
sabdflcan i replace * with something more localised?09:46
sabdflis the / intentional?09:47
SteveAno, it is wrong09:47
SteveAshould be a .09:47
SteveAyou could replace * with IMaloneBugThing or whatever you're working on09:47
SteveAif the change is meant only for that one thing09:47
sabdflis it the interface of the context?09:48
SteveAyes, exactly09:48
sabdflor the container that has the addform?09:48
SteveAI expect this will be looked up as context/@@widget_macros09:48
SteveAoh, that could get a bit more complex09:48
SteveAthere's IAddings involved there -- views on views09:48
SteveAerm -- maybe stick with "*"09:48
SteveAI should go make food, and then watch donnie darko on dvd.09:49
sabdflweird movie09:50
SteveApicked up the dvd at the airport for three quid09:52
SteveAas the director's cut was out for about 2009:52
SteveAand being heavily advertised09:53
=== SteveA --> cooking
sabdfldirectors cut might be interesting09:55
sabdflSteveA: can't seem to access my custom copy of the widget10:05
sabdflit's not being used, the old one is10:05
SteveAAs a debugging measure, try declaring it not in the launchpad layer, but without a layer attribute, and declare it for zope.interface.Interface, not for *10:49
SteveAthat's a crappy way of getting it registered, but if it works, it shows that you're not doing anything wrong, and for some reason the layer isn't being used.10:50
SteveA(it was too late at night to watch a full film after eating, so we've settled for an episode or two of futurama instead)10:50
sabdflstill around?11:22
sabdflstevea: ^?11:22
SteveAyeah, just about11:24
=== SteveA pings sabdfl
sabdflso i'm now crafting the actual template11:26
sabdflthe one which will fill the slots of the default_template11:26
sabdfland i've no idea what that one's header should look like11:27
sabdflshould it refer explicitly to the launchpad-addform.pt?11:27
sabdflor is that all handled by the machinery?11:27
sabdfland here's where it gets interesting11:27
sabdflthe addform template itself is clearly referring to a master template11:27
SteveAis launchpad-addform.pt registered as a view on anything?11:28
sabdflso can these templates be layered in a stack?11:28
sabdflyes, it works as the view on a bug add11:28
sabdfli' now trying to generalise it11:28
sabdflso that for new add forms we just make a tiny template11:28
sabdflthat has the appropriate document description, headings etc11:28
SteveAprovided each template is registered as a view on something, sure, you can use many of them using bits of each other11:28
sabdflok, so let's assume there are three of them11:29
SteveAthe general model is using a macro, which has slots in it11:29
sabdflin the default-addform, when there is a fill-slot, that would fill a slot in the master?11:29
sabdfland when there's a define-slot, that's something the table-addform can fill?11:30
SteveAassuming default-addform has a use-macro refering to a macro of the master template11:30
SteveAyou're filling a slot of whatever macro you're inside of, in the code of the template the fill-slot is in11:31
sabdflso for the table-addform do i need a use-macro?11:32
sabdflor does the addform machinery automatically do that11:33
sabdflgiven that it has default_template for the default-addform11:33
SteveAfrom the code I saw, the default_template is what is used if you don't supply a "template"11:34
sabdflerm that doesn't make sense to me11:35
SteveAyou don't need to supply a 'template' in your zcml11:35
sabdflwhy have both "template" and "default_template" attributes11:35
SteveAthere is a default 'template' that is used instead11:35
SteveA'default_template' isn't meant to be used in zcml11:35
SteveAit can be used if you subclass the class, I think11:35
sabdflthat's not what i understood previously11:35
sabdflit seems as if this addform, which is copied from the zope dir, is designed to be used as an "intermediate" template11:36
SteveAI'm still not sure I understand -- I only skimmed throught the code.11:36
sabdflas i described above11:36
sabdflin any event, say i want to refer to the template directly, from another template11:36
sabdflhow do i do that?11:36
SteveAI suppose it would use the macros and slots of the master template11:36
SteveAif you want to use macros from a template11:37
SteveAthen first you need to get to the template.  usually, they are registered as views on an object.  so, context/@@view_name11:37
sabdflwhat would be the name?11:37
SteveAfor widget_macros.pt it was widget_macros11:38
SteveAit is whatever it is registered in zcml as11:38
sabdflhmm.. this is getting murky again11:38
sabdflok, here's what i understood11:38
sabdfland what makes some sense11:38
sabdflthat it's pssible to define a general site-wide template11:39
SteveAwhere you want to use a particular macro, you put  metal:use-macro="context/@@view_name/macro_name"11:39
sabdfland then a custom template will use that one11:39
SteveAif you explicitly use the site-wide template's macros in your custom template, yes11:39
SteveAthe building blocks you have are metal:use-macro="context/@@view_name_of_template_with_macros/macro_name"11:40
SteveAand filling slots in that macro inside the element you chose to use the macro from11:40
SteveAusually, we suse the macro on the whole template (the html element)11:40
SteveAand fill the "body" slot, (or "page" slot or "content" slot) and perhaps others11:41
SteveAthat's the most basic way to use macros11:41
sabdflok, this will take some fiddling11:41
SteveAyou can also use macros to include any parts of another template where you can 1. get at the template and 2. that template has defined appropriate macros around the parts of it you want to reuse elsewhere11:41
sabdfldo the attributes of the macro override the attributes of the element in the calling document?11:41
SteveAyou mean the element where you say "metal:use-macro" ?11:42
SteveAnote that this isn't "calling" at all.  it will become very confusing if you think of it like that. 11:42
SteveAit is "including"11:42
sabdflok, so they supplement them11:42
SteveAyou're building up a synthetic page template (that you'll never see) from parts of other templates plus your own11:42
SteveAthat whole template is then "executed" in terms of its tal:11:43
SteveAin the element where you say "metal:use-macro", I think the whole element disappears11:43
SteveAbut, I may be mis-remembering11:43
SteveAbasically, the whole element disappears, except where you have slots inside it11:44
SteveAyeah -- that must be so, because of how in the simple use of metal, you put use-macro in the html element of your template11:44
sabdflso basically, a use-macro in the html element wipes out the document?11:44
SteveAthat nukes your html element, and in fact your whole template, except where you have said "metal:fill-slot"11:44
SteveAuse-macro in an element says "I want what the other template says for this element.  except where I fill its slots"11:45
sabdflcant be11:45
sabdfllet me check11:45
sabdflblow me down, seems true11:48
sabdflcan you have both fill-slot and define-slot elements inside a use-macro?11:48
sabdflfor layered templates?11:48
SteveAit can get complex pretty quickly, though11:52
SteveAespecially as the exact "include" nature of macros is a bit subtle11:52
sabdflyeah, this default-addform is fun11:55
sabdflis has a use-macro in the html11:55
sabdflthen it fill-slot's the "main" slot11:55
sabdflinside that, it has both define-macro ("formbody" and "addform" etc) and define-slot elements11:56
SteveAmaybe you can draw a "map" of it in dia?11:56
SteveAmight help with maintenance11:56
=== SteveA -> bed
sabdflwill try to write it up once i've got it working the way i want11:57

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!