Layouting advice needed

View: New views
3 Messages — Rating Filter:   Alert me  

Layouting advice needed

by Dennis Möhlmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'd like to build an interface consisting of a left and a right pane.
The left one should have a fixed width (in pixel), the right one should
use up the remaining space. Both should stretch to full viewport height,
display a stretched background image and use a "Stack" for their content.
My current attempt looks like this:

+ Composite:HBox
    + Composite:Canvas // left panel
        + Image // the background
        + Stack
             + Canvas // left content pages
             + Canvas
             + ...
    + Composite:Canvas // right panel
        + Image
        + Stack
             + Canvas
             + Canvas
             + ...

I've been experimenting with flex and width: "100%", but nothing really
adds up to what I want it to look. One problem is, that the layout
managers usually either allow a percentage value or pixels, but not both
(likely by design, so some advice on this would be welcome, too).
Another one is, that the image doesn't seem to stretch to the parent
Canvas (despite using scale, allowGrowX/Y). I've tried doing this
manually by setting maxWidth/Height in a "resize" listener (which sort
of works), but that doesn't seem to adjust the size of the stack on top
of it, which always uses the initial image size.
Now, I could set all the element dimensions manually, but I imagine that
would be rather slow. I'd like to think that there's a better way to do
this. Any hints/ideas/links are welcome. I'm pretty new to qooxdoo and
still in the "confused-developer"-stage. :)

P.S: Oh, one unrelated question: Sometimes the generator spills out
multiple pages of "unknown class" errors for core classes like
qx.application.Standalone. I noticed this seems to be caused by a
missing ,/; somewhere, but it's a pain to find something like that. I've
tried the "lint" target, but that doesn't seem to catch it either. Any
advice? I've already spent hours on hunting commas :)

Thanks,
  Dennis

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: Layouting advice needed

by Jonathan Weiß-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello Dennis!


The SplitPane[1] widget is perfect if you want to have one widget with a
fixed and one a flexible value.
If you want to set a background image and stretch it to the full widget
size, you have to use a background decorator[2]. With this decorator you can
set the background image behind the widget.

Lint will find any comma, which is used incorrectly. I use the qooxdoo
TextMate extension which runs the lint command every time I save a file and
this helped me much finding small typing errors. It should be possible to
integrate lint into Eclipse, too...

Please let me know if I could help you.

Cheers
Jonathan

[1] http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.splitpane
[2] http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.decoration.Background

-----
Jonathan Weiß
Framework Engineer

http://mysterycity.de/blog Blog  -  http://www.linkedin.com/in/jonathanrass
LinkedIn  -  http://www.xing.com/profile/Jonathan_Weiss5 XING
--
View this message in context: http://n2.nabble.com/Layouting-advice-needed-tp3938099p3945545.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: Layouting advice needed

by Dennis Möhlmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jonathan, hello qooxdoo-devel,
> The SplitPane[1] widget is perfect if you want to have one widget with a
> fixed and one a flexible value.
> If you want to set a background image and stretch it to the full widget
> size, you have to use a background decorator[2]. With this decorator you can
> set the background image behind the widget.
>  
Thanks for pointing those out. I've found some examples for the
SplitPane and decorators and see how it goes. It's not possible to lock
the splitter in place, though, is it?
> Lint will find any comma, which is used incorrectly. I use the qooxdoo
> TextMate extension which runs the lint command every time I save a file and
> this helped me much finding small typing errors. It should be possible to
> integrate lint into Eclipse, too...
I'm using Notepadd++ (bit of a minimalist), but I've setup something
similar for the lint target. Thanks for the idea!
About the errors I encounterd: Apparently I was wrong in thinking those
were caused by missing commas/semicolons. I've since noticed that doing
a" generate distclean" fixes the problem, so I guess it's not really
anything in my code (?). I've attached an example of what I mean at the
end of this mail.

In general I still find it a bit difficult to debug Qooxdoo code. I've
already setup my local webserver to send out nocache headers for the
files within my project directory - which has helped quite a bit with
Chrome's annoying caching habits. Chrome doesn't allow me to view the
RPC requests though, so I'm using Firefox with Firebug to watch those,
but every now and then Firebug simply hangs and I have to kill Firefox.
This is going to be my fist RIA, so any hits/links you or anyone else
might want to share on debugging RIAs beyond what's been said in the
manual's section on debugging would be appreciated.

Best regards,
  Dennis

============================================================================
    INITIALIZING: GUI
