PDA

View Full Version : edittext alignment in DHTML runtime


jimkfoster
11-08-2007, 01:24 PM
Hello,

The edittext component in a DHTML runtime does not align its text along the vertical correctly.

Rather than seeing input text fields like this:



+---------------------+
| I am some text |
+---------------------+


I am seeing things like:



+- I am some text ----+
| |
+---------------------+



...meaning that the text of the input box is shifted up by a few pixels.

I have tried manipulating everything I could think of, but to no avail.

Finally, for this forum post (so as to remove my own code as at fault), I tried compiling to DHTML the example provided in the Laszlo Explorer, and it, too, exibits the very same results.

Specifically, I used the code from OpenLaszlo menu => Components => Form Components => Edit Text. You will find this code in your OpenLaszlo install at

http://127.0.0.1:8080/lps-4.0.5/examples/components/edittext_example.lzx

For convenience, here is that code, pulled straight from that url:


<canvas bgcolor="0xeaeaea" height="500">
<include href="lz/library.lzx" />
<dataset name="ds">
<item>first item from dataset</item>
<item>second item from dataset</item>
<item>third item from a dataset</item>
</dataset>

<view x="40" y="40" width="420" height="360" bgcolor="silver">
<constantlayout axis="x" value="20"/>
<simplelayout spacing="12" inset="20"/>
<edittext id="a">Name</edittext>
<edittext id="b" text="Address"></edittext>
<edittext id="c" text="555-555-1234"></edittext>
<view>
<text text="Notes:"/>
<edittext id="d" text="Multiline text displayed in an inputtext box with a defined width and height."
width="370" height="50" multiline="true"/>
<simplelayout spacing="2"/>
</view>
<view>
<simplelayout spacing="10" axis="x"/>
<text text="Username:"/>
<edittext id="d1"/>
<text text="Password:"/>
<edittext id="d2" password="true" text="password"/>
</view>

<view datapath="ds:/">
<constantlayout axis="x" value="15"/>
<simplelayout spacing="10"/>
<edittext width="150" datapath="item/text()"/>
</view>
</view>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ************************************************** *
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ************************************************** **** -->
<!-- @LZX_VERSION@ -->



Now the obvious questions:

Why is this so?
If this is a bug, has it been filed in JIRA, yet?
What can one do to rectify this, for the immediate need?

The edittext component is fundamental to forms, but the current way that it is displayed in a DHTML deployment is not acceptable for a professional web presentation, so any advise would be most appreciated.

Thank you!

senshi
11-09-2007, 10:37 AM
Looks like LPP-4738 (http://www.openlaszlo.org/jira/browse/LPP-4738), doesn't it? Currently, I cannot longer reproduce this issue with the latest development revision. I haven't tested it in OL4.0.6, but you may give it a shot...!

jimkfoster
11-09-2007, 12:52 PM
Hi senshi,

As I had hoped, this issue has indeed already been filed in JIRA, and LPP-4738 looks to be the one addressing the exact issue I described.

I am working with 4.0.5.0, build 6513, so I will go up and get a nightly and be done with it.

Thanks for pointing out where it already had a place in JIRA.

jimkfoster
11-10-2007, 06:45 AM
senshi:

The code provided by the nightly at http://www.openlaszlo.org/download does not resolve this issue. Tests using OpenLaszlo menu => Components => Form Components => Edit Text yield the same results as in my original post.

The nightly I pulled down last yeserday (11/09/07) is stamped as Version 4.0.6.0, Build 6841.

However, I noted that in reading LPP-4738 that you have a note that speaks to a later build:


Cannot reproduce in latest trunk (rev. #7184), swf- and dhtml-output look absolutely the same. Tested in Firefox 2.0.9 and IE6.


It was my understanding that the nightly download had a development name of wafflecone, and that it provided the latest and greatest in any 24-hour period. I am obviously mistaken. Perhaps I need that in trunk (legals?) (ringding?) or whatever it's called this month.


Could you please set me straight on this, and tell me how I can get the working version that you speak of?

Thank you!

senshi
11-10-2007, 01:33 PM
It was my understanding that the nightly download had a development name of wafflecone, and that it provided the latest and greatest in any 24-hour period. I am obviously mistaken. Perhaps I need that in trunk (legals?) (ringding?) or whatever it's called this month.

Main development happens in "trunk" aka "RingDing" release, that's "4.x Latest" on the download-page (http://www.openlaszlo.org/download#4.0nightly).
Minor releases come from the "Wafflecone" branch, i.e "Wafflecone" or "Cranberry" release, that's "4.0.x Nightly" on the download-page (http://www.openlaszlo.org/download#4.0nightly). These releases are spun off to support the SWF-runtime, most things for DHTML-runtime go into "trunk"

And I couldn't reproduce this issue in "trunk" ("RingDing" or "4.x Latest").

---

"legals" was the branch for OL4.x development, when "trunk" was still for OL3.x. As we moved all main development to OL4.x (recommended platform for SWF-runtime), "legals" branch became "trunk" (it was merged). "trunk", "branches" and "merging" etc. are SVN verbs (http://subversion.tigris.org/).

jimkfoster
11-11-2007, 02:15 PM
senshi,

Thanks for clarifying the naming nomenclature.

If I just download the ringding code, then I take it I would then need to follow the instruction in the "SubversionBuildInstructions" Wiki page at http://wiki.openlaszlo.org/SubversionBuildInstructions?

Also, the Wiki Roadmap page says that 4.1 will be the recommended one for DHTML development, but it does not indicate any timeline. Do you have any insight to this?

The project I am working on requires a DHTML runtime, so I must nail this issue down either with a blessed version from you folks, or (if I take your meaning, correctly) take the plunge and build it myself.

Your counsel is much appreciated.

Thanks!