View previous topic :: View next topic |
Author |
Message |
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Thu Jun 29, 2006 8:46 pm Post subject: MenuItems order |
|
|
Maybe it's a silly question, but... Why when you add menu items, like in this code:
Code: |
MenuItem item = new MenuItem();
item.menuItems.add(new MenuItem()); // 1
item.menuItems.add(new MenuItem()); // 2
|
the menu appears like this:
?
It's like the menus are pushed down when you add them. Why?
You can see a sample code of this in "client.d" from the DFL examples. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Jun 29, 2006 10:35 pm Post subject: Re: MenuItems order |
|
|
asterite wrote: | It's like the menus are pushed down when you add them. Why?
You can see a sample code of this in "client.d" from the DFL examples. |
Because their index are default 0 which add to the top. There's a shortcut, you can just use menu ~= menuitem and it appends as the last menu item. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sat Jul 01, 2006 11:37 am Post subject: Re: MenuItems order |
|
|
Chris Miller wrote: | There's a shortcut, you can just use menu ~= menuitem and it appends as the last menu item. |
Sorry, I didn't see it is explained in the documentation: http://wiki.dprogramming.com/DflDoc/Menu, http://wiki.dprogramming.com/DflDoc/Menu-Menu-opCatAssign, http://wiki.dprogramming.com/DflDoc/Menu-Menu-MenuItemCollection-add
I'll try to fill out the documentation as I find doubts and stuff like that. But I wonder if my english is good enough for that.
I also think a little comment should appear next to each member of a Class, instead of having to click the member to find out what it is (just like Javadoc works, and I think DDoc also uses the first paragraph for this).
Also: why edit the documentation online instead of attaching it to the code and then generating it with DDoc or some other tool (like CandyDoc)? I can see this is working a bit like this (there are some directives like "(:includefile menu.dfl.html:)" but I can't seem to reach those html pages).
Any way I can help, let me know. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun Jul 09, 2006 7:19 pm Post subject: Re: MenuItems order |
|
|
asterite wrote: | Also: why edit the documentation online instead of attaching it to the code and then generating it with DDoc or some other tool (like CandyDoc)? I can see this is working a bit like this (there are some directives like "(:includefile menu.dfl.html:)" but I can't seem to reach those html pages). |
I would have done that if DDoc was out sooner, but most of DFL was already done. I'll probably go back and add DDoc comments when porting to other platforms. |
|
Back to top |
|
|
|