|
Re: MVC Question [message #188769 is a reply to message #188721] |
Fri, 22 July 2005 16:04 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Are you talking about the properties view? If not, your custom property
page is the "controller" and should execute commands directly on the model.
"Josh Reed" <jareed@iastate.edu> wrote in message
news:dbr0u4$pm4$1@news.eclipse.org...
> Here's a simple MVC question.
>
> I have a GEF editor. When you select a figure, there is an associated
> property page with it. If the user modifies a property, do I change the
> model or do I tell the EditPart which changes the model?
>
> Thanks,
> Josh
|
|
|
|
Re: MVC Question [message #188882 is a reply to message #188810] |
Fri, 22 July 2005 20:00 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You need to make it undoable or you may run into consistency problems when
the user undoes the stuff that is undoable/redoable.
"Josh Reed" <jareed@iastate.edu> wrote in message
news:dbrdo6$9gh$1@news.eclipse.org...
> Yeah, I have a custom property page. I made the updates directly on the
> model. The EditPart gets notified of the changes via
> PropertyChangeListeners and updates the Figure accordingly.
>
> Thanks,
> Josh
>
> Randy Hudson wrote:
>> Are you talking about the properties view? If not, your custom property
>> page is the "controller" and should execute commands directly on the
>> model.
>>
>> "Josh Reed" <jareed@iastate.edu> wrote in message
>> news:dbr0u4$pm4$1@news.eclipse.org...
>>
>>>Here's a simple MVC question.
>>>
>>>I have a GEF editor. When you select a figure, there is an associated
>>>property page with it. If the user modifies a property, do I change the
>>>model or do I tell the EditPart which changes the model?
>>>
>>>Thanks,
>>>Josh
>>
>>
|
|
|
Re: MVC Question [message #188942 is a reply to message #188882] |
Sun, 24 July 2005 15:51 |
Eclipse User |
|
|
|
Originally posted by: tankun.web.de
what do u mean "Make it undoable"?what should i make?
if i change the properties directly in the model,for example the location
of the model.it has no more relation with the Commands.and what will be
happen in the commandstack?
thx ur help
|
|
|
Re: MVC Question [message #189001 is a reply to message #188942] |
Mon, 25 July 2005 14:15 |
Eclipse User |
|
|
|
Originally posted by: harsh.ti.com
What Randy is trying to say is if you change the model in anyway via
Commands, the user is able to undo/redo them if you support those
operations in your derived Command class.
Until you save your editor, any operation done via the CommandStack can be
undone even if they are changed from your custom property view.
Harsh
|
|
|
|
Powered by
FUDForum. Page generated in 0.04297 seconds