FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MenuItems order

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Thu Jun 29, 2006 8:46 pm    Post subject: MenuItems order Reply with quote

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:

Code:

2
1


?

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
View user's profile Send private message Yahoo Messenger MSN Messenger
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Jun 29, 2006 10:35 pm    Post subject: Re: MenuItems order Reply with quote

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
View user's profile Send private message
asterite



Joined: 01 Jun 2006
Posts: 235
Location: Buenos Aires, Argentina

PostPosted: Sat Jul 01, 2006 11:37 am    Post subject: Re: MenuItems order Reply with quote

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 Very Happy

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
View user's profile Send private message Yahoo Messenger MSN Messenger
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Jul 09, 2006 7:19 pm    Post subject: Re: MenuItems order Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group