Compile IDL file error - idl

I'm using VS 2008 Pro.
I have 1 idl file which contains:
module views {
// Introduced in DOM Level 2:
interface [
ObjCCustomImplementation,
OmitConstructor
] AbstractView {
readonly attribute Document document;
readonly attribute Media styleMedia;
};
}
(That's all, no more in the file.)
When I build the file (right click to file and press Compile, error occurs as following:
AbstractView.idl
..\page\AbstractView.idl(30) : error MIDL2025 : syntax error : expecting a type specification near "interface"
..\page\AbstractView.idl(31) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
What is the problem? How can I fix this?

Maybe it should be other way. As far as I remember, first you must define attributes, then interface itself. This link can be useful.

That might be a CORBA IDL file rather than a MIDL file.

Related

GlideApp symbol not found in Android Studio 4.1

I have been using Glide 4.11.0 and Realm 6.0.2 for some time now, and recently upgraded Android Studio 4.0.x to 4.1. All has been going fine. Today I ran the lint checker, and started doing some "clean up", nothing out of the ordinary (it would seem). One of the things I did a lot of was to replace switch statements that were testing against R.id. with if-else statements per the lint warning about what's gonna happen in Gradle 5.0.
When I did this, I did use a number of int variables I named 'id' that were to replace the value to compare - i.e. instead of a switch statement that would be:
switch (menuOpt.getId()) {
case R.id.xxx:
...
}
I would do:
int id = menuOpt.getId();
if ( id == R.id.XXX) {
} else if....
per the new guidelines.
Suddenly, on a full build AS complains that it no longer recognizes GlideApp, and I am also getting a very weird message about Realm not being able to process correctly:
C:\BLD\AndroidStudioProjects\InTouch\app\src\main\java\com\reddragon\intouch\ui\MediaPlayerActivity.java:61: error: cannot find symbol
import com.reddragon.intouch.utils.GlideApp;
^
symbol: class GlideApp
location: package com.reddragon.intouch.utils
C:\BLD\AndroidStudioProjects\InTouch\app\src\main\java\com\reddragon\intouch\ui\MediaDialogActivity.java:92: error: cannot find symbol
import com.reddragon.intouch.utils.GlideApp;
^
symbol: class GlideApp
location: package com.reddragon.intouch.utils
C:\BLD\AndroidStudioProjects\InTouch\app\src\main\java\com\reddragon\intouch\ui\MediaListActivity.java:48: error: cannot find symbol
import com.reddragon.intouch.utils.GlideApp;
^
symbol: class GlideApp
location: package com.reddragon.intouch.utils
Note: Version 10.0.0 of Realm is now available: https://static.realm.io/downloads/java/latest
Note: Processing class Album
error: Class "Album" contains illegal final field "id".
Note: [1] Wrote GeneratedAppGlideModule with: []
Class "Album" contains illegal final field "id".
4 errors
I have had the field 'id' in my Album class for about 2 years with no issues!
No manner of rebuild, invalidating cache and restarting, syncing gradle files or "reload all from disk" seems to help.
Actually, if I invalidate and restart, I don't get the red squiggle in the offending classes that are referencing GlideApp, but as soon as I start to run the app and it goes through a build process it errors out.
I Googled a bit and found one post where there seemed to be some conflict between Realm and Glide (RequestOptions), but the strange thing to me is why would this suddenly start occurring?
I have validated that the GlideAppjava class is in fact getting built - I am using the debug build variant, and I can see in the file system GlideApp.java that is in the ap_generated_sources/debug directory in the proper package where I have my class that extends AppGlideModule with the #GlideModule annotation.
So GlideApp is getting generated. It just isn't getting recognized.
One of the other new things is that I've recently created a Dynamic Feature module. This module does depend on a class that is in the base module (where GlideApp is referenced). Not sure if this is relevant (I had many, many successful builds before I started doing lint clean-up).
So frustrating! Any help appreciated.
It turns out that the answer was staring right at me, although somewhat hidden: part of the lint check that I did was accept some suggestions about making variables 'final' - including those that are used in Realm classes to define Realm objects. Realm doesn't like that - above build error output includes as a last line the statement 'Class "Album" contains illegal final field "id".'
"Album" extends RealmObject, and the "auto accept" of the lint's suggestion to make some of the fields final was the culprit.
I think this issue with Realm caused a ripple effect somehow with the other annotation processing - when I went back to all the RealmObject classes and removed the "final" declaration, build now completes smoothly.

The NewtonSoft.Json.xml file has references to a file that is not shipped with it which results in Sandcastle breaking

I am trying to reference Newtonsoft.Json.xml as part of documenting my own code that is dependent on it.
When I try and compile my help file in Sandcastle I get the following error:
BuildAssembler : error : [...\BuildTopics.proj]
BuildAssembler : error : CodeBlockComponent: [N:Newtonsoft.Json] Unable to load source file '...\Visual Studio 2017\Projects\CBUSAlexa\trunk\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs'
Error: Could not find a part of the path '...src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs'. [...\BuildTopics.proj]
(some paths have been obfuscated)
Looking in the Newtonsoft.Json.Xml I see:
<member name="T:Newtonsoft.Json.DefaultValueHandling">
<summary>
Specifies default value handling options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
</summary>
<example>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs" region="ReducingSerializedJsonSizeDefaultValueHandlingObject" title="DefaultValueHandling Class" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs" region="ReducingSerializedJsonSizeDefaultValueHandlingExample" title="DefaultValueHandling Ignore Example" />
</example>
</member>
This code is not shipped as part of the Json.NET install and hence the src path is missing (which makes sense as they are tests) and yet Sandcastle should not just abandon the build as they are missing.
I would like the build to complete and ignore these linked files - or should there be guidance around shipping any files referenced in the documentation xml file?
In the Components tab of the Sandcastle Help File Builder for your project, select the 'Code Block Component' and add it to your project. When configuring it make sure 'Allow missing source code files/regions' is checked.
It is kind of misleading, as it appears that if the component is not added that it shouldn't attempt to look for these items. Note also that the Build tab 'disable the custom code block component' is different from the above so checking that will have no impact on your build error.

How to remove the 'WARNING: CSS Error parsing':

There is a warning everytime I run the program, I don't know where the problem is because at [1, 19] of all of my css files I have a comment. I tried to fix this by removing the comment and it made no difference. Please help.
WARNING: CSS Error parsing '*{-fx-font-family: ;}: Unexpected token ';' at [1,19]
[]1
In javaFx you can use CSS with two ways : you can customise your fxml file by using scene builder or by according a css file.I had the same problem ,when the JavaFX CSS parser encounters a syntax error, a warning message is emitted which conveys as much information as is available to help resolve the error. For example
WARNING: com.sun.javafx.css.parser.CSSParser declaration Expected
'' while parsing '-fx-background-color' at ?[1,49]
The cryptic '?[1,49]' pertains to the location of the error. The
format of the location string is
[line, position]
If the error is found while parsing a file, the file URL will be given. If the error is from an inline style (as in the example above), the URL is given as a question mark. The line and position give an offset into the file or string where the token begins. Please note that the line and position may not be accurate in releases prior to JavaFX 2.2.
Applications needing to detect errors from the parser can add a listener to the errors property of com.sun.javafx.css.StyleManager. This is not public API and is subject to change.
I think you add a value by using scene builder and you are adding ; to your value and this is not acceptable in scene builder you need to remove ;.
To resolve your problem ,go to your fxml file in your IDE ,i think you are using Netbeans and click right button of mouse --> edit , you can find your warning.

ASP.NET how to resolve CS1513: } expected error on page

I am getting an error at run time when viewing my ASP.NET page in the browser. I am not getting any build errors however I am getting the following compiler error at runtime:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1513: } expected
Source Error:
Line 329: #line hidden
Line 330: __output.Write("\r\n\t\t\t</div>\r\n\t\t");
Line 331: }
Line 332:
Line 333: private System.Web.UI.Control __BuildControl__control7() {
Source File: c:\Windows\Microsoft.NET\Framework\v1.1.4322\
Temporary ASP.NET Files\xxxxxxxx\450ffa78\d46d847d\
k1gsz9dj.0.cs Line: 331
I cannot locate any missing } in my source code and this error is occurring in the generated code files that exist in the Temporary ASP.NET Files directory. How can I trace this to the line of code that is actually malformed in my page or user controls on my page?
If the error code related as following:
A variable name same as reserved word then you can rename variable.
A code segment such as:
#model MyModel
{
var appname = #Model.Apps.FirstOrDefault(x => x.ID == Model.SelectedApp);
}
Remove '#' coming before Model.Apps.FirstOrDefault(x => x.ID == Model.SelectedApp)
A code segment or section usage such as:
#section{
<!-- hiiii it's not about an error -->
}
Remove the apostrophe from comment in section.
If it is none of these specific cases you can attempt to locate where the error is generated by applying a source reduction. Delete/cut/comment out pieces of code until you can reliably turn the error off and on. The code that turns the error on is likely the culprit if it is not one of the above situations.
Look in the markup (aspx or ascx) for blocks like:
<% ... some C# code.... { %>
markup(controls, html etc)
<% } %>
Any opened bracket { needs to be closed with another bracket }.
These pages or controls are compiled once by ASP .Net when they are first requested.
Visual Studio doesn't compile aspx or ascx files.
If the project is "Web Site" type, Visual Studio compiles the aspx/ascx files, but if the project is "Web Application" type Visual Studio doesn't "compile" the markup (it does not generate the corresponding classes to the aspx/ascx markup)
On my site, the problem was caused by a block of code that looked like this:
#{
var currentNode = #linkedList.Find(#CurrentPage);
if (#currentNode.Next != null)
{
var next = #currentNode.Next;
<li>
#next.Name
</li>
}
if (#currentNode.Previous != null)
{
var prev = #currentNode.Previous;
<li>
#prev.Name
</li>
}
}
I'm not sure why the problem was caused by the nesting. This may be a bug in the compiler.
I got a similar problem and oculd find it only after a log of trial and error.
The error I made was to add a '#' to variables inside a foreach loop which started with:
#foreach
Well as the error suggests, you are missing a closing curly brace '}'
Have a look at the msdn compiler errors documentation:
http://msdn.microsoft.com/en-us/library/83ht1k63(v=vs.80).aspx
As in the example on MSDN:
// the below will cause CS1513 since namespace is missing '}'
namespace y
{
class x
{
public static void Main()
{
}
}
try to compile it in visual studio. i think it will also show where the exact line of the code that has incomplete curly braces.
compilation error cs1513

requires named attributes

After I migrated my project from Windows to Mac, every time I try to embed an asset in Flash builder like this:
[Bindable] [Embed("assets/assets.swf#mySymbol")]
public var myClass:Class;
I get this error:
[Embed] requires named attributes
if I close the files containing the embedding, it compiles fine and doesn't give any problem.
I googled the error, and haven't found anything similar.
If I remember correctly:
[Embed(source="assets/assets.swf", symbol="mySymbol")]
These are named attributes FB is telling you about - source and symbol.
Update: as Jason Towne mentioned, the only required attribute is source. Symbol allows to bind specific symbol from swf to variable.

Resources