View previous topic :: View next topic |
Author |
Message |
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Fri Nov 30, 2007 12:34 am Post subject: Changing menus |
|
|
There doesn't seem to be any way to remove menu items once they've been added. Am I just missing it?
Here's the doc page:
http://wiki.dprogramming.com/DflDoc/Menu
There are "add" methods but no "remove" methods.
How is one supposed to implement something like the MDI list of windows menu? I see the MDI example side-steps the issue by simply not having any real menus. Not exactly the solution I was looking for.
Or the "recent files" list is another good example of a menu that changes.
Entice itself doesn't have either of those features, so I'm guessing it's just impossible? |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Nov 30, 2007 10:09 am Post subject: Re: Changing menus |
|
|
All collections in DFL should have these base methods: add, addRange, clear, contains, indexOf, insert, remove, removeAt; from dfl.collections. They get mixed-in so aren't friendly to the documentation generator, which I hope to improve soon.
So to answer your question, you can use mymenu.menuItems.remove(item) or mymenu.menuItems.removeAt(index).
Entice doesn't have such a menu because I prefer the recent list on the start page. |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Fri Nov 30, 2007 11:41 am Post subject: |
|
|
Ok. Great! I added that info to the Menu documentation page. |
|
Back to top |
|
|
|
|
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
|