Lukas Renggli wrote:
Has anyone
done, or seen a sample of cascading dialog boxes done
with only magritte descriptions? Say I had a dropdown list of
classes, and when one was selected, I want the next drop down list
to contain methods in that class, or maybe countries and states, or
whatever. How can the second MultipleOptionDescription get it's
options: from the selector on the instance that the first
MultipleOptionDescription set the value on?
Yes, however you need to specify the second description on the
instance-side to be able to define it according to the state of your
model. There are some examples on how to change descriptions on an
instance-bases in the slides of my Magritte Tutorial (Dynamic
Descriptions, 31-33) at <http://www.lukas-renggli.ch/smalltalk/
magritte>.
Cheers,
Lukas
Ok, doesn't seem to work, but let me explain what I'm doing. I'm
writing a component meant to be hosted in Pier, the component has
several settings it needs, and I was using class side descriptions to
provide the "settings" interface that Pier offers on any component.
However, looking at PRSettingsComponent, I see that it's not asking the
instance for it's description, it's asking the class directly, bypassing
any overrides I may have attempted on the instance side. Is that the
intention? Am I writing components wrong? Should I be subclassing
something in Pier rather than my own WAComponent subclass?
The Magritte tutorial is great btw, is there something similar for Pier?
Now that Pier seems somewhat stable, I'm starting to explore it more
as an application container with configurable widgets, digging it so
far, just need to get a few things done so I grok the do's and dont's a
little better. Great work though, keep it up!