From: thomas m. <tho...@gm...> - 2006-08-30 23:32:02
|
Hello all, i'm having trouble rotating views ... is there anything I should be aware of ? using rotateByAngle(90) results in my view disappearing alltogether trying to use mcBoundsHolder._rotation does the same hope i'l just mising something :) tia thomas -- |
From: Scott H. <sc...@af...> - 2006-08-31 13:08:21
|
This used to work. I'll have a look. Scott On 30/08/06, thomas mery <tho...@gm...> wrote: > Hello all, > > i'm having trouble rotating views ... is there anything I should be aware of > ? > > using rotateByAngle(90) results in my view disappearing alltogether > > trying to use mcBoundsHolder._rotation does the same > > hope i'l just mising something :) > > tia > > thomas > > -- > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > |
From: thomas m. <tho...@gm...> - 2006-08-31 14:48:24
|
actually I think I was lookng for setFrameRotation and it works :) On 8/31/06, Scott Hyndman <sc...@af...> wrote: > > This used to work. I'll have a look. > > Scott > > On 30/08/06, thomas mery <tho...@gm...> wrote: > > Hello all, > > > > i'm having trouble rotating views ... is there anything I should be > aware of > > ? > > > > using rotateByAngle(90) results in my view disappearing alltogether > > > > trying to use mcBoundsHolder._rotation does the same > > > > hope i'l just mising something :) > > > > tia > > > > thomas > > > > -- > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Scott H. <sc...@af...> - 2006-08-31 14:57:44
|
nice! On 31/08/06, thomas mery <tho...@gm...> wrote: > actually I think I was lookng for setFrameRotation and it works :) > > > > > On 8/31/06, Scott Hyndman <sc...@af... > wrote: > > This used to work. I'll have a look. > > > > Scott > > > > On 30/08/06, thomas mery < tho...@gm...> wrote: > > > Hello all, > > > > > > i'm having trouble rotating views ... is there anything I should be > aware of > > > ? > > > > > > using rotateByAngle(90) results in my view disappearing alltogether > > > > > > trying to use mcBoundsHolder._rotation does the same > > > > > > hope i'l just mising something :) > > > > > > tia > > > > > > thomas > > > > > > -- > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > |
From: thomas m. <tho...@gm...> - 2006-08-31 14:59:33
|
by the way is there a method (im not that good with maths ...) to shift the rotation center ? I know there probably is out there but already built in actionstep ? On 8/31/06, thomas mery <tho...@gm...> wrote: > > actually I think I was lookng for setFrameRotation and it works :) > > > > > On 8/31/06, Scott Hyndman <sc...@af... > wrote: > > > > This used to work. I'll have a look. > > > > Scott > > > > On 30/08/06, thomas mery < tho...@gm...> wrote: > > > Hello all, > > > > > > i'm having trouble rotating views ... is there anything I should be > > aware of > > > ? > > > > > > using rotateByAngle(90) results in my view disappearing alltogether > > > > > > trying to use mcBoundsHolder._rotation does the same > > > > > > hope i'l just mising something :) > > > > > > tia > > > > > > thomas > > > > > > -- > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > -- ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Ray C. <rc...@gm...> - 2006-08-31 16:27:27
|
Hi, maybe you can attach it to another clip. Say you have a box w by h, which is originally at (x,y). You want the centre of rotation to be at (xc,yc). So, attach it to a clip: daddy_mc.createEmptyMovieClip("kid_mc", daddy_mc.getNextHigestDepth()); daddy_mc._x = x-xc; daddy_mc._y = y-yc; kid_mc._x = xc; kid_mc._y = xc; Since the absolute coordinates of the attached clip takes into account the coordinates of the parent clip, kid clip appears at the point (x, y) but has rotation centre (xc, yc). To do this in ActionStep your movieclip heirarchy should look like this: mcBounds |- holder |- daddy_mc |- kid_mc On 8/31/06, thomas mery <tho...@gm...> wrote: > by the way is there a method (im not that good with maths ...) to shift the > rotation center ? I know there probably is out there but already built in > actionstep ? > > > > > On 8/31/06, thomas mery <tho...@gm...> wrote: > > > > actually I think I was lookng for setFrameRotation and it works :) > > > > > > > > > > > > On 8/31/06, Scott Hyndman <sc...@af... > wrote: > > > This used to work. I'll have a look. > > > > > > Scott > > > > > > On 30/08/06, thomas mery < tho...@gm...> wrote: > > > > Hello all, > > > > > > > > i'm having trouble rotating views ... is there anything I should be > aware of > > > > ? > > > > > > > > using rotateByAngle(90) results in my view disappearing alltogether > > > > > > > > trying to use mcBoundsHolder._rotation does the same > > > > > > > > hope i'l just mising something :) > > > > > > > > tia > > > > > > > > thomas > > > > > > > > -- > > > > > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > security? > > > > Get stuff done quickly with pre-integrated technology to make your job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > -- > > > ---------------------------------------------------------- > > http://www.myspace.com/thomasmery > > http://www.thomas-mery.net > > > ---------------------------------------------------------- > > > > -- > ---------------------------------------------------------- > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: thomas m. <tho...@gm...> - 2006-08-31 16:57:27
|
the good old method I thought about somethin more complex where the new center was computed but this is way better :) thanks On 8/31/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > maybe you can attach it to another clip. > > Say you have a box w by h, which is originally at (x,y). You want the > centre of rotation to be at (xc,yc). So, attach it to a clip: > > daddy_mc.createEmptyMovieClip("kid_mc", daddy_mc.getNextHigestDepth()); > daddy_mc._x = x-xc; > daddy_mc._y = y-yc; > kid_mc._x = xc; > kid_mc._y = xc; > > Since the absolute coordinates of the attached clip takes into account > the coordinates of the parent clip, kid clip appears at the point (x, > y) but has rotation centre (xc, yc). > > To do this in ActionStep your movieclip heirarchy should look like this: > > mcBounds > |- holder > |- daddy_mc > |- kid_mc > > On 8/31/06, thomas mery <tho...@gm...> wrote: > > by the way is there a method (im not that good with maths ...) to shift > the > > rotation center ? I know there probably is out there but already built > in > > actionstep ? > > > > |
From: Ray C. <rc...@gm...> - 2006-09-01 01:19:27
|
What do you mean? Share! On 9/1/06, thomas mery <tho...@gm...> wrote: > the good old method > > I thought about somethin more complex where the new center was computed but > this is way better :) > > thanks > > > On 8/31/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > maybe you can attach it to another clip. > > > > Say you have a box w by h, which is originally at (x,y). You want the > > centre of rotation to be at (xc,yc). So, attach it to a clip: > > > > daddy_mc.createEmptyMovieClip("kid_mc", > daddy_mc.getNextHigestDepth()); > > daddy_mc._x = x-xc; > > daddy_mc._y = y-yc; > > kid_mc._x = xc; > > kid_mc._y = xc; > > > > Since the absolute coordinates of the attached clip takes into account > > the coordinates of the parent clip, kid clip appears at the point (x, > > y) but has rotation centre (xc, yc). > > > > To do this in ActionStep your movieclip heirarchy should look like this: > > > > mcBounds > > |- holder > > |- daddy_mc > > |- kid_mc > > > > On 8/31/06, thomas mery < tho...@gm...> wrote: > > > by the way is there a method (im not that good with maths ...) to shift > the > > > rotation center ? I know there probably is out there but already built > in > > > actionstep ? > > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: thomas m. <tho...@gm...> - 2006-09-01 09:56:50
|
I was thinking it should be possible to set a center point and compute the new x and y based on the rotation angle, new x, new y , old x, old y without having to resort to a container clip like if you rotate a square by 90=B0 and want its rotation point to be its center you rotate it and then have to add half its width to its x position you then get the desired behaviour I thought there was a formula to have it work with any angle and any rotation point I'll keep on looking for this but if someone knows what I mean and have it handy ... :) maybe its basic stuff but trigonometry and I have to schedule a meeting On 9/1/06, Ray Chuan <rc...@gm...> wrote: > > What do you mean? Share! > > On 9/1/06, thomas mery <tho...@gm...> wrote: > > the good old method > > > > I thought about somethin more complex where the new center was computed > but > > this is way better :) > > > > thanks > > > > > > On 8/31/06, Ray Chuan <rc...@gm...> wrote: > > > Hi, > > > maybe you can attach it to another clip. > > > > > > Say you have a box w by h, which is originally at (x,y). You want the > > > centre of rotation to be at (xc,yc). So, attach it to a clip: > > > > > > daddy_mc.createEmptyMovieClip("kid_mc", > > daddy_mc.getNextHigestDepth()); > > > daddy_mc._x =3D x-xc; > > > daddy_mc._y =3D y-yc; > > > kid_mc._x =3D xc; > > > kid_mc._y =3D xc; > > > > > > Since the absolute coordinates of the attached clip takes into accoun= t > > > > the coordinates of the parent clip, kid clip appears at the point (x, > > > y) but has rotation centre (xc, yc). > > > > > > To do this in ActionStep your movieclip heirarchy should look like > this: > > > > > > mcBounds > > > |- holder > > > |- daddy_mc > > > |- kid_mc > > > > > > On 8/31/06, thomas mery < tho...@gm... > wrote: > > > > by the way is there a method (im not that good with maths ...) to > shift > > the > > > > rotation center ? I know there probably is out there but > already built > > in > > > > actionstep ? > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > --=20 ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: thomas m. <tho...@gm...> - 2006-09-01 09:13:29
|
sorry I wrote : like if you rotate a square by 90=B0 and want its rotation point to be its center you rotate it and then have to add half its width to its x position you then get the desired behaviour should have been : you have to add its whole width On 9/1/06, thomas mery <tho...@gm...> wrote: > > I was thinking it should be possible to set a center point and compute th= e > new x and y based on the rotation angle, new x, new y , old x, old y > > without having to resort to a container clip > > like if you rotate a square by 90=B0 and want its rotation point to be it= s > center you rotate it and then have to add half its width to its x positio= n > you then get the desired behaviour > > I thought there was a formula to have it work with any angle and any > rotation point > > I'll keep on looking for this but if someone knows what I mean and have > it handy ... :) > > maybe its basic stuff but trigonometry and I have to schedule a meeting > > > > > > On 9/1/06, Ray Chuan <rc...@gm...> wrote: > > > > What do you mean? Share! > > > > On 9/1/06, thomas mery <tho...@gm...> wrote: > > > the good old method > > > > > > I thought about somethin more complex where the new center was > > computed but > > > this is way better :) > > > > > > thanks > > > > > > > > > On 8/31/06, Ray Chuan <rc...@gm... > wrote: > > > > Hi, > > > > maybe you can attach it to another clip. > > > > > > > > Say you have a box w by h, which is originally at (x,y). You want > > the > > > > centre of rotation to be at (xc,yc). So, attach it to a clip: > > > > > > > > daddy_mc.createEmptyMovieClip("kid_mc", > > > daddy_mc.getNextHigestDepth()); > > > > daddy_mc._x =3D x-xc; > > > > daddy_mc._y =3D y-yc; > > > > kid_mc._x =3D xc; > > > > kid_mc._y =3D xc; > > > > > > > > Since the absolute coordinates of the attached clip takes into > > account > > > > the coordinates of the parent clip, kid clip appears at the point > > (x, > > > > y) but has rotation centre (xc, yc). > > > > > > > > To do this in ActionStep your movieclip heirarchy should look like > > this: > > > > > > > > mcBounds > > > > |- holder > > > > |- daddy_mc > > > > |- kid_mc > > > > > > > > On 8/31/06, thomas mery < tho...@gm... > wrote: > > > > > by the way is there a method (im not that good with maths ...) to > > shift > > > the > > > > > rotation center ? I know there probably is out there but > > already built > > > in > > > > > actionstep ? > > > > > > > > > > > > > > > > > > > > > -----------------------------------------------------------------------= -- > > > Using Tomcat but need to do more? Need to support web services, > > security? > > > Get stuff done quickly with pre-integrated technology to make your jo= b > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > -- > > Cheers, > > Ray Chuan > > > > > > -----------------------------------------------------------------------= -- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > > ---------------------------------------------------------- > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > --=20 ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Ewan M. <mr...@mr...> - 2006-09-01 13:38:24
|
Hello, I'm trying to program my application using MVC pattern as described in Cocoa Fundamentals. "The delegate object itself is typically, but not necessarily, an object, often a custom object, that controls some part of the application (that is, a coordinating controller object)." CocoaFundamentals p148. Great so my thoughts so far I can either initialize my view objects with their controller e.g. var myView = (new MyView).initWithController((new MyController).init()); or as the text above suggests I can set it as a delegate and implement an informal protocol between the controller and view e.g. var myView = (new MyView()).init(); myView.setDelegate((new MyController).init)); From the actionstep source code there are three different ways to implement setDelegate in your Delegator It can be notified (see ASFieldEditor.as) It can be called directly and the delegate check to see that it conforms to informal protocol(see ASTreeView.as) It can be called directly but not checked to see if it responds to calls (see NSImage.as , when is m_delegate used?) You can create an interface if you want (ASFieldEditingProtocol.as) The naming strategy is either append Protocol or Delegate. Does this sound about right? So say I've got 10 small simple views shall I just bundle all my control code in one or two Controllers and set either as delegate for all the view? There doesn't seem much point spreading all the control code around by having parallel Views and Controllers. (i.e. one controller for each view). Cheers, Ewan |
From: Scott H. <sc...@af...> - 2006-09-01 20:51:26
|
> Hello, > > I'm trying to program my application using MVC pattern as described > in Cocoa Fundamentals. > > "The delegate object itself is typically, but not necessarily, an > object, often a custom object, > that controls some part of the application (that is, a coordinating > controller object)." > CocoaFundamentals p148. > > Great so my thoughts so far I can either initialize my view objects > with their controller e.g. > var myView = (new MyView).initWithController((new MyController).init()); > or as the text above suggests I can set it as a delegate and > implement an informal protocol between the controller and view e.g. > var myView = (new MyView()).init(); > myView.setDelegate((new MyController).init)); > > From the actionstep source code there are three different ways to > implement setDelegate in your Delegator > > It can be notified (see ASFieldEditor.as) > It can be called directly and the delegate check to see that it > conforms to informal protocol(see ASTreeView.as) > It can be called directly but not checked to see if it responds to > calls (see NSImage.as , when is m_delegate used?) > > You can create an interface if you want (ASFieldEditingProtocol.as) > The naming strategy is either append Protocol or Delegate. > > Does this sound about right? Yes, it does. > So say I've got 10 small simple views shall I just bundle all my > control code in one or two Controllers and set either as delegate for > all the view? Yeah, you can absolutely do something like this. In fact, you may notice that the first argument for most delegate methods is the "sender", which is the object that is requesting the delegated behaviour. Just do equality testing on that and have it behave appropriately. Scott |
From: Ewan M. <mr...@mr...> - 2006-09-03 11:50:30
|
Great, thanks for the reassurance and advice, Ewan. On 1 Sep 2006, at 21:51, Scott Hyndman wrote: >> Hello, >> >> I'm trying to program my application using MVC pattern as described >> in Cocoa Fundamentals. >> >> "The delegate object itself is typically, but not necessarily, an >> object, often a custom object, >> that controls some part of the application (that is, a coordinating >> controller object)." >> CocoaFundamentals p148. >> >> Great so my thoughts so far I can either initialize my view objects >> with their controller e.g. >> var myView = (new MyView).initWithController((new >> MyController).init()); >> or as the text above suggests I can set it as a delegate and >> implement an informal protocol between the controller and view e.g. >> var myView = (new MyView()).init(); >> myView.setDelegate((new MyController).init)); >> >> From the actionstep source code there are three different ways to >> implement setDelegate in your Delegator >> >> It can be notified (see ASFieldEditor.as) >> It can be called directly and the delegate check to see that it >> conforms to informal protocol(see ASTreeView.as) >> It can be called directly but not checked to see if it responds to >> calls (see NSImage.as , when is m_delegate used?) >> >> You can create an interface if you want (ASFieldEditingProtocol.as) >> The naming strategy is either append Protocol or Delegate. >> >> Does this sound about right? > > Yes, it does. > >> So say I've got 10 small simple views shall I just bundle all my >> control code in one or two Controllers and set either as delegate for >> all the view? > > Yeah, you can absolutely do something like this. In fact, you may > notice that the first argument for most delegate methods is the > "sender", which is the object that is requesting the delegated > behaviour. Just do equality testing on that and have it behave > appropriately. > > Scott > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core |