On Friday, March 21, 2003, at 10:19 AM, Raymond Irving wrote:
I do use it.
--- Doug Melvin <[EMAIL PROTECTED]> wrote:In the ChangeLog Dan had suggested that theonresizeevent be replaced with the setAnchor() function.ThesetAnchor() function is much more flexible thathavingto do invokeEvent("resize")
So how do I respond to the resizing of a layer? I really would like to know.
These are issues we will have to collaborate on. Is it best to add invokeEvent inside the setSize() function? How many apps/widgets will make use of the onresize events?
The pros and cons will have to be carefully look at.
Shouldn't the ability to pass noevent==false as an argument on all methods that send event fix that ? This means that if an animation call setSize or setLocation, it could send it with the extra argument to say don't send the event, this should fix the performance issue, right ?Having invokeEvent inside setSize will slow down animations and layers/widgets that makes use of the anchor feature.
I have used that feature for performance optimization.
I guess.If you say yes add the onresize, then you'll have to add the onmove,etc events that have been removed.
Could you tell which ones ? The one I've used is by using a delegate. The delegate concept has been always present in NeXT, and Apple now Object Oriented frameworks. The idea is that one object is attached a delegate which will have the ability to change some default behaviours, react to some events. For example, a delegate could be sent : layerWillDrag(aLayer). This could give the delegate, which can be a delegate of multiple layers, to prevent a drag to start. You frequently find delegate methods like willDoSomething, and didDoSomething.
DynAPI 3.0 removed the onresize and onmove events. IMO I don't think we need these events. I've found other ways to solve my resize issues,
This is slightly more efficient than notifications as there's only one object to message, and it's available by an instance variable.
I have to say that a lot of the use I made of events could have been re implemented by a delegate. You usually don't have multiple objects observing others. For example, you usually don't have multiple objects listening for drag events of the same layers, would you agree ?
And if you do, than we could provide a delegate that send events.
So to summarize:
Introduce the concept of delegate:
The events we currently send, we replace them by sending an equivallent method directly to the delegate.
Now if by design you really need a notification, the delegate can send the equivallent event, and you're back to the old schema.
What do you think ?
Benoit
but let's get some feedback from the other developers.
Should be sacrifice add onresize,onmove and onload back into 3.0?
We have about 7 active debvelopers, let hear the view of as many as posible.
server)onCreate()
As for onload... It was suggested the theonPrecreate() functions be used to triggercallbacksonce the object (elm) is loaded.
See previous email (if it ever arrives on the
same as comment above.
-- Raymond Irving
__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/