
Fri, 10/03/2008 - 16:26
Forums:
Hi
I am trying to understand how local contexts work and I have a problem about them. When I create a shape, I don't want any open local context thats why I close all contexts first using CloseAllContexts(). And for selection mode, I open a local context. This way worked fine until I try to create shapes using selected shapes i.e. when I create a shape using the shape from SelectedShape(), I close the context and I get segmentation fault for next MoreSelected() call. Any advice?
Thanks
xaeroxx
Sat, 10/04/2008 - 07:08
Hi,
I'm not sure exactly what you're trying to do but this may help.
You can select shapes (only shapes not edges, verticies, etc.) without opening a local context. They are referred to as current. Try getting the current shape and using MoreCurrent() instead of MoreSelected().
Mon, 10/06/2008 - 11:05
Thanks, but I should select edges, vertices etc. so I think I should use local context
Mon, 10/06/2008 - 09:57
My guess is that closing the current local context invalidates the list of selected shapes, so a call to MoreSelected and such will surely try to access a list/elements that exist no more. If you want to get all selected shapes, do so before closing the context.