CheckListboxItem in ItemListbox is not saved by LayoutEditor

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

ncoppola
Just popping in
Just popping in
Posts: 3
Joined: Mon Aug 17, 2009 19:40

CheckListboxItem in ItemListbox is not saved by LayoutEditor

Postby ncoppola » Mon Aug 17, 2009 20:36

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.

User avatar
scriptkid
Home away from home
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

Postby scriptkid » Tue Aug 18, 2009 08:04

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 :D

HTH.
Check out my released snake game using Cegui!

User avatar
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

Postby CrazyEddie » Tue Aug 18, 2009 08:34

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.

hermit purple
Just popping in
Just popping in
Posts: 13
Joined: Wed Oct 21, 2009 20:21

Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor

Postby hermit purple » Thu Nov 19, 2009 19:30

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?

r0br0y
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Thu Apr 08, 2010 09:36

Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor

Postby r0br0y » Thu Apr 08, 2010 09:47

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

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor

Postby Jamarr » Thu Apr 08, 2010 15:05

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.

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!

r0br0y
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Thu Apr 08, 2010 09:36

Re: CheckListboxItem in ItemListbox is not saved by LayoutEditor

Postby r0br0y » Fri Apr 09, 2010 09:56

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

User avatar
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

Postby CrazyEddie » Mon Apr 12, 2010 09:02

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.


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: Google [Bot] and 0 guests