Re: Best Practices Issue

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Friday 07 February 2003 06:13 pm, you wrote:
>
> > On Fri, 7 Feb 2003 12:29:48 -0600, "C. K. Lester" <cklester at yahoo.com=
>
> >
> > wrote:
> > > anybody else who wants to chime in): what do you do if a value chan=
ges
> > > in your variable, but not as a result of the control itself?
>
> Isn't that what OOP was all about? If you accessed a variable, and it h=
ad
> an associated method, which was inherited, code was run to automagicall=
y do
> these things among all the sub-objects that were inheriting the same
> method?

I dunno, Kat... I don't do OOP. But are you suggesting that OOP allows an=
=20
onChange() event for a variable?! That'd be interesting.

> o =3D object
> .setmethod =3D o =3D a + b + c
>
> a =3D descendant of o
> b =3D descendant of o
> c =3D descendant of o
>
> a =3D 1
> b =3D 1
> c =3D 1
> -- o =3D 3
> a =3D 2
> -- o =3D 4

I wonder if Diamond does something like this... except you'd have to do=20
something like

define object o
o.setmethod( o.value , sum( a,b,c ) )
set(a,1)
-- o =3D 1
set(b,1)
-- o =3D 2
set(c,1)
-- o =3D 3

The set() procedure can either call all variables to run their onChange()=
=20
code, or it knows the dependencies and runs only the applicable onChange(=
)=20
events.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu