[Q] About IconicButton in PartsBin, as responding to sender
of bug#impara.de bounces message
Scott Wallace
scott.wallace at squeakland.org
Sat Apr 23 05:45:29 UTC 2005
Hi, Edgar,
(This correspondence arose in an exchange on Mantis on April 21, but
since Edgar carried it over to squeak-dev, I'm following suit.)
I see that I guessed wrongly about the motivation for your
"morphToDropFromFix" fileout on Mantis (bug #1092.) If I'd known
that you were trying to rearrange buttons in a "parts flap" (such as
Supplies, Tools, or Widgets,) I would have offered up the solution
mentioned below in #1 below right away.
However, it's also true that a small modification to your fileout
will accomplish the result you were seeking without breaking the
proper functioning for "normal" IconicButtons, so I've produced such
a fileout for your inspection -- see #4 below.
(1) There's a simple way to move a parts-button in a "parts" flap to
be the first item in that flap. Just choose "bring to front" from
the halo menu of the button in question. Voilà! By a series of
judiciously-chosen "send to back" and "bring to front" requests on
the buttons in a flap, you can end up with any arrangement you want.
(2) In the example you cite, operating in an image that has the
original version of your fileout present, if one creates a "normal"
IconicButton, and drops it into the Supplies Flap, you are right that
the appearance of the resulting button in the Supplies Flap is
"correct", but what you may not have noticed is that the resulting
button does not work as a "parts donor" -- i.e., if you try to drag
from it, you'll end up just "pressing" the button, rather than
obtaining a new instance. Thus, it may *look* right, but it doesn't
work ;-)
(3) BTW a quick way to get an example of a user-defined IconicButton
for testing is: "(IconicButton new labelGraphic: Form fromUser)
openInHand".
(4) FWIW I attach a fileout similar to yours but which doesn't have
the problem of malfunctioning when a "regular" iconicButton is
dropped into a parts flap. It differs from yours only in that it
does one additional test, to ascertain whether the button being
dropped is actually a "parts donor" button in its own right, before
deciding whether or not to accept it without further processing.
(5) A decent case could be made for adopting this "fix" (i.e. your
fix as tweaked in the attached.) This would then permit the kind of
casual rearrangement of items in a parts flap via grab and drop,
which was your original intention. Likewise, you could put the
ZipViewer into the Tools flap by tearing-out (black handle) or
duplicating (green handle) the Zip button from the Objects Catalog
and dropping the resulting button wherever you want it in the Tools
Flap. What do you think? This would be "common sense overriding
consistency," a principle on which the house may be divided ;=)
(6) Finally, no need to apologize about anything, and you're
certainly not wasting anyone's time! Your voice in the Squeak
community is always a cheerful and earnest point of light which I for
one have always appreciated.
Cheers,
-- Scott
At 9:49 AM -0300 4/22/05, Lic. Edgar J. De Cleene wrote:
>First I apologize any troubles.
>
>Scott:
>I appreciate your corrections.
>As still learning , I don't know some things.
>> If, instead of tearing off a fresh instance from the Objects Catalog by
> > using a simple drag, you decide to *rip out the entry itself° from the
> > Objects Catalog by using the black halo handle, or to use the green
> > halo-handle to obtain a duplicate of the parts-donor button -- which
> > seemingly is the gesture that the "fix" is trying to support -- then the
> > object you obtain will be a "parts-donor button". (Try dragging from it
>> -- you'll get fresh instances!) So if you were to drop *that* button into
> > the Widgets flap, you'd get an item in the Widgets flap which, when the
> > user drags from it, produces a copy of that parts-donor button.
>Not in any images what I have without my bad fix. (this comes from 3.4 era
>or earlier)
>Having a duplicate via green halo handle don't work in any flap.(see
>attached pict)
>
>f _ Form fromFileNamed: 'Macintosh
>HD:Users:admin:Public:SqueakDevelop:StabiloBoss.jpg'. "put here the path of
>your pict"
>esteBoton _ IconicButton new. "Create a new IconicButton "
>esteBoton initialize. "For 3,8 no need, but I have this as example for ages
>"
>esteBoton labelGraphic: f. "You button see like as you graphic "
>esteBoton openInWorld.
>
>And grabbing to any flap I don't see any wrong in any images WITH my bad
>fix.
>Sometimes feeling I'm the only using Squeak in odd ways.
>Sorry if I wasting your time, all this happened when I try to change what's
>on Tools Flap , like putting button for ZipTool or moving button for Browser
>to first place manually.
>
>Thanks again.
>
>Edgar
-------------- next part --------------
Skipped content of type multipart/appledouble
More information about the Squeak-dev
mailing list
|