So I am sitting here a little uncertain about how to correctly use CoredNodePtr's with beginEditCP/endEditCP.

Some code for an example:

CoredNodePtr<Transform>  root_transform;

beginEditCP(root_transform);
  root_transform->setMatrix(m);
endEditCP(root_transform);


It appears from the API documentation for CoredNodePtr that this code would issue a begin edit on the "node" part of the cored node pointer and not on the core part (because of the operator FieldContainerPtr). This seems to be exactly what I would not expect it to do. :(

I think there are 3 cases for what it could do:

- flag the core for edits
- flag the node for edits
- flag both of them for edits

Since the dereference operator makes the root_transform "look" like a core pointer I would expect that most people would think of the first option being the one to happen.

Anyway, how should I be using this?

Something like this???:

beginEditCP(root_transform.core());
  root_transform->setMatrix(m);
endEditCP(root_transform.core());

This still seems a little odd.

-Allen


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to