Hi

Often a transitional view is used to move objects between parents. For
example the calendar application allows you to drag a view (the event)
from one day to another. This makes it look like you are changing the
parent of the view but really you aren't. To create the transitional
view make sure it is on the same view plane as the views you are
planning to be able to drag across (You can position it by using
bringToFront or sendToBack methods). When the drag begins to happen
(onclick event) position the transitional view by getting the relative
position of the child view compared to the view plane the transitional
view is on (getAttributeRelative), hide the view that was clicked and
(generally) set the datapath pointer for the transitional view from
the hidden child. The user can then drag the transitional view till
they want to drop it. You then need to determine where they are
dropping it (usually by iterating through the subviews collection and
performing a getAttributeRelative to determine the position of the
subview), lastly you update the data that the transitional view is
using. This is totally dependent on what you are planning on,

Anyways like I said the calendar application goes into this in a lot
more detail. and there is an example (if you read a bit further) in
chapter 37 section 9 on how to move datapointers to different paths.
Hope this helps

z



On 6/13/07, Can Barışcan <[EMAIL PROTECTED]> wrote:
In the forum I've seen someone say : you can't change parent dynamically.
Oh well.  I'll try to hack it in some other way.



Reply via email to