eclipse中怎么把源码点出来显示对象的源码??我的显示不出来

11:33 提问
easyui为什么不能用,如下是我页面的代码,老说找不到对象
&!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&
&meta http-equiv="Content-Type" content="text/ charset=UTF-8"&
&title&easyui test&/title&
&script type="text/javascript" src="../jquery-easyui-1.3.6/jquery.easyui.min.js"&&/script&
&script type="text/javascript" src="../jquery-easyui-1.3.6/easyloader.js"&&/script&
&script type="text/javascript" src="../jquery-easyui-1.3.6/jquery.min.js"&&/script&
&script type="text/javascript" src="../../Scripts/jquery-1.7.1.min.js"&&/script&
&h1&EasyLoader&/h1&
&a href="#" class="easyui-linkbutton" onclick="load1()"&Load Calendar&/a&
&a href="#" class="easyui-linkbutton" onclick="load2()"&Load Dialog&/a&
&div id="cc"&&/div&
&div id="dd"&&/div&
&script type="text/javascript"&
function load1() {
using('calendar', function () {
$('#cc').calendar({
width: 180,
height: 180
function load2() {
using(['dialog', 'messager'], function () {
$('#dd').dialog({
title: 'Dialog',
width: 300,
height: 200
$.messager.show({
title: 'info',
msg: 'dialog created'
按赞数排序
页面没引easyui的js?
jquery框架要放第一位,要不导入easyui要报错,easyui是居于jquery的,所以js导入循序不能搞错,而且你怎么导入了2个jquery框架。
同时注意检查js文件路径都对了没有
而且导入easyloader类库动态加载js文件,就不需要导入jquery.easyui.min.js整个框架了。。
&script type="text/javascript" src="../jquery-easyui-1.3.6/jquery.min.js"&&/script&
&script type="text/javascript" src="../jquery-easyui-1.3.6/easyloader.js"&&/script&
别的不说你看看你的JavaScript放的地方就不对吧,怎么放在了body的外面呢!!!
让后你再试试...
# 你的路径不对
把../去掉试试
其他相关推荐
其他相似问题UITableView没数据时用户提示如何做? - 简书
UITableView没数据时用户提示如何做?
最近项目在大改,把之前很多的业务功能进行修改。在看到之前同事的代码时,他在处理在网络请求不到数据的时候,提示用户没有数据的代码太不合理。先来看看他的代码。
// 显示无数据提示
- (void)showNoDataLabel
if (!_noDataLabel) {
_noDataLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, ScreenHeight-150, ScreenWidth, 25)];
_noDataLabel.text = @"没有查询到相对应的商品";
_noDataLabel.textColor = COLOR_f15899;
_noDataLabel.textAlignment = NSTextAlignmentC
[self.view addSubview:_noDataLabel];
if ([self.dataSource count] == 0) {
_noDataLabel.hidden = NO;
_noDataLabel.hidden = YES;
以上代码是同事他在控制器里面定义一个UILabel属性_noDataLabel,把它添加在控制器的View上,默认这个_noDataLabel是隐藏的。每次在网络请求完成的时候,就调用上面的方法,这个方法会判断数据源数组中有没有数据,如果没有数据,那么_noDataLabel就会显示,如果有数据该_noDataLabel就继续隐藏。这样做当然没有问题,但是这样做很不合理:
这是一种典型的面向过程的方法,没有进行封装,不便于维护
这样的代码没有重复利用,所用到的地方,几乎都是要拷贝一份。
没有很好的利用Objective C这门编程语言的特性-分类。
导致控制器的代码过多,不便于维护,MVC设计模式变成了Massive ViewController。
那么我是怎么做的呢?利用Objective C 的分类可以达到很好的效果,实际上苹果公司的开发也是大量采用分类来做的。之前做HomeKit智能家居开发的时候,看了很多HomeKit的开发文档和HomeKit的demo,其中苹果的Demo很多地方都是利用Catergory来做的。
做法如下:我们对UITabelView进行扩展,代码如下。
@import UIK
@interface UITableView (EmptyData)
//添加一个方法
- (void) tableViewDisplayWitMsg:(NSString *) message ifNecessaryForRowCount:(NSUInteger) rowC
/// .m文件
#import "UITableView+EmptyData.h"
@implementation UITableView (EmptyData)
- (void) tableViewDisplayWitMsg:(NSString *) message ifNecessaryForRowCount:(NSUInteger) rowCount
if (rowCount == 0) {
// Display a message when the table is empty
// 没有数据的时候,UILabel的显示样式
UILabel *messageLabel = [UILabel new];
messageLabel.text =
messageLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
messageLabel.textColor = [UIColor lightGrayColor];
messageLabel.textAlignment = NSTextAlignmentC
[messageLabel sizeToFit];
self.backgroundView = messageL
self.separatorStyle = UITableViewCellSeparatorStyleN
self.backgroundView =
self.separatorStyle = UITableViewCellSeparatorStyleSingleL
首先导入头文件
& #import "UITableView+EmptyData.h"
在UITableView的数据源方法中进行调用就可以了。如果你的TableView有多个Section,那么可以在- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView方法中进行调用。
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
如果没有数据的时候提示用户的信息
[tableView tableViewDisplayWitMsg:@"没有查询到相对应的商品" ifNecessaryForRowCount:self.dataSource.count];
return [self.dataSource count];
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
如果你的TableView只有一个分组,那么可以在- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 中进行调用
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
[tableView tableViewDisplayWitMsg:@"没有查询到相对应的商品" ifNecessaryForRowCount:self.dataSource.count];
return self.dataSource.
效果如下:
Simulator Screen Shot 日 下午3.27.26.png
只要你的用得到地方,直接导入UITableView的分类就可以了。这样做是不是很方便呢?代码写多了,是不是要考虑偷懒一下呢?直接复制粘贴,这种简单粗暴的活是不是应该留给年轻人干呢?
demo地址:
技术交流QQ群:
1》 app签名找QQ:
2》购买企业开发者账号找我们

我要回帖

更多关于 传奇dbserver源码 的文章

 

随机推荐