Hi Corey,
I''m checking out the source files you posted and I can''t see
why the
first edit.rhtml file wouldn''t work. One thing I do know is that some
controls do not work well inside other controls. For example, you
can''t
put buttons, lists, or menulists inside a listbox. They get rendered
but you just can''t interact with them.
Some things you should try when debugging these are:
1. Generate the file and then save it to disk. It''s harder to debug
the resulting file if there''s Ruby "infecting" it. Once you
can get a
bare XUL file working you can more easily figure out why it isn''t
working.
2. Use an editor with proper high-lighting and tag bounding. It helps
a lot to be able to see if your XML is well formed.
3. Setup a file without any javascript in it. Sometimes this causes
problems.
4. Make your files as simple as possible. I notice you have a habit of
wrapping every component with an hbox or vbox. These tags are only
necessary if you want to change the direction of flow, and having too
many just makes things difficult to debug and read. For example, in
your first edit.rhtml, if you take the outer vbox and make it an hbox,
then you can get rid of every hbox in that file. The only time you
really put redundant "flow" tags is if you need to modify the box
using
some CSS. I think this is in the original show.rhtml and edit.rhtml
files because I was just learning how to do things.
5. Check the javascript console as well to make sure there wasn''t a
weird javascript error.
6. Try loading it in Internet Explorer. :-) Just kidding. Although,
it is a quick way to see a pretty printed XML file.
Also, feel free to catch me on IRC as zedas as you try to figure it out.
Zed
On Mon, 2005-02-14 at 00:40 -0800, Corey Lawson wrote:> In messing with the files from Zed Shaw''s application of XUL to
> List.rhtml and show.rhtml, I''ve made an edit.rhtml file that seems
to
> work, but when I try to do a menulist control, even with dummy values,
> it doesn''t show up. Looking in Mozilla''s DOM browser, I
can find the
> menulist control, and it shows no menuitems in it there (yes,
there''s
> a menupopup in there. I''ve pasted the manually populated code from
> xulplanet into the rhtml file, rather than try to populate the
> menulist from the categories class).
>
> When I try to do the same thing with a listbox, almost the same
> results, but all that shows on the page is a small box, again with no
> list contents in it, according to the DOM Browser.
>
> If I don''t have the listbox/menulist controls, but instead just a
> simple textbox with the value for that current recipe''s fields,
things
> display just fine.
>
> If I make a page with the full example of a listbox/menulist control,
> and view it in Moz separately, both controls work just fine.
>
> I''ve attached my edit.rhtml file (path:
> %RUBY%/apps/cookbooxul/app/viewers/recipe/edit.rhtml)
>
> System? Win2KPro, Moz 1.7.5, Ruby 1.9.2, Rails 0.9.4.1, via WebBrick.
>
> I just don''t know where the impedence mismatch is
happening...Mozilla?
> WebBrick? CSS?
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails