There is a textformat object. I don't know of a textformat tag in flash7 or 8, but after reading your note I checed the Flex2 alpha docs and they do have one. Apparently they use it just for blockindent, leading, leftmargin, rightmargin and tabstops, so they are using the textformat tag just for the paragraph level properties of what used to be the textformat object (which like the lztextformat is appled via script only). I can see the logic in this as it's that paragraph level stuff that one most wants to be able to access programmatically via the cursor position, so this way they can just search the hierarchy for the enclosing textformat object when someone wants to realign a paragraph with nothing selected. I cant say that I'm wild about that name though. If it's just going to be paragarph formatting it should be <paragraphformat>

In terms of how this relates to laszlo syntax, a good thing about having a textformat tag  (or a combination of <fontformat> and <paragraphformat> which would make sense too) is that rather than use the html tags for text that might cause confusing incompatabilities between dhtml and flash rendered html text, the difference in capabilities are pointed out by their different names and the need to translate true html text to a flash renderable version is given a name and a place in the system. That way if somebody creates a dhtml laszlo app and then decides they need to add sound and try to retarget the flash player, they will more easily be able to get in there and see what is changing the output and where. It might be annoying to make the switch, but at least it won't be confusing. An example would be, say, the font size, where the flash font size implies pixel size and html font size = a relative big picture value. I hope I'm being clear, I'm trying to type this out quickly in order to get back to work.

Hope this helps and isn't confusing,

-Cort

On 12/2/05, Henry Minsky <[EMAIL PROTECTED]> wrote:
Note that Flash 7 (or is it Flash 8?) has  a <textformat> tag which is supposed to be one of the legal tags supported in HTML text content,  by the TextField object. I haven't
actually tried it, but it is documented in the Macromedia docs.






On 12/2/05, Cortlandt Winters <[EMAIL PROTECTED] > wrote:
Hi Guys,

I might be missing something here, but I'm thinking that even if it's not the case today, the tag might be usefull in a couple of ways down the road that fits well with the laszlo way of doing things such as to have a declarative way of styling of initial text.

<LzTextFormat name="joe" bold="true" italics="false" ... etc />

<richinputtext name="rich" width="300" height="100" multiline="true" textFormat="joe">
  "Use setTextFormat to set several formatting attributes at once declaratively."
</richinputtext>

Or as a way of declarativly styling sections of text. (There could be some mistakes in this example when it comes to what the syntax of this should look like, I'm just thinking out loud)

<textstyle name="regular" bold="true" underlined="false" color="..etc />
<textstyle name="underlined" bold="true" underlined="false"...etc />

<richinputtext name="rich" width="300" height="100" multiline="true">
  <LzTextFormat textstyle="regular">Use setTextFormat to set</LzTextFormat>
  <LzTextFormat textstyle="underlined">several</LzTextFormat>
  <LzTextFormat textstyle="regular">formatting attributes at once."></LzTextFormat>
</richinputtext>

Somthing like this will probably be the goal especially when css is implemented, won't it? I'm also thinking that having that tag has the potential to make it easier to protect users from Flash's underlying textformat quirks and gives the programmer more control over individual nodes in order to handle crazy things like the align handling than embedding font tag text into a string.

Just thinking out loud.

Thanks for everything you are doing, I hope to check out the current version more closely soon.

-Cort


On 12/2/05, John Sundman <[EMAIL PROTECTED] > wrote:
D'oh!

Actually, although that's an obvious point, it never occured to me.

I'll make sure it's made more clear in the documentation.  Actually the
Developer's Guide doesn't even have a full chapter on scripting (it
merely has a short tutorial).  I guess it's about time I wrote one.

jrs

PS: I like your idea about alllowing the .js suffix.

On Dec 1, 2005, at 4:51 PM, P T Withington wrote:

>>
>
> If it is meant to only be used in script, then it should be defined in
> script.  Then you won't get the magic parallel tag interface.
>
> <script>
>   function LzTextFormat () {
>     ...
>   }
> </script>
>
> Perhaps we should also allow files consisting solely of script to have
> a .js suffix, but I don't think that is required to solve this issue.

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev


_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev





--
Henry Minsky
Software Architect
[EMAIL PROTECTED]


_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to