After exporting a flex project, the images are broken - apache-flex

After completing building a flex project in Flash Builder 4.5, the project was exported using the
File -> Export Flash Builder Project.
After which some of the images stopped working (get the broken image icon). This has left me clueless and even search on the internet did not give me good answers...

I get the same problem time to time. Probably compiler / Flash Builder bug. But to be sure, you might want to check some basic things. First off: check that you have correct image urls. Secondly, ensure you are not using absolute source paths (e.g. C:\workspace\project\src\assets\images\image.png). Instead use relative path (i.e. assets\images\image.png).
If these are correct, check your build directory (default build directory for release builds in FB is bin-release) and see if the images are compiled there correctly. As I said, for some reason my FB does not always compile all the assets correctly, so sometimes I have to move them in manually. That is, you can simply drag and drop them from the source directory to the bin-release directory (although if you are using svn, you should be careful with this as it might copy also the svn metadata).
Other solutions you might want to try:
restart eclipse / FB (maybe it's simply out of memory)
delete the project from your workspace and import it again with no project information
change workspace and import the project there

I finally found the answer... made all the images bindable and just used the class to tag the images.
for example... instead of
if (draggedImage.id == "Chris" )
{
newImage.source = "assets/Chris.png";
}
changed it to
if (draggedImage.id == "Chris" )
{
newImage.source = pic3_icon;
}

Related

AEM DAM image replace - references in pages not updating

I have a problem with references to an image not updating in pages that are using that image.
This is the steps that the users are reporting
go to /siteadmin#/content/dam/
on the "new" dropdown menu, select "new file"
select an image file that is a different image but has the same name as a file that already exists
upload the file and when asked that a file already exists, choose replace
activate the file when the upload completes
The problem is that when I check pub I can see the image is updated, and if I navigate to the path of the image, for example:
pub1.mypub:4503/content/dam//my-image.png
I can see the new image I replaced the old one with
the problem is that pages that were referencing the image, specifically the image component, still shows the old image. I've check flush rules, checked workflows and nothing seems to work
The one thing I noticed is that in pages that are referencing the image the path is like this
/content//_jcr_content/my-component/my-component-parsys/columns/parsyscenter/image.img.jpg/1538602163986.jpg
so it seems the path it is using is like a generated path and not the same path as this one: pub1.mypub:4503/content/dam//my-image.png
im at a complete loss, I honestly do not know what else to check, has anyone ran into this and figured out how to fix it?
this is on aem 6.3
the problem is that in pubs the image being referenced in the component does not update, and since it does not update in pub, it never updates dispatcher
You can try activating the referenced pages after the image has been published. Since the page on publish has reference to the previous image.

Change virtual keyboard to AZERTY

I have a javafx application that is supposed to run in fullscreen mode on a Windows tablet.
My problem is, when the keyboard appears, it's in QWERTY whereas my tablet is in AZERTY.
So the question is : Is there a way to use the system virtual keyboard or to switch the javafx virtual keyboard to AZERTY?
I found you question while trying to accopllish the same thing.
I spent a day trying to make javafx display an AZERTY keyboard and i found a solution!
Well let me be clear : javafx gave no way at all to have an azerty keyboard so you have to hack a little.
The solution bellow is not a perfect one and you'll have to repeat it each time you update javafx, but it will allow you to extrem customize the keyboard far beyong querty and azerty.
SOLUTION 1 (dirty but works )
You will need to edit a file in javafx file shipped with the JDK
STEPS :
GO to the JDK (in Mac : /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home)
Go inside jre/lib/ext and copy javafx jar called jfxrt.jar to a folder on your desktop.
Install EMACS if you don't have it and open the copied jar file with this software
Browse files list searching for com/sun/javafx/scene/control/skin/TextBoard.txt
the list is sorted from A-Z so use it (there is more than 6000 files).
Open it and HERE you are. Change characters to whatever order makes you happy. I joined the azerty order.
Save and copy back the jfxrt.jar to where it was. Done.
Note: don't try to extract the jar and rezip it, it won't work as jdk keeps an index list of files.
Result:azerty javafx virtual keyboard in action
SOLUTION 2 (Clean but i didn't finish it)
Whene i digged into javafx classes i found out that the class responsible for loading the TextBoard.txt file that lays out the keyboard is FXKVSkin
This class is meant to receive other type of keyboards than the lonly qwerty default one.
All you have to do is add this in your code :
textFieldThatYouUse.getProperties().put(FXVK.VK_TYPE_PROP_KEY,
"mykeyboard");
Where mykeyboard is a file you created like TextBoard.txt called MykeyboardBoard.txt (capitals letters are important).
FXKVSkin will look now for a file called MykeyboardBoard.txt, and here's where my adventure ended.
You will need to make FXKVSkin find your file, i tried by adding a file to the classpath at runtime solutions Here but it didn't work.
If anyone can solve this problem, please add it as an answer, it would be a less dirty solution.
Hope the solutions will help some non english speakers! :p
The definition of the layout is contained in jfxrt.jar (part of the Java install). It is described by TextBoard.txt. It is possible to browse in the jfxrt.jar with 7zip or similar programs. TextBoard.txt is in com/sun/javafx/scene/control/skin/
This file is loaded com/sun/javafx/scene/control/skin/FXVKSkin.java is responsible for loading the TextBoard.txt file. Browse the javafx source (included via the jdk and contained in javafx-src.zip) to see how it is processed. Maybe this will give you enough information to load your own TextBoard.txt file.

Windows form application - Icon image location?

I think this should be a relatively easy one to answer, I hope, but is proving to be a bit of a stress!
I have used an Icon on an old application developed some years ago and I would now like to use the icon for a current project.. however..
I added the icon using the upload/import icon-image in the properties window, and did not add it in the project resources file, nor specify its location anywhere in my code, using only the icon tool in the properties window.
Now wanting to find the icon image file to use again, I cannot find it anywhere! I have trawled through all the project files looking for the image file or a ref to its location, but have found nothing; except for:
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
When running the application the icon is still clearly visible in the applications taskbar tile.
Does anyone know where the icon file is stored / how I can retrieve it?
Thank you in advance.
It is stored in "{Your_project_name}.{Form_name}.resources" file. Search inside the "obj" folder which is in your project folder.
Now open the command prompt of Visual Studio. We will convert this ".resources" file into a ".resx" file. We use "resgen" command here.
resgen foo.resources bar.resx
The .resx can then be added to a C# project. You can find your icon file there.

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).

Adobe AIR: Controls flipped (mirrored) in certain build environments

I'm having an issue where certain controls are flipped, depending on the machine that I'm building my project on. On my development machine, when I build it, everything is okay. However, when I build it on our build server, some things are flipped. It seems to be things that are on a higher layer - for instance, options in the select control (see first image below), alerts/overlays (see second image below), etc. It's not just the text, either - the entire content is flipped, images and all.
I have verified that the code is exactly the same in both instances, so it must have something to do with settings or the flex SDK version. On my development machine, the Flex SDK version is 4.0.0.14159, and on the build server, the Flex SDK version is 4.1.0.16076. I can downgrade the SDK on the build server if needed - but could it really be an issue with the SDK? Any ideas?
Thanks!
It looks like this will be fixed in the 4.5 SDK--see SDK-26473 for workarounds.
I was able to fix the mirroring by turning off Flex 3 Compatibility Mode in the Flex compiler settings (if using mxmlc, -compatibility-version=4.0).
Your build machine must be set to a locale which uses right-to-left text, such as Hebrew or Arabic keyboard setting.
Oops - hadn't read all of dpstone's answer before I posted my comment to the question.
The answer to this problem is in the bug he linked to. You need to explicitly set the layout direction. You can do this in one of two ways.
1) in a .css file that you import into your main application file:
global
{
layoutDirection: "ltr";
}
OR
2) you can set it in a <style> tag in your main application file.
<mx:Style>
global
{
layoutDirection: "ltr";
}
</mx:Style>

Resources