Invalid symbol: "default" - xamarin.android

My Android project in Xamarin keeps failing to build due to below error
invalid symbol :"default" default.png res/drawable/default.png
not sure what is causing this to happen.
Any help will be greatly appreciated.
Thanks
Ravi

default is c# keyword, you need rename your picture's name.

As mentioned before default is the keywords and that why it's failing . I wanted to share the lists so you may save your time by not using other keyword . We have quite a large number of keywords in c#:
Please find the few list mentioned in link below:
http://azuliadesigns.com/list-keywords-reserved-words/
https://msdn.microsoft.com/en-us/library/x53a06bb(v=vs.120).aspx
http://www.dotnetfunda.com/codes/show/945/list-of-csharp-reserved-keyword
So if u use any of the reserved names u may come across this kind of error.

Related

carat and New line issues using NHAPI tool in .NET

I'm using NHapi v22 tool for sending HL7 messages. Issue is I'm not able to create component separator(^) and new line. Please tell me how to code for it in C#.
Following is the code:
MSH|^~\&|xyz|xyz|FLOW|FLOW|201601201525||ADT\S\A04|201601201525123456789|P|2.3|||NE|NE
I need to get like this- ADT^A04
I believe the issue here is that \S\ is an escape character for ^ (component separator). Your message should contain an actual component separator with the actual ^ in it, not the escape character.
"ADT" should appear in MSH-9-1 and "A04" should appear in MSH-9-2 as opposed to how I suspect you are doing it with "ADT^A01" in MSH-9.
Does this help? Please feel free to contact me directly if you need more specialized advice.
edit: I don't normally use NHapi but I suspect you may need to do something along this line:
terser.set("/MSH-9-1", "ADT");
terser.set("/MSH-9-2", "A01");
as opposed to something you might be doing
terser.set("/MSH-9", "ADT^A01");

SQLWindows - How to check Line Number?

I am new to SQLWindows IDE and I need to edit a number of SQLWindows applications. I am using Version 3.0.0 of the IDE. I am facing trouble finding the line number of a particular line of code. Is there any setting or way to know the line number of the code? Generally IDEs provide the line number, but I am not able to see any line number details in the [Outline] mode. Kindly help!
SQLWindows doesn't use line numbers at all.
If you want to change similar code lines in several files, I suggest getting acquainted with the CDK, which lets you write applications that alter .app/apt/apl files. Unfortunately wasn't able to find a "Starter Guide" on Google.
Im guessing you have corruption in a apl file ? If so save the file as 'text' , ( never save as Binary i.e. 'Compiled' or 'App' always save using the 'Text' option ) then re-open it. 9 out of 10 any line number errors fix automatically this way . Once you have saved as Text , you can open it and edit it ( carefully ) in Notepad++ .
Its very unusual to need to know a line number....why would you possibly want to know it ? If you explain more , there may be a better workaround ( there always is )

Localizable string in Foundation.framework not found

