smalltalk - 以编程方式更改 GLMStacker 选项卡(Glamour、Smalltalk)
问题描述
我正在尝试以编程方式打开一个或两个选项卡,类似于这个工作示例......
browser := GLMTabulator new.
browser column: #blah.
(browser transmit)
to: #blah;
andShow: [ :a |
a list title: 'One'.
a text title: 'Two'.
tab := a.].
browser openOn: Object.
browser panes last lastActivePresentation: browser panes last presentations last.
...但使用堆垛机,如下所示:
browser := GLMTabulator new.
browser title: 'Prueba'.
browser column: #testColumn.
browser transmit
to: #testColumn;
andShow: [ :presentation |
| first second |
first := #'first'.
second := #'second'.
innerStacker := GLMStacker new.
presentation custom: innerStacker.
innerStacker panes: { first . second }.
innerStacker transmit
to: first;
andShow: [ :p | p title: first ].
innerStacker transmit
to: second;
andShow: [ :p | p title: second ].
"innerStacker selection: Dictionary.
innerStacker selection: second." ].
browser openOn: #('first...' 'second...').
我尝试了不同的方法,但似乎没有任何效果。喜欢:
browser panes last lastActivePresentation: innerStacker panes last presentations pane.
或者
innerStacker panes last lastActivePresentation: innerStacker panes last presentations pane.
任何想法?
解决方案
推荐阅读
- java - JavaFX WebView:如何加载 webjars?
- javascript - SQL GUID 在 tojson 查询中变为大写
- java - 如何知道日期是否在前 x 分钟内?
- laravel - Laravel 还有其他方法可以显示从控制器到刀片的数据吗?
- cloud - 有什么方法可以将 PrivateIP 从我的主机的机器网络子网分配给 Openstack 实例
- leaflet - Leaflet中的overlayMaps和标记
- c++ - 如何为模板“使用”类型别名的流输出运算符 << 提供重载?
- javascript - 在同一个对象上使用 mousePressed 两次?
- json - Kafka Streams API GroupBy 行为
- arduino - ESP32(arduino 中的 BLE 扫描)有时会在 12 到 25 分钟内不扫描 BLE 设备。为什么?