简体   繁体   English

在海边嵌套的#call:的数量有限制吗?

[英]Is there a limit to the number of nested #call:'s in Seaside?

I'm developing a Seaside Application and I suspect I've reached a point in which I can no longer #call: another component. 我正在开发Seaside Application,我怀疑我已经无法再#call:另一个组件。 It's not an issue of my WAComponents, since I tried other messages that end up in #call: , like #confirm: . 这不是我的WAComponents的问题,因为我尝试了其他以#call:结尾的消息,例如#confirm:

I have 4 nested #call: 's in my app (I know, I know... but I'm not looking for design advice, just an answer on this :) ). 我的应用程序中有4个嵌套的#call:我知道,我知道...但是我不是在寻找设计建议,只是一个答案:))。 The 5th just reloads the page, and the called component never appears. 5号只是重新加载页面,并且被调用的组件永远不会出现。

I searched the docs but there's nothing about this, and debugging is really difficult to me, since I'm not familiar with Seaside's inner code. 我搜索了文档,但是却一无所获,由于我不熟悉Seaside的内部代码,调试对我来说真的很困难。

This is Seaside 3.2 under Pharo 6.1. 这是Pharo 6.1下的Seaside 3.2。

Thanks! 谢谢!

There is no limit to the nested #call: s, as correctly indicated in Johan's comment. 嵌套的#call: s没有限制,正如Johan的注释中正确指出的那样。

In this particular case, the "null" behavior of #call: (ie, just reloading the page), was due to an error in the #children method of the parent WAComponent . 在这种特殊情况下,对“空”的行为#call:即,只是重新加载页面),是由于错误#children父的方法WAComponent What was happening here was: 这里发生的是:

  • Component A #render: 'ed component B , but component A 's #children: was buggy 组分A #render: 'ED分量B,A成分的#children:是越野车
  • Component B wanted to #call: component C 组件B想要#call:组件C
  • The #call: didn't work, it just reloaded the page #call:不起作用,它只是重新加载了页面

As the Seaside documentation states, every WAComponent that renders another WAComponent must redefine #children with a collection of all subcomponents. 由于海边文档状态,每WAComponent呈现另一WAComponent 必须重新定义#children与所有子组件的集合。 It's easy to forget to implement to do this, since most of the times it's not a show-stopper. 容易忘记执行此操作,因为在大多数情况下,这并不是一个障碍。 Until you find yourself into this kind of scenario. 直到您陷入这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM