|
an class="rem">- # Author area
- pair("AuthorArea", viewAttribute=u"author", position=0.19,
- childrenBlocks = [
- label("AuthorLabel", title=u"author"),
- field("AuthorAttribute", title=u"author"),
- ]
- ),
</span><span class="add">+ # Date area
+ detail.makeArea(parcel, &quot;DateArea&quot;,
+ position=0.4,
+ childrenBlocks = [
+ detail.makeLabel(parcel, _(u&quot;date&quot;), borderTop=2),
+ detail.makeSpacer(parcel, width=8),
+ detail.makeEditor(parcel, 'date',
+ viewAttribute=u'date',
+ border=RectType(0,2,2,2),
+ readOnly=True,
+ stretchFactor=0.0,
+ size=SizeType(90, -1)),
+ ],
+ ).install(parcel),
</span><span class="cx">
</span><span class="rem">- # Date area
- pair(&quot;DateArea&quot;, viewAttribute=u&quot;date&quot;, position=0.4,
- childrenBlocks = [
- label(&quot;DateLabel&quot;, title=u&quot;date&quot;),
- DateDetail.update(parcel, &quot;DateAttribute&quot;,
- title=u&quot;date&quot;,
- characterStyle=blocks.LabelStyle,
- stretchFactor=0.0,
- textAlignmentEnum=&quot;Left&quot;,
- ),
- ],
- ),
</span><span class="add">+ detail.makeSpacer(parcel, height=7, position=0.8999).install(parcel),
+
+ FeedItemDetail.update(parcel, &quot;ItemBodyArea&quot;,
+ position=0.9,
+ blockName=&quot;articletext&quot;,
+ size=SizeType(100,50),
+ minimumSize=SizeType(100,50),
+ ),
+ ]
</span><span class="cx">
</span><span class="rem">- # Category
- pair(&quot;CategoryArea&quot;, viewAttribute=u&quot;category&quot;,
- position=0.2,
- childrenBlocks = [
- label(&quot;CategoryLabel&quot;, title=u&quot;category&quot;),
- field(&quot;CategoryAttribute&quot;,
- title=u&quot;category&quot;, stretchFactor=1.0
- ),
- ]
- ),
- ],
</span><span class="add">+
+ # The DetailTrunkSubtree ties the blocks to our FeedItem's Kind.
+ detail.DetailTrunkSubtree.update(parcel, &quot;ChannelSubtree&quot;,
+
+ # This ensures that this detail view gets attached to feed items
+ key = feeds.FeedItem.getKind(parcel.itsView),
+ rootBlocks = feedItemRootBlocks,
</span><span class="cx"> )
&lt;/pre&gt;
&lt;p /&gt;
</span><span class="rem">-Each &lt;code&gt;rootBlocks&lt;/code&gt; attribute refers to a widget or fragment of user interface which will be displayed in the Detail View. Chandler will ensure that these user interface fragments will display and edit the correct data in a consistent way.
</span><span class="add">+The &lt;code&gt;rootBlocks&lt;/code&gt; attribute of the &lt;code&gt;DetailTrunkSubtree&lt;/code&gt; refers to a widget or fragment of user interface which will be displayed in the Detail View. Chandler will ensure that these user interface fragments will display and edit the correct data in a consistent way. For the details on the feedItemRootBLocks, you'll need to look at the &lt;a href=&quot;http://chandler.osafoundation.org/docs/0.6/feeds-tutorial.html&quot;&gt;feeds tutorial&lt;/a&gt;. You cand find a list of all the available blocks &lt;a href=&quot;cpia-blocks.html&quot;&gt;here&lt;/a&gt;.
</span><span class="cx"> &lt;p /&gt;
&lt;h2&gt;&lt;a name=&quot;Loading_the_Items_into_Chandler&quot;&gt; &lt;/a&gt;&lt;a name=&quot;Loading_the_Items_into_Chandler_&quot;&gt; &lt;/a&gt; Loading the Items into Chandler: Parcels &lt;/h2&gt;
&lt;p /&gt;
</span><span class="lines">@@ -484,20 +369,20 @@
</span><span class="cx"> &lt;p /&gt;
&lt;strong&gt;Behind the scenes:&lt;/strong&gt; The Python code for Kinds and Items is merely a bootstrapping mechanism to get data loaded into the Repository. The Repost;. You cand find a list of all the available blocks &lt;a href=&quot;cpia-blocks.html&quot;&gt;here&lt;/a&gt;.
</span><span class="cx"> &lt;p /&gt;
&lt;h2&gt;&lt;a name=&quot;Loading_the_Items_into_Chandler&quot;&gt; &lt;/a&gt;&lt;a name=&quot;Loading_the_Items_into_Chandler_&quot;&gt; &lt;/a&gt; Loading the Items into Chandler: Parcels &lt;/h2&gt;
&lt;p /&gt;
</span><span class="lines">@@ -484,20 +369,20 @@
</span><span class="cx"> &lt;p /&gt;
&lt;strong&gt;Behind the scenes:&lt;/strong&gt; The Python code for Kinds and Items is merely a bootstrapping mechanism to get data loaded into the Repository. The Reposist argument for the callable
- should be the main view, before *args and **kw.
- @param callable: A Python callable
- @param args: Arguments for callable
- @param kw: Keyword arguments for callable
- &quot;&quot;&quot;
- if withView:
- return callable(self.itsView, *args, **kw)
- return callable(*args, **kw)
-
</span><span class="cx"> def onReplyEventUpdateUI(self, event):
event.arguments['Enable'] = False
def onReplyAllEventUpdateUI(self, event):
</span>
</pre>
</div>
</div>
</body>
</html>
|
Thu, 11 Dec, 12:37 |
|
t;tutorial&lt;/a&gt; on the workings of thep;quot;&amp;gt;get involved&amp;lt;/a&amp;gt; with the Chandler project.
&amp;lt;p /&amp;gt;
&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
|
Tue, 20 Dec, 12:56 |