============================================================================
 >>> Configuration: config.json
 >>> Jobs: source
 >>> Resolving config includes...
 >>> Resolving jobs...
 >>> Incorporating job defaults...
 >>> Resolving macros...
 >>> Resolving libs/manifests...

============================================================================
    EXECUTING: SOURCE::SOURCE-SCRIPT
============================================================================
 >>> Scanning libraries...
  - Scanning E:\Documents\Source\Dominion\gui...
 >>> Resolving dependencies...
    - ! Unknown class referenced: qx.ui.window.Window (in: gui.Register)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Register)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Register)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Register)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Register)
    - ! Unknown class referenced: qx.ui.form.TextField (in: gui.Register)
    - ! Unknown class referenced: qx.ui.form.PasswordField (in:
gui.Register)
    - ! Unknown class referenced: qx.ui.form.PasswordField (in:
gui.Register)
    - ! Unknown class referenced: qx.ui.form.TextField (in: gui.Register)
    - ! Unknown class referenced: qx.ui.form.Button (in: gui.Register)
    - ! Unknown class referenced: qx.ui.form.Button (in: gui.Register)
    - ! Unknown class referenced: qx.ui.layout.VBox (in: gui.Register)
    - ! Unknown class referenced: qx.ui.container.Composite (in:
gui.Register)
    - ! Unknown class referenced: qx.ui.layout.Grid (in: gui.Register)
    - ! Unknown class referenced: qx.ui.core.Spacer (in: gui.Register)
    - ! Unknown class referenced: qx.ui.core.Spacer (in: gui.Register)
    - ! Unknown class referenced: qx.ui.container.Composite (in:
gui.Register)
    - ! Unknown class referenced: qx.ui.layout.HBox (in: gui.Register)
    - ! Unknown class referenced: qx.ui.window.Window (in: gui.Login)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Login)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Login)
    - ! Unknown class referenced: qx.ui.form.TextField (in: gui.Login)
    - ! Unknown class referenced: qx.ui.form.PasswordField (in: gui.Login)
    - ! Unknown class referenced: qx.ui.form.Button (in: gui.Login)
    - ! Unknown class referenced: qx.ui.form.Button (in: gui.Login)
    - ! Unknown class referenced: qx.ui.form.Button (in: gui.Login)
    - ! Unknown class referenced: qx.ui.container.Composite (in: gui.Login)
    - ! Unknown class referenced: qx.ui.container.Composite (in: gui.Login)
    - ! Unknown class referenced: qx.ui.layout.VBox (in: gui.Login)
    - ! Unknown class referenced: qx.ui.layout.Grid (in: gui.Login)
    - ! Unknown class referenced: qx.ui.layout.HBox (in: gui.Login)
    - ! Unknown class referenced: qx.ui.container.Composite (in: gui.Left)
    - ! Unknown class referenced: qx.ui.layout.VBox (in: gui.Left)
    - ! Unknown class referenced: qx.ui.container.Composite (in: gui.Left)
    - ! Unknown class referenced: qx.ui.layout.Basic (in: gui.Left)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Left)
    - ! Unknown class referenced: qx.ui.basic.Image (in: gui.Left)
    - ! Unknown class referenced: qx.ui.core.Spacer (in: gui.Left)
    - ! Unknown class referenced: qx.application.Standalone (in:
gui.Application)
    - ! Unknown class referenced: qx.ui.container.Composite (in:
gui.Application)
    - ! Unknown class referenced: qx.ui.layout.Canvas (in: gui.Application)
    - ! Unknown class referenced: qx.ui.basic.Image (in: gui.Application)
    - ! Unknown class referenced: qx.ui.basic.Image (in: gui.Application)
    - ! Unknown class referenced: qx.ui.container.Stack (in:
gui.Application)
    - ! Unknown class referenced: qx.ui.container.Stack (in:
gui.Application)
    - ! Unknown class referenced: qx.ui.basic.Image (in: gui.Application)
  - Sorting 195 classes...
 >>> Loaded 558 private fields
 >>> Resolving dependencies...
    - ! Unknown class referenced: qx.ui.window.Window (in: gui.Register)
    - ! Unknown class referenced: qx.ui.basic.Label (in: gui.Register)
    [... repeats the above here ...]
    - ! Unknown class referenced: qx.ui.container.Stack (in:
gui.Application)
    - ! Unknown class referenced: qx.ui.basic.Image (in: gui.Application)
  - Sorting 195 classes...
 >>> Generate source version...
  - Processing translation for 3 locales...
  - Analysing assets...
    - Compiling resource list...
  - Generating boot loader...
 >>> Done

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel