Joel Hooks' tutorial for learning Robotlegs: complete n00bie problem: Error 1114...
Hi,
I am starting to look into the use of Robotlegs and was working through Joel Hooks' tutorial: An Introduction to Robotlegs AS3 Part 1: Context and Mediators. I have re-created the project, project structure looks as so:
RobotlegsIntro01
src
(default package)
HelloWorld.mxml
HelloWorldContext.as
MessageView.mxml
MessageViewMediator.as
Inside HelloWorldContext.as, I have copied the code from the tut, so it looks like this:
import org.robotlegs.mvcs.Context
public class HelloWorldContext extends Context
{
override public function startup():void
{
//bootstrap here
mediatorMap.mapView(MessageView, MessageViewMediator);
}
}
but when declared in HelloWorld.mxml, where HelloWorld.mxml is the main application, like so:
<?xml version="1.0"?>
<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/mx"
xmlns:local="*">
<fx:Declarations>
<local:HelloWorldContext contextView="{this}"/>
</fx:Declarations>
<local:MessageView top="40" width="100%" height="100%"/>
</s:Application>
I receive the following error in HelloWorldContext.as:
1114: The public attribute can only be used inside a package. HelloWorldContext.as /RobotlegsIntro01/src line 3
Can anyone tell me what I'm doing wrong? This has me baffled, but I really want to understand RobotLegs. Any help would be much appreciated.
Cheers,
~Chipleh
p.s. - I have uploaded my source as well in case anyone fancies a look.
- RobotLegsIntro01.zip 2.2 MB
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Chipleh on 09 Jul, 2012 05:57 PM
Nevermind, I found my answer after tweaking the code. Indeed, I needed to add packages to the code, which in turn created new errors within the HelloButton.mxml. Once I converted s:Group to s:Button, I had the app working. Like i said, I'm a n000b, but am liking the Robotlegs paradigm. I am using Flash Builder 4.6, not sure if this was the cause of any of my probs, but regardless, thanks for these tutorials Joel.
Support Staff 3 Posted by Joel Hooks on 10 Jul, 2012 12:36 PM
I tend to chop things in the code listings for brevity when I think they are "obvious". Sorry about that :)
Joel Hooks closed this discussion on 10 Jul, 2012 12:36 PM.