You know you might want to consider
looking into DataServices too if the idea is keeping things like your Projects
in sync with the server. It takes care of monitoring property changes for you
for example.
Matt
Thanks Matt,
Yeah re-reading my post it dosn't make much sense.
You know I am in the labratory ;-) Testing and messing around with thoughts.
Basically, I have a mySQL record that I wanted to use as the internal object.
Once you load the result, a project IS the record and a Project class is
created looping through the record sets. I also wanted to add some methods like
save() remove() to the project class. This seemed like a real kewl use of
composition. I thought of object proxy becasue I am still finding my 'style'
using as3.
Seems as though, now that I have tested more things that either
I just put all public properties as public var name:String; etc, or write
get-set methods for them. The major thing is here I really loved the idea that
ObjectProxy monitors that properties. I want to monitor these properties as
they change. Binding?
I will write more about this if you care to hear it, it's abit long winded for
just free typing this thought train.
;-) I think this is just going to be one of those cases where one solution
gives me THESE benefits and the other solution gives me THOSE benifits. Time to
get out the triple beam :)!
Peace, Mike
On 3/12/06, Matt Chotin <[EMAIL PROTECTED]> wrote:
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
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.
--
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
YAHOO! GROUPS LINKS