Hey all,
As a sample for my project I tried adding a CheckListboxItem (from this tutorial) to an ItemListbox in CELayoutEditor. I made the CheckListboxItem a child of the ItemListbox, but the CheckListboxItem didn't save with the layout file. It happens just the same with just using a ListboxItem. Manually adding the CheckListboxItem or ListboxItem to the layout file works just fine though.
Am I wrong in my understanding that ItemListbox uses child widgets as its items, and should be doing this through some other means?
As an aside: I know that you can't (to my knowledge) add items to widgets like the Listbox or Combobox in CELayoutEditor. Are there any plans currently on adding this as a feature, or are we going to be left with just adding it through code?
Thanks.
CheckListboxItem in ItemListbox is not saved by LayoutEditor
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
Hi and welcome
Coindicentely (and luckily), this week i am reworking the 'filtering' behaviour of the editor. While updating the documentation i was running some tests, and things just don't work out very convienent at this moment.
One problem (which you ran into) with the current filtering is that the editor checks on the widgetname, where it should look at the underlying mapping. For example you could add your 'CheckListboxItem', because the editor only filters on 'ListboxItem'. But they are the same, since they both map to an 'ItemEntry'. So i should check against a different value. Do you understand this?
The filtering was actually added to provide some help in avoiding weird layouts (such as adding a scrollbar to a button). But on the other hand, i might loosen things up a bit and rely on our users common sense
HTH.
Coindicentely (and luckily), this week i am reworking the 'filtering' behaviour of the editor. While updating the documentation i was running some tests, and things just don't work out very convienent at this moment.
One problem (which you ran into) with the current filtering is that the editor checks on the widgetname, where it should look at the underlying mapping. For example you could add your 'CheckListboxItem', because the editor only filters on 'ListboxItem'. But they are the same, since they both map to an 'ItemEntry'. So i should check against a different value. Do you understand this?
The filtering was actually added to provide some help in avoiding weird layouts (such as adding a scrollbar to a button). But on the other hand, i might loosen things up a bit and rely on our users common sense
HTH.
Check out my released snake game using Cegui!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
ncoppola wrote:As an aside: I know that you can't (to my knowledge) add items to widgets like the Listbox or Combobox in CELayoutEditor. Are there any plans currently on adding this as a feature, or are we going to be left with just adding it through code?
Currently this is not possible, since CELayoutEditor deals in Window based objects and those other list types do not support items that are Window based. This is a limitation of CEGUI itself rather than CELayoutEditor.
Eventually CEGUI will offer a single, unified, listbox-like class; one listbox to rule them all! And this will support the ItemEntry model for adding content from layouts (as is possible with the existing ItemListbox).
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Just popping in
- Posts: 13
- Joined: Wed Oct 21, 2009 20:21
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
I don't understand why this is a limitation in CEGUI and not in Layout Editor. I tried manually adding two ListboxItem into ItemListbox and it loads properly in my app. It even loads properly in Layout Editor. It's just that when saving in Layout Editor, it leaves out the two ListboxItem. It seems to be a bug in Layout Editor.
I also try nested objects like a Listbox with several ListboxItem in it and Layout Editor saves them without any problem. Why is it only ListboxItem that got left out when saving layout?
I also try nested objects like a Listbox with several ListboxItem in it and Layout Editor saves them without any problem. Why is it only ListboxItem that got left out when saving layout?
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
Hi,
same problem here:
I can add listboxitems to a itemlistbox in the layout-xml or the editor, load and display it with the editor properly but when saving the layout in the editor all items are gone...
thanks for any advice
rob
same problem here:
I can add listboxitems to a itemlistbox in the layout-xml or the editor, load and display it with the editor properly but when saving the layout in the editor all items are gone...
thanks for any advice
rob
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
I think you misunderstood the above posts. There are two separate issues mentioned here. I will try to explain them as plainly as possible:
1 - The CELayoutEditor has a poorly implemented filtering mechanism. Because of this, custom windows like CheckListboxItem will not be saved in the layout file. It sounds like ScriptKid is already working on fixing this issue.
2 - The Listbox and Combobox windows do not support ItemEntry (or window-based) items. Since the layout files (and in turn, CELayoutEditor) only handle window-based widgets, you cannot use the editor or layout files to add non-window based items to the Listbox or Combobox.
You obviously did not test this out very thoroughly. Even though you can nest ListboxItem's in a Listbox in the CELayoutEditor, those nested items are not managed by the Listbox class. You can only add managed items to the Listbox control via code. Really, the CELayoutEditor should not allow this behavior.
1 - The CELayoutEditor has a poorly implemented filtering mechanism. Because of this, custom windows like CheckListboxItem will not be saved in the layout file. It sounds like ScriptKid is already working on fixing this issue.
2 - The Listbox and Combobox windows do not support ItemEntry (or window-based) items. Since the layout files (and in turn, CELayoutEditor) only handle window-based widgets, you cannot use the editor or layout files to add non-window based items to the Listbox or Combobox.
I also try nested objects like a Listbox with several ListboxItem in it and Layout Editor saves them without any problem.
You obviously did not test this out very thoroughly. Even though you can nest ListboxItem's in a Listbox in the CELayoutEditor, those nested items are not managed by the Listbox class. You can only add managed items to the Listbox control via code. Really, the CELayoutEditor should not allow this behavior.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
Jamarr wrote:1 - The CELayoutEditor has a poorly implemented filtering mechanism. Because of this, custom windows like CheckListboxItem will not be saved in the layout file. It sounds like ScriptKid is already working on fixing this issue.
Sounds good! will this be available at the trunk? if yes when (roughly)?
Jamarr wrote:2 - The Listbox and Combobox windows do not support ItemEntry (or window-based) items. Since the layout files (and in turn, CELayoutEditor) only handle window-based widgets, you cannot use the editor or layout files to add non-window based items to the Listbox or Combobox...Even though you can nest ListboxItem's in a Listbox in the CELayoutEditor, those nested items are not managed by the Listbox class. You can only add managed items to the Listbox control via code. Really, the CELayoutEditor should not allow this behavior.
Makes sense
thanks
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor
r0br0y wrote:Sounds good! will this be available at the trunk? if yes when (roughly)?
Scriptkid is currently taking some time off. As such no progress is being made as regards to work on the layout editor, and no estimates are available for implementation of features or bug fixes.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Unofficial CEGUI-Related Tools”
Who is online
Users browsing this forum: No registered users and 1 guest