[Bese-devel] questions

Marco Baringer mb at bese.it
Tue Sep 20 17:39:07 UTC 2005


Jan Rychter <jan at rychter.com> writes:

> Two questions, again any guidance is very much appreciated.
>
> 1. Is there a good way to initialize form elements? At present, if I
>    create a form component containing a number of form elements, I can't
>    just use initargs to pass values to the elements when creating the
>    component -- obviously, since the form elements are classes
>    themselves.
>
>    Basically, I'm looking for a way to do 
>       (call 'settings-dialog :first-name "blah" :last-name "blah")
>    where first-name and last-name are initargs for :component slots in
>    the form component settings-dialog.
>
>    This is probably something that falls into "think of a good way to do
>    it and implement it yourself" category -- right?

no, it falls into the "think of a good way and help marco implement
it". i'd really really like to see ucw have a nice form api
(validation, marshalling and java script alerting are good starting
points), i just can't seem to come up with it. this would be as good a
time as any to start stealing ideas from other libs.

in the mean time we could setup an initialize-instance method
which passed initargs to slots which were know to be form elements. or
even better we could create a form-class (a subclass of
standard-component-class) and all the bells and whistles we want. we'd
just need to come up with a short list of what a form class sholud
look like and rework the form components (i'd be more than happy to
put time into this).

> 2. I would like to have the capability of creating a "modal" component,
>    one that would take over the entire browser window when called. I
>    could probably do that by adding yet-another-container on the top
>    level, but is there a better way? I'm probably missing something.

(defmacro takeover-entire-window (component-class &rest initargs)
  `(call-component (context.window-component *context*)
                   (make-instance ,component-class , at initargs)))

that should work.

> BTW, debugging UCW apps is a *real* pain. I can't seem to read anything
> out of the backtraces that I get, so it's really mostly guesswork...

i consider this to be a _huge_ issue (unless you're on clisp in which
case you're just fucked). are you using slime? are the html backtraces
not inspectable? is the javascript in the backtraces causing problems?
how can things be improved?

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list