Re: Trapping Box Properties?
Brian Alliet <[email protected]> Thu, 15 Apr 2004 11:30:09 -0400
| Newsgroups | gmane.comp.java.xwt.core |
|---|---|
| Message-ID | <[email protected]> |
On Apr 15, 2004, at 11:07 AM, Charles Goodwin wrote: >> $mybox.height = 100; >> and >> ibex.ui.frame = $mybox // then resizes the frame > > Not the greatest example as here (I think) the resizing frames does > adjust the maxheight. Right, but as a result of maxheight changing the actual height will get changed. This was just intended to be an example of the height being changed without an explicit put to height/minheight/maxheight. > The trick is remembering that width/height are _not_ directly writable > properties. When you write to width the core actually writes to > maxwidth/minwidth. I'm looking at things from an org.xwt.js standpoint though. org.xwt.js doesn't know that width and height are special. It is going to invoke any traps on them regardless unless we put some ugly special cases in there. Even if we don't take this into account. People expect traps to work a certain way. Changing how they work for width/height is no good. > When put into context, this does actually make sense. It'll work, but it is ugly, and certainly doesn't make sense give the way every other trap works. > Still, that's what I think Adam is thinking. Can't guarrantee it. I hope it isn't. -Brian