Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

bindable ?

Guest
Oct 16, 2008 Oct 16, 2008
in Flex you can declare a bindable variable with the [Bindable] tag.
Can you do the same in pure AS3 (not using MXML) ?

Thanks
TOPICS
ActionScript
319
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 17, 2008 Oct 17, 2008
I'm pretty sure the answer is no.

I've only been using Flex for about 6 months, intermittently, and with a very specifc focus, so perhaps I may not understand completely. But I think the way the flex compiler implements it is to dispatch a propertyChange event (which is defined in the Flex framework) from within the setters for the 'bindable' variables and add listeners to the targets for binding. Its a bit more organised than that I guess, but in principle I think that's how it works. There are some binding utilities in the Flex framework that get used as well to support it. One of the options on the Flex compiler is '-keep-generated-actionscript' which shows you what it creates from the mxml and some of the binding code that is generated before it actually runs it through the compiler. It's interesting to see how the mxml gets translated to actionscript....particularly for the application startup sequence and deferred instantiation etc.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 17, 2008 Oct 17, 2008
LATEST
Not without using the Flex framework and that requires at least one mxml file...

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx=" http://www.adobe.com/2006/mxml"
layout="absolute"
applicationComplete="Main.init()">
</mx:Application>

The 'rest' of the application can be ActionScript only. If working with data is a major part of the work you must do, this way you can profit from all the 'extra's' the Flex framework has to offer, like the powerfull collections and the wrappers for http requests, remote objects... sheer power. And if your worried about specific content you can only create in Flash... use the Flash Component Kit For Flex to bring your Flash content to your Flex project. It's awesome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines