I have some problems with the ResourceManifest.cs of an Orchard custom module (let's call it 'testmodule'). In the manifest inside this testmodule I defined the following Style:
manifest.DefineStyle("Identifier123").SetUrl("dashboard.min.css");
that is located in the testmodule's Styles folder.
Now in the View (that is also located in the testmodule) I call:
Style.Require("Identifier123");
Unfortunately I get the following dashboard.min.css file added, instead of my file:
/Modules/Amba.ImagePowerTools/Styles/dashboard.min.css
When I rename my dashboard.min.css to dashboard2.min.css (and also in the manifest) it is working fine. Is this a normal behavior or some priority problem caused by Amba.ImagePowerTools? Can someone help me with this?
Related
I am trying to follow the example posted by Adam Pedley at
Introduction to UrhoSharp in Xamarin Forms but have run into a problem. In the following code block, he is loading a custom font:
private void CreateText()
{
// Create Text Element
var text = new Text()
{
Value = "Hello World!",
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center
};
text.SetColor(Color.Cyan);
text.SetFont(font: ResourceCache.GetFont("Fonts/Anonymous Pro.ttf"), size: 30);
// Add to UI Root
UI.Root.AddChild(text);
}
The problem I have is that I don't have this font, and it isn't included anywhere in any kind of Assets folder or anything in his GitHub repository of his demo project at adamped/UrhoSharp.Demo. In fact, in spite of the allusion to a "Fonts" folder in the function call, no Fonts folder exists in his demo solution in any of the projects.
Trying to run the application results in a mono runtime error " [ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Could not find resource...".
In addition, there doesn't seem to be any means of contacting the author to ask (which I find doubly frustrating), so I am having to ask the Stack Overflow community: Where and how do I place custom font assets in my solution (his solution) so that a custom font may be used?
I am currently able to use a custom font in a standard Label with the font file being located in the /Assets folder of both my Sample.Android and Sample.UWP projects, but no combination of path or file name I have tried in the call to GetFont(...) works.
After hours of searching, I finally came across a screen shot showing the proper setup for anyone else who may run into this issue;
I have to say I am unclear on the real reason for the error, but my only observation is that this .css file is being treated as a Lua file for whatever reason, which is why we see the error below.
Module:Citation/CS1/styles.css
http://www.gwart.co.uk/Module:Citation/CS1/styles.css
Other related errors: http://www.gwart.co.uk/Les_Edwards
How can I either fix this issue or alternatively, if needed, make this be a file rather than a module
Probably the page is being parsed as Lua because the content model is "Scribunto". If the TemplateStyles extension is installed, an admin can apparently change the content model of the page from "Scribunto" to "sanitized-css" and the page will be parsed correctly.
Another approach if you are not an admin is to create a .css subpage in the Template namespace and then move it to the Module namespace. Creating it in the Template namespace automatically gives it the "sanitized-css" content model, and it keeps its content model when it is moved to the Module namespace.
There is a Phabricator ticket requesting that Module subpages ending in .css automatically have the "sanitized-css" content model, but I do not know what progress has been made on implementing that.
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).
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.
I have just meticulously followed MS instructions for customising a dynamic data page template for one table. Create the folder CustomPages/MyTable/List.aspx, and copy PageTemplates/List.aspx into that folder, but I now get compiler error because I have duplicated methods in both List.aspx files.
What am I doing wrong?
Just in: I found another, non-MS page that I can't find again now, but he suggested the almost obvious: to change the class name in thej 3 files of my custom list page.
I'm not sure what it says in the instructions, but you'll need to change the namespace in the two codebehind files (List.aspx.cs and List.aspx.designer.cs) and in the "inherits" reference in the .aspx file or yes, you will have duplicate methods (same namespace, same class name, same method name).
You should change the namespace to reflect the path that the custom page is in - this will help ensure it stays unique.