我已经在/Developer/SDKs/MacOSX10.6.sdk下安装了sencha-touch-2.1.0-gpl和sencha SDK工具.,在Temrinal中浏览到文件夹sencha-touch-2.1.0-gpl并给出命令sencha导致警告
[WARN] The current working directory (/Developer/SDKs/MacOSX10.6.sdk/sencha-touch-2.1.0) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
Run Code Online (Sandbox Code Playgroud)
有什么建议 !!??谢谢
任何人都可以告诉如何在Ext JS中动态设置商店的url和root?
我创建了一个类似下面的商店.我需要更新根并动态设置控制器内的url.
Ext.define('Test.store.TestStore', {
extend: 'Ext.data.Store',
model: 'Test.model.TestModel',
storeId: 'testStore',
proxy: {
type: 'jsonp',
reader: {
type: 'json',
root: 'responseXML'
}
}
});
Run Code Online (Sandbox Code Playgroud)
谢谢
我有一个按钮,删除当前视图以显示下面的内容.它工作正常,除了我想动画它.这可能吗?
有效的删除代码:
Ext.Viewport.remove(Ext.Viewport.getActiveItem(), true);
Run Code Online (Sandbox Code Playgroud)
使用动画调用另一个视图的示例:
var c = Ext.getCmp('NextView');
if(c === undefined) c = Ext.create('MyApp.view.NextView');
Ext.Viewport.animateActiveItem(Ext.getCmp('NextView'), {type: 'slide', direction: 'left'});
Run Code Online (Sandbox Code Playgroud)
我已经尝试了以下但没有成功:
Ext.Viewport.remove(Ext.Viewport.getActiveItem(), true, {type: 'slide', direction: 'left'});
Run Code Online (Sandbox Code Playgroud)
随着:
Ext.Viewport.remove(Ext.Viewport.getActiveItem(), {type: 'slide', direction: 'left'});
Run Code Online (Sandbox Code Playgroud)
注意,我需要删除屏幕(而不仅仅是调用另一个),因为该组件在整个应用程序中都是链接的.
有没有办法在Trigger Field点击上实现组件弹出?例如,我有一个Trigger Field,当我点击Triggerfield时我想显示一个Tree Grid.当我从树网格中选择一个值时,触发字段也设置相同的值.Ext.Net中有一个与此类似的例子:http://examples.ext.net/#/Form/DropDownField/Overview/

我使用Sencha Arhitect 3和ExtJS 4.2.任何帮助表示赞赏!
我试图在按下注销按钮时设置确认消息,如果用户单击"是",则会在名为"myContainer"的容器中重定向到面板控件.消息显示正常,但是当我选择"是"时,我收到错误(假设因为容器未初始化).我的控制器上有一个参考设置到容器,但这似乎没有帮助.任何关于如何正确处理确认的建议是值得赞赏的.谢谢
确认讯息:
onLogoutTap: function(button, e, options) {
Ext.Msg.confirm("Logout", "Do you wish to continue?", function(button){
if (button == 'yes') {
//doesn't work:
this.getMyContainer().setActiveItem(1);
} else {
return false;
}
});
}
Run Code Online (Sandbox Code Playgroud)
Controller中的myContainer参考
myContainer: '#myContainer'
Run Code Online (Sandbox Code Playgroud)
错误信息:
Uncaught TypeError: Object [object Window] has no method 'getMyContainer'
Run Code Online (Sandbox Code Playgroud) 如何在Sencha Architect中更改xtype?
例:
从:
xtype: 'list'
至
xtype: 'RefreshableList'
任何人都可以告诉如何在extjs中为没有冒号的组合框带来fieldLabel
谢谢
使用Sencha Touch(2.2)和Sencha Architect 2
我有一个树形结构,我在其中导航.
节点是元素,元素可以是文件夹或叶子.
要在Ext.dataview.dataview(LIST)上显示元素,我使用商店(storeID:'elementstore')和Ext.dataview.component.Dataitem.
这是我的代码,首先填写LIST,每次我们打开一个文件夹深入树中.
第一次填充商店,禁用事件,因此update()不会被调用两次我将在创建它之后立即切换到此视图.它运作良好,并回馈所需的结果.我在我的列表中显示了第一级文件夹和Leaf.
这是使用onItemTap事件直接在列表中触发的
var EStore = Ext.getStore('elementstore');
EStore.removeAll();
EStore.suspendEvents();
EStore.add(record.get('arrElement'));
EStore.resumeEvents(true);
Run Code Online (Sandbox Code Playgroud)
使用达到的树级别清空和重新填充商店.
这是通过onItemTap事件直接在LIST中触发的
if(record.get('strUIType') === 'folder')
{
INDEX_STACK.push(index);
store = Ext.getStore('elementstore');
store.removeAll();
store.add(record.get('arrElement'));
}
Run Code Online (Sandbox Code Playgroud)
当我试图向后走,在我的树上上升时,出了什么问题.这是位于Sencha控制器中的代码.
它实际上不会回到一个级别,而是返回顶级.ACTIVE_PROJECT是
活动树的索引,它们都位于我的项目存储中.
var popped =INDEX_STACK.pop();
var tab = tabpanel.getParent().getParent().getParent().getComponent('projects_Tab');
if(popped === undefined)
{
tab.setActiveItem(0);
}
else
{
var eStore = Ext.getStore('elementstore');
eStore.removeAll();
//Crashes!
eStore.add(Ext.getStore('projectstore').getAt(ACTIVE_PROJECT).get('arrElement'));
}
Run Code Online (Sandbox Code Playgroud)
你有没有看到eStore.add(....)是崩溃的行,我得到以下错误:
Uncaught TypeError: Cannot call method 'indexOf' of null sencha-touch-all.js:21
Ext.Array.contains.e
Ext.Array.include
Ext.define.join
Ext.define.insert
Ext.define.add
Ext.define.onMain_TabsTap (----Yep this line is my code the …Run Code Online (Sandbox Code Playgroud) 我试图找出为什么我的keyup事件没有被触发.我创建了一个UpperCaseTextField(在Sencha Architect内部)并以一种形式(链接)使用它.
Ext.define('MyApp.view.UpperCaseTextField', {
extend: 'Ext.form.field.Text',
alias: 'widget.uppercasetextfield',
initComponent: function () {
var me = this;
Ext.applyIf(me, {
listeners: {
keyup: {
fn: me.onTextfieldKeyup,
scope: me
}
}
});
me.callParent(arguments);
},
onTextfieldKeyup: function (textfield, e, eOpts) {
var me = this;
alert('keyup');
var upper = me.getValue().toUpperCase();
me.setValue(upper);
}
});
Run Code Online (Sandbox Code Playgroud)
我错过了什么或listeners配置应该工作?
颜色来了,但我不能选择它们
{
xtype: 'combobox',
anchor: '100%',
fieldLabel: 'Mild Color',
forceSelection: true,
typeAhead : true,
name: 'mildColor',
valueField: 'id',
bind: {
store: '{mildcolor}'
},
tpl: [
'<ul>',
'<tpl for=".">',
'<li style="background-color:{name}">{text}</li>',
'</tpl>',
'</ul>'
],
}
[ https://i.stack.imgur.com/DObF7.png]
请有人帮助我