帮我看看为什么无法响应BaseAdapter中的onItemClick()方法? [问题点数:40分,结帖人Dylan465]

Bbs2
本版专家分:293
结帖率 90.91%
Bbs3
本版专家分:693
Bbs2
本版专家分:194
Bbs2
本版专家分:293
自定义ListView无法响应OnItemClickListener中的onItemClick方法问题解决方案
1.如果Item中含有button,checkbox等控件,设其属性android:focusable="false",从而可以使item<em>响应</em>点击事件 2.上述<em>方法</em><em>无法</em>解决的话,可考虑设置item中的控件,比如textview,设置其属性android:clickable="true",即可<em>响应</em>onItemClick<em>方法</em>;若要<em>响应</em>onItemLongClick<em>方法</em>,设置属性 android
【转】自定义ListView无法响应OnItemClickListener中的onItemClick方法问题解决方案
  Android中自定义ListView<em>无法</em><em>响应</em>OnItemClickListener中的onItemClick<em>方法</em>问题解决方案    在Android软件设计与实现中我们通常都会使用到ListView这个控件,系统有一些预置的Adapter可以使用,例如SimpleAdapter和ArrayAdapter,但是总是会有一些情况我们需要通过自定义 ListView来实现一些效果,那么在这个时...
帮我看看为什么无法实现?
<em>为什么</em>当按下“确定”提交时,只执行JS里的,而不执行Private Sub Button1_ServerClick里的? rnrnrn rn rn rn rn rn rn rn rnrnImports GameFamily.common rnImports System.Data rnImports System.Data.SqlClient rnImports System rnImports System.Web rnImports System.Web.UI rnImports System.Web.UI.WebControls rnImports System.Collections rnImports System.ComponentModel rnImports System.Web.Security rnrnPublic Class pay rn Inherits System.Web.UI.Page rn Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm rnrn#Region " Web 窗体设计器生成的代码 " rnrn '该调用是 Web 窗体设计器所必需的。 rn Private Sub InitializeComponent() rnrn End Sub rnrn Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init rn 'CODEGEN: 此<em>方法</em>调用是 Web 窗体设计器所必需的 rn '不要使用代码编辑器修改它。 rn InitializeComponent() rn End Sub rnrn#End Region rnrn Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load rnrn End Sub rn Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ServerClick rn .... rn End Sub rnEnd Class
关于listview 的onItemClick事件无法得到响应
本人查了网上所有关于这一问题的说法都没得到解决什么listview中有button checkbutton android:descendantFocusability="blocksDescendants"等等,最后我做了一个demo一一排查终于得解 我在listitem.xml中根目录下配置了一个属性true 去掉就行了 它就是控制click事件的.你在代码里写了表面你要listItem
(转)自定义ListView无法响应onItemClick方法问题解决方案
在Android软件设计与实现中我们通常都会使用到ListView这个控件,系统有一些预置的Adapter可以使用,例如SimpleAdapter和ArrayAdapter,但是总是会有一些情况我们需要通过自定义ListView来实现一些效果,那么在这个时候,我们通常会碰到自定义ListView<em>无法</em>选中整个ListViewItem的情况,也就是<em>无法</em><em>响应</em>ListView的onItemClickLis
为什么有时GridView不能响应onItemClick函数
写了两个关于GridView的页面,结果一个能<em>响应</em>onItemClick函数,一个不能<em>响应</em>。 原因是因为一个的Item是TextView,一个的Item是Button,如果Item是是Button的话,Button自带的点击<em>响应</em>函数就会覆盖onItemClick函数。所以不能<em>响应</em>的原因就是因为Item是Button. 解决<em>方法</em>一,亲测无效: 在Item的布局文件XML的根部添加属性andr...
帮我看看为什么这个消息没响应
#define CM_CHANGECOLOR (WM_APP+400)rn//---------------------------------------------------------------------------rnclass TForm1 : public TFormrnrn__published: // IDE-managed Componentsrn TButton *Button1;rn void __fastcall Button1Click(TObject *Sender);rnprotected:rn void __fastcall CMChangeColor(TMessage &Message);rn // DECLARE_MESSAGE_MAP();rnBEGIN_MESSAGE_MAPrnMESSAGE_HANDLER(CM_CHANGECOLOR, TMessage, CMChangeColor);rnEND_MESSAGE_MAP(TForm);rnprivate: // User declarationsrnpublic: // User declarationsrn __fastcall TForm1(TComponent* Owner);rn;rnrnvoid __fastcall TForm1::Button1Click(TObject *Sender)rnrn // HWND hWnd=GetParent();rnrn SendMessage(HWND_BROADCAST,CM_CHANGECOLOR,NULL,NULL);rnrn//---------------------------------------------------------------------------rnvoid __fastcall TForm1::CMChangeColor(TMessage &Message)rnrnrn ShowMessage("Success!!");rnrn<em>为什么</em>CM_CHANGECOLOR这个消息没<em>响应</em>
onItemClick方法中的四个参数
public void onItemClick(AdapterViewparent, View view, int position, long id) <em>方法</em>中的四个参数详解。
为什么消息无法响应
用的PostMessage发送消息,可<em>为什么</em>发送过去程序不<em>响应</em>呢?rn发送的是最简单的WM_LBUTTONDOWN,奇怪啊rn虽说有个队列,那等一会儿也该<em>响应</em>了啊?rn急,这边有个数据交互的东西
为什么ActionEvent无法响应????
我做的一个画板程序:rnimport java.awt.*;rnimport java.awt.event.ActionEvent;rnimport java.awt.event.*;rnimport javax.swing.*;rnpublic class DrawBoard extends JApplet implements ActionListenerrn JFrame frame;rn JMenuBar menu;rn JMenu file,edit,view,image,color,help;rn JMenuItem newfile,openfile,copy,t,helpabout,about;rn JPanel panel1,panel2,panel3;rn JButton cut,pencil,gun,drawline,rectangle,polygon,circle;rn JColorChooser jj;rn rn private Container top;rn rn public void init()rn rn Container top = getContentPane();rn top.setLayout(new BorderLayout());rn rn setSize(800,800);rn menu=new JMenuBar();rn menu.setOpaque(true);rn menu.setBackground(Color.lightGray);rn menu.setPreferredSize(new Dimension(500,20));rn rn file=new JMenu("文件(F)");rn edit=new JMenu("编辑(E)");rn view=new JMenu("查看(V)");rn image=new JMenu("图像(I)");rn color=new JMenu("颜色(C)");rn help=new JMenu("帮助(H)");rn rn newfile=new JMenuItem("新建(N) Ctrl+N");rn openfile=new JMenuItem("打开(O) Ctrl+O");rn copy=new JMenuItem("复制(C) Ctrl+C");rn t=new JMenuItem("剪切(T) Ctrl+T");rn helpabout=new JMenuItem("帮助主题(H) Ctrl+H");rn about=new JMenuItem("关于(A) Ctrl+A");rn rn file.add(newfile);rn file.add(openfile);rn file.add(copy);rn file.add(t);rn help.add(helpabout);rn help.add(about);rn rn menu.add(file);rn menu.add(edit);rn menu.add(view);rn menu.add(image);rn menu.add(color);rn menu.add(help);rn rn setJMenuBar(menu);rn rn JButton cut=new JButton("裁剪");rn JButton pencil=new JButton("铅笔");rn JButton gun=new JButton("喷枪");rn JButton drawline=new JButton("直线");rn JButton rectangle=new JButton("矩形");rn JButton polygon=new JButton("多边形");rn JButton circle=new JButton("圆");rn rn cut.addActionListener(this);rn pencil.addActionListener(this);rn gun.addActionListener(this);rn drawline.addActionListener(this);rn rectangle.addActionListener(this);rn polygon.addActionListener(this);rn circle.addActionListener(this);rn rn JPanel panel1=new JPanel();rn panel1.setLayout(new GridLayout(7,1,1,3));rn panel1.add(cut);rn panel1.add(pencil);rn panel1.add(gun);rn panel1.add(drawline);rn panel1.add(rectangle);rn panel1.add(polygon);rn panel1.add(circle);rn rn top.add(panel1,BorderLayout.WEST);rn rn JPanel panel2=new JPanel();rn JColorChooser jj=new JColorChooser();rn panel2.add(jj);rn rn top.add(panel2,BorderLayout.SOUTH);rn rn JPanel panel3=new JPanel();rn panel3.setBackground(Color.WHITE);rn panel3.setSize(300,500); rn top.add(panel3,BorderLayout.CENTER);rn rn rn public void actionPerformed(ActionEvent e) rn rn Object g=e.getSource();rn if(g==cut||g==pencil||g==gun)rn JOptionPane.showMessageDialog(null,"Asdf","d",JOptionPane.INFORMATION_MESSAGE);rn rn rn<em>为什么</em>我按下哪个按钮都不弹出对话框,急啊!!!
listview 的onitemclick方法中的参数
http://blog.sina.com.cn/s/blog_618199e60101071l.html
Android中自定义ListView无法响应OnItemClickListener中的onItemClick方法问题解决方案
在Android软件设计与实现中我们通常都会使用到ListView这个控件,系统有一些预置的Adapter可以使用,例如SimpleAdapter和ArrayAdapter,但是总是会有一些情况我们需要通过自定义ListView来实现一些效果,那么在这个时候,我们通常会碰到自定义ListView<em>无法</em>选中整个ListViewItem的情况,也就是<em>无法</em><em>响应</em>ListView的onItemClickL...
android自定义ListView的Item无法响应OnItemClick的解决办法
如果你的自定义ListViewItem中有Button或者Checkable的子类控件的话,那么默认focus是交给了子控件,而ListView的Item能被选中的基础是它能获取Focus,也就是说我们可以通过将ListView中Item中包含的所有控件的focusable属性设
关于android listview 的onItemClick方法
我自己写了一个adapter继承baseAdapter,能填充数据,但是我想在listView的onItemClick()中得到item中的值,这个<em>方法</em>里面有4个参数大概知道,但是我怎么获取之前put进去的值啊,我这里找了一个模板,但是不行,单击item以后,总在String number = map.get("number").toString();这一行报空指针,是哪里没有取出来呢?rn这是在mainActivity中使用数据rn[code=java]cardList.setAdapter(cardItemAdapter);rn //为每个列表项添加单击事件,点击进入名片详情rn cardList.setOnItemClickListener(new OnItemClickListener() rnrn @Overridern public void onItemClick(AdapterView parent, View view, int position,rn long id) rn ListView listView = (ListView)parent; rn @SuppressWarnings("unchecked")rn HashMap map = (HashMap)listView.getItemAtPosition(position); rn String number = map.get("number").toString();rn Intent intent = new Intent(MainActivity.this,CardDetailActivity.class);rn startActivity(intent);rn Log.v("abc", "你点击了ListView条目" + position+"电话是"+number);//在LogCat中输出信息rn rn );[/code]rn这是我写的适配器rn[code=java]package com.wisesoft.cloudwab.adapter;rnrnimport java.util.ArrayList;rnimport java.util.HashMap;rnrnimport com.wisesoft.cloudwab.R;rnimport com.wisesoft.cloudwab.bean.Data;rnrnimport android.content.Context;rnimport android.util.Log;rnimport android.view.LayoutInflater;rnimport android.view.View;rnimport android.view.ViewGroup;rnimport android.view.View.OnClickListener;rnimport android.widget.BaseAdapter;rnimport android.widget.ImageButton;rnimport android.widget.ImageView;rnimport android.widget.TextView;rnrnrnpublic class CardItemAdapter extends BaseAdapter rnrn private LayoutInflater mInflater;//得到一个LayoutInfalter对象用来导入布局rnrn /*构造函数*/rn public CardItemAdapter(Context context) rn this.mInflater = LayoutInflater.from(context);rn rnrn @Overridern public int getCount() rn rn return getData().size();//返回数组的长度rn rnrn @Overridern public Object getItem(int position) rn return null;rn rnrn @Overridern public long getItemId(int position) rn return 0;rn rn /*书中详细解释该<em>方法</em>*/rn @Overridern public View getView(final int position, View convertView, ViewGroup parent) rn ViewHolder holder;rn //观察convertView随ListView滚动情况rn Log.v("MyListViewBase", "getView " + position + " " + convertView);rn if (convertView == null) rn convertView = mInflater.inflate(R.layout.card_list_item,rn null);rn holder = new ViewHolder();rn /*得到各个控件的对象*/rn holder.alpha = (TextView) convertView.findViewById(R.id.alpha);rn holder.name = (TextView) convertView.findViewById(R.id.name);rn holder.number = (TextView) convertView.findViewById(R.id.number);rn holder.headImg = (ImageView)convertView.findViewById(R.id.headImg);rn holder.bt_call = (ImageButton) convertView.findViewById(R.id.bt_call);rn convertView.setTag(holder);//绑定ViewHolder对象rn rn elsern holder = (ViewHolder)convertView.getTag();//取出ViewHolder对象rn rn /*设置TextView显示的内容为我们存放在动态数组中的数据*/rn holder.alpha.setText(getData().get(position).get("alpha").toString());rn holder.name.setText(getData().get(position).get("name").toString());rn holder.number.setText(getData().get(position).get("number").toString());rn holder.headImg.setImageResource(R.drawable.mn);rn holder.bt_call.setImageResource(R.drawable.call);rn if(position!=0&&!(getData().get(position).get("alpha").equals(getData().get(position-1).get("alpha"))))rn holder.alpha.setVisibility(View.VISIBLE);rn /*为Button添加点击事件---打电话*/rn holder.bt_call.setOnClickListener(new OnClickListener() rn rn @Overridern public void onClick(View v) rn Log.v("abc", "你点击了按钮" + position);//打印Button的点击信息rn rn rn );rn rn return convertView;rn rn rn /*添加一个得到数据的<em>方法</em>,方便使用*/rn private ArrayList> getData()rn rn ArrayList> listItem = new ArrayList>();rn /*为动态数组添加数据*/rn int card_num = Data.cardList.size();rn for(int i=0;i map = new HashMap(); rn map.put("alpha", Data.cardList.get(i).getHeadSpell());rn map.put("number", Data.cardList.get(i).getTelNumber()); rn map.put("name", Data.cardList.get(i).getName()); rn listItem.add(map); rn rn return listItem;rn rn rn rn public final class ViewHolderrn public TextView alpha;rn public TextView number;rn public TextView name;rn public ImageView headImg;rn public ImageButton bt_call;rn rn rnrnrn[/code]
ListView的OnItemClick无法响应以及子Item控件的事件处理。
如果你的listview item中有Button或Checkable的子类控件的话,那么默认focus是交给了子控件的,而ListView的Item能被选中的基础是它能获得focus ,也就是说,我们可以通过将ListView的Item中包含的所有控件的focusable属性设为false,这样的话,ListView的Item就可以自动获得Focus了,也就可以被选中了。另外,对于属性 andr
Android自定义ListView的Item无法响应OnItemClick的解决办法
原文:http://www.cnblogs.com/ycxyyzw/p/3672366.html       如果你的自定义ListViewItem中有Button或者Checkable的子类控件的话,那么默认focus是交给了子控件,而ListView的Item能被选中的基础是它能获取Focus,也就是说我们可以通过将ListView中Item中包含的所有控件的focusable属性设
帮我看看这个方法为什么不行……
/**rn * 增加图书rn * @param mappingrn * @param formrn * @param requestrn * @param responsern * @returnrn * @throws Exceptionrn */rn public ActionForward addBook(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception rn BookForm bookForm = (BookForm)form;rn Integer id = (Integer)bookForm.getId();rn String bookName = (String)bookForm.getBookName();rn String author = (String)bookForm.getAuthor();rn String publisher = (String)bookForm.getPublisher();rn Float price = (Float)bookForm.getPrice(); rn Integer type_id = (Integer)bookForm.getType_id();rn BookType bt = new BookType();rn bt.setId(type_id);rn Integer operator_id = (Integer)bookForm.getOperator_id();rn Operator op = new Operator();rn op.setId(operator_id);rn Integer num = (Integer)bookForm.getNum();rn Book book = new Book();rn book.setId(id);rn book.setBookName(bookName);rn book.setAuthor(author);rn book.setPublisher(publisher);rn book.setPrice(price);rn book.setType_id(bt);rn book.setInTime(new Date());rn book.setOperator_id(op);rn bookService.save(book);rn for (int i = 1; i < 10) rn barcode = barcode + "00" + typeId.toString();rn else if (typeId < 100) rn barcode = barcode + "0" + typeId.toString();rn else rn barcode = barcode + typeId.toString();rn rnrn if (bookId < 10) rn barcode = barcode + "00" + bookId.toString();rn else if (bookId < 100) rn barcode = barcode + "0" + bookId.toString();rn else rn barcode = barcode + bookId.toString();rn rnrn if (bookNo < 10) rn barcode = barcode + "00" + bookNo.toString();rn else if (bookNo < 100) rn barcode = barcode + "0" + bookNo.toString();rn else rn barcode = barcode + bookNo.toString();rn rnrn return barcode;rn
帮我看看为什么
class myPanel extends Panelrnrn myPanel()rn rn setLayout(new FlowLayout());rn for (int j=0;j<10;i++)rn rn add(new Rectangle(j*25,i*25,20,20));//编译时提示:不能解析符号addrn rn rn rn
帮我看看为什么不行
string ls_psw,ls_id //定义两个字符串变量,一个保存id,一个保存pswrnls_id = sle_id.textrnselect userpsw into :ls_psw from t_operaterrnwhere userid =: sle_id.text;rnif ls_psw = sle_psw.text thenrn open(w_main)rn end ifrn这段就是想实现在sle_id里输入xxxx,然后到数据库搜索出userpswrn如果ls_psw和输入的psw相等,就打开w_mainrn我是在 按钮的clicked的事件添的,<em>为什么</em>不行呢?
大家帮我看看为什么
<em>为什么</em>我一个数据库数据MDF文件大小为1.56M,导入数据到另一个新建数据库,查看一下,另一个数据库的MDF文件大小为1.25M,数据库导入导出数据不是就是表和视图的复制吗,中间哪里少了什么内容呢?
android ListView 中的onItemClick Intent 无法跳转
android ListView 中的onItemClick Intent <em>无法</em>跳转rnrn[code=Java]protected void onCreate(Bundle savedInstanceState) rn // TODO Auto-generated method stubrn super.onCreate(savedInstanceState);rn setContentView(R.layout.source_list);rn ListView lv = (ListView) this.findViewById(R.id.listView);rnrn // 生成动态数组,加入数据rn ArrayList> listItem = new ArrayList>();rn for (int i = 0; i < 10; i++) rn HashMap map = new HashMap();rn map.put("ItemImage", R.drawable.bt);// 图像资源的IDrn map.put("ItemTitle", "Level " + i);rn map.put("ItemText", "Finished in 1 Min 54 Secs, 70 Moves! ");rn listItem.add(map);rn rn // 生成适配器的Item和动态数组对应的元素rn SimpleAdapter listItemAdapter = new SimpleAdapter(this, listItem,// 数据源rn R.layout.context,// ListItem的XML实现rn // 动态数组与ImageItem对应的子项rn new String[] "ItemImage", "ItemTitle", "ItemText" ,rn // ImageItem的XML文件里面的一个ImageView,两个TextView IDrn new int[] R.id.ItemImage, R.id.ItemTitle, R.id.ItemText );rnrn // 添加并且显示rn lv.setAdapter(listItemAdapter);rnrn // 添加点击rn lv.setOnItemClickListener(new OnItemClickListener() rn @Overridern public void onItemClick(AdapterView arg0, View arg1, int arg2,rn long arg3) rn // Toast.makeText(SourceList.this, "点击第"+arg2+"个项目", 1).show();rn Intent intent = new Intent(SourceList.this, ViewDetail.class);rn startActivity(intent);rn //这里<em>无法</em>跳转rn rn );rn [/code]rnrnViewDetail.classrn应该不关这个的事rn[code=Java]protected void onCreate(Bundle savedInstanceState) rn // TODO Auto-generated method stubrn super.onCreate(savedInstanceState);rn this.setContentView(R.layout.view_detail);rn [/code]
帮我看看这是为什么
<em>为什么</em>我触发button1_Click事件的时候,系统报错为Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.rnrnrn public partial class Form1 : Formrn rn OleDbDataAdapter da;rn OleDbCommand cmd;rn OleDbConnection connection;rn OleDbCommandBuilder cb;rn DataGrid datagrid;rn public Form1()rn rn InitializeComponent();rn rnrn private void Form1_Load(object sender, EventArgs e)rn rn string conStr = @"provider=Microsoft.Jet.OLEDB.4.0;data source=D:\study of C#\UserData.mdb";rn string SQL = "SELECT * from User1";rn connection = new OleDbConnection(conStr);rn connection.Open();rn //cmd = new OleDbCommand(SQL, connection);rn da = new OleDbDataAdapter(SQL, connection);rn // da.SelectCommand = cmd;rn da.Fill(dataSet1, "User1");rn cb = new OleDbCommandBuilder(da);rn dataGridView1.DataSource = dataSet1.Tables[0].DefaultView;rn //datagrid = new DataGrid();rn //datagrid.SetDataBinding(dataSet1, "User1");rnrn rnrn private void button1_Click(object sender, EventArgs e)rn rn da.Update(dataSet1, "User1");rn rn
帮我看看为什么出错
<em>为什么</em>总是冒出CPU错误,且函数未执行完就返回了!rnrnrnprivatern Private declarations rn publicrn Public declarations rn end;rnrn TModPas=Function(OldPwd:PChar;NewPwd:PChar):Boolean;rnrnvarrn Form1: TForm1;rn ModPassWord:TModPas;rnrnimplementationrnrnrnrn$R *.dfmrnrnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn xx1,xx2:PChar;rn hh:thandle;rnbeginrn hh:=LoadLibrary(PChar('xpformdll.dll'));rn if hh<>0 thenrn @ModPassWord:=GetProcAddress(HH,'ModPassWord');rn if (@ModPassWord)<>nil thenrn if TModPas(ModPassWord)(xx1,xx2) thenrn showmessage(xx1)rn elsern showmessage('nopt');rn FreeLibrary(hh);rnend;
帮我看看为什么出错??
typedef struct _Globals rn BOOL fAllowNewUser;rn BOOL fAutoLogonAtBoot;rn BOOL fAutoLogonAlways;rn HANDLE hUserToken;rn PMiniAccount pAccount;rn Globals, * PGlobals;rnrnrnrnPGlobals pGlobals;rnpGlobals = LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT, sizeof(Globals));rn这个<em>为什么</em>出现错误:rnerror C2440: '=' : cannot convert from 'void *' to 'struct _Globals *'rn Conversion from 'void*' to pointer to non-'void' requires an explicit cast
----------------帮我看看,这是为什么
rnrnrn rnrn rn Untitled Documentrnrnrn rnrn rnrn rnrnrnrn rn<em>为什么</em>得不到值?rnrn谢谢
帮我看看为什么
我想要读取电脑上的文本文件内容。rn按照《JScript》书上的例子:rnfunction ReadFiles()rnrn var fso, f1, ts, s;rn var ForReading = 1;rn fso = new ActiveXObject("Scripting.FileSystemObject");rn f1 = fso.CreateTextFile("c:\\testfile.txt", true);rn // 写一行。rn Response.Write("Writing file ");rn f1.WriteLine("Hello World");rn f1.WriteBlankLines(1);rn f1.Close();rn // 读取文件的内容。rn Response.Write("Reading file ");rn ts = fso.OpenTextFile("c:\\testfile.txt", ForReading);rn s = ts.ReadLine();rn Response.Write("File contents = '" + s + "'");rn ts.Close();rnrnrn但是出现错误信息:Automation服务器不能创建对象。rnrn调试的时候发现错在rnfso = new ActiveXObject("Scripting.FileSystemObject");rn这一句。rnrn请问是<em>为什么</em>?rn谢谢!
帮我看看为什么出错!!
void __fastcall TForm1::bbFieldsClick(TObject *Sender)rnrn int i;rnrn ListBox1->Clear();rn for (i = 0; i < tblCustomer->FieldCount; i++)rn ListBox1->Items->Add(tblCustomer->Fields[i]->FieldName);rnrnrn编译错误为:rn[C++ Error] Main.cpp(24): E2288 Pointer to structure required on left side of -> or ->*rnrn请问是哪里错了,怎么改!!
帮我看看为什么
从装了声卡之后,我的WIN2000rnPROFRESSOR,没有了休眠的选项,UPS里也没有了rn<em>为什么</em>呢?大侠请告之!
帮我看看,为什么select的onchange方法无效
rn网易rn搜狐rnrn rnrn点option时<em>为什么</em>没有触发alert??
为什么啊,帮我看看
<em>为什么</em>我在引字符串操作函数的时候 总是说我没有定义呢
麻烦帮我看看为什么
我的信誉分一直在下降,这是<em>为什么</em>啊!rn我好长时间没发帖了,只是跟帖,这也有错???
帮我看看这是为什么????
在VB中使用ADO与Access数据库 建立登录对话窗体:rn Access中建立数据库:testdb.mdb 表 user 属性 user_account,user_password rn vb工程中代码如下:rnOption ExplicitrnDim result As IntegerrnrnPrivate Sub Command1_Click()rn If Text1.Text = "" Or Text2.Text = "" Thenrn MsgBox "用户名/密码不能为空"rn Exit Subrn End Ifrn rn result = UserValidate(Text1.Text, Text2.Text)rn rn If result = 0 Thenrn rn Unload Mern Elsern Select Case resultrn Case 1:rn MsgBox "用户" & frmLogin.Text1 & "不存在"rn Case 2:rn MsgBox "用户" & frmLogin.Text1 & "密码错误"rn Case Elsern MsgBox "为知错误"rn End Selectrn End IfrnEnd SubrnrnPrivate Sub Command2_Click()rn rn Endrn rnEnd SubrnrnFunction UserValidate(input_user As String, input_password As String) As Integerrn Dim rs As New ADODB.Recordsetrn Dim sql As Stringrn Dim tmp_password As Stringrn Dim conn As New ADODB.Connectionrn rn conn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source= " & App.Path & "\testdb.mdb;persist security info=false"rn conn.Openrn rs.ActiveConnection = connrn sql = "select user_account,user_password FROM user where user_account ='" & input_user & "'"rn Call rs.Open(sql, conn)rn rn If (rs.EOF) Thenrn UserValidate = 1rn rs.Closern conn.Closern Exit Functionrn End Ifrn rn tmp_password = rs("user_password")rn rn rs.Closern conn.Closern rn If StrComp(tmp_password, input_password) Thenrn UserValidate = 2rn Exit Functionrn End Ifrn rn UserValidate = 0rn rnEnd FunctionrnrnPrivate Sub Form_Load()rn result = -1rn rnEnd SubrnPrivate Sub form_unload(cancel As Integer)rn If (Not result) Thenrn frmMain.Showrn End IfrnEnd Subrnrn每次按F5调试,输入正确的用户名和密码总是返回错误信息:“Form 子句语法错误” 但我看不出哪错,到底错在哪呢?
帮我看看,为什么?,谢谢!
我在自己本机做了一个简单的Asp.net网站,使用C#编写内置代码,后台数据库使用Oracle9I,本机安装Oracle8I客户端,<em>为什么</em>整个移植到装数据库的服务器上后,会出现Oracle数据库连接出错的问题,唯一的区别就是服务器上装的是Oracle9I的客户端,除与数据库连接有关的页面外,其它页面全部访问正常.各位同仁有没有遇到过这种问题,希望能提供一两个比较好的解决办法
帮我看看,这是为什么?
Private Sub 组合16_AfterUpdate()rnDim i As Integerrn If Not IsNull(组合16) Thenrn 列表13.RowSource = ""rn For i = 0 To CurrentDb.QueryDefs(组合16).Fields.Count - 1rn 列表13.RowSource = 列表13.RowSource & CurrentDb.QueryDefs(组合16).Fields(i).Name & ";"rn Next irn End IfrnEnd Subrnrn上面的这段代码,运行到"For i = 0 To CurrentDb.QueryDefs(组合16).Fields.Count - 1"这一句提示rn"运行时错误'3285'rn这个集合打不到此项目"rnrn请各位高手<em>帮我</em><em>看看</em>,在此谢谢了!
帮我看看为什么?
int main1()rnrn char ch[10];rnrn ch[0] = 1;rn printf("%d", ch[0]);rn<em>为什么</em>结果是1
为什么??大家帮我看看
大家好,我是最近才接触xml,我碰到一个问题,百思不得其解,下面是这段代码,请大家<em>看看</em>。rn1.xsl:rnrnrnrn Address Book XML Examplernrnrnrnrnrnrnrnrnrnrnrnrn1.xml:rnrnrnrnFrank Rizzornrnrn程序运行后,未提示出错,屏幕的颜色也变成预定的颜色,但文字确始终出不来。rn相信这是一个简单的入门级别的问题,还望大家忙.
大家帮我看看为什么
我在Visual Studio 2005里,用ActiveSync来同步模拟器rn教程上说rn 1、打开 Visual Studio 2005 rn 2、单击 工具 - 连接设备 ,在平台下,选择Windows CE,在Devices 下选择CHS Windows Mobile 5.0 Pocker PC R2 Emulatorrn[img=http://images.cnblogs.com/cnblogs_com/greatandforever/p2.JPG][/img]rnrnrn但是我找不到windows cern[img=http://hi.csdn.net/attachment/201102/26/4621320_1298732904LLOD.jpg][/img]rnWindows Mobile 6 Professional SDK 和Windows Mobile 5.0 Pocket PC SDK都已经安装了rn还要安装什么么?
崩溃了,高手帮我看看为什么无法mysql无法回滚!
有一个<em>方法</em>pay,参数为orderid,pay需要同时更新3个表的数据,比如t1,t2,t3。我在t3这个表抛出一个异常。rn当通过支付宝return的时候,t1的数据可以回滚,t2<em>无法</em>回滚,但是手动调用pay<em>方法</em>传递与支付宝一样的orderid回滚都正常。rnrnrn各位高手<em>帮我</em>想想,这个问题可能出在什么地方,纠结了3个小时,郁闷了!
BaseAdapter——convertView回收机制与动态控件响应
前言:对于listView的BaseAdapter的派生,难度比较大。最难理解的莫过于getView(int position, View convertView, ViewGroup parent)这个函数是如何产生每条记录的,有些博客中利用holderView,有些博客却没有用,种种<em>方法</em>之间有什么异同,今天我们就来揭开这个绘制ITEM机制的面纱。本篇借助《PullToRefresh使用详解(二)
为什么在弹出式菜单中,无法响应ON_COMMAND
<em>为什么</em>在弹出式菜单中,<em>无法</em><em>响应</em>ON_COMMAND
Android 编程下自定义 ListView 无法响应 OnItemClickListener 中的 onItemClick 方法问题解决方案...
在 Android 软件设计与实现中我们通常都会使用到 ListView 这个控件,系统有一些预置的 Adapter 可以使用,例如 SimpleAdapter 和 ArrayAdapter,但是总是会有一些情况我们需要通过自定义 ListView 来实现一些效果,那么在这个时候,我们通常会碰到自定义 ListView <em>无法</em>选中整个 ListViewItem 的情况,也就是<em>无法</em><em>响应</em> ListVie...
ListView的onItemClick方法传递参数
listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { UserInfo userInfo=infos.get(position); In
在BaseAdapter中各方法解析
BaseAdapter中各<em>方法</em>解析
为什么ARM中断无法响应
我写的程序如下:[code=C/C++]rn#include "def.h"rn#include "option.h"rn#include "2440addr.h"rn#include "2440lib.h"rnrnstatic int count = 0;rnrnstatic void __irq EINT18_ISR(void)rnrnrn rSRCPND |= (1<<<< GPG10rn //中断模式rn rINTMOD = rINTMOD & ( ~(1<<<<<<<<5);//rn //中断向量rn pISR_EINT8_23 = (U32)EINT18_ISR;//EINT18rnrn while(1)rn rn rn[/code]rn程序运行后对外部中断没有相应,这是<em>为什么</em>呢?
麻烦大神帮我看看,ListView的onItemClick页面跳转问题!!!
[img=https://img-bbs.csdn.net/upload/201608/22/1471864450_454181.jpg][/img]rnrn概述:rn 自己从网上下载的Json数据,放在Listview里面,想通过点击Listview跳转到新的页面!!但是好像不成功,有没有大神,<em>帮我</em><em>看看</em>,谢谢了
哪位大虾帮我看看为什么中断不能响应
#pragma config POSCMOD = XT, FNOSC = PRIPLLrn#pragma config FPLLIDIV = DIV_2, FPLLMUL = MUL_18, FPLLODIV = DIV_1rn#pragma config FPBDIV= DIV_2,FWDTEN = OFF,CP =OFF,BWP =OFFrnrn#include rn#includern#include rn#define delayms(x) \rn \rn int i; \rn i = x*10; \rn while((--i) != 0); \ rn rnrnstatic int count =0;rnrnvoid __ISR(_CHANGE_NOTICE_VECTOR, ipl1) CNIntHandler( void )rnrn int i =0;rn if(!_RB2)rn //延时检测跳变前沿rn dorn rn delayms(5);rn if(!_RB2)rn i++;rn elsern i = 0;rn rn while(i < 10);rn rn while(!_RB2);rn //延时检测跳变后沿rn dorn rn delayms(5);rn if(_RB2)rn i++;rn elsern i = 0;rn rn while(i < 10);rn count++;rn rn mCNClearIntFlag();rnrnrnint main(void)rnrn //CNIF = 0;rn TRISB = 1;rn AD1PCFG = 0xffff;rn rn CNENbits.CNEN4 =1;//连接的RB2引脚rn CNCONbits.ON =1;rnrn mCNSetIntPriority( 1);rn INTEnableSystemSingleVectoredInt();rn mCNClearIntFlag();rn mCNIntEnable( 1);rn while(1)rn rn rn rnrnrn以上我是我的中断程序,<em>为什么</em>调试的时候就是停在while那里,按键按下时没反应,中断函数不能<em>响应</em>!
无法读取数据,帮我看看代码
rn rn rn 类型rn 1月rn 2月rn 3月rn 4月rn 5月rn 6月rn 7月rn 8月rn 9月rn 10月rn 11月rn 12月rn 合计rn rn rnrn rn rn rnrn<em>为什么</em>读取不了数据,w3wp进程占用很大。直接在数据库了使用:rnSelect sum(m1),sum(m2),sum(m3) From [test] Where format(date_time,'yyyy-MM') ='2010-07'可以获取.rn
为什么为什么????高手帮我看看为什么???
我写了以下代码::rnString name_sql="select Name from onePubCategory where ID=16";//+category;rnResultSet result=opdb.executeQuery(name_sql);rnrn数据库中有一行数据的,可是我发现 result==null ???rnrn 我 <em>无法</em>从数据库中取数据了,这是<em>为什么</em>,上周还没出错的????rnrn 请高手为我指点迷津::::::::::::::::rn 谢谢!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ListView中存在ImageButton,无法单击 无法调用onItemClick
转自:http://blog.csdn.net/mengweiqi33/article/details/7280423 工程里面有一个listview,listview的模板上有一个ImageButton(在右端),然后有一个TextView在中间,然后我发现中间的TextView<em>无法</em>被单击了,但是显示变黄,然后onListItemClick也不<em>响应</em>. 我试过在layout文件里
BaseAdapter中的GetCount方法频繁调用,请高手看看
只有三条数据,但是调用GetCount()<em>方法</em>多达650+以上的次数,不知道原因。是否与Layout XML文件相关rnprivate class ListViewAdapter extends BaseAdapterrn rn /* inflater */rn private LayoutInflater mInflater;rnrn private ArrayList sites;rnrn private ArrayList ldapSites;rnrn private ArrayList selectedSites;rnrn private ArrayList selectedLDAPSites;rnrn private int count = 0;rnrn public ListViewAdapter()rn rn HLog.i("AddrLocalView", "ListViewAdapter: ListViewAdapter");rn mInflater = LayoutInflater.from(mContext);rn sites = new ArrayList();rn ldapSites = new ArrayList();rn selectedSites = new ArrayList();rn selectedLDAPSites = new ArrayList();rn rnrn @Overridern public int getCount()rn rn return count;rn rnrn public String getItemName(int postion)rn rn HLog.i("AddrLocalView", "ListViewAdapter: getItemName");rn if (postion >= sites.size())rn rn return ldapSites.get(postion - sites.size()).getAbsSite().name;rn rn elsern rn return sites.get(postion).name;rn rnrn rnrn public int getSelectedCount()rn rn HLog.i("AddrLocalView", "ListViewAdapter: getSelectedCount");rn return selectedLDAPSites.size() + selectedSites.size();rn rn public ArrayList getSites()rn rn return sites;rn rnrn @Overridern public long getItemId(int position)rn rn HLog.i("AddrLocalView", "ListViewAdapter: getItemId");rn return position;rn rnrn rn rnrnrn /**rn * 得到每行item ,一个view代表一行itemrn */rn public View getView(int position, View convertView, ViewGroup parent)rn rn HLog.i("AddrLocalView", "ListViewAdapter: getView");rn final Viewholder viewholder;rn if (convertView == null)rn rn convertView = mInflater.inflate(R.layout.address_list_style, null);rn viewholder = new Viewholder();rnrn // 取出控件对象rn viewholder.lineLayout = (LinearLayout) convertView.findViewById(R.id.lineText);rn viewholder.text = (TextView) convertView.findViewById(R.id.txtSname);rn viewholder.no = (TextView) convertView.findViewById(R.id.no);rn viewholder.onlineImage = (ImageView) convertView.findViewById(R.id.online_status_image);rn viewholder.mtableLayout = (TableLayout) convertView.findViewById(R.id.childText);rn viewholder.addrCheckbox = (CheckBox) convertView.findViewById(R.id.address_check);rn viewholder.btnSave = (ImageButton) convertView.findViewById(R.id.ldap_item_save);rn viewholder.btnExpand = (ImageView) convertView.findViewById(R.id.expand);rn viewholder.ldap_image = (ImageView) convertView.findViewById(R.id.ldap_image);rnrn viewholder.addrCheckbox.setOnClickListener(new OnClickListenerHandle()rn rn @Overridern public void onNormalClick(View v)rn rn CheckBox chkbtn = (CheckBox) v;rn handlerCheckboxClick(chkbtn);rn rnrn );rnrn convertView.setTag(viewholder);rn rn elsern rn viewholder = (Viewholder) convertView.getTag();rn rn
onItemClick方法中的position和id是什么意思?
[code=java] rn // 点击listview的某一项而进入rn listview.setOnItemClickListener(new OnItemClickListener() rn public void onItemClick(AdapterView parent, View view,rn int position, long id) rn Intent intent = new Intent(MainActivity.this,rn DetailActivity.class);rn intent.putExtra("id",position);rn startActivity(intent);rn rn );[/code]rnrnrnrn我今天测试的时候发现一个问题,我点击listview的某一项进入下一个activity。但是我发现这里的id是0,10,20这样的,还请各位帮帮忙。
大家帮我看看这是为什么
我在Visual Studio 2005里,用ActiveSync来同步模拟器rn教程上说rn 1、打开 Visual Studio 2005 rn 2、单击 工具 - 连接设备 ,在平台下,选择Windows CE,在Devices 下选择CHS Windows Mobile 5.0 Pocker PC R2 Emulatorrn[img=http://images.cnblogs.com/cnblogs_com/greatandforever/p2.JPG][/img]rnrnrn但是我找不到windows cern[img=http://hi.csdn.net/attachment/201102/26/4621320_1298732904LLOD.jpg][/img]rnWindows Mobile 6 Professional SDK 和Windows Mobile 5.0 Pocket PC SDK都已经安装了
帮我看看为什么会越界?
程序中,黄色点的轨迹所成的直线应该在x=100-400,y=100-300之间显示,<em>为什么</em>左右下三个方向都越界了呢?哪位大虾帮忙<em>看看</em>。rnrn#includern#include rn#includernmain()rnfloat pf,ps,a,j;rn int y,n,x,i;rn int GraphDriver=DETECT,GraphMode;rn initgraph( &GraphDriver, &GraphMode, "c:\\turboc\\cgi" );rn setbkcolor(GREEN);rn bar(100,100,400,400);rn setfillstyle(SOLID_FILL,RED);rn bar(100,300,400,400);rn printf("\n\ninput the number of n:\n");rn scanf("%d",&n);rn printf("input the value of pf(0-1):");rn scanf("%f",&pf);rn ps=(1-pf)/2;rn for(i=0;i=400) x=100+x%400;rn if(x<100) x=300+x%100;rn a=(float)rand()/32767;rn if(a
高手帮我看看这是为什么
typedef structrn char name[4];rn float score;rnS;rnmain()rnrn int i;rn S std[3];rn for(i=0;i,std[i].name,std[i].score);rnrn<em>为什么</em>运行时出错?请告诉我原因,详细一点。
帮我看看为什么会这样?
sql="select * from apply where acid='"&acid&"'"rnset rs=server.CreateObject("adodb.recordset")rnrs.open sql,conn,1,3rnif not rs.eof thenrnresponse.Write " "rnresponse.End()rnelsernrs.addnewrnrs("zuzhang")=zuzhangrnrs("num")=numrnrs("acid")=acidrnrs("member1")=member1rnrs("member2")=member2rnrs("member3")=member3rnrs("week")=weekrnrs("zu")=zurnrs("qingkuang")=qingkuangrnrs("date")=now()rnrs.updaternrnend ifrnrs.closernset rs=nothingrnconn.closernset conn=nothingrnrnrn不知道<em>为什么</em>,记录是添加了,但会显示alert的内容?搞不明白
大家帮我看看这是为什么
这个是我的WebForm1.aspx.vb的一个<em>方法</em>rnPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clickrn Dim fs As FileStream = New FileStream("c:/11/a.doc", FileMode.Open)rn Dim fs2 As FileStream = New FileStream("c:/11/2.doc", FileMode.Create)rn Dim br As BinaryReader = New BinaryReader(fs)rn Dim br2 As BinaryWriter = New BinaryWriter(fs2)rn Dim bs As Bytern While br.PeekChar <> -1rn br2.Write(br.ReadByte)rn End Whilern br.Close()rn br2.Close()rn fs.Close()rn fs2.Close()rn End SubrnEnd Classrn但是每次点击按钮都会出错,错误表现如下rn“/WebWord”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn对路径“c:\11\a.doc”的访问被拒绝。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.UnauthorizedAccessException: 对路径“c:\11\a.doc”的访问被拒绝。 rnrnASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 MACHINE\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。 rnrn若要授予 ASP.NET 对文件的写访问权,请在资源管理器中右击该文件,选择“属性”,然后选择“安全”选项卡。单击“添加”添加适当的用户或组。突出显示 ASP.NET 帐户,选中所需访问权限对应的框。rnrn源错误: rnrnrn行 29: rn行 30: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clickrn行 31: Dim fs As FileStream = New FileStream("c:/11/a.doc", FileMode.Open)rn行 32: Dim fs2 As FileStream = New FileStream("c:/11/2.doc", FileMode.Create)rn行 33: Dim br As BinaryReader = New BinaryReader(fs)rn rnrn源文件: c:\inetpub\wwwroot\WebWord\WebForm1.aspx.vb 行: 31 rnrn堆栈跟踪: rnrnrn[UnauthorizedAccessException: 对路径“c:\11\a.doc”的访问被拒绝。]rn System.IO.__Error.WinIOError(Int32 errorCode, String str) +393rn System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888rn System.IO.FileStream..ctor(String path, FileMode mode) +52rn WebWord.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebWord\WebForm1.aspx.vb:31rn System.Web.UI.WebControls.Button.OnClick(EventArgs e)rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)rn System.Web.UI.Page.ProcessRequestMain()rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573 rnrn我的c:\11 文件夹已经为asp.net用户赋予了完全控制权限了,<em>为什么</em>还会这样?
为什么错了,帮我看看,谢谢
#include "stdafx.h"rnrn#include "stdio.h"rnmain()rnrn int i,j,k,m,n,t;rn int a[5]=2,3,4,5,6;rn int b[4]=7,8,9,10;rn int c[10];rn i=j=k=0;m=5;n=4;rn rn for(i=0;i<=b[j])rn c[k]=a[i];rn i++;rn k++;rn rn elsern rn c[k]=b[j];rn j++;rn k++;rn rn if(j==n)rn for(t=j;t
为什么没人帮我看看呢????
用Delphi 做了一个系统,其中有个数据库恢复模块,我这样写(见下面),如果我单独使用这个模块,可以恢复,可是我把它连入系统就发生异常,异常提示:Table is busy!rn百思不得其解,请各位指点迷津!谢谢!!!!!!!!(有位朋友让我把两个Open都屏蔽,可还是不行!!)rnwith Table1 dornbeginrn close;rn Databasename:=Directorylistbox2.Directory ;rn Tablename:=Edit2.Text;rn Open;rnend;rnwith Table2 dornbeginrn close;rn Databasename:=combobox1.text;rn Tablename:=combobox2.text;rn open;rnend;rn Batchmove1.Execute;
帮我看看为什么是什么错误?
数据库有2005-02-02的记录,但打印结果却是0,其实不该是0rn代码:rnrn rn rn 日期rn 消费总量rn rn rn 0rn rn rn rn rn rn rn rn
哪位帮我看看为什么出错
仿照《visual studio 2008入门经典》这本书中第15章MFC在窗口中绘图的例子,我用的是visul studio 2005,其中Line类的代码如下:rnclass CLine :rn public CElementrnrnpublic:rn ~CLine(void);rn virtual void Draw(CDC* pDC);rn CLine(CPoint Start,CPoint End,COLORRER aColor);rnprotected:rn CPoint m_StartPoint;rn CPoint m_EndPoint;rn CLine(void);rn;rn编译时就是在这段代码中出现这样的错误,rne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“)”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2460: “CLine::CPoint”: 使用正在定义的“CLine”rn e:\vc\sketcher\sketcher\elements.h(22) : 参见“CLine”的声明rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“End”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“aColor”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2059: 语法错误 : “)”rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(30) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rne:\vc\sketcher\sketcher\elements.h(31) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rne:\vc\sketcher\sketcher\elements.cpp(29) : error C2597: 对非静态成员“CLine::CPoint”的非法引用rne:\vc\sketcher\sketcher\elements.cpp(29) : error C2146: 语法错误 : 缺少“)”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.cpp(29) : error C2761: “ctor”: 不允许成员函数重新声明rne:\vc\sketcher\sketcher\elements.cpp(29) : error C2059: 语法错误 : “)”rne:\vc\sketcher\sketcher\elements.cpp(30) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rne:\vc\sketcher\sketcher\elements.cpp(30) : error C2447: “”: 缺少函数标题(是否是老式的形式表?)rne:\vc\sketcher\sketcher\elements.cpp(47) : error C2065: “m_StarPoint”: 未声明的标识符rnSketcher.cpprne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“)”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2460: “CLine::CPoint”: 使用正在定义的“CLine”rn e:\vc\sketcher\sketcher\elements.h(22) : 参见“CLine”的声明rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“End”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“aColor”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2059: 语法错误 : “)”rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(30) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rne:\vc\sketcher\sketcher\elements.h(31) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rnSketcherView.cpprne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“)”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“Start”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C2460: “CLine::CPoint”: 使用正在定义的“CLine”rn e:\vc\sketcher\sketcher\elements.h(22) : 参见“CLine”的声明rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“End”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2146: 语法错误 : 缺少“;”(在标识符“aColor”的前面)rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(28) : error C2059: 语法错误 : “)”rne:\vc\sketcher\sketcher\elements.h(28) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrne:\vc\sketcher\sketcher\elements.h(30) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rne:\vc\sketcher\sketcher\elements.h(31) : error C2327: “CLine::CPoint”: 不是类型名称、静态或枚举数rnrn我对照书上例子来的,并且在SketcherView.h中也使用了CPoint定义变量,<em>为什么</em>会出现这样的错误码?哪位帮忙指点一下。CElemen是自己定义的一下MFC类。
帮我看看这个是为什么
[quote]import java.io.RandomAccessFile;rnrnimport java.io.*;rnrnpublic class RandomFileTestrnrn public static void main(String[] args) throws Exceptionrn rn Student s1 = new Student(1, "zhangsan", 98.5);rn Student s2 = new Student(2, "lisi", 94);rn Student s3 = new Student(3, "wangwu", 58);rn RandomAccessFile raf = new RandomAccessFile("student.txt", "rw");rn s1.writeStudent(raf);rn s2.writeStudent(raf);rn s3.writeStudent(raf);rn Student s = new Student();rn raf.seek(0);rn for (long i = 0; i < raf.length(); i = raf.getFilePointer())rn rn s.readStudent(raf);rn System.out.println(s.num + ":" + s.name + ":" + s.score);rn rn raf.close();rnrn rnrnrnclass Studentrnrn int num;rn String name;rn double score;rnrn Student()rn rn rnrn Student(int n, String na, double sc)rn rn num = n;rnrn name = na;rnrn score = sc;rn rnrn public void writeStudent(RandomAccessFile raf) throws IOExceptionrn rn raf.writeInt(num);rn raf.writeUTF(name);rn raf.writeDouble(score);rnrn rnrn public void readStudent(RandomAccessFile raf) throws IOExceptionrn rn raf.readInt();rn raf.readUTF();rn raf.readDouble();rnrn rnrnrn[/quote]rnrnrnrnrnrnrnrnrn0:null:0.0rn0:null:0.0rn0:null:0.0rn<em>为什么</em>结果都是这样的呢?
帮我看看程序为什么通不过???
////example of complex class and convertion of class typern//authro:zhaodongrn/*rn#include rn#include rn#define pi 3.1415rnclass Complex;rnrnclass TTTrnrnrnpublic:rn double r;rn double q;rnpublic:rn TTT(double t1=0,double t2=0 )rn rn r = t1;rn q = t2;rn rn rn operator Complex()rn rn Complex *temp;rn temp->Rem = r*cos(q);rn temp->Imp = r*sin(q);rn return *temp;rn rn rn;rnrnclass Complexrnrnpublic:rn double Rem;rn double Imp;rnpublic:rn Complex()rn rn Rem = 0;rn Imp = 0;rn rnrn Complex(int a)rn rn Rem = a;rn Imp = 0;rn rn Complex(int a, int b)rn rn Rem = a;rn Imp = b;rn rn friend Complex operator+(Complex t1, Complex t2)rn rn Complex temp;rn temp.Rem = t1.Rem + t2.Rem;rn temp.Imp = t1.Imp + t2.Imp;rn return temp;rn rn friend Complex operator-(Complex t1, Complex t2)rn rn Complex temp;rn temp.Rem = t1.Rem - t2.Rem;rn temp.Imp = t1.Imp - t2.Imp;rn return temp;rn rn friend Complex operator*(Complex t1, Complex t2)rn rn Complex temp;rn temp.Rem = t1.Rem*t2.Rem - t1.Imp*t2.Imp;rn temp.Imp = t1.Rem*t2.Imp + t1.Imp*t2.Rem;rn return temp;rn rn friend Complex operator/(Complex t1, Complex t2)rn rn Complex temp;rn temp.Rem = (t1.Rem*t2.Rem + t1.Imp*t2.Imp)/(t2.Imp*t2.Imp + t2.Rem*t2.Rem);rn temp.Imp = (t1.Imp*t2.Rem - t1.Rem*t2.Imp)/(t2.Imp*t2.Imp + t2.Rem*t2.Rem);rn return temp;rn rn //*rn operator TTT()rn rn TTT temp;rn temp.r = sqrt(Rem*Rem + Imp*Imp);rn if ((Rem == 0 )&&(Imp > 0 ))rn rn temp.q = pi/2;rn rn else if ((Rem == 0)&&(Imp < 0))rn rn temp.q = (3*pi)/2;rn rn elsern rn temp.q = atan(Imp/Rem);rn rn return temp;rn rn rn;rn编译环境为vc6.0,两个类有互相使用的关系,<em>为什么</em>有错呢??请高手指点
大家帮我看看这是为什么????
a1.xlst:rnrnrnrnrnrnrnrnrnrnrna1.xmlrnrnrnrnpara1rnpara2rnpara3rnpara4rn rnrna1.xml运行之后,既不报错,但也没出项如期的结果,这是为何??rn我用的是msxml3.dllrnrn
帮我看看为什么不能插入数据
string title=Request["teamName"];rn string fatherID=Request["fatherID"];rn string company=Request["company"];rn string department=Request["department"];rn string description=Request["description"];rn rnstring sql="Insert into team (Team_Title,ParentTeamID,Company,Department,Description) values(\""+title+"\","+fatherID+",\""+company+"\",\""+department+"\",\""+description+"\")";rn conn.Open();rn OleDbCommand dc=new OleDbCommand(sql,conn);rn tryrn rn dc.ExecuteNonQuery();rn Response.Write("Add new team succeeded");rn rn catch(Exception expec)rn rn Response.Write("Add new team failed ");rn Response.Write(expec.Message);rn Response.Write(" ");rn Response.Write(sql);rn rn conn.Close();rn结果总是返回错误:rnAdd new team failedrnOperation must use an updateable query.rnInsert into team (Team_Title,ParentTeamID,Company,Department,Description) values("product",5,"CCC","dd","new team") rn我把这个sql语句拷贝到access里面是可以执行的。怎么搞?
帮我看看为什么内存错误
#includernmain()rnrn char name,surname;rn printf("输入名字name:");rn scanf("%s",&name);rn printf("输入你的姓氏surname:");rn scanf("%s",&surname);rn printf("%s",surname);rn printf("%s\n",name);rnrn
编译通不过,为什么????帮我看看
/**************************************************************************rnModule:cmdhdr.hrnNotices:copyright(c) 2004 hellenlongrn***************************************************************************/rn#pragma oncernrn#define _WIN32_WINNT 0x0500rnrn#ifndef _M_IX86rn#define UNICODErn#endifrnrn#ifdef UNICODErn#define _UNICODErn#endifrnrn#pragma warning(push,3)rn#include rn#pragma warning(pop)rn#pragma warning(push,4)rnrn#ifndef WT_EXECUTEINPERSISTENTTHREADrn#pragma message("You are not using the lastest platform sdk header/library")rn#pragma message("files.This may prevent the project from building correctly.")rn#endifrnrn#pragma warning(disable:4001)rnrn#pragma warning(disable:4100)rnrn#pragma warning(disable:4699)rnrn#pragma warning(disable:4710)rn#pragma warning(disable:4514)rnrn#pragma warning(disable:4512)rnrn/*rnwhen the compiler sees a line like this:rn */rnrn#define chSTR2(x) #xrn#define chSTR(x) chSTR2(x)rn#define chMSG(desc) message(__FILE__"("chSTR(__LINE__)"):" $desc)rn#define chINRANGE(low,NUM,Hight) (((low)<<<<);
帮我看看指针为什么不对?
我先定义了一个LISTrnlist m_list;rnrn在文本框输入时<em>响应</em>Edit_Change事件并写入以下代码每次改变都将文本框中的内容记录到list中rnCString str1;rnm_Edit1.GetWindowText(str1);rnCString * str=new CString;rnstr=&str1;rnm_list.push_front(str);rnrn然后我加了一个UNDO按纽做以下事情:rnCString * str=new CString;rnm_Edit1.GetWindowText(*str);rnm_list.push_front(str);rnstr=m_list.back();rnm_Edit1.SetWindowText(*str);rnUpdateData(FALSE);rnm_list.pop_back();rn我在调试时总发现当程序执行到str=m_list.back();时它就提示“错误的指针”rn但是m_list的大小是对的。请问这是<em>为什么</em>怎么改?rn
帮我看看为什么图片显示不出来??
struts2rn工程目录结构如下:rn Project rn --srcrnrn --imagesrn --logo.gifrnrn --WebRootrn --WEB-INFrn --librn --pagern --index.jsprnrn --web.xmlrnrnrnweb.xml里rn rn /WEB-INF/page/index.jsprn rnrnindex.jsp的内容rnrn[code=HTML]rnrnrn rnrnrnrn rn rn 登陆 rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[/code]rnrnrn通过http://localhost:8080/Project/ 现在可以访问index.jsp页面,但是上面的图片显示不出来,rn直接http://localhost:8080/PaperProject/images/logo.gif也显示不出图片rnrnrn请问哪里有问题,谢谢!
各位,帮我看看这是为什么
Object[] params = 1;rn这个Object数组中放入数字就会报错,但是在别的工程却又不会报错rn这是报错的信息:Type mismatch: cannot convert from int to Objectrn把 1 换成 new Integer(1)就可以了,请问各位这是<em>为什么</em>?
帮我看看为什么错了。怎么改
ExcelApp := CreateOleObject( 'Excel.Application' );rnxFileName:=ExtractFilePath(Application.EXEName)+'NZFCG.XLS';rnExcelApp.WorkBooks.Open(xFileName);rnrnExcelApp.ActiveSheet.Columns[1].value :='';rnExcelApp.ActiveSheet.Columns[2].value :='';rnExcelApp.ActiveSheet.Columns[3].value :='';rnExcelApp.ActiveSheet.Columns[4].value :='';rnExcelApp.activeSheet.Columns[5].value :='';rnExcelApp.ActiveSheet.Columns[6].value :='';rnExcelApp.ActiveSheet.Columns[7].value :='';rnExcelApp.ActiveSheet.Columns[8].value :='';rnExcelApp.ActiveSheet.Columns[9].value :='';rnExcelApp.WorkBooks.saveas(xFileName);<<<<<<<<<
帮我看看 为什么编译不了?
package wht;rnrnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport com.microsoft.jdbc.sqlserver.SQLServerDriver;rnimport java.sql.*;rnimport java.util.*;rnimport java.io.*;rn//实现对数据库的 插入动作 这是个servlet 打算在表单的action里面提交给它,然后完成rn//可是,编译不过去啊! 我用jsp页面嵌入代码就可以实现,改用servlet<em>为什么</em>不对呢?rnrnrnpublic class InsertServlet extends HttpServletrnrnrnprivate Connection conn;rnrn//构造函数 连接数据库rnrnpublic InsertServlet()rn rn String CLASSFORNAME="com.microsoft.jdbc.sqlserver.SQLServerDriver";rn String DBURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=jspdev";rn String USER="sa";rn String PWD="sa"; rn rn rn Class.forName(CLASSFORNAME);rn conn = DriverManager.getConnection(DBURL,USER,PWD);rn rn rnrnrnpublic void doGet(HttpServletRequest request,rn HttpServletResponse response)rn throws IOException, ServletExceptionrn rnrn rn Statement stmt = conn.createStatement();rn String SQLSTR = "insert into myuser(identify_id,reg_id,user_name,user_state,user_pwd,flag values('D1001','5566','com','00','',0)";rn rn stmt.executeUpdate(SQLSTR);rnrn stmt.close();rn conn.close();rnrnrn //end of doGet()rnrn public void doPost(HttpServletRequest request,rn HttpServletResponse response)rn throws IOException,ServletExceptionrn rn doGet(request,response);rn //end of doPost()rn rnrn异常:都是和sql有关系的,可相关的jdbc都装了 classpath也设置了rnInsertServlet.java:25: unreported exception java.lang.ClassNotFoundException; murnst be caught or declared to be thrownrn Class.forName(CLASSFORNAME);rn ^rnInsertServlet.java:26: unreported exception java.sql.SQLException; must be caughrnt or declared to be thrownrn conn = DriverManager.getConnection(DBURL,USER,PWD);rn ^rnInsertServlet.java:37: unreported exception java.sql.SQLException; must be caughrnt or declared to be thrownrn Statement stmt = conn.createStatement();rn ^rnInsertServlet.java:40: unreported exception java.sql.SQLException; must be caughrnt or declared to be thrownrn stmt.executeUpdate(SQLSTR);rn ^rnInsertServlet.java:42: unreported exception java.sql.SQLException; must be caughrnt or declared to be thrownrn stmt.close();rn ^rnInsertServlet.java:43: unreported exception java.sql.SQLException; must be caughrnt or declared to be thrownrn conn.close();rn ^rn6 errors
高手帮我看看这是为什么
我在类模块中这样写的rnOption ExplicitrnPublic Sub longtask(ByVal duration As sing, ByVal minimuminterval As Single)rnDim sngthreshod As SinglernDim sngstart As SinglernDim blncancle As Booleanrnsngstart = Timerrnsngthreshod = minimumintervalrnDo While Timer < (sngstart + duration)rn If Timer > (sngstart + sngthreshod) Thenrn RaiseEvent percentDone(sngthreshod / duration, blncancle)rn If blncancle Then Exit Subrn sngthreshod = sngthreshod + minmumintervalrn End Ifrn rnLooprnrnEnd Subrn可他提示用户定义类型未定义rnrn
帮我看看代码为什么错误!
protected void denglu_Click(object sender, EventArgs e)rn rnrn OleDbConnection Con = new OleDbConnection();rn Con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +rn "Data Source=" + Server.MapPath("userid.mdb");rn Con.Open();rn OleDbCommand Cmd = new OleDbCommand("select count(*) from userid where uesrname='" + this.name.Text + "'and UserPwd='" + this.psd.Text + "'", Con);rnrnrn int count = (int)Cmd.ExecuteScalar();rn if (count > 0)rn rn Session["URL"] = this.name.Text;rnrn Response.Redirect("LoginSuccess.aspx");rnrn rn elsern rn Response.Redirect("LoginFail.aspx");rn rn Con.Close();rn rn“/”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn至少一个参数没有被指定值。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Data.OleDb.OleDbException: 至少一个参数没有被指定值
帮我看看这个为什么这么做.
CDC& m_dc;//变量申明rn//下面是构造函数.rnCDrawManager::CDrawManager(CDC& m_dc):rn m_dc (m_dc)//初始化引用变量rnrnrnrn问题:1\m_dc<em>为什么</em>要用引用型?rn 2\m_dc的初始化可以放在构造函数里面吗?rn我是采鸟,请高人指点;不明白.
大家帮我看看为什么多了....
1.htmrnrnrnrn creating an elementrnrnrnrnrnrn rnhello1 domrnhello2 domrnhello3 domrnrnrnhello11 domrnhello22 domrnhello32 domrnrnrnrn rnrnrnrn结果中<em>为什么</em>会多了rnnodename:#textrntype:3rn数量:0rnrn
帮我看看结束进程为什么失败?
HANDLE pHandle;rn if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES&&TOKEN_QUERY,&pHandle))rn rn TOKEN_PRIVILEGES tkp; rn tkp.PrivilegeCount=1;rn if(!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tkp.Privileges[0].Luid)) rn MessageBox("Can't lookup privilege value"); rn tkp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; rn AdjustTokenPrivileges(hToken,FALSE,&tkp, sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,(PDWORD)NULL); rn if(!AdjustTokenPrivileges(hToken,FALSE,&tkp,sizeof(tkp),NULL,NULL)) rn DWORD PEER=GetLastError();rn MessageBox("can't adjust");rn CloseHandle(hToken); rnrn rnrn我要结束一个外部进程,我用openprocess再terminateprocess结束不了,说无权限,我找了段代码提高权限,可是显示"can't adjust" GetLastError是句柄无效rnrn我该怎么办呢?
uml.part1.rar uml.part1.rar下载
uml.part1.rar uml.part1.rar uml.part1.rar 相关下载链接:[url=//download.csdn.net/download/mietian/2079428?utm_source=bbsseo]//download.csdn.net/download/mietian/2079428?utm_source=bbsseo[/url]
基于职责设计对象下载
基于职责设计对象 决定方法归属于哪个对象和对象之间如何交互,其意义重大,应谨慎从事。 掌握OOD可以通过在实例中学习和在设计中对模式的命名 相关下载链接:[url=//download.csdn.net/download/sunheartlee/3951576?utm_source=bbsseo]//download.csdn.net/download/sunheartlee/3951576?utm_source=bbsseo[/url]
DSP最小硬件系统下载
TMS320VC5402最小系统硬件设计 相关下载链接:[url=//download.csdn.net/download/moliumei1989/4683184?utm_source=bbsseo]//download.csdn.net/download/moliumei1989/4683184?utm_source=bbsseo[/url]
相关热词 c#串口测试应用程序 c# 匹配 正则表达式 c#防止窗体重绘 c#读写txt文件 c#挖地雷源代码 c#弹框选项 c# 移除 队列 c# 密码写入配置文件 c# 获取可用内存大小 c# 嵌入excel编辑
我们是很有底线的