Alright I’ll try and explain this.
I have a set of listboxes and functions that let you move items between the different groups.
A “Group” listbox changes the view of items that are shown in a TableListBox. then if you click on an item in that Table , you can move it to another listbox(ActiveListBox)
the TableListBox and ActiveListBox are both hosted in the Group Listbox class.
I am using pointers to the XmlElements and I pass those into the two ListBoxModels and run numRows = getNumChildElements() on those pointers to get them to draw the ListBox.
there is a pointer to the XML document that is used to host all the data, since I am basing my app off of the tableListBoxModel tutorial this is still:
rather then passing that pointer into the listbox model and executing things like writeToXml(); within each listboxmodel i thought I would set it up so the tables ONLY display data that is passed into them, and the writing and moving around of the data would occur in the class that is hosting both of those listboxes. This works fine when I use buttons to activate all the functions because I can just host those buttons within the hosting class for everything. the problem is that I would like to use right click menus and they can only access functions within the class they are owned by.
so I’ve created functions within that class that calls functions outside the class and they seem to work for basic things like an Alert Window but when I pass in any of the pointers to any of the XMLobjects or try to call a function in any of the child classes it crashes.
Ive set up a basic example to show what is causing a crash (psuedo code) :
// function to delete selected items (works)
//right click menu if result is one
//right click menu if result is 2 do this
that is the basic structure of what I am trying to accomplish, though if I select option 1 in the right click menu it works, but when I select option 2 it doesn’t work.