Bang vs. Dot - 最终答案 [英] Bang vs. Dot - final answer

查看:52
本文介绍了Bang vs. Dot - 最终答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用bang(!)运算符完成了所有控件引用。我所有的

控件都被引用为Me!txtInput等。


我现在发现这样做比Intellisense失去的更多。


1.编译不会找到丢失的控件,即如果我有一个引用

Me!btnEdit,并从我的表单中删除该按钮,Compile将不显示

警告。如果我引用了我的控件,* *将*显示警告

Me.btnEdit。


2.编译不会标记某些语法错误 - 例如,错误地

输入我!btnEdit.SetFocus = True


我认为,总是使用点运算符,即使它不是

''正确''。


-

Darryl Kerkeslager

I once did all my control references with the bang (!) operator. All my
controls were referenced as Me!txtInput, etc.

I have now discovered that doing this loses much more than Intellisense.

1. Compile does not pick up missing controls, i.e., if I have a reference to
Me!btnEdit, and remove that button from my form, Compile will not show a
warning. It *will* show a warning if I have referenced my control as
Me.btnEdit.

2. Compile will not flag certain syntax errors - for instance, mistakenly
typing Me!btnEdit.SetFocus = True

Reason enough, I think, to always use the dot operator, even if it is not
''correct''.

--
Darryl Kerkeslager

推荐答案

" Darryl Kerkeslager" <柯********* @ comcast.net>在消息中写道

新闻:BZ ******************** @ comcast.com ...
"Darryl Kerkeslager" <ke*********@comcast.net> wrote in message
news:BZ********************@comcast.com...
我曾经用bang(!)运算符完成了我的所有控件引用。我的所有
控件都被引用为Me!txtInput等。

我现在发现这样做比Intellisense损失的更多。

1.编译没有拿起丢失的控件,即如果我有一个参考
给我!btnEdit,并从我的表单中删除该按钮,编译将不会显示
警告。如果我将控件引用为Me.btnEdit,它*将*显示警告。

2.编译不会标记某些语法错误 - 例如,错误地键入我!btnEdit.SetFocus = True

我认为,总是使用点运算符,即使它不是正确的原因。
-
Darryl Kerkeslager
I once did all my control references with the bang (!) operator. All my
controls were referenced as Me!txtInput, etc.

I have now discovered that doing this loses much more than Intellisense.

1. Compile does not pick up missing controls, i.e., if I have a reference to Me!btnEdit, and remove that button from my form, Compile will not show a
warning. It *will* show a warning if I have referenced my control as
Me.btnEdit.

2. Compile will not flag certain syntax errors - for instance, mistakenly
typing Me!btnEdit.SetFocus = True

Reason enough, I think, to always use the dot operator, even if it is not
''correct''.

--
Darryl Kerkeslager




好​​点。



Good points.


我只用过这个点多年了。

I have used only the dot for many years.


Darryl Kerkeslager写道:
Darryl Kerkeslager wrote:
我认为,足够的理由,要始终使用点运算符,即使它不是''正确''。
Reason enough, I think, to always use the dot operator, even if it is not
''correct''.




如果没有我的点,我将完全迷失。这是一个比

PL / SQL或任何其他编程或开发语言没有
intellisense(受虐狂)好多了,让我告诉你。

-

Tim http://www.ucs.mun.ca/~tmarshal/

^ o<

/#)" Burp-beep,burp-beep ,burp-beep?" - Quaker Jake

/ ^^Whatcha doin? - 同上TIM-MAY !! - 我



I''d be totally lost without my dot. It''s one hell of a lot better than
PL/SQL or any other programming or developing language with no
intellisense (masochism), let me tell you.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me


这篇关于Bang vs. Dot - 最终答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