Re: Typesetting Fields

2018-04-25 Thread Richard Gaskin via use-livecode

Sannyasin Brahmanathaswami wrote:
> Where does livecode.wikia.comcome from?

It's a "semi-friendly" fork of the LC docs managed by a fella who goes 
by "MaxV" in the forums.


It's certainly not at all "unfriendly" (such as some of the more hostile 
forks we see in the Wordpress world).  On the contrary, he's shown great 
dedication to providing current docs with enhanced content.  His work is 
excellent, his intentions good, his timeliness exemplary.


Normally a "friendly" fork is one in which someone wants to take a 
project in a new direction, and in discussion with the core team they 
agree that each has a different vision and the proposed enhancements 
would be unsuited for the main project, so a fork lets the new dev 
scratch his own itch without interference.  The GPL welcomes such diversity.


In this case I use "semi-friendly" only to note that I've seen nothing 
in Max's excellent work which wouldn't be welcome in LiveCode, but by 
posting at a separate site rather than upstream at Github the main 
branch cannot include those enhancements, so the value of his good 
efforts is lost to most LiveCode users.


Max would be one of the shining stars of the LC docs project if he would 
consider submitting his excellent content refinements to the main branch 
at Github so they become part of the standard docs set.


As it is, we have fragmentation and duplicated effort.  Still useful, 
but less so than sharing in the place set up for that.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Typesetting Fields

2018-04-24 Thread Paul Hibbert via use-livecode

> Where does livecode.wikia.comcome from?

I believe it was started by MaxV2, I think he hangs around in the forums mainly 
under the handle MaxV. He’s done a great job with the Wikia.

Paul





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread Sannyasin Brahmanathaswami via use-livecode
http://livecode.wikia.com/wiki/StyledText 


Paul



Paul, that helps!

It does matter the name of array… (could be anything) a long  it conforms to 
styled text that 

set the styleText of fld "playlist to tPlayListTextArray.

that property can actually use.

wow! I wonder how far we can take this, in terms of "runs" containing thing 
like the images source of a character.  I guess I can find out quickly.

BR

Where does livecode.wikia.comcome from?



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread Paul Hibbert via use-livecode
Another useful reference that may help…

http://livecode.wikia.com/wiki/StyledText 


Paul

> On Apr 24, 2018, at 12:29 PM, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> 
> What I would do is set some text in a field to some different styles, then 
> get the styledText of the field and examine the array. 
> 
>Bob S
> 
> That is also my plan. 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread Richard Gaskin via use-livecode

Sannyasin Brahmanathaswami wrote:
> richard wrote
>
> You may find the styledText array helpful.
>
> =
>
> Wow that looks missing, though the dictionary could help with
> examples…I gonna need an expresso and to some time  to figure out
> how that works!
>
> set the styledText of field to styledArray
>
> Maybe if someone had some example of what to put into
>
> styledArray
>
> I got lost when started talking about "the other" arrays:
>
> Are these arrays inside the styledArray text?

They are.  A great explanation of those (and all the new stuff added in 
The Great Field Enhancement Work of Version 5.5) are here, starting on 
p12 (discussion specific to the styledText property is on p15):


https://downloads.livecode.com/livecode/5_5_1/LiveCodeNotes-5_5_1.pdf

A couple years ago I had a discussion with Peter Brett about how that 
info critical to making good use of the new field properties could be 
moved into the User Guide.  I had the impression that was underway at 
the time, but I just checked the User Guide for v9 and the string 
"styledText" doesn't appear to be there.


Too bad; hopefully added soon.  The styledText array gives us all the 
full-fidelity info we love with htmlText, but in the super-efficient 
form of an associative array.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread Sannyasin Brahmanathaswami via use-livecode

What I would do is set some text in a field to some different styles, then get 
the styledText of the field and examine the array. 

Bob S

That is also my plan. 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Typesetting Fields

2018-04-24 Thread Bob Sneidar via use-livecode
What I would do is set some text in a field to some different styles, then get 
the styledText of the field and examine the array. 

Bob S


> On Apr 24, 2018, at 07:33 , Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> Wow that looks missing, though the dictionary could help with examples…I 
> gonna need an expresso and to some time  to figure out how that works!
> 
> set the styledText of field to styledArray
> 
> Maybe if someone had some example of what to put into 
> 
> styledArray
> 
> I got lost when started talking about "the other" arrays:
> 
> Are these arrays inside the styledArray text?

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread Sannyasin Brahmanathaswami via use-livecode
I wonder if the dictionary need helps. Are there paragraph marks missing this 
example?

=

For example, take the following content consisting of two paragraphs:

Centered Hello World

Left-aligned Hello unicodeString

This would transpire as the following array:
1 =
style = { textAlign = center }
runs =
1 = { text = Centered  }
2 =
style = { textStyle = bold }
text = Hello
3 = { text =  World }
2 =
runs =
1 = { text = Left-aligned  }
2 =
style = { textColor = 255,0,0 }
text = Hello
3 = { unicodeText = unicodeString }

[ For brevity, single element arrays are represented using { ... }
notation ]

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Typesetting Fields

2018-04-24 Thread Sannyasin Brahmanathaswami via use-livecode
richard wrote

You may find the styledText array helpful.

=

Wow that looks missing, though the dictionary could help with examples…I gonna 
need an expresso and to some time  to figure out how that works!

set the styledText of field to styledArray

Maybe if someone had some example of what to put into 

styledArray

I got lost when started talking about "the other" arrays:

Are these arrays inside the styledArray text?

===

