On Sun, 08 Aug 2010 11:49:45 +0300 Tom Hacohen
<tom.haco...@partner.samsung.com> said:

> Hey all,
> 
> Consider the following text:
> "<b>bla</b>" (which of course shows just "bla" bold).
> At the moment, erasing the <b> will leave the text as:
> "bla</b>" and erasing the </b> will leave the text as: "<b>bla".
> I find this behavior very odd, because there's no way to really reuse
> the other part in a sane manner. Especially since the user is the one
> that's removing the first part (pressing "delete" on the keyboard for
> example) while it's the widget that will have to know it still exists
> and reuse it in a smart way. In other words, not only it's confusing, it
> can cause a lot of mess.

yup. as such this requires you have to scan and find matching format opens or
closes and nuke them when deleting format. as such edje entry doesnt actually
do that right now. it's considered part of a problem higher-level than
textblock itself.

> Important notice: those formats just point to letters, deleting them
> means deleting the letters they point to.
> 
> There are two approaches (I can think of) to solve this:
> 1. When erasing the <b> (it's letter) also erase the </b>, which is ok,
> but not perfect.
> 2. When trying to erase the <b> (it's letter), don't erase the </b> but
> instead advance <b> to the next letter and only erase the </b> (and the
> <b>) when <b> and </b> point to the same place, i.e when they are not
> used.
> 
> I find the second solution more correct, just wanted to hear what you
> think since it's changing the behavior of the textblock object a bit.

2nd sounds better - but you need to differentiate between differeing formats
those that just insert a newline or a tab (one off inserts or one off format
changes) vs push and pop of a format string. i'd say you need to keep matching
pushes and pops as you describe above until they are directly together, then
nuke them as they are empty push/pop pairs.

> Thanks,
> Tom.
> 
> P.S
> Accidentally sent it to e-svn :P 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to