I'm getting this log warning while using my app and I'm not sure how to deal with this message:
2014-10-21 12:57:54.472 App[7067:2540152] Localizable string "(A Document Being Saved By %#)" not found in strings table "Document" of bundle CFBundle 0x12e508f60 (not loaded).
It seems, the localization file within the framework is missing, which would be really weird. Re-adding the framework didn't help.
Any hints apprechiated.
I'm getting the same message. In my case it looks like both TestFlight and Crashlytics are generating them;
[TestFlight takeOff:#"xxxxxxxxxxx"]; // Generates 2 messages
[Crashlytics startWithAPIKey:#"xxxxxxxxxxx"]; // Generates 1 message
Not causing us any trouble, so leaving them alone for now.
Update
Ok, got to the bottom of it. If you've been doing localization, chances are you probably enabled 'Localization Debugging' in your scheme (Product > Scheme > Edit Scheme in Xcode). If you're wondering why you're getting these messages from the various libraries, it's probably because you still have it enabled.
I just had this problem too.
Since turning off the warning seems like a bad idea (Feels like high risk translations will not work as intended), I tracked down what actually caused the problem.
In my case, the problem was an empty string in the Localizable.strings file. (I used a non-standard way to generate it, the default genstrings tool will not add them)
That is, in one place I had this line:
/* No comment provided by engineer. */
"" = "";
If I removed it, the warning disappeared!
Seems like there is some problem in the string table implementation if you add empty strings, that makes all string tables mess up, not only the one where the problem is...
Maybe someone will find this information useful, so I leave it here.
If you don't specify "Document" then it will look in the file Localizable.strings. Otherwise make sure you have the file Document.strings in your project. Also, "(A Document Being Saved By %#)" looks pretty weird to me. You might want to check this is really what you want as a key for a localizable string.
Here is a link that may help you understand the process
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html
From what i found in my recent project, this error occured when you have the english language (just english with no region) defined in your device.
Since one or more framework will fail to find translation strings you will have this error in your console log.
Hope that helps
Another common mistake is the forgotten ";" at the end of any line in the file, that holds your Localizable.strings. This can easily happen after massive copy and paste. Unfortunately it is not easy to locate, because the compiler does not complain with a line number or any other helpful hint. This can be very painful and tedious, when you have big localizable tables.
The result of that mistake will be, that some translations are found, others not and its hard to find the reason.
My solution to make sure, all keys are proper defined (with the ";" at the end of the line):
Open your file "Localizable.strings" in Xcode
Delete the lower half of the table (for a start)
Press COMMAND + B (build)
If you don't get an error, the problem must be in the deleted lower half. Paste it back, delete now only the lower 25 % and repeat build. Repeat the process until you can better locate the problem.
Looked all over StackOverflow looking for a solution.
And found a mistake.
I just duplicated the localization, for example:
let str = "String".localized
After that, as well:
str.localized
And after that I claim
[strings] ERROR: String not found in table Localizable of bundle
CFBundle 0x14bd01fc0

Xamarin ios - import library

I need help importing a library to Xamarin. I included the library and inserted it into a new folder named BarcodeScanner, and the name of the library is libBarcodeScanner.a.
gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a”
But it shows an error:
Error: Could not parse additional mtouch arguments: No matching quote found.
What should i do ?
Do i need to create a binding project to use a library like BarcodeScanner ?
Error: Could not parse additional mtouch arguments: No matching quote found.
That does not look like a Xamarin.iOS (mtouch) error message. Those start with a MT prefix followed by 4 numbers, e.g. MT2001. Could it be Xamarin Studio giving you this error ?
What should i do ?
Review the flags: are they identical to what's pasted above ?
No matching quote found. makes is sound there's an extra quote in there. Maybe one of the " is wrong (e.g. a autocorrection giving you a smart quote) ?
Or maybe your project directory (replaced from ${ProjectDir} contains a quote character ?
Also can you edit your question to add which version of Xamarin Studio you're using ?
Do i need to create a binding project to use a library like BarcodeScanner ?
No, but it's the preferred ways to link static libraries. Using a binding project removed the need to add Additional mtouch arguments inside every projects and every build configuration (e.g. Debug, Release...) of your applications.
I will answer my own question, maybe it will help someone. I declared in my MainController that i needed:
using MonoTouch.CoreVideo;
using MonoTouch.CoreMedia;
using MonoTouch.CoreGraphics;
using MonoTouch.CoreFoundation;
And after that i referenced only the static library with:
-gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a"
#poupou's "maybe" was spot on, but I'll be pedantic and explain exactly.
Look closely at this line I just quoted from your original question. I've marked it down using code (four spaces prefix per line), and broke it into two lines. Nothing else has been changed. Hopefully the error should be obvious now:
- gcc_flags "-L${ProjectDir} -lBarcodeScanner
-force_load ${ProjectDir}/libBarcodeScanner.a”
Essentially, you used different types of double quotes. The first double-quote character above is Unicode 0x0022, which is the regular Quotation Mark. The second double-quote character above is Unicode 0x8221, or Right Double Quotation Mark. It might be that you had copied & pasted all or part of the line above from a web page, rather than typing it in.
For command-line processing, mixing your styles of double quotes simply won't work. You'll need to use balanced regular quotation marks, as you wrote in your own answer just now (but might not have specifically noticed?) FWIW, the right- and left- variants of the quotation mark are usually used for word processing, web pages, etc. where the style aesthetic matters.
Since you didn't use code-markup when quoting that line originally (while I noticed you did, in your recently posted answer) it looks like Stack Overflow "helpfully" tried to render the quotes as similar in style, fooling us into looking elsewhere for the problem, when it was right in front of us.
Anyway, next time you get an error about mismatched quotes, I suggest you carefully check their type. If they look the least bit different, they may not be the right kind of quotes.

add a new Color scheme to the Rad Studio

It's possible modify or change a color scheme (Color SpeedSetting) in the Rad-Studio?
There is an entry in the Windows Registry? or must edit some file?
Thanks in advance.
It doesn't look easy at first glance.
I found the following under then HKCU path:
\HKCU\Software\CodeGear\ETM\12.0\Color
with the following sub-keys
List item
Classic
Default
Ocean
Twilight
Each key has what appear to be color constants but there doesn't appear to be enough constants to make it the right section.
The list of values under each key:
Auto_TranslatedItemColor
EditBackgroundColor
EditForegroundColor IsOEM
Non_editBackgroundColor
Non_editForegroundColor
SelectionBackgroundColor
SelectionForegroundColor
TranslatedItemColor
UntranslatedItemColor UnusedItemColor
That's all I've got, with out spending a lot more time from the looks of it.
It's probably stored in a BPL as a Opentools API object.
Take a look at OP's https://github.com/rruz/delphi-ide-theme-editor, it supplies thousands of themes. Yes, the OP makes one himself.
Thanks for the OP's awesome project.
Thanks for #Nicholas point out this for me.

Resources