Flex 4 wont recognise flash.events.UncaughtErrorEvent - flex4

test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" x="0" y="0" width="703" height="609" xmlns:ns1="*" >
<mx:Script>
<![CDATA[
import flash.events.*;
// stuff
private function onUncaughtError(e:UncaughtErrorEvent):void {
//Do Stuff
}
This gives:
apitester.mxml 1046: Type was not found or was not a compile-time constant: UncaughtErrorEvent. /apitester/src line 35 Flex Problem
According to Adobe it is available in flex and Air.
The Flex 4/Eclipse build path shows:
Flex 4.0
playerglobal.swc
textLayout.swc
osmf.swc
framework.swc
spark.swc
sparkskins.swc
rpc.swc
datavisualisation.swc
flash-integration.swc
flex.swc
utilities.swc
Any ideas?

You need the Flex 4.1 SDK.
See: http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/
Also you need to specify to the flex compiler that you are require flash player 10.1 (not the minimum version required by the SDK which is 10.0) because earlier versions of the flash player do not support this.

You can simply add the playerglobal.swc from Flex SDK 4.1/frameworks/libs/player/10.1 to your build path. When you do so, you have to remove the linkage to the original framework playerglobal.swc

Related

Why emulator not opening? (Xamarin)

https://i.stack.imgur.com/S2za3.jpg
Emulator(phone) won't open. What is the problem?
Output: Hardcoded string "Button", should use #string resource
when another emulator(phone) is installed it gives this error
https://i.stack.imgur.com/54dEY.jpg
Output: The package was not installed. Please check you do not have it installed under any other user. If the package does show up on the device, try manually uninstalling it then try again. You should be able to uninstall the app via the Settings app on the device.
NOW
I deleted the old app links. The second error is over. The first error persists. The emulator does not open on the phone.
Output: Hardcoded string "Button", should use #string resource
This is a warning not an error. This warning would not affect the app running. I was able to reproduce this when set the text like below.
<Button
android:id="#+id/button1"
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
If you want to fix the warning, add a Strings.xml in you value folder of Resources. Strings.xml is a string table to help with localization of the application.
Add the codes below into Strings.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="Button_Text">Hello</string>
</resources>
And use it in your Layout:
android:text="#string/Button_Text"

Why is the ShortcutPanel not shown in izpack?

I am trying to make an installer with izpack 4.3.5. While installing, a shortcut should be added to the users Desktop. Though I have added the ShortcutPanel and did not add the skipOnNotSupported no panel is shown and no shortcut is created though it complies successfully.
I already took a look at the following post (izpack: create shortcut on windows) but couldn't figure out my mistake.
Here is part of my install-file:
<panels>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="ShortcutPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
...
</packs>
<resources>
<res src="shortcut.xml" id="shortcut.xml"/>
</resources>
<natives>
<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
</natives>
And here is my shortcut XML:
<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">
<shortcut
name = "test"
target = "$INSTALL_PATH\test.jar"
description="test"
programGroup="true"
desktop="yes"
applications="yes"
startMenu="yes"/>
<lateShortcutInstall />
</izpack:shortcuts>
Any ideas?
UPDATE:
I also tried to remove the lateShortcutInstall, but nothing changed.
Thanks in advance
You are trying to make install files for izPack version 5 work with izPack 4.3.5 (notice the version="5.0" in the shortcut XML?). This will not work as the format has changed in subtle details.
I suggest that you move to a current izPack 5 version (5.1.0 has just been released). It is actively maintained, more stable and better documented than 4.3.5.
If you are stuck on 4.3.5 please read my other post here: izpack-maven-plugin is not including native libraries by default and remove the <natives> element.

How to properly structure UWP app icons in AppxManifest.xml file for a Win32 app converted using Desktop Bridge (Project Centennial)

I'm trying to convert my Win32 app into a UWP app using Project Centennial converter (i.e. Desktop bridge.)
After the app is converted, I need to adjust AppxManifest.xml file to ensure the following:
That all icon formats are configured properly.
That I properly specified app resources for: English (US), German, French and Russian languages.
So I followed this Windows 10 icon guide and created the following .png images that were all placed into the Assets folder. I got these:
And my AppxManifest.xml was structured as such:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
<Identity Name="MyApp.Name" ProcessorArchitecture="x86" Publisher="CN=My Name, O=My Name, STREET="Street Address", L=City, S=State, PostalCode=12345, C=US" Version="1.2.3.4" />
<Properties>
<DisplayName>MyApp.Name</DisplayName>
<PublisherDisplayName>PublisherName</PublisherDisplayName>
<Logo>Assets\StoreLogo-50x50.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
<Resource Language="de-DE" />
<Resource Language="fr-FR" />
<Resource Language="ru-RU" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14342.0" MaxVersionTested="10.0.14342.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="MyApp.Name" Executable="VFS\Users\ContainerAdministrator\AppData\Local\PublisherName\App Name\RunFile.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="My App Name" Description="My app does this ... and this ..."
BackgroundColor="#aabbcc"
Square71x71Logo="Assets\AppNameSmallTile.png"
Square150x150Logo="Assets\AppNameMedTile.png"
Square310x150Logo="Assets\AppNameWideTile.png"
Square310x310Logo="Assets\AppNameLargeTile.png"
Square44x44Logo="Assets\AppNameAppList.png"
>
<uap:DefaultTile>
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="Square310x150Logo" />
<uap:ShowOn Tile="Square310x310Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
</uap:VisualElements>
<Extensions />
</Application>
</Applications>
</Package>
So can someone answer these questions:
I'm somewhat confused about specifying icons for correct sizes and scaling. Did I do it correctly?
Do I need to specify scaling for Assets\StoreLogo-50x50.png icon as well?
And lastly, did I specify resources for 4 different languages correctly?
EDIT: While waiting, I tried compiling my AppxManifest.xml above with the assets I showed. But makeappx.exe tool gives me the following error:
MakeAppx : error: Error info: error C00CE015: App manifest validation
error: The app manifest must be valid as per schema: Line 22, Column
27, Reason: The attribute 'Square71x71Logo' on the element
'{http://schemas.microsoft.com/appx/manifest/uap/windows10}VisualElements'
is not defined in the DTD/Schema.
It evidently doesn't like the following icon sizes:
Square71x71Logo
Square310x150Logo
Square310x310Logo
But then even if I remove the icon sizes above from AppxManifest.xml, when I try to pack it with the following command:
"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe" pack /d "path-to-folder-to-pack" /p "path-to\MyAppxPackage.appx"
I get the following errors about naming assets for scaling:
MakeAppx : error: Manifest validation error: Line 22, Column 27,
Reason: The file name "Assets\AppNameMedTile.png" declared for element
"[local-name()='Applications']/[local-name()='Application']/[local-name()='VisualElements']"
doesn't exist in the package. If this file has multiple variations or
resource versions for language, scale, contrast, etc., use the /l
command line option to disable this validation. MakeAppx : error:
Manifest validation error: Line 23, Column 27, Reason: The file name
"Assets\AppNameAppList.png" declared for element
"[local-name()='Applications']/[local-name()='Application']/[local-name()='VisualElements']"
doesn't exist in the package. If this file has multiple variations or
resource versions for language, scale, contrast, etc., use the /l
command line option to disable this validation. MakeAppx : error:
Package creation failed. MakeAppx : error: 0x80080204 - The specified
package format is not valid: The package manifest is not valid.
Using suggested /l command as such:
"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe" pack /l /d "path-to-folder-to-pack" /p "path-to\MyAppxPackage.appx"
builds the package with a lot of warnings. But when I install it later, all icons in it seem to be blank.
There must be something that I'm missing here?
I see two main problems: you're defining tile images in the wrong place, and you don't talk at all about a resources.pri file.
The UAP schema is fairly involved, but also reasonably well documented, so make sure you respect its requirements. In particular, the uap:VisualElements element only has the image attributes Square150x150Logo and Square44x44Logo. If you want to define other sizes, they go in attributes on a child uap:DefaultTile element. Note that your uap:ShowOn elements' attributes include an incorrect Square310x150Logo that should instead be wide310x150Logo.
Once you sort that out, makeappx should succeed with your original command line, i.e., without the additional /l parameter. However this is not enough to make your alternate DPI images show up. For that you will need to create a resources.pri file. You can do this manually by using makepri.exe to create a template priconfig.xml, update it, then invoke makepri again to build the resources.pri from it.
Alternately, use a tool that will create an app package with a resources.pri for you (such as Visual Studio), and extract the resources.pri and add it to your package. Just make sure the locations you use in your package match the ones in the package created by the tool, as relative paths are stored in the resources.pri file. (As a bonus, you can look at the AppxManifest.xml that this creates to verify that your structure from the first part is correct. Just don't forget that apps using the desktop bridge will have additional namespaces and capabilities that Visual Studio won't offer.)

How to include bin/java via Java fx:deploy on Mac OS X

I'm trying to get JavaFX Ant to package up my (Swing) code with the JRE for Mac OS X.
I've got almost everything working, but I can't figure out how to include jre/bin/java. It looks like all the other relevant stuff from jre/ is included (e.g. all the jre/lib/).
Here's my ant task:
<fx:deploy outdir="${appdir}" outfile="${appname}" nativeBundles="image">
<fx:info title="${appname}" vendor="${vendor}"/>
<fx:application name="${appname}"/>
<fx:bundleArgument arg="icon" value="${appname}.icns"/>
<fx:resources>
<fx:fileset dir=".">
<include name="${objar}"/>
</fx:fileset>
</fx:resources>
<fx:platform basedir="${jdk-base}"/>
</fx:deploy>
Is there a way to get to include jre/bin/java? Or should it already be doing this and so I should look for something screwed up on my system?
Is there a way to add stuff via scripting (e.g. like the "package/macosx/post-image.sh" mechanism)?
Is the ant-javafx source available somewhere?
Any other suggestions?
thx.

Updating my Firefox extension - autoupdates not working

My Firefox extension is not hosted on the official extension site. It is hosted on a secure (https) server. From what I have read, I do not need to sign my add-on, right?
The problem is that it is not working. I install my plugin, and click on 'Check for updates', but it says no updates have been found. I have set the version in the update manifest and in the install manifest from initial.rev332 to initial.rev333.
Could someone shed some light on my situation? Thanks very much :)
My install manifest...
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack</em:id>
<em:version>initial.rev333</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack}</em:id>
<em:minVersion>3.4</em:minVersion>
<em:maxVersion>30.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>iStyla</em:name>
<em:description>iStyla is a marketplace for themes for Facebook, Twitter and Google+ </em:description>
<em:creator>iStyla</em:creator>
<em:homepageURL>https://www.istyla.com/</em:homepageURL>
<em:updateURL>https://www.istyla.com/Updates/firefox.rdf</em:updateURL>
</Description>
</RDF>
My Update Manifest
<?xml version="1.0"?>
<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/2004/em-rdf#">
<r:Description about="urn:mozilla:extension:jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack">
<updates>
<r:Seq>
<r:li>
<r:Description>
<version>initial.rev333</version>
<targetApplication>
<r:Description>
<id>{jid0-BsYlcooDmgR331LCKZwABfD4yQk#jetpack}</id>
<minVersion>3.0</minVersion>
<maxVersion>30.*</maxVersion>
<updateLink>https://www.istyla.com/Updates/Firefox.xpi</updateLink>
<updateHash>
sha256:af031d8bb9303a42ab1f270845e9c692d65cd4fc
</updateHash>
</r:Description>
</targetApplication>
</r:Description>
</r:li>
</r:Seq>
</updates>
</r:Description>
</r:RDF>
I think your addon version number needs to be in a different format: https://developer.mozilla.org/en/Install_Manifests#version
Try the versioning format listed here to differentiate versions: https://developer.mozilla.org/en/Toolkit_version_format
Maybe try <em:version>0.0.333</em:version>
Also, I don't think <em:maxVersion>30.*</em:maxVersion> is valid (I could be wrong though. If you're not hosting it on AMO it might work alright). Here is the list of valid Firefox version numbers available FWIW: https://addons.mozilla.org/en-US/firefox/pages/appversions/

Resources