gpt4 book ai didi

sproutcore - 从tabview菜单未加载splitview

转载 作者:行者123 更新时间:2023-12-03 13:38:46 25 4
gpt4 key购买 nike

我创建了一个带有tabview菜单的基本页面。
选项卡之一指向拆分 View 。现在,此拆分 View 可以在重新加载页面时正常工作。
通过不同的选项卡导航工作,但加载拆分 View 的选项卡再也不会显示,如果我导航到未显示的拆分 View ,然后执行页面重新加载拆分 View 加载就好..如果我离开并返回拆分 View ,不加载..

我正在使用最新的 Sproutcore 芯。

任何一个想法在哪里看?

// This page describes the main user interface for your application.  
App.mainPage = SC.Page.design({

mainPane: SC.MainPane.design({

childViews: [SC.TabView.design({
value: "welcome",
items: [
{ title: "Welcome", value: "welcome"},
{ title: "splitview", value: "contentView"},
],

itemTitleKey: 'title',
itemValueKey: 'value',

userDefaultKey: "mainPane"
})]
}),

contentView: SC.SplitView.design({
topLeftView: SC.SourceListView.create({
contentValueKey: 'name',
contentBinding: 'Tp.buildingBlockNodesController.content',
selectionBinding: 'Tp.buildingBlockNodesController.selection',
}),

bottomRightView: SC.View.design({
childViews: 'buildingBlockDetails'.w(),

buildingBlockDetails: SC.View.design({
layout: { top: 50, left: 50, bottom: 50, right: 50 },
childViews: 'nameLabel'.w(),

nameLabel: SC.LabelView.design({
layout: { top: 40, width: 500, height: 18 },
valueBinding: SC.Binding.oneWay('Tp.buildingBlockNodesController.name')
}),
})
})
}),
welcome: SC.LabelView.design({
escapeHTML: NO,
value: "<h1>Sample Tankpit</h1><p>created with SproutCore</p>",
}),
});

最佳答案

我通过运行最低限度来调试代码,然后将contentView重命名为其他名称,然后突然起作用了。我应该使用App.mainPage.contenView作为变量名。我想我碰到了名字冲突或烦人的事!

所以我改变了:

items: [
{ title: "Welcome", value: "welcome"},
{ title: "splitview", value: "contentView"},
],


 items: [
{ title: "Welcome", value: "welcome"},
{ title: "splitview", value: "App.mainPage.contentView"},
],

然后使用contenView的任何其他名称都可以。

关于sproutcore - 从tabview菜单未加载splitview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6111767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com