Peace, Mike
On 3/15/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
Mike,
Thanks for your idea,
I wrote this code myself to try and pin down a problem I am having. I
can't get dynamic properties to bind.
I tried the "use namespace flash_proxy" in the SomeClass.as and it
didn't help.
The SomeClass.mxml has a textarea that I am trying to bind the
instance of someClass with a dynamic property newAttribute to the
"text" property.
The button on the mxml changes the someClass.newAttribute to help with
the testing of the binding of a dynamic property.
Renaun
--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Well, I was just in this classroom the other day. If I get your question
> correctly..
>
> Add;
>
> use namespace flash_proxy;
>
> right under the import flash.util.flash_proxy.
>
> If you got this code from an example, it was missing the use
statement. I
> missed this also!, Once the use is in there it works great!
>
> Peace, Mike
>> On 3/15/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> >
> > The sample code is located below. I am trying to find a way to bind
> > dynamic attributes (when using Proxy class). I can't get the dynamic
> > properties to bind, any suggestions or help would be appreciated.
> >
> > Renaun
> >
> > Proxy Class:
> > package {
> > import flash.util.flash_proxy;
> > import flash.util.Proxy;
> >
> > dynamic public class SomeClass extends Proxy {
> >
> > public var _dynamicAttributeArray:Array;
> >
> > public function SomeClass() {
> > _dynamicAttributeArray = new Array();
> > }
> >
> > flash_proxy override function getProperty( name : * )
: * {
> > return _dynamicAttributeArray[ name ];
> > }
> >
> > flash_proxy override function setProperty(name:*,
> > value:*):void {
> > _dynamicAttributeArray[ name ] = value;
> > }
> > }
> > }
> >
> >
> > Now if I have:
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns="*"
> > creationComplete="initApplication()">
> > <mx:VBox width="100%" height="100%">
> > <mx:TextArea width="100%" height="50%" id="output" text="{
> > SomeClass(someClass).newAttribute }"/>
> > <mx:Button label="Change"
click="someClass.newAttribute = '' +
> > new
> > Date();"/>
> > </mx:VBox>
> > <mx:Script>
> > <![CDATA[
> > import SomeClass ;
> > public var someClass:SomeClass;
> >
> > public function initApplication()
> > {
> > someClass = new SomeClass();
> > someClass.newAttribute = "I am New";
> > //output.text = someClass.newAttribute;
> > }
> >
> > ]]>
> > </mx:Script>
> > </mx:Application>
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> >
> >
> >
> > SPONSORED LINKS
> > Web site designdevelopment< http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ >
Computer
> > software
development< http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw >
Software
> > design and
development< http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ >
Macromedia
> >
flex< http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw >
Software
> > development best
practice< http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw >
> > ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > - Visit your group"flexcoders<http://groups.yahoo.com/group/flexcoders>"
> > on the web.
> >
> > - To unsubscribe from this group, send an email to:
> >[EMAIL PROTECTED]< [EMAIL PROTECTED]>
> >
> > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------
> >
>
>
>
> --
> What goes up, does come down.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
What goes up, does come down.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.