Sorry, I really don’t get it.  So you have a Project that extends ObjectProxy (this is because you want to monitor property access I guess).  So now would you really be returning a subclass of Project?  Or is the deal that the object within the ObjectProxy has a concrete type that you want to reach?  If that is the case you really shouldn’t be using the ObjectProxy.  The whole point of ObjectProxy is that you don’t care what’s inside and never want concrete typing.  If you want the concrete type you should devise another system. 

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schmalle
Sent: Friday, March 10, 2006 6:53 AM
To: [email protected]
Subject: [flexcoders] Flex2 :: ObjectProxy subclass :: Interfacing concrete accessors

 

Hello,

Lets see here, the question is kinda odd...

I have the following;

        private function _getProjectAt(id:uint):Project
        {
            var cursor:IViewCursor = projectsQueue.getCursor();   
           
            while (!cursor.afterLast) {
                var curProject:Project = cursor.current as Project;
                var curID:uint = curProject.id;
                if (curID == id) {
                    return curProject;
                }               
                cursor.moveNext();   
            }
            return null;       
        }


1)  the Project class extends ObjectProxy
2) The Project class wraps a record from mySQL (so we really don't have a set interface for the mySQL record from a record set)
3) When I loop through these Project of type ObjectProxy, is there anyway I can attach an interface to this, IE IProject
4) I know most of the time typing an interface is the best way but, uisng ObjectProxy as a super class, I am wondering if the rules are changing here.

Theoretically, we don't know what properties are there because is is a proxy for the ture object. Now, should I type the returned Project class AS Project and programm to the concrete implemenation of Project?? I see know way of creating an interface other that concrete typing.

Do you get it ? :)

What is the elogent way of nailing down an ObjectProxy class from it's accessors in a concrete implementation?

Peace, Mike

--
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




Reply via email to