I am sorry to report that the pageranges property of fields is still broken in
7.0.
Create a field and place this in a button:
on mouseUp
put empty into fld 1
set the height of fld 1 to 60
repeat with i = 1 to 10
put i & cr after fld 1
end repeat
set the spaceabove line 2 of fld 1 to 10
put the pageranges of fld 1 & cr
put "the first line should be 1,6" after msg
end mouseUp
On Oct 30, 2014, at 5:32 PM, Michael Doub <[email protected]> wrote:
> I use the styled arrays quite often when creating content, applying styles
> and taking advantage of the metadata. I can’t comment on the speed.
>
> I have a tendency to think in terms of arrays so this is pretty comfortable
> for me.
>
> I did a lot of work using space above and below and was really bummed when
> pageranges did not take them into account. (a bug report exists for this.)
> I guess I should look and see if 7.0 addressed that issue.
>
> Rather than including char offsets for runs in the array itself, I think it
> might be more useful to have an easy way to get from a char offset to the
> pgh_number/run_number within the styled array. Another thing to look at in
> 7.0.
>
> -= Mike
>
>
> On Oct 30, 2014, at 2:36 PM, Richard Gaskin <[email protected]>
> wrote:
>
>> 1. ID caching
>> Page 10 of the v6.0 Release Notes:
>> <http://downloads.livecode.com/livecode/6_0_0/LiveCodeNotes-6_0_0.pdf>
>>
>> The description there says:
>>
>> The engine now caches lookups of control references of the form
>> “card id ...” and “control id ...”. This speeds up any access
>> using those forms after the first time, turning an operation that
>> would be completed in linear time into one that will be completed
>> in constant time.
>>
>> What does that mean in practical terms? How can I benchmark the benefit of
>> this new feature?
>>
>>
>> 2. StyledText array
>> Pages 16-18 of the v5.5.4 Release Notes:
>> <http://downloads.livecode.com/livecode/5_5_4/LiveCodeNotes-5_5_4.pdf>
>>
>> Anyone here use this? Is it faster than doing equivalent operations on
>> htmlText? While the style attributes themselves are well represented in the
>> array, the character offsets of runs don't seem to be present, so I'm
>> unclear as to what this should be used for.
>>
>>
>> Any insight into either of these would be appreciated - TIA...
>>
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> ____________________________________________________________________
>> [email protected] http://www.FourthWorld.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode