I was messing with the RemoteObject tags in Flex 4 and got the following error that is fairly straight forward, but I thought it was worth blogging since it’s a change from Flex 3.
declaration must be contained within the tag since it does not implement mx.core.IUIComponent.
In Flex 4 there are some changes to how you can place tags in your application. We’ve got a new Declarations tag which is similar to the Script. In Flex 4, that’s where everything that isn’t some kind of UI component goes. IUIComponent extends basically everything that renders on the screen. Anything that doesn’t, things like RemoteObject or HTTPService. Currently it doesn’t look like other classes, like ArrayCollection or the filters have to be in that Declarations tag.