我想在列表中创建dataitem,如下所示:

但我无法vbox使用3个组件渲染中间部分.我是按照这个例子:http://www.sencha.com/blog/dive-into-dataview-with-sencha-touch-2-beta-2/
这就是我定义数据项的方式:
Ext.define('MyTabApp.view.CartListItem', {
extend : 'Ext.dataview.component.DataItem',
alias : 'widget.cartlistitem',
requires: [
'Ext.Img'
],
config : {
cls: 'cart-list-item',
layout: {
type: 'hbox',
align: 'center'
},
image: true,
details: {
cls: 'x-details',
flex: 3,
},
pricing: {
cls: 'x-pricing',
flex: 1
},
removeButton: {
iconCls : 'delete',
iconMask : true,
ui : 'astonvilla',
style : 'margin-left: 5px; margin-top:10px; padding:5px;'
},
moveButton: {
iconCls : 'reply',
iconMask : true,
ui : 'astonvilla',
style : 'margin-left: …Run Code Online (Sandbox Code Playgroud) 我的应用程序支持纵向和横向方向.我使用以下代码从位于UITabBarController中的UIViewController以模态方式呈现UIViewController:
self.modalViewController = [[ModalViewController alloc] init];
[self presentViewController:self.modalViewController animated:YES completion:^{
}];
Run Code Online (Sandbox Code Playgroud)
ModalViewController是一个控制器,只能由Landscape中的用户看到.它应该能够从LandscapeRight旋转到LandscapeLeft.这是它的样子:
@implementation ModalViewController
#pragma mark - UIViewController - Orientation
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotate
{
return YES;
}
#pragma mark - NSObject
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor greenColor];
}
#pragma mark - UIViewController - Status Bar
- (BOOL)prefersStatusBarHidden
{
return YES;
}
@end
Run Code Online (Sandbox Code Playgroud)
控制器从左侧向上滑动,并在95%的时间内完全覆盖屏幕.但有5%的时间,它从底部向上滑动,仅覆盖屏幕的上半部分.
以下是它工作正常时的样子:
这是它在不能正常工作时的样子:
我创建了一个示例项目,可以在这里找到:https://github.com/TitouanVanBelle/Bug
有一个UI测试目标,以帮助重现该问题,但它很少有效.
有谁知道为什么会这样?
尝试使用数组,但它在switch语句中给出了"语句需要表达整数类型('id'无效)".怎么了?
NSArray count = [NSArray arrayWithObjects: @"1", @"2", @"3", @"4", @"5", @"6", @"7", nil];
switch ([count objectAtIndex: myIndex]) {
case 1:
NSLog(@"One");
break;
case 2:
NSLog(@"Two");
break;
case 3:
NSLog(@"Three");
break;
default:
break;
}
Run Code Online (Sandbox Code Playgroud) 在我看来,我想做的是:
true或false该集合的每个项目我已成功检索当前用户的Facebook好友并将其提供给我的应用程序
UserController的
def facebook_friends
@friends = graph.get_connections("me", "friends")
end
Run Code Online (Sandbox Code Playgroud)
Rabl的
object false
node :data do @friends
end
Run Code Online (Sandbox Code Playgroud)
它返回如下内容:
{
data: [{
'id': '23456789'
'name': 'Bobby Brown'
}, {
'id': '23456788'
'name': 'Bobby Black'
}]
}
Run Code Online (Sandbox Code Playgroud)
但我想要的是这样的:
{
data: [{
'id': '23456789'
'name': 'Bobby Brown',
'registered': true
}, {
'id': '23456788'
'name': 'Bobby Black',
'registered': false
}]
}
Run Code Online (Sandbox Code Playgroud)
但我不知道如何在不浪费太多资源的情况下完成第二部分.
一个cusomized UINavigationBar要求我提供一个定制的"后退"按钮,我使用navigationItem.leftBarButtonItem = myCustomizedButton,但它的位置是固定的.
有人愿意分享如何将这个按钮40像素移到右边?
我正在尝试使用liferay中的javapns库向我的设备发送推送通知.这是代码:
private void pushNotification(ActionRequest actionRequest,
ActionResponse actionResponse) {
try {
System.out.println("Push");
Push.alert("Hello World!", "ck.p12", "PASSPHRASE", false, "TOKEN");
} catch (CommunicationException e) {
System.out.println("CommunicationException");
e.printStackTrace();
} catch (KeystoreException e) {
System.out.println("KeystoreException");
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
调用pushNotification时出现此错误:
ERROR [PushNotificationManager:450] Delivery error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Run Code Online (Sandbox Code Playgroud)
我用谷歌搜索但找不到任何解决方案.
有谁知道如何解决这个问题?
我尝试在这样的代码中声明一个变量,但它不起作用.你能告诉我这是什么问题吗?
ERROR: syntax error at or near "VARCHAR"
LINE 2: p_country VARCHAR;
DECLARE
p_country VARCHAR;
p_country : = '';
SELECT p_country;
Run Code Online (Sandbox Code Playgroud) 我已经在/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)
有什么建议 !!??谢谢
我刚刚升级到Mac OSX Mavericks和Ruby 1.9.3-p392,现在当我尝试在我的rails s一个应用程序中运行时,出现以下错误:
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (NoMethodError)
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `inject'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:470:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:136:in …Run Code Online (Sandbox Code Playgroud) ios ×3
objective-c ×2
sencha-touch ×2
android ×1
cordova ×1
extjs ×1
facebook ×1
iphone ×1
java ×1
javascript ×1
koala ×1
liferay ×1
postgresql ×1
rabl ×1
ruby ×1