1) It is a fully faithful representation (set the styledText of field
to the styledText of field results in no change to the field). 2) It
is array-based.

The styledText property returns a numerically-indexed array of
paragraphs, each index representing each paragraph in the field in
order:tStyledTextArray[1] = 
...
tStyledTextArray[] =  

Each paragraph array has up to two keys:

tParagraphArray["style"] =  tParagraphArray["runs"] = 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-24 Thread ambassador--- via use-livecode
You may find the styledText array helpful.
Richard GaskinFourth World Systems
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Typesetting Fields

2018-04-23 Thread Sannyasin Brahmanathaswami via use-livecode
I decided to 

hide fid; 
 fill the field with "plain text" ; 
 typeset the field;
show fld

I don't see any processing time in the phone (some list are 200+ line longs); 
happens in under 10 milliseconds

…[other code]
repeat for each line x in tKeys
 put sCurrentPlayListA["audioFiles"] [x]["Title"] after tTitles
 if sCurrentPlayListA["audioFiles"] [x]["media_type"] ="audio/song" then
 put cr ["audioFiles"] [x]["artists"] after tTitles
 else
 put cr after tTitles
 end if
 put cr after tTitles
end repeat
end switch
put playlist_GetCurrent() into fld "title-label" of card "listen-browse"
go to card "listen-browse"

hide fld "audioList"

put tTitles into fld "audioList" 

typesetAudioList

   show fld "audioList"

if the formattedHeight fld "audioList" > the height of fld "AudioList" then
  send "CreateScroller audioList" to fld "audioList" of card "listen-browse"
   end if
   put  sTargetPlayList into pData["audio_playlist"]
   tracking_RecordActivity "Listen", "navigation/playlist", pData
end playlist_Instantiate

command typeSetAudioList
 put 0 into tX
 repeat with x =1 to the number lines in fld "audioList"
   add 1 to tX
If (tX mod 2) = 0 then
 set the leftIndent of line x of fld "audioList" to 10
 if line x of fld "audioList" <> empty then
  set the spaceBelow of line x of fld "audioList" to 15
  end if
set the textSize of line x of fld "audioList" to 13
 else
set the textSize of line x of fld "audioList" to 15
 end if
 end repeat 
end typeSetAudioList



From: Brian Milby <br...@milby7.com>
Date: Sunday, April 22, 2018 at 5:27 PM
To: How LiveCode <use-livecode@lists.runrev.com>
Cc: Brahma Nathaswami <bra...@hindu.org>
Subject: Re: Typesetting Fields

Well, I was just about to suggest that, so I’m not sure what else. But I’m 
fairly new around here.
On Sun, Apr 22, 2018 at 10:25 PM Sannyasin Brahmanathaswami via use-livecode 
<use-livecode@lists.runrev.com> wrote:
and I am hoping not to deal bloated htmltext, like using template

LESSON 
[[tChapterNum]]
[[tSubtitle]]



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-22 Thread Brian Milby via use-livecode
Well, I was just about to suggest that, so I’m not sure what else. But I’m
fairly new around here.
On Sun, Apr 22, 2018 at 10:25 PM Sannyasin Brahmanathaswami via
use-livecode  wrote:

> and I am hoping not to deal bloated htmltext, like using template
>
> LESSON
> [[tChapterNum]]
> [[tSubtitle]]
>  src="51276" char="@">
>
>
>
> 
> Until we get scrolling working in a datagrid, (on mobile) and also we
> want it keep simple, I frequently need to create a runtime list from the
> database.
>
> But the "typesetting tools" in Livecode depend on a field being
> present. e.g.
> --
> set the textAlign of line 1 of field "myField" to right
> 
> Currently you can
>
> lockscreen,
> # populate the fld with all kinds of "tweaking" to look nice
> unlockscreen
>
> But I was looking for a method, similar to the advice
>
> "get all you data in a variable and then show in a field"
>
> So that the field gets a single pixel update
>
> Is there a similar method to this with a field,  where it all laid out
> ahead of time; and "bingo"  you popular the field in one go  without
> lockscreen?
>
> BR
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Typesetting Fields

2018-04-22 Thread Sannyasin Brahmanathaswami via use-livecode
and I am hoping not to deal bloated htmltext, like using template

LESSON 
[[tChapterNum]]
[[tSubtitle]]





Until we get scrolling working in a datagrid, (on mobile) and also we want 
it keep simple, I frequently need to create a runtime list from the database.

But the "typesetting tools" in Livecode depend on a field being present. 
e.g.
--
set the textAlign of line 1 of field "myField" to right

Currently you can

lockscreen,
# populate the fld with all kinds of "tweaking" to look nice
unlockscreen

But I was looking for a method, similar to the advice

"get all you data in a variable and then show in a field"

So that the field gets a single pixel update

Is there a similar method to this with a field,  where it all laid out 
ahead of time; and "bingo"  you popular the field in one go  without lockscreen?

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Typesetting Fields

2018-04-22 Thread Sannyasin Brahmanathaswami via use-livecode
Until we get scrolling working in a datagrid, (on mobile) and also we want it 
keep simple, I frequently need to create a runtime list from the database.

But the "typesetting tools" in Livecode depend on a field being present. e.g.
--
set the textAlign of line 1 of field "myField" to right

Currently you can

lockscreen,
# populate the fld with all kinds of "tweaking" to look nice
unlockscreen

But I was looking for a method, similar to the advice

"get all you data in a variable and then show in a field"

So that the field gets a single pixel update

Is there a similar method to this with a field,  where it all laid out ahead of 
time; and "bingo"  you popular the field in one go  without lockscreen?

BR







___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode