Hi guys,
First please find me naming and explanation of this feature better. It is like you can work with tables easily just by using e cell, e newCell, e newRow etc. See example here: http://www.aidaweb.si/tables . Namely, I just introduced the same convenient composing for all structural tags from divs and spans to new HTML5 headers, footers etc. Most common subdivs can be now created with: e newDiv Until you create a new one with another e newDiv, the current one can be referenced simply by: e div You can nest more divs simply by nesting those calls. Two level divs: e newDiv newDiv And because div is automatically created at first #div call this can become simply as: e div div Now your typical page with ordered list included would look like: MyPAgeApp>>#viewMain | e | e := WebElement new. e newHeader id: #header; addTextH1: 'My page'. e newSection id: #content; addText: 'Here comes my list'. e section newList ordered addText: 'First in list'; addText: 'Second in list'. e newFooter id: #footer; addText: 'My footer'. self add e. Old way looks much uglier, specially list part: MyPAgeApp>>#viewMain | e content list | e := WebElement new (e add: (WebElement newHeader id: #header)) addTextH1: 'My page'. content := e add: (WebElement newSection id: #content). content addText: 'Here comes my list'. list := content add: WebList newOrdered. list addText: 'First in list'; addText: 'Second in list'. (e newFooter id: #footer)) addText: 'My footer'. self add e. Best regards Janko -- Janko Mivšek Svetovalec za informatiko Eranova d.o.o. Ljubljana, Slovenija www.eranova.si tel: 01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565 _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Janko,
8. 8. 2012 v 12:13, Janko Mivšek <[hidden email]>: > Hi guys, > > First please find me naming and explanation of this feature better. > > It is like you can work with tables easily just by using e cell, e > newCell, e newRow etc. See example here: http://www.aidaweb.si/tables . > > Namely, I just introduced the same convenient composing for all > structural tags from divs and spans to new HTML5 headers, footers etc. > > Most common subdivs can be now created with: > > e newDiv > > Until you create a new one with another e newDiv, the current one can be > referenced simply by: > > e div > > You can nest more divs simply by nesting those calls. Two level divs: > > e newDiv newDiv > > And because div is automatically created at first #div call this can > become simply as: > > e div div > > Now your typical page with ordered list included would look like: > > MyPAgeApp>>#viewMain > | e | > e := WebElement new. > > e newHeader > id: #header; > addTextH1: 'My page'. > > e newSection > id: #content; > addText: 'Here comes my list'. > > e section newList ordered > addText: 'First in list'; > addText: 'Second in list'. > > e newFooter > id: #footer; > addText: 'My footer'. > > self add e. This looks really good. The #newHeader #newFooter are HTML5 elements? The code looks very clean compared that bellow, so it is definitely step forward. > > > Old way looks much uglier, specially list part: > > MyPAgeApp>>#viewMain > | e content list | > e := WebElement new > > (e add: (WebElement newHeader id: #header)) > addTextH1: 'My page'. > > content := e add: (WebElement newSection id: #content). > content addText: 'Here comes my list'. > > list := content add: WebList newOrdered. > list > addText: 'First in list'; > addText: 'Second in list'. > > > (e newFooter id: #footer)) > addText: 'My footer'. > > self add e. > > > > Best regards > Janko > > > > -- > Janko Mivšek > Svetovalec za informatiko > Eranova d.o.o. > Ljubljana, Slovenija > www.eranova.si > tel: 01 514 22 55 > faks: 01 514 22 56 > gsm: 031 674 565 > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida I'm looking forward to 6.5 release. Martin _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |