The wrong presenter is getting the command

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The wrong presenter is getting the command

Sebastián Sastre
Hi all,

 I have an application interface that is made on the fly when the user
make the login.

 What I'm using is a CardPresenter wich I dinamically add and remove
cards so the proper interface is shown.

 For some reason, I'm sending a comand to one card (making right click
and selecting a command) in a list presenter of a card, and the command
is received by the wrong presenter (other than the one in focus).

  Anybody has an idea of what could be wrong? or a clue about where to
trace this error?

  Thanks,

Sebastian


Reply | Threaded
Open this post in threaded view
|

Re: The wrong presenter is getting the command

Sebastián Sastre
It seems to be that the command route is in a wrong order. Perhaps the
dinamic presenter creation is making the command route to be in an
inconsistent state.

 How is the whole idea with this command route? how do you create cards
programatically in a kind way so the command route could be consistent
with the presenters in view?

regards,

Seb


Reply | Threaded
Open this post in threaded view
|

Re: The wrong presenter is getting the command

hboon@motionobj.com
If you can give a short and complete sample, it should be easier to see
what you mean.

--
HweeBoon


Reply | Threaded
Open this post in threaded view
|

Re: The wrong presenter is getting the command

Bruno Brasesco
In reply to this post by Sebastián Sastre
Hi,

May be is this:
(query receiver:)
Look at #removeXXX

MyComposite
queryCommand: query
| command |

command := query commandSymbol.
        command = #addXXX ifTrue: [query isEnabled: true; receiver: self. ^true].
        command = #removeXXX ifTrue: [query isEnabled: true; receiver: self
topShell. ^true].


Reply | Threaded
Open this post in threaded view
|

Re: The wrong presenter is getting the command

Chris Uppal-3
In reply to this post by Sebastián Sastre
Sebastián wrote:

> It seems to be that the command route is in a wrong order. Perhaps the
> dinamic presenter creation is making the command route to be in an
> inconsistent state.

FWIW, I do a lot of dynamic add/remove of cards and haven't experienced any
problems with command routing such as you describe.

    -- chris