[Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Cédric Muller
So I have this complex TLFTextField vortex where I try to let user format text 
with … Bullet Lists for example.
So … so so …. I have got this overly complex and deep question to whether some 
did write this API or was it thrown together by some spaghetti monster ? (ok, 
this is some intentional pun towards bad Adobe documenters not doing their work)

Here goes my question/remark/complaint/doom:
Why is it /so/ hard to remove a ListElement ?

If you wish to answer, don't bother reading, just get that:
How can I remove a bullet list I added with EditManager.createList ?

I see EditManager.createList (which works perfectly) but why on earth no one 
did a 'EditManager.removeList' ???
How can I remove a bulleted list I added with code ? Why is it not available 
per se in the EditManager public methods ? Since when do we use a Class to 
createSomething, and totally fail to provide the removeSomething part ?
The only almost feasible way I found was using ListElement.moveChildren … but 
mn: this only happens to be a success if you don't add button that let the 
user decide when he/she wants to format some part of some text …

This TLFTextField is quite a debacle. I wonder if Adobe people know that no one 
can handle such bad APIs and documentation :'(

Cedric, all in flames.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Cédric Muller
further info, even though I suspect that I am the last one on earth using this 
framework ………

//  init
var fmt:TextLayoutFormat = new TextLayoutFormat();
var tmpInt:ISelectionManager = field.textFlow.interactionManager;
var editManager:EditManager = new EditManager();
field.textFlow.interactionManager = editManager;
//  wrap up the format change in a composite operation
editManager.beginCompositeOperation();
var fmtSelectionState:SelectionState;
//  select the desired text and apply the new paragraph format
fmtSelectionState:SelectionState = new SelectionState(field.textFlow, 
beginIndex_p, endIndex_p);
editManager.applyParagraphFormat(fmt, fmtSelectionState:SelectionState);  
//  create the list
editManager.createList(null, fmt, fmtSelectionState:SelectionState);
editManager.endCompositeOperation();
//  restore the original interaction manager
field.textFlow.interactionManager = tmpInt;


See my intent ?
instead of
editManager.createList(null, fmt, fmtSelectionState:SelectionState);

I want to replace that line with:
editManager.removeList(null, fmt, fmtSelectionState:SelectionState);

would be amazing! (I am ready to kill any nested lists inside a list, so I am 
not /that/ keen :) )

anyone's up for a ride in space with me ?


 So I have this complex TLFTextField vortex where I try to let user format 
 text with … Bullet Lists for example.
 So … so so …. I have got this overly complex and deep question to whether 
 some did write this API or was it thrown together by some spaghetti monster ? 
 (ok, this is some intentional pun towards bad Adobe documenters not doing 
 their work)
 
 Here goes my question/remark/complaint/doom:
 Why is it /so/ hard to remove a ListElement ?
 
 If you wish to answer, don't bother reading, just get that:
 How can I remove a bullet list I added with EditManager.createList ?
 
 I see EditManager.createList (which works perfectly) but why on earth no one 
 did a 'EditManager.removeList' ???
 How can I remove a bulleted list I added with code ? Why is it not available 
 per se in the EditManager public methods ? Since when do we use a Class to 
 createSomething, and totally fail to provide the removeSomething part ?
 The only almost feasible way I found was using ListElement.moveChildren … but 
 mn: this only happens to be a success if you don't add button that let 
 the user decide when he/she wants to format some part of some text …
 
 This TLFTextField is quite a debacle. I wonder if Adobe people know that no 
 one can handle such bad APIs and documentation :'(
 
 Cedric, all in flames.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Rick Hassen
I think you are quite right that this is a problematic api. While I can't 
address your specific question, I had tons of problems with TLF in the past. It 
caused strange bugs that would break my movies(this was in CS5) At the time, 
there were a lot of complaints on the forums with TLF with the solution simply 
to not use it. You can google problems with TLF text to see a lot of the 
issues and some of the clunky, heavy workaround solutions.
I noticed that Flash CC no longer supports TLF, which I found gratifying - as I 
had lost tons of hours dealing with it, while on deadline no less.
So, good luck, as it sounds as if your application requires TLF!!! But if you 
weren't too far committed, I thought this bit of history might help you in your 
decision making to use the api at all.


 From: flashco...@benga.li
 Date: Tue, 27 Aug 2013 18:53:41 +0200
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] TLFTextField drowning me ...
 
 So I have this complex TLFTextField vortex where I try to let user format 
 text with … Bullet Lists for example.
 So … so so …. I have got this overly complex and deep question to whether 
 some did write this API or was it thrown together by some spaghetti monster ? 
 (ok, this is some intentional pun towards bad Adobe documenters not doing 
 their work)
 
 Here goes my question/remark/complaint/doom:
 Why is it /so/ hard to remove a ListElement ?
 
 If you wish to answer, don't bother reading, just get that:
 How can I remove a bullet list I added with EditManager.createList ?
 
 I see EditManager.createList (which works perfectly) but why on earth no one 
 did a 'EditManager.removeList' ???
 How can I remove a bulleted list I added with code ? Why is it not available 
 per se in the EditManager public methods ? Since when do we use a Class to 
 createSomething, and totally fail to provide the removeSomething part ?
 The only almost feasible way I found was using ListElement.moveChildren … but 
 mn: this only happens to be a success if you don't add button that let 
 the user decide when he/she wants to format some part of some text …
 
 This TLFTextField is quite a debacle. I wonder if Adobe people know that no 
 one can handle such bad APIs and documentation :'(
 
 Cedric, all in flames.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Cédric Muller
Thanks :)
Yep, my application _requires_ TLF (left to right, right to left, top down 
(korean), ligatures, …. and so on, that's is a big circus).
The worst part is that I managed implementing everything else.
I think I may be off for a quick exit if I understand how I can get a 'fake' 
ListElementGroup (if any, or a 'real' one if needed) based on a Selection. I 
bet I could 'moveChildren' out of this ListElement hierarchy.

Thanks anyways. I feel my pain now … as I realize I could down with the ship 
(and I am not that kind of captain!)

 I think you are quite right that this is a problematic api. While I can't 
 address your specific question, I had tons of problems with TLF in the past. 
 It caused strange bugs that would break my movies(this was in CS5) At the 
 time, there were a lot of complaints on the forums with TLF with the solution 
 simply to not use it. You can google problems with TLF text to see a lot of 
 the issues and some of the clunky, heavy workaround solutions.
 I noticed that Flash CC no longer supports TLF, which I found gratifying - as 
 I had lost tons of hours dealing with it, while on deadline no less.
 So, good luck, as it sounds as if your application requires TLF!!! But if you 
 weren't too far committed, I thought this bit of history might help you in 
 your decision making to use the api at all.
 
 
 From: flashco...@benga.li
 Date: Tue, 27 Aug 2013 18:53:41 +0200
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] TLFTextField drowning me ...
 
 So I have this complex TLFTextField vortex where I try to let user format 
 text with … Bullet Lists for example.
 So … so so …. I have got this overly complex and deep question to whether 
 some did write this API or was it thrown together by some spaghetti monster 
 ? (ok, this is some intentional pun towards bad Adobe documenters not doing 
 their work)
 
 Here goes my question/remark/complaint/doom:
 Why is it /so/ hard to remove a ListElement ?
 
 If you wish to answer, don't bother reading, just get that:
 How can I remove a bullet list I added with EditManager.createList ?
 
 I see EditManager.createList (which works perfectly) but why on earth no one 
 did a 'EditManager.removeList' ???
 How can I remove a bulleted list I added with code ? Why is it not available 
 per se in the EditManager public methods ? Since when do we use a Class to 
 createSomething, and totally fail to provide the removeSomething part ?
 The only almost feasible way I found was using ListElement.moveChildren … 
 but mn: this only happens to be a success if you don't add button that 
 let the user decide when he/she wants to format some part of some text …
 
 This TLFTextField is quite a debacle. I wonder if Adobe people know that no 
 one can handle such bad APIs and documentation :'(
 
 Cedric, all in flames.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Cédric Muller
 I noticed that Flash CC no longer supports TLF
I bet all my TLF code that Flash CC 8 will come with a simple timeline to draw 
things on … remember Flash 3 ? Not far :)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread John R. Sweeney Jr.
TLF's have been a pain, since day one. Bailed on them pretty early on…

Sorry,
John

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Aug 27, 2013, at 12:18 PM, Cédric Muller flashco...@benga.li wrote:

 I noticed that Flash CC no longer supports TLF
 I bet all my TLF code that Flash CC 8 will come with a simple timeline to 
 draw things on … remember Flash 3 ? Not far :)


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Rick Hassen

 I bet all my TLF code that Flash CC 8 will come with a simple timeline to 
draw things on … remember Flash 3 ? Not far :)
'splain please! I started with Director 1 then went away till CS3, so I missed 
a bit there, so missing the joke.

  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread John R. Sweeney Jr.
Director?? Did you mean Flash 1?



John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Aug 27, 2013, at 2:57 PM, Rick Hassen rickhas...@hotmail.com wrote:

 'splain please! I started with Director 1 then went away till CS3, so I 
 missed a bit there, so missing the joke.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread Rick Hassen
At the time, I was using Director. Flash 1 came out and I wasn't into banner 
ads and didn't know how powerful it would eventually become. 
Did you know that Director is still out with new updates??? I was shocked to 
find this and apparently has a userbase with HD people. 

 From: jr.swee...@comcast.net
 Subject: Re: [Flashcoders] TLFTextField drowning me ...
 Date: Tue, 27 Aug 2013 15:12:21 -0500
 To: flashcoders@chattyfig.figleaf.com
 
 Director?? Did you mean Flash 1?
 
 
 
 John R. Sweeney Jr.
 Senior Interactive Multimedia Developer
 OnDemand Interactive Inc
 Hoffman Estates, IL 60169
 
 
 
 
 On Aug 27, 2013, at 2:57 PM, Rick Hassen rickhas...@hotmail.com wrote:
 
  'splain please! I started with Director 1 then went away till CS3, so I 
  missed a bit there, so missing the joke.
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLFTextField drowning me ...

2013-08-27 Thread John R. Sweeney Jr.
Yep. Director 12 came out in February and has had its issues, to say the least. 
:)

Since your from Director, your missing the joke because its based on earlier 
Flash, current Flash and future Flash. That's why your Director statement 
initially throw me.
 

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Aug 27, 2013, at 3:35 PM, Rick Hassen rickhas...@hotmail.com wrote:

 At the time, I was using Director. Flash 1 came out and I wasn't into banner 
 ads and didn't know how powerful it would eventually become. 
 Did you know that Director is still out with new updates??? I was shocked to 
 find this and apparently has a userbase with HD people.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders