How does one disable deprecated warnings in Flex 3? - apache-flex

I've recently started working with an application written using Adobe Flex 3. We're using several deprecated functions and unfortunately we can't remove these dependencies.
The documentation says to set -show-deprecated-warnings=false into the Compiler Additional Options. This isn't accepted, but I've found that using -show-deprecation-warnings=false will be accepted by the dialog, but gives an error about declaring the option twice when I try to compile the project.
Ideally, I'd like a way to disable the warning on a case-by-case basis. Failing that, can anyone help me to disable the warnings either per-file, per-project or globally?

As an update for recent versions, I added a compiler option in FlashDevelop:
-show-deprecation-warnings=false
This worked for me.

This link suggests that it doesn't work properly anyway, and the only real answer is to turn off warnings altogether.
Adobe Jira 13569
You can turn off warnings by using a custom flex-config.xml file for each project / globally. Just point the compiler at the right file.

I've found a partial workaround: filter the warnings from the 'Problems' tab. This doesn't get rid of the next-to-the-source warning markers, but it's the Problems tab which I'd like to be clean.
Click the filters button on the Problems tab, change 'Description' to 'doesn't contain' with text 'deprecated' and hit OK.

Related

Edit is missing and Add Item not working in 2sxc 9.32.1 on DNN EVOQ BASIC v. 09.01.01

Just upgraded to DNN EVOQ BASIC v. 09.01.01 (113) and 2sxc 9.32.1
After placing the Content module on a page, some of our templates do not have Edit options and some of them that have an Add Item option doesn't do anything after clicked.
When I click on Add Item, I get this error:
Uncaught SyntaxError: Unexpected token T in JSON at position 0
at JSON.parse (<anonymous>)
at Object.t.showDetailedHttpError (ToSic.Sxc.Instance.ts:73)
at fire (jquery.js?cdv=209:1037)
at Object.fireWith [as rejectWith] (jquery.js?cdv=209:1148)
at done (jquery.js?cdv=209:8076)
at XMLHttpRequest.callback (jquery.js?cdv=209:8598)
This sounds like a skin / container compatibility issue, the "content module" you mention, is this the core text / html module or something else?
As a test, change the page skin and or module container to one that comes with the core 9.1.1 install and retest
DC
I don't know for sure what's happening, but let me give you a bit of background. When an editor is on the page, 2sxc adds some configuration information as json in the html-attributes, which the UI the needs to know what you were clicking on etc.
To me it sound like something is breaking this - either because a server-side filter is changing the HTML (not likely, but possible), or another javascript is running which changes the DOM, resulting in removed or broken attributes.
To get this resolved, pls verify that you can find these jsons in the html-tags (they are very obvious) by looking at the html-source. If they are there and look ok, it's not the server that's breaking it.
Then check if they are still there in Chrome-Debugger (F12) which doesn't show you the source as the server sent it, but the source as the browser currently has it. I'm pretty sure it will be off somehow, because maybe a neat jQuery mangles the HTML.
Love from Switzerland,
iJungleboy

Eclipse - annoying error when editing css files

Each time I edit a css file in Eclipse, I get this error. It really keeps me from doing my work, because it pops up almost after each character.
Can't find resource for bundle java.util.PropertyResourceBundle, key css2.stylesheet-def.description
I would like to disable the parsing for css in order to not get this error anymore, but I didn't find how. Can you give me any tip on how to solve this issue ?
This sounds like Eclipse bug 419986 which says it because of missing translations in the CSS property files.
The bug report suggests deleting the localization plugin (such as org.eclipse.wst.css.core.nl_fr_4.3.0.jar works around the problem).

Log .less errors to console

Each time I have a .less syntax error I have to open the exact less file in browser in order to view the error message.
I was wondering if it is possible to somehow output .less errors to console so I can view all errors directly in the Console log when - for example - using Firebug?
I'm using dotless. I tried setting the webconfig to (by following info this link )
<dotless minifyCss="false" cache="false" web="false" log="error" logger="dotless.Core.Loggers.ConsoleLogger" />
but seems like I'm missing something - not really sure, if I understand the logger correctly.
Also the info about logger on the site states:
Can be set but then gets overidden by the "web" boolean
Does this mean that I must not set the web boolean? How could I make this work?
EDIT AFTER FEW ANSWERS
Ok so I figured out that in order to achieve this result I need to extend dotless.Core.Loggers with my own logger class. Have no idea how to do it but will report back once I get it figured out.
If you're using Visual Studio, you can try using Web Essentials extension, which is free on the gallery. This add-in compiles .LESS on save, and gives you the errors in the output console. You can also see the compiled .css side-by-side as as you edit the .LESS.
It looks like a similar question has already been answered here
In any case, looking at the link you indicated, it makes it clear that you need to set web="true" or miss it out as it seems to be the default.
ConsoleLogger means the Console, not the browser console.
So, you need to set the logger to the one you prefer that works with HTTP (definitely not Console though).

Flex: build error - runtime-shared-library-path

I recently switched a Flex project over to using RSLs. It built fine for quite a while but has recently dug its heels in and is giving me this error:
configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'
I went through all the flex XML files I could find and either this value doesn't exist or there are entries available for it. Nowhere did I see a <rs-url></rs-url> with no value.
Clearly this points to some deeper issue. Suggestions on where to look?
In Flash Builder, this value is edited through the project properties under the Flex Build Paths menus. Normally you should see your referenced library here. Double click on the "Link Type" line. Be sure link type is setted to RSL and click the Add button on the right to add a new URL path for your RSL. I suggest you use you main SWF root as it's simplier (ex : myRSLlibrary.swf).

Could not resolve * to a component implementation

I'm a wee bit stuck on this, and was hoping you might have some input to help me.
I'm getting the "Could not resolve * to a component implementation." error message. However, everything I've read about this via Google hasn't helped my case in the slightest. I presume I'm just missing something obvious, but maybe its something more serious.
So, to solve this problem, I've tried two things, and both work, as far as they take me. First, I added a new component, of the exact same variety, and then copied the contents of the erroring component into it. I replace the viewstack 'page' with the new component (which as near as I can tell is IDENTICAL, but with a different name), and the compiler error goes away.
I can also solve this by simply renaming the original component & letting FB4 refactor for me. The error goes away again. But if I then re-rename back to the original name, I get the compiler error again.
I've tried to clean the project several times, and that doesn't help. Neither does deleting the workspace, and re-importing the project.
I'd really like to understand what I've done wrong here. What am I missing?
Thanks much!
Try the following:
Right-click on your project in the
Package Explorer.
Select "Properties" in the pop-up
menu (last item).
Click "Flex Library Build Path"
Click the "Classes" tab
Try to find the name of your new component in there. If you do, see if it is checked or not. If it is not, check it. That should solve the problem right there, but you may have to clean and (sometimes) quit FB4 and relaunch.
Usually errors like this means you have two components named similarly and the compiler couldn't tell which one you wanted to use.
Do you have another component with the same, even in a different package? Or do you have a variable in your component the same name as the component? Be sure to check your SWCs and/or Library projects.
I'm assuming this is a compile time error; is that correct?
In my case the problem was solved by changing the SDK version of the Flex Compiler to 4.5
You can try with different SDK versions, until you get your component to compile or until the error changes to something related to a theme related error.
After changin this I got an error related to a propertie that is not supported by the current theme, so I open the component in design view and in the Properties View selected the Appearance tab and changed the theme from SPARK to HALO
Hope this is usefull for somebody else
One cause of this error is that the default xml namespace for the component is not the same as the the package in which the component resides.
Check to make sure that the default xmlns entry in the component definition is the same as the package.
For example:
If you have an component MyControl.mxml located in the package com.company.components.controls
The mxml opening tag might look something like this:
<MyControl xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:util="com.company.components.util.*"
xmlns:components="com.company.components.*"
xmlns="com.company.components.controls.*">
Note how the default xmlns entry points to the same package.
Why this happens:
What often happens is that after you refactor an MXML class by moving it to a new package you will end up with a an valid but not correct mxml definition.
For example say I refactor and move the MyControl.mxml from the com.company.components package to the com.company.components.controls package. The xmlns definitions will not be updated so they will look like this:
<controls:MyControl xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:util="com.company.components.util.*"
xmlns="com.company.components.*"
xmlns:controls="com.company.components.controls.*">
Note how the default namespace still points to the com.company.components package and the mxml tag MyControl has to be prefixed by the namespace controls this is an indication of the issue.
Now here is the catch; This is technically valid and will often work. The reason is that it is valid and the components can all be found in their defined xmlns locations.
The problem comes when you try to use a component that is expected to be found, by the framework or parent component, in the default namespace. A good example of this is and other subcomponents of the parent mxml component you might be extending.
To fix this you should modify the mxml tag and namespaces so that the default namespace is the same as the current package. (As in the first example)
Might be I am very late to answer this question, but this might be because the package name which is associating with your class is not the exact and appropriate.

Resources