Gumbo

9 views
Skip to first unread message

Peter Cowling

unread,
Aug 10, 2009, 6:31:06 AM8/10/09
to Axiis
Hi,

Looking to use Axiis with Degrafa; is there any news you can share on
this front?

twgonzalez

unread,
Aug 10, 2009, 10:26:55 AM8/10/09
to Axiis
Hello Peter,

There is no reason why you can not use Axiis/Degrafa with Gumbo.

This is not something we have tested extensively - but architecturally
there is nothing to prevent them from working together.



On Aug 10, 3:31 am, Peter Cowling <peter.cowl...@exemplars-

Peter Cowling

unread,
Aug 21, 2009, 2:07:50 PM8/21/09
to Axiis
Hey Tom,

When trying the code below, I get "VerifyError: Error #1014: Class
IVisualElement could not be found".

The code should be cut and past friendly, with only
xmlns:axiis1="org.axiis.*" and xmlns:scale="org.axiis.layouts.scale.*"
namespace references being changed from the LineAreaSeriesExample.html
example on the Axiis website.

Any thoughts on this would be good because the error occurs at compile
time, and give no pointer to the nature of the problem/where it
occurs.

<?xml version="1.0" encoding="utf-8"?>

<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"

xmlns:charts="org.axiis.charts.*"
creationComplete="start();"
xmlns:series="org.axiis.charts.series.*"
xmlns:groupings="org.axiis.charts.groupings.*"
xmlns:degrafa="http://www.degrafa.com/2007"
xmlns:states="org.axiis.states.*"
xmlns:paint="org.axiis.paint.*"
xmlns:Examples="Examples.*"
xmlns:axis="org.axiis.charts.axis.*"
xmlns:labels="org.axiis.charts.labels.*"
xmlns:utils="org.axiis.utils.*"
xmlns:axiis1="org.axiis.*"
xmlns:scale="org.axiis.layouts.scale.*">

<fx:Style source="styles/Axiis_Examples.css"/>

<fx:Script>
<![CDATA[
import org.axiis.data.DataSet;

private var ds:DataSet = new DataSet();

public function start():void
{
ds.processCsvAsTable(payload, false);
ds.pivotTable(0);
ds.aggregateData(ds.data.pivot, "rows.columns",
["value"]);
vScale.maxValue =
ds.data.pivot.aggregates.columns_value_max / 6;

dataProvider = ds.data.pivot.rows;

dc.invalidateDisplayList();
}

private function axisLabel(obj:Object):String
{
return formatter.format(Number(obj) / 1000);
}

private function filterColumns(obj:Object):Boolean
{
//Don't want filter fields, trim columns
if (obj.index < 1 || obj.index > dataSlice.value)
return false;
else
return true;
}

private function filterRows(obj:Object):Boolean
{
//Trim our rows
if (obj.columns[0].value == "Baseline")
return false;
else
return true;
}
]]>
</fx:Script>

<fx:Declarations>

<fx:String id="payload" source="data/LineSeriesData.csv"/>

<mx:CurrencyFormatter currencySymbol="k"
precision="0"
id="formatter"
alignSymbol="right"
useThousandsSeparator="true"/>

<!-- GLOBAL VARIABLES -->
<fx:Object id="dataProvider"/>
<fx:String id="verticalField"/>
<fx:Number id="percentGap">.02</fx:Number>

<!-- EXPRESSIONS -->
<utils:NumericExpression id="tension" value="{slider.value/210}"
valueChanged="{if (myLineGroup) dc.invalidateDisplayList();}"/>

<!-- CHART -->
<scale:LinearScale dataProvider="{dataProvider}"
minLayout="0"
maxLayout="{myLineGroup.height}"
id="vScale"
minValue="{(layoutGroup.selectedValue ==
LineSeriesGroup.MODE_STACK_FLOW) ? -Number(vScale.maxValue) : 0}"/>

<!-- FILLS & STROKES -->
<fx:Array id="palettes">
<paint:LayoutAutoPalette id="outerPalette"
layout="{myLineGroup}" colorFrom="0xCC3333" colorTo="0x3333CC"/>
<paint:LayoutAutoPalette id="clusterPalette"
layout="{myLineGroup}" colorFrom="{outerPalette.currentColor}"
colorTo="{outerPalette.currentColor | 0x337f00}"/>
<paint:LayoutAutoPalette id="areaPalette"
layout="{myLineGroup.plotLayout}" colorFrom="0x3333CC"
colorTo="0xCC3333"/>
</fx:Array>
<fx:Array id="fills">
<degrafa:LinearGradientFill id="areaFill" angle="90"
enableEvents="false">
<degrafa:GradientStop color="{areaPalette.currentColor}"
alpha=".95"/>
<degrafa:GradientStop color="{areaPalette.currentColor |
0x999933}" alpha=".65"/>
</degrafa:LinearGradientFill>
<degrafa:LinearGradientFill id="clusterFill" angle="45"
enableEvents="false">
<degrafa:GradientStop
color="{clusterPalette.currentColor}"/>
<degrafa:GradientStop color="{clusterPalette.currentColor
| 0xFFFFFF}" alpha=".85"/>
</degrafa:LinearGradientFill>
</fx:Array>
<fx:Array id="strokes">
<degrafa:LinearGradientStroke id="colStroke"
pixelHinting="true" angle="45" enableEvents="false">
<degrafa:GradientStop color="0xFFFFFF" alpha=".7"/>
<degrafa:GradientStop color="0xFFFFFF" alpha=".3"/>
</degrafa:LinearGradientStroke>
<degrafa:SolidStroke color="0xFFFFFF" alpha=".3"/>
<degrafa:SolidStroke color="0x222222" id="axisStroke"
pixelHinting="true"/>
<degrafa:SolidStroke color="{areaPalette.currentColor}"
id="myStroke"
weight="1"
alpha="1"
caps="none"
pixelHinting="true"/>
</fx:Array>


</fx:Declarations>

<Examples:ExampleBackground width="100%" height="100%"
title="Horizontal Chart" subTitle="Lines and Areas"/>

<axiis1:DataCanvas width="80%"
id="dc"
top="120"
bottom="100"
horizontalCenter="0"
strokes="{strokes}"
fills="{fills}"
palettes="{palettes}"
showDataTips="true">

<!-- Background -->
<axiis1:backgroundGeometries>
<axis:VAxis verticalScale="{vScale}"
tickStroke="{axisStroke}"
width="{dc.width}"
height="{myLineGroup.height}"
emitDataTips="false"
fontFamily="Myriad Pro"
fontColor="0"
fontSize="14"
tickGap="5"
majorTickSpacing="50"
labelFunction="{axisLabel}"/>
<degrafa:Line x="0"
x1="{myLineGroup.x+myLineGroup.width}"
y="{myLineGroup.height}"
y1="{myLineGroup.height}"
stroke="{axisStroke}"/>
</axiis1:backgroundGeometries>

<!-- Layouts -->
<axiis1:layouts>
<groupings:LineSeriesGroup id="myLineGroup"
x="10"
y="0"
height="{dc.height-70}"
width="{dc.width-35}"
tension="{tension.value}"
markerColor="{areaPalette.currentColor}"
dataFilterFunction="{filterRows}"
showArea="{area.selected}"
plotFilterFunction="{filterColumns}"
markerSize="8"
showMarker="{showMarker.selected}"
mode="{int(layoutGroup.selectedValue)}"
dataProvider="{dataProvider}"
plotCollection="columns"
dataField="value"
verticalScale="{vScale}"
stroke="{myStroke}"
fill="{areaFill}"/>

</axiis1:layouts>
</axiis1:DataCanvas>


<!-- DISPLAY OBJECTS -->

<mx:HBox id="myBox" bottom="50" horizontalCenter="0">
<mx:HBox>
<mx:Label text="Line Curve" textAlign="right"
verticalCenter="0"/>
<mx:HSlider width="80"
id="slider"
minimum="1"
maximum="80"
value="35"
liveDragging="true"
showTrackHighlight="false"
verticalCenter="-5"/>
</mx:HBox>
<mx:Label text="|"/>
<mx:HBox>
<mx:Label text="% Data" textAlign="right"
verticalCenter="0"/>
<mx:HSlider width="80"
id="dataSlice"
minimum="3"
maximum="220"
value="30"
snapInterval="1"
change="{dc.invalidateDisplayList();
myLineGroup.invalidateDataProvider();}"
showTrackHighlight="false"
verticalCenter="-5"/>
</mx:HBox>
<mx:Label text="|"/>
<mx:HBox>
<mx:Label text="Area" textAlign="right" verticalCenter="0"/
>
<mx:CheckBox id="area" change="{dc.invalidateDisplayList
();}" selected="true"/>
</mx:HBox>
<mx:Label text="|"/>
<mx:HBox>
<mx:Label text="Marker" textAlign="right"
verticalCenter="0"/>
<mx:CheckBox id="showMarker"
change="{dc.invalidateDisplayList();}"/>
</mx:HBox>
<mx:Label text="|"/>
<mx:Spacer width="20"/>
<mx:HBox>
<mx:RadioButtonGroup id="layoutGroup"
change="{dc.invalidateDisplayList();}"/>
<mx:RadioButton label="Overlay" group="{layoutGroup}"
value="{LineSeriesGroup.MODE_BASELINE}" selected="true"/>
<mx:RadioButton label="Stack" group="{layoutGroup}"
value="{LineSeriesGroup.MODE_STACK_ZERO}"/>
<mx:RadioButton label="Flow" group="{layoutGroup}"
value="{LineSeriesGroup.MODE_STACK_FLOW}"/>
</mx:HBox>
</mx:HBox>

</s:Application>

Michael VanDaniker

unread,
Aug 23, 2009, 1:14:48 AM8/23/09
to ax...@googlegroups.com
Peter,

I was able to compile and run your example using Flex 4 just fine.  If you're still have problems, can you provide more details about your compiler set up?  I am using Flex Builder 3.  In my libs directory I have the DegrafaLibrary.swc from the examples project and the axiis swc which I compiled from the code in the development branch.  When I initially built the project I got an error about not being able to locate the Matrix3D class.  Manually changing the target Flash Player version from 9.0.124 to 10.0.0 fixed the problem. 

-Michael VanDaniker

Peter Cowling

unread,
Aug 23, 2009, 5:12:08 AM8/23/09
to Axiis
Michael,

The development branch of Axiis has some changes to the version I have
been using.
I will update accordingly, and let you know how I get on.
(I am not compiling Axiis into a swc at present.)

I am using the same version of Degrafa as you used.

Flex Builder 4 Beta with nightly build 8287 currently.
I have used a range of sdk builds, and believe this one better than
the official stable build.

I am targetting flash 10.0.0.

Peter Cowling

unread,
Aug 23, 2009, 6:30:11 AM8/23/09
to Axiis
So using the development branch, I get pre-compile error notifications
for:

1. CalloutBallon (com.degrafa.geometry)

The method ceateCallout seeks references to the properties bottomLine,
rightLine, topLine, and leftLine, which are not contained withing
CalloutBallon, and are referenced via 'this'.
Not sure how to proceed here.


2. FreeDataTipManager (org.axiis.managers)
This class makes use of ISystemManager.

Calls to addChildToSandBoxRoot and removeChildFromSandBoxRoot are
affected.
Gumbo has split these into a new interface called
IMarshalSystemManager, retaining stuff like topLevelSystemManager.

Michael VanDaniker

unread,
Aug 23, 2009, 8:29:05 AM8/23/09
to ax...@googlegroups.com
Peter,

The topLine, leftLine, bottomLine, and rightLine properties were added to CalloutBalloon's super class after we released the alpha 1.0 build of Axiis.  Your first error message suggests that the copy of Degrafa you're compiling into Axiis is out of date.  Are you using the version at branches/development/axiis/libs/DegrafaLibrary.swc?

Since we are targeting Flex 3.4, your best option for getting around your second error it to make the change to FreeDataTipManager so that it uses the correct interface.

Peter Cowling

unread,
Aug 23, 2009, 11:15:29 AM8/23/09
to Axiis
Michael,

No, as mentioned ealier I was using the degrafa version that was
available in the examples.
I swapped over to the development version, which sorted out the error
messages.

I also made the changes to FreeDataTipManager splitting out the
interface usage, as required to remove the error messages.

Now I am back to "VerifyError: Error #1014: Class IVisualElement could
not be found".

Thanks for your help BTW, especially on a Sunday. :)

Michael VanDaniker

unread,
Aug 23, 2009, 4:27:00 PM8/23/09
to ax...@googlegroups.com
Peter,

I've reconfigured my development environment to match the one you described as closely as possible, including making modifications to FreeDataTipManager.  In the end I can still compile and run your example without any problems.

You may want to try to set up your development environment the way we have it and make changes until you're either back to your desired configuration or until you hit the VerifyError message again.  We have two separate projects for Axiis, one for the library and one for the examples.  In addition to the default compiler settings, the library project compiles in the libs directory, uses "http://www.axiis.org/2009" as the namespace url, and uses the manifest file in the src directory.  FreeDataTipManager changes aside, compiling against Flex 3.4 or 4 doesn't appear to make a difference.  The examples project compiles in the version of Degrafa in the its libs directory (this should be the same as the version in the axiis libs directory now) and links in the swc produced by the library project.

The only other reference I've been able to find to someone having a similar problem is here: http://code.google.com/p/flex-mojos/issues/detail?id=163#c0 . Their resolution was to rearrange the order in which libraries are being compiled in.  I don't know if that applies to your situation or not.  Please keep us posted about your progress.  More people are likely to compile with Gumbo in the future.

-Michael VanDaniker

Peter Cowling

unread,
Aug 24, 2009, 10:08:00 AM8/24/09
to Axiis
Michael,

Thanks again for your effort here.

The issue was indeed the order in which the .swc were being compiled -
moving framework.swc higher up the stack to second position sorted the
problem out striaght away.

I am going to post this solution over on actionscript.org in case any
others come across it.
Reply all
Reply to author
Forward
0 new messages