首页 \ 问答 \ 如何设置myapp.herokuapp.com mx记录指向mx.sendgrid.net?(How to set myapp.herokuapp.com mx record to point to mx.sendgrid.net?)

如何设置myapp.herokuapp.com mx记录指向mx.sendgrid.net?(How to set myapp.herokuapp.com mx record to point to mx.sendgrid.net?)

我试图让我的邮件交换器记录指向sendgrid,但我似乎无法在heroku上找到该选项。 有谁知道这个设置的位置?


I am trying to get my mail exchanger record to point to sendgrid, but I cannot seem to find the option on heroku. Does anyone know where this setting is located?


原文:https://stackoverflow.com/questions/20871914
更新时间:2023-05-08 08:05

最满意答案

您希望e.getSource()是输入的数字,但您得到的是导致事件发生的TextField 。 您无法使用<TextFieldTextField与数字进行比较。

由于您直接在TextField上注册ActionListener ,因此您无需检查事件的来源。 你知道它将是TextField

你想要做的是:

在事件的情况下( actionPerformed()仅在TextField中发生操作时被调用),如果按下的键是Enter ,则从TextField获取数字并检查其值。


You expect e.getSource() to be the number entered, but what you get is the TextField which caused the event to happen. You can't compare a TextField to a number using < or such.

Since you register the ActionListener directly on the TextField, you don't have to check the source of the event. You know it will be the TextField.

What you want to do is :

In the case of an event (the actionPerformed() only gets called when an action happened in the TextField), if the key pressed was Enter, get the number from the TextField and check its value.

相关问答

更多
  • 很高兴有关于此错误的更多详细信息。 喜欢哪条线实际上抛出了这个错误。 然而即使没有它,也很少有东西看起来很奇怪。 var playerName:int; // And few lines below playerName = txtPlayer; // Few more lines below var txtPlayer:TextField = new TextField(); 看起来你将playerName声明为int,因此你想存储数值,但是txtPlayer是一个TextField。 所以通过play ...
  • 尝试这个: func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if textField == usernameField, let text = textField.text { let newLength = text.characters.count + string.cha ...
  • 在解析之前,您可以尝试检查 if(contactnumber.trim().length() == 0) { } 此外,您可能希望使用long,因为int将无法存储10位数的联系号码。 Before parsing you may try to check if(contactnumber.trim().length() == 0) { } Also you may want to use long as int won't be able to store 10 digit contact numbe ...
  • 一个问题似乎是您已将selectable属性设置为false 。 当type为TextFieldType.DYNAMIC时,这是有意义的。 但是,当type为TextFieldType.INPUT时,它会出现问题。 禁用文本选择时,不显示任何光标。 我仍然能够编辑文本。 但是,由于光标不可见,我无法更改它的位置,文本会添加到任何现有文本的前面。 One problem appears to be that you have set the selectable property to false. This ...
  • 我在互联网上看到人们使用了事件,但我不确定在这种情况下是否必须使用它。 TextField默认包含空字符串。 如果您不使用某种事件或听众对text属性,则不会获得用户可能输入该字段的值。 在这种情况下,我建议使用TextFormatter来简化事情: TextField tf1 = new TextField(); TextField tf2 = new TextField(); StringConverter converter = new IntegerStringConverter ...
  • 问题是input()函数返回一个字符串对象: >>> n = input("n = ") n = 4.5 >>> x >>> '4.5' >>> type(n) 正如文档所述,当你没有将表示所谓的整数文字的字符串实例传递给Pythons int()函数时,你将得到一个ValueError 。 >>> int(n) Traceback (most recent call last): ValueError: invalid literal for int() with base ...
  • 您希望e.getSource()是输入的数字,但您得到的是导致事件发生的TextField 。 您无法使用<或TextField将TextField与数字进行比较。 由于您直接在TextField上注册ActionListener ,因此您无需检查事件的来源。 你知道它将是TextField 。 你想要做的是: 在事件的情况下( actionPerformed()仅在TextField中发生操作时被调用),如果按下的键是Enter ,则从TextField获取数字并检查其值。 You expect e.ge ...
  • 如果变量50正在工作,那么文本字段的文本显然有问题。 您的文本字段很可能是零。 尝试检查您的代码,看看是否有任何影响您的应用程序成为零。 如果下次发生类似情况,我会告诉你。 例如,您应该总是尝试调试代码,而不是直接将其发布到使用最少代码的堆栈溢出,请尝试自己解决问题! 例如,一种方法可以确定您建议您现在尝试的问题有什么问题,并将结果反馈给我,检查textfield是否为非零,如下所示: if (textfield) { NSLog (@"Text field is not nil! GOOD!"); ...
  • 是的,你试图将字符与不能工作的字符进行比较。 如何只使用字符? public static boolean bs(char key,String N){ 并打电话 bs('5', '25789'); Yes, you are trying to compare chars with ints which wont work. How about only using chars? public static boolean bs(char key,String N){ and call bs('5', ...
  • 无论出于何种原因,正则表达式都被那些文字字符弄得很困惑。 您可以使用这些数字的十六进制代码使其工作: function convertToEnglishDigit(input) { var numberMap = { '\u0660': '0', '\u0661': '1', '\u0662': '2', '\u0663': '3', '\u0664': '4', '\u0665': '5', '\u0666': ' ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。