Hi Reza,

I see my name mentioned so feel responsible :). However as I'm sure you are aware I'm no expert. For what they are worth, here are some thoughts:

* seasideCallbackMarker produces the helpful error: "You can only #call: and #answer: from within a callback or a Task." So presumably you are using #call outside a callback
* PRContentWidget>>onChangeContext: handles #isQuick commands differently by directly calling the #onAnswerCommand: . Perhaps examining the call stack within onAnswerCommand in the cases where the command causes and error and when it executes successfully might highlight the difference causing the problem.
* I brought lots of trouble on myself when I experimented with some options inside PRContentsWidget and wasn't returning all the child components from PRContentsWidget>>children, but that was probably unique to me.

Hope that helps

Nick

On 11 March 2010 15:14, Reza RAZAVI <razavi@acm.org> wrote:
At 17:36 26/02/2010, Nick Ager wrote:
The solution I've finally arrived at is:
1) I've added a method to my custom kernel #editingEnvironment
2) I've overridden #environment in PRPierFrame so that it now reads:

 environment
| environment |
(self context command isView or: [self context command isQuick]) ifTrue: [
environment := self context structure environment
] ifFalse: [
environment := self kernel editingEnvironment
].

^ environment

Hi,

I'm testing a specific type of *quick* command (#isQuick returns true). During their execution, triggered by PRContentsWidget >> onAnswerCommand:, they call other components (via #call:). My configuration is Ubuntu, Pharo, Seaside 3, and Pier2.

The execution goes on smoothly when triggered via the *commands* toolbar. However, I'm experiencing an issue in the following circomstances:
1) When trying to switch the current template just before the start of the execution, using the above method by Nick.
2) When launching the command via an internal link, and only if I'm not logged in.

In both cases the execution stops by the error raised in GRPharoPlatform >> seasideCallbackMarker.

It is difficult to characterize the issue since its somehow contextual. But, it seems that #seasideCallbackMarker is sensitive to the components that are present in the current Pier Context.

I'd greatly appreciate any feedback on this issue.
Regards,
Reza





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki