Skip to main content
miquael
Inspiring
October 16, 2011
Question

Legacy Conversion to Mobile

  • October 16, 2011
  • 1 reply
  • 534 views

I'm converting an Flex application that was originally developed a few years ago for mobile export.  I've already done a bunch of modifications to the code, and have it close to working--except for a few of these errors:

Could not resolve <s:HDividedBox> to a component implementation.

I get this for: 

<s:HDividedBox>

<s:Tile>

<s:DateField>

All other component implementations work, including <s:VDividedBox>.  Why would <s:VDividedBox> work and not <s:HDividedBox> ?

Here's the MXML code:

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

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                    xmlns:s="library://ns.adobe.com/flex/spark"

                    title="HomeView"

                    backgroundColor="white"

                    xmlns:local="*"

                    xmlns:custom="custom.*"

                    creationComplete="init()">

 

  <fx:Declarations>

  </fx:Declarations>

 

  <fx:Script>

                    <![CDATA[

 

    // a bunch of ActionScript in here ...

                    ]]>

  </fx:Script>

 

          <s:Style source="AION.css"/>

 

  <s:ApplicationControlBar width="100%">

                    <s:Label text="AION" color="0xFFFFFF" fontWeight="bold" fontSize="20"/>

  </s:ApplicationControlBar>

 

          <s:Spacer height="5"/>

 

          <s:VDividedBox width="100%" height="100%" liveDragging="true" dividerPress="paused=true" dividerRelease="paused=false">

 

          <s:HDividedBox id="hd" width="100%" height="100%" liveDragging="true" dividerPress="paused=true" dividerRelease="paused=false">

 

  <custom:AIONPanel id="geocentricPanel" title="Geocentric View" width="100%" height="100%" reset="resetPanelSizes()" maximise="timelinePanel.height=0;heliocentricPanel.width=0">

                                        <local:GeocentricView id="geocentricView" orb="{GCOrbSlider.value}"/>

                                        <s:HSlider id="GCOrbSlider" value="2" minimum="0" maximum="10" bottom="10" left="10" liveDragging="true" showDataTip="false" visible="false"/>

  </custom:AIONPanel>

 

                              <s:VBox minWidth="175" maxWidth="175" height="100%" horizontalAlign="center" horizontalCenter="true">

                                        <s:Tile id="checkBoxesTile" height="100%" width="100%">

  </s:Tile>-->

 

                                        <s:Label id="dateLabel" width="100%" color="0xFFFFFF" fontSize="13" horizontalCenter="true" textAlign="center"/>

                                        <s:DateField id="dateField" change="date=dateField.selectedDate" width="0" visible="false" includeInLayout="false"/>

                                        <s:HSlider id="speedSlider" change="speed=speedSlider.value" liveDragging="true"/>

                                        <s:Spacer height="7"/>

  </s:VBox>

 

  <custom:AIONPanel id="heliocentricPanel" title="Heliocentric View" width="100%" height="100%" reset="resetPanelSizes()" maximise="timelinePanel.height=0;geocentricPanel.width=0">

                                        <local:HeliocentricView id="heliocentricView" zoom="{HCZoomSlider.value}"/>

                                        <s:HSlider id="HCZoomSlider" value="1" minimum="0.6" maximum="25" bottom="10" right="10" liveDragging="true" showDataTip="false"/>

  </custom:AIONPanel>

 

  </s:HDividedBox>

 

                    <custom:AIONPanel id="timelinePanel" title="Timeline" maximise="hd.height=0" width="100%" height="100%" reset="resetPanelSizes()"/>

 

  </s:VDividedBox>

 

          <s:Image source="{fpsTimer}"/>

 

</s:View>

Any insights? 

This topic has been closed for replies.

1 reply

miquael
miquaelAuthor
Inspiring
October 16, 2011

And then in another MXML file (for the custom AIONPanel), <mx:Canvas> is not recognized:

The prefix "s" for element "s:Canvas" is not bound.


I've tried changing this to <s:Group> and <s:SkinnableContainer>, tho get the same result.

What does "prefix 's' for element '*' is not bound" really mean???

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

<s:Group

          xmlns:mx="http://www.adobe.com/2006/mxml"

          creationComplete="init()">

 

  <fx:Metadata> 

                    [DefaultProperty("subComponents")]

                    [Event("maximise")]

                    [Event("reset")]

  </fx:Metadata>

  <fx:Script>

                    <![CDATA[

 

                              [Bindable]

                              public var title:String;

                              public var subComponents:Array;

 

                              private function init() : void {

                                        if (subComponents) {

                                                  for(var i:int=0; i < subComponents.length; i++) {

                                                      panel.addChild(subComponents);

                                                  }

                                        }

                        }

 

                    ]]>

  </fx:Script>

          <s:Panel title="{title}" width="100%" height="100%">

                    <s:Canvas id="panel" width="100%" height="100%">

 

  </s:Canvas>

  </s:Panel>

          <s:HBox right="10" top="5">

  <s:Button width="20" height="20" click="this.dispatchEvent(new Event('reset'))"/>

  <s:Button width="20" height="20" click="this.dispatchEvent(new Event('maximise'))"/>

  <!-- <mx:Button width="20" height="20" fillAlphas="[0.2, 0.2, 0.4, 0.4]" click="this.dispatchEvent(new Event('reset'))"/> -->

  <!-- <mx:Button width="20" height="20" fillAlphas="[0.2, 0.2, 0.4, 0.4]" click="this.dispatchEvent(new Event('maximise'))"/> -->

  </s:HBox>

</s:Group>