xcode wrong error. I deleted the line with the error and the error is still there, on a blank line - xcode7

I just delete the var isTied and an error appears at the next line where I referenced this var. So I delete the reference but the error is still there, even with the blank line.
I tried to put back the variable and a reference to it, but no effect.
Another error appears at class ViewController: UIViewController : "Class "ViewController" has no initializers". And refers to an variable that I leave without value
var whoIsTheWinner : Int
So I just add a value:
var whoIsTheWinner : Int = 3
The error remains at the class ViewController and at the variable the error is now gray instead of red...
I can't see any errors and I already tried to close and re-open xcode.
Any ideas?
My Xcode is 7.2(7C68)

Have you tried doing a deep clean of the project?
Clean build with
Shift+Cmd+K
Clean build folder with
Option+Shift+Command+K

Related

how can i fix the "ran out of input" error

I'm trying to make a listing program for a school assignment where i can add things and delete things from a text document, however i keep running in to this "ran out of input" error that i cant figure out.
all im trying to do is open an empty file that can be edited
mainList = pickle.load(file_handler)
print(mainList)
input()
i am then presented with this error:
mainList = pickle.load(file_handler)
EOFError: Ran out of input
anyone got a good fix?

SSIS : I am trying to get the error column name using the script component. However I get error for the code below

I am trying to get the error column name using the script component but am getting an error for the below line:
var componentMetaData130 = this.ComponentMetaData as IDTSComponentMetaData130;
Row.ErrorColumnDescription = this.ComponentMetaData.GetIdentificationStringByID(Row.ErrorColumn);
The type or namespace 'IDTSComponentMetaData130' could not be found.
If anyone can guide me for the same.
I don't think "as" is legal syntax in a Script Component. Can you try removing that so the code is:
var componentMetaData130 = this.ComponentMetaData;
EDIT: Ah, my mistake. I think I've found the code you're referring to. Does replacing the "var" with "IDTSComponentMetaData130" work:
IDTSComponentMetaData130 componentMetaData = this.ComponentMetaData as IDTSComponentMetaData130;
Row.ErrorColumnName = componentMetaData.GetIdentificationStringByID(Row.ErrorColumn);
IDTSComponentMetaData130 is SQL Server 2016 and above only.
It is described here: https://learn.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.dts.pipeline.wrapper.idtscomponentmetadata130?view=sqlserver-2016
If you go to that link, you'll see a dropdown that shows the available versions.

SSIS - Error when passing object from one script task to another

I am passing object of a class from one script task to another. I have declared a package level variable by the name IPSService which is of type object.
The first script task contains the following piece of code
IPSService iPSService = new IPSService();
Dts.Variables["IPSService"].Value = iPSService;
I get an exception at the second line of code where the assignment happens.
The error message is as follows.
he element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.
Could somebody tell me what the issue is ?
You need to refer to the variable like this, notice the use of User:: in the variable name:
Dts.Variables["User::IPSService"].Value = iPSService;

MS Access VBA Compile Error on "x="

Everytime I try to compile my VBA code, I'm getting an error that says "Can't find project or library".
I have no idea which library I'm missing because all that the debugger highlights is a portion of one of my VBA lines:
x=
the full line looks like this:
x = MsgBox("You must select a manufacturer")
Any clues what library I need to include?
Thanks Hans,
I didn't notice that one of my references was labeled as "MISSING".
...
First thing to check: from VB Editor main menu, choose Tools->References. If any of the selected (checked) references are "Missing", all sorts of weird crap can happen with your code. Fix any that are missing

Why am I getting "Unrecognized identifier" in my SSRS custom code?

I'm trying to make use of the custom code feature within SSRS (SQL Server Reporting Services), but keep getting an "Unrecognized identifier" message in the Expression Editor.
Here's my custom code. Actually, the final routine will be more complicated than this, but I'm trying to simplify things to figure out why the error is happening.
Public Function GetCutoffDate(batchNumber As String) As DateTime
Return New DateTime(Now.Year, 12, 31)
End Function
Here's how I reference the code in the Expression Editor.
=IIf(UCase(Fields!MailId.Value) = "VARIOUS",
Code.GetCutoffDate(Fields!BatchNumber.Value),
Fields!CutOffDate.Value)
I'm getting a red underline under the "GetCutoffDate" portion of Code.GetCutoffDate(..). Also, the message "Unrecognized identifier" appears when I hover my mouse over the "GetCutoffDate" text.
What am I missing?
I've also tried the following in the Expression Editor but keep getting the same "Unrecognized identifier" message.
=Code.GetCutoffDate(Fiels!BatchNumber.Value)
I must be overlooking something, but can't see what it is.
Thanks.
Try
Public Shared Function GetCutoffDate(batchNumber As String) As DateTime ...
in the function declaration, which has worked for me.
Turns out my custom code would still work, despite getting the "Unrecognized identifier" message. I was getting confused because the dataset I had specified was return back zero records.
Still not sure why the "Unrecognized identifier" message comes up, though. Very annoying.