I am using flex 4 and I want to custom the preloader, but I meet error of DownloadProgressBar. The code:
public class MyPreLoader extends DownloadProgressBar
{
var progress:ProgressBar = new ProgressBar();
Or substitude ProgressBar to Label will produce the same error:
Error: Could not find compiled resource bundle 'collections' for locale 'en_US'.
Anyone has implemented the custom preloader? I am almost missing here.
Resolved by adding:
[ResourceBundle("")] tag in the source!
Hope this can help others.
Related
I am having trouble utilising the libserialport.dart package. I have put a libserialport.so in the root of the project. When trying to run an application I get the following error:
Unhandled exception: Invalid argument(s): Failed to load dynamic library 'libserialport.so': libserialport.so: cannot open shared object file: No such file or directory
This tells me that the package is looking for the file somwhere else - but where?
The original library links the library this way, which results in it not finding the library:
LibSerialPort? _dylib;
LibSerialPort get dylib {
return _dylib ??= LibSerialPort(ffi.DynamicLibrary.open(
resolveDylibPath(
'serialport',
dartDefine: 'LIBSERIALPORT_PATH',
environmentVariable: 'LIBSERIALPORT_PATH',
),
));
}
If I replicate the plugin locally, but changing the linking as such, the library works as expected:
var libraryPath =
path.join(Directory.current.path, 'libserialport.so');
LibSerialPort? _dylib;
LibSerialPort get dylib {
return _dylib ??= LibSerialPort(ffi.DynamicLibrary.open(libraryPath));
}
The question is: where to put the .so file so it would work with the original verison? Where does resolveDylibPath() link to?
If possible I would like to avoid using my modified version as that brings license implications I am not entirely sure how to deal with.
Apparently the function looks for the path in the LIBSERIALPORT_PATH enviroment variable. Setting it to '.' made it work!
In the terminal:
export LIBSERIALPORT_PATH=.
I am trying to include custom icons as described in this post. But I can not find the #HtmlImport annotation anymore (Flow V. 20). This annotation was widely used, should it have been replaced I would expect to find at least some documentation.
P.S. I also tried #StyleSheet("./styles/iconexp-iconset-svg.html")
bit it complains:
Couldn't find route for 'styles/iconexp-iconset-svg.html'
Bower was deprecated in favor of npm and HTML Imports in favor of ES modules in Vaadin 14. I don't remember when they were removed, but they are no longer supported in Vaadin 20.
You can check the migration instructions here: https://vaadin.com/docs/v14/guide/upgrading/v10-13/#migration-steps
Building off of Jouni's, here is an example using #JsModule.
(1) Define your iconset in a JavaScript file.
import '#polymer/iron-iconset-svg/iron-iconset-svg';
const templateElem = document.createElement('template');
templateElem.innerHTML = `
<iron-iconset-svg name="namespace"><svg><defs>
<g id="iconname">...</g>
...
</defs></svg></iron-iconset-svg>
`;
document.head.appendChild(templateElem.content);
(2) Import the file in your root layout class.
#JsModule("./icons.js")
public class RootLayout...
I'm currently upgrading a TYPO3 extension from v9 to v10 which uses mpdf/mpdf.
In Services.yaml I've added
mPDF\:
resource: '../../../../../vendor/mpdf/mpdf/'
But now I end up with this error message:
Expected to find class "mPDF\MpdfException" in file
"/var/www/xxxx/vendor/mpdf/mpdf/MpdfException.php" while importing
services from resource "../../../../../vendor/mpdf/mpdf/*", but it was
not found! Check the namespace prefix used with the resource.
The problem is, that the class is MpdfException and not mPDF\MpdfException.
I tried to add
MpdfException\:
resource: '../../../../../vendor/mpdf/mpdf/'
This didn't work.
Next I tried to add this to the global composer.json:
"autoload": {
"psr-4": { "mPDF\\": "vendor/mpdf/mpdf/" }
}
but that didn't work either.
Many thanks for your effort to help me, Julian! Much appreciated! It turned out that the extension had a requirement for an outdated version of mPDF. After using the latest version of mPDF it now works. Nevertheless I still need Services.yaml.
I'm trying to add native swift code to my NativeScript app. According to these instructions in the documentation I can just add a swift source file to App_Resources/iOS/src/ and then use any publicly exposed classes directly in my TypeScript code.
Unfortunately this just doesn't work. I'll just get Cannot find name 'TestClass' and that's it.
Steps to reproduce:
Get a fresh NS project with ios tns create my-app-name --template tns-template-blank-ts
Update: I actually created the App with vue init nativescript-vue/vue-cli-template testapp. That seems to have caused the problems.
Add a TestClass.swift to App_Resources/iOS/src/
import Foundation
public class TestClass: NSObject {
#objc public func echo(param: String) -> String {
return param
}
}
Instantiate it in any TypeScript source file let instance = new TestClass()
Do tns debug ios
Compilation will fail with Cannot find name 'TestClass'
I have also tried generating TypeScript typings with TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" tns build ios or or just delcaring it as any with declare let KeyCommander: any; to eliminate the possibility that this is a TS related problem. The first approach doesn't generate any typings for my custom class so the TypeScript code will still not compile. The second approach let's the TS code compile but crashes on execution with JS ERROR ReferenceError: Can't find variable: TestClass.
I have also verified that the swift file is indeed getting compiled by inserting a syntax error which will crash the build process.
My NativeScript version is 6.4.0.
What am I missing?
Update: I just realized I actually created the App with vue init nativescript-vue/vue-cli-template testapp. I verified that as mentioned Tyler Blake's answer in an app created with the tns cli the described process actually works. In an app I just freshly created with vue init it doesn't, the objc!nsswiftsupport.d.ts is not being generated.
The question now is: What's causing the difference?
I followed your steps and I was able to get the typings to generate in objc!nsswiftsupport.d.ts. After you generate typings do you have that file with these contents?
declare class TestClass extends NSObject {
static alloc(): TestClass; // inherited from NSObject
static new(): TestClass; // inherited from NSObject
echoWithParam(param: string): string;
}
This shows that NS is able to pick up the Swift code.
All you need to do now is add tns-platform-declarations then in the references.d.ts file, add a line that points to the objc!nsswiftsupport.d.ts file. Then you'll get intellisense in your TS code.
Something like this:
/// <reference path="./typings/objc!nsswiftsupport.d.ts" />
Hope this helps!
I was able to solve the problem by inspecting the differences between the templates created with tns-cli and vue init. The difference is that the vue init template ships with an outdated version of the nativescript platform. You can just simply change
"tns-ios": {
"version": "6.0.1"
}
to version 6.4.0 (which the version the tns-cli template comes with) and then the process will work as described in the documentation.
I am getting the red line and shows the title error when I add
#Html.Widget("home_page_top") and
#Html.Action("TopicBlock", "Topic", new { systemName = "HomePageText" })
in nop.web Home view in nopcommerce.
And the full error shows the following message i.e. :
Error CS1061 'IHtmlHelper' does not contain a definition for 'Widget' and no accessible extension method 'Widget' accepting a first argument of type 'IHtmlHelper' could be found (are you missing a using directive or an assembly reference?)
I got the solution. I am going in a wrong way I am doing code 3.8 in 4.0. Thats why I am getting this issue.
In case anyone else comes across this question, in version 4.0 the code for adding a widget zone has changed. Use this :
#await Component.InvokeAsync("Widget", new { widgetZone = "custom_widget_zone" })