Steve Linabery
2008-Sep-08 20:38 UTC
[Ovirt-devel] Blocked on flex compilation of open-flash-chart
As some of you know, I've been trying to get an open source graphing tool to work with oVirt. The project is called open flash chart, and it lives at http://teethgrinder.co.uk/open-flash-chart-2/ The problem I am blocked on is building the Open Flash Chart (hereafter OFC) project using mxmlc (the command line Action Script compiler that ships with the adobe flex SDK). The author of OFC uses an open source IDE called Flash Develop, but there is no linux port for this Windows-based project. His code relies on some classes provided by the Flash Develop IDE which are used to send debugging trace messages from the swf to the IDE. I have worked around this (temporarily and solely for the immediate purpose of getting *something* to build) by copying the source (.as) files for these classes into my build tree. The tougher nut to crack seems to be dealing with the way the author is using Embedded Fonts. In flex, in order to be able to display text as rotated and have it remain legible, one needs to embed the font definition in the swf. Typically this is done using an "Embed" metadata tag, e.g. [Embed(source="pathToFont", fontFamily="fontName")] private var className:Class;** The author, however, has embedded the Windows Arial font in this manner: [Embed(systemFont='Arial', fontName='spArial', mimeType='application/x-font')] public static var ArialFont:Class; I can get the project to compile if I change the above to: [Embed(systemFont='Nimbus Sans L', fontName='spArial', mimeType='application/x-font')] public static var ArialFont:Class; but then, at runtime, I get the error: "Verify error#1014 Class mx.core::FontAsset could not be found". So at this point, I am faced with some problems whose solutions aren't obvious to me, all of which relate to getting possible changes back into the upstream project. 0) The workaround for the Flash Develop IDE debugging classes: Do I try to persuade the author to include the source for these classes in his project source? Or perhaps point the mxmlc compiler to a different set of source files for these classes that merely imitate the debugging classes by implementing their various methods, but which do nothing (i.e. change "someMethod() { doSomething(); }" to "someMethod() { //do nothing }"...in other words, create "stub" classes that allow the project to compile. 1) I can try re-implementing the Embed metadata tags using linux system fonts in the style at ** above, but I presume the Windows-based project author prefers to continue using the windows fonts. 2) Since I don't really know Action Script or flex development (except what I've picked up from this experience so far), I don't know whether I'm wasting effort on this. It might be more efficient to learn Action Script and roll our own! I would appreciate some help and/or guidance in deciding what path to take at this point. Thanks, Steve