tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/17-drag-and-drop-question-re-using-a-viewRobotlegs: Discussion 2013-04-28T10:30:50Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/6848712009-12-09T16:56:54Z2009-12-09T16:56:54ZDrag and drop question - re-using a view. <div><p>I've done some more simplification of this - here is the new
sequence diagram.</p>
<p><a href="http://tiny.cc/MNYwF">http://tiny.cc/MNYwF</a></p>
<p>It is better, but i feel like i shouldn't be passing the
displayObject around.. But it works, and follows most of the
guidelines in the best practices doc..</p></div>Jos Yuletag:robotlegs.tenderapp.com,2009-10-18:Comment/6848712009-12-11T14:42:12Z2009-12-11T14:42:12ZDrag and drop question - re-using a view. <div><p>Hi Jos,</p>
<p>I feel terrible that I haven't had a chance to look at this at
all. Hopefully someone else will get a chance to dig into it with
you, or I'll manage to free up some time soon.</p>
<p>I'm not sure if this is even remotely related, but don't forget
that mediators can be mapped in such a way as to be auto-created,
but to require manual removal - this might help with re-parenting
issues. Or it might have nothing to do with anything!</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/6848712009-12-11T14:46:18Z2009-12-11T14:46:18ZDrag and drop question - re-using a view. <div><p>Looking very briefly at your latest sequence diagram, and
thinking about your statement "i feel like i shouldn't be passing
the displayObject", perhaps you don't need to.</p>
<p>Maybe you could have a model that maps DOs to VOs. Then all
you'd need to do is pass the VOs around - if anything needs the DO
associated with a VO it can just look it up in the model. Again, I
haven't looked into your specific needs yet, it was just a
thought.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/6848712009-12-11T15:17:22Z2009-12-11T15:17:22ZDrag and drop question - re-using a view. <div><p>That was the direction i was going - i just wasn't sure if a
Model could/should store that info... But that's what a Model does,
right?</p>
<p>Anyway, thanks for even looking at this - i know its of
questionable relevancy to RL... but it does relate to MVC, although
in a more general, non-rl way...</p>
<p>I went ahead with the system I worked out in the previous email
- its working fine. But i think for next time i'll go with your
suggestion - a DO to VO Model. At the least, i'll try it out.</p>
<p>Thanks for spending some of your valuable time with this - i
really appreciate it.</p>
<p>jos</p></div>Jos Yuletag:robotlegs.tenderapp.com,2009-10-18:Comment/6848712009-12-11T15:36:20Z2009-12-11T15:36:20ZDrag and drop question - re-using a view. <div><p>Hey, no problem =)</p>
<p>It depends on how you define what a Model is. I tend to view
Models in my Flex/Flash apps as Models of front-end application
state. I avoid having too much view specific state information, but
I do have some models that exist purely to manage view related
stuff.</p>
<p>PureMVC tends to promote the idea of models (proxies) as
gatekeepers of server-side state. I leave most of that kind of
state to my server, and talk to it via Services. My models are for
my app - and sometimes that includes view state.</p>
<p>Cheers,<br>
shaun</p></div>Shaun Smith