Questions tagged [nothing]

In VB.NET, Nothing refers to something which has not been initialized. In C# it would be null. Occasionally used in the Scala type system.

140 questions
2
votes
2 answers

Webbrowser control's window.external is ALWAYS null

The Web browser's Window.External object is always null! To reproduce drop a web browser on a new winform and type: Option Strict Off Public Class Form1 Private Sub Form1_Load() Handles…
Elijah
2
votes
1 answer

Object variable or block variable not set when processing HTMLSelectElement

I'm trying to run the below user defined function, but I receive the following error: object variable or with block variable not set Private Function Find_Select_Option(selectElement As HTMLSelectElement, optionText As String) As Integer Dim…
prashant
  • 53
  • 6
2
votes
1 answer

Result set to Scala HashMap

I am trying to build a hashmap from pairs returned in a jdbc call using the following code val query = "select x,y from tablename" val rs = stmt.executeQuery(query) var lookup = new HashMap[String,String]() while(rs.next()) { lookup = lookup +…
Slayer6
  • 121
  • 6
2
votes
1 answer

Scala : Type Nothing with User defined classes

In scala Nothing is a subtype of every other type. scala> class A {} defined class A scala> def x[T >: Nothing](t: T): Unit = {} x: [T](t: T)Unit scala> x(new A) When we create an arbitrary class, it automatically becomes a supertype of…
tharindu_DG
  • 8,900
  • 6
  • 52
  • 64
2
votes
2 answers

Why does creating a map function whose parameter is of type `Nothing => U` appear to work?

I'm writing Scala code that uses an API where calls to the API can either succeed, fail, or return an exception. I'm trying to make an ApiCallResult monad to represent this, and I'm trying to make use of the Nothing type so that the failure and…
Daniel McHenry
  • 305
  • 2
  • 9
2
votes
3 answers

How do I make an integer to null in Excel VBA?

I am trying to detect whether an integer was set, and if not, skip most of the code in the loop (using an if statement). Here is what I have so for. Do While hws.Cells(r, 9).Value <> "" On Error Resume Next ar = Null ar =…
Arlen Beiler
  • 15,336
  • 34
  • 92
  • 135
2
votes
1 answer

Actually what is Nothing - How it is converted

I have a VB class library with a test method. Which will return an Integer (sometimes Nothing will be returned). Public Class Class1 Public Function testMethod() As Integer 'Some code here Return Nothing End Function End…
Suji
  • 1,326
  • 1
  • 12
  • 27
2
votes
3 answers

Is there any point in having default form String.IsNullOrEmpty(str) instead of str.IsNullOrEmpty()?

.NET libraries have String.IsNullOrEmpty(value As String). I can create more comfortable .IsNullOrEmpty() by simple extension method: Function IsNullOrEmpty(s As String) As Boolean Return String.IsNullOrEmpty(s) End…
miroxlav
  • 11,796
  • 5
  • 58
  • 99
2
votes
2 answers

VBA find returns "nothing" in userform

I have a worksheet in which column "A" to "I" are filled with data. Column a contains dates from 30/11/2011 to 6/12/2011. I have a userform in which there are 2 optionbuttons. When the first is selected, all dates are used. When the second is…
Antares797
  • 97
  • 2
  • 9
2
votes
3 answers

Concatenate IQueryable starting with Empty IQueryable in VB

I am trying to concatenate multiple LINQ requests returns (all the returns are IQueryable). My problem is that I need to start with an Empty IQueryable variable, but the ".Concat" method doesn't work with a variable that is "Nothing". I was…
David Gourde
  • 3,709
  • 2
  • 31
  • 65
2
votes
1 answer

How to handle nothing in a foreach loop

I have the following function: Public Sub performautowebrowserOperations() Try For Each link As HtmlElement In WebBrowser2.Document.GetElementsByTagName("input") 'sometimes throws a null reference exception If…
user1570048
  • 880
  • 6
  • 35
  • 69
2
votes
2 answers

C# COM Interop returning object of null causes 0x800A01A8 Object required

I'm writing COM wrappers that return an object, or null if the object does not exist. When calling from VBScript, returning null throws the error "Object required: 'ComObj.Prop2'" Code 800A01A8... C# public class testCOM { public object…
FuncL
  • 21
  • 4
1
vote
1 answer

How to replace value types with nothing?

I am writing a vb.net application which calls a webservice method. The webservice method in question accept some 20 parameters, such as (string x, string y, string z.... Integer a, Integer b, Integer c). Its possible that any one of the integers (a…
n00b
  • 4,341
  • 5
  • 31
  • 57
1
vote
2 answers

Found object returns Nothing despite being set within an "If not ... is nothing" check

I am trying to find a string in a row and then select the found cell. For this I have the following part of code: currentRelease = Worksheets("Summary").Cells(5, "I").Value Set myrange = Worksheets("Summary").Rows(15) If Not…
Toni92
  • 27
  • 7
1
vote
1 answer

Using Just and Nothing Haskell

I am implementing a lambda calculus interpreter and one of the functions I have to write is specified as follows. I have written all of the other functions but this one is really giving me trouble because it needs to return either Just Expr or…
Person6273
  • 13
  • 3