Typesetting Fields

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Apr 23 13:27:10 EDT 2018

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 &sCurrentPlayListA["audioFiles"] [x]["artists"] after tTitles
     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" 


   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
      	set the textSize of line x of fld "audioList" to 15
     end if
     end repeat 
end typeSetAudioList

From: Brian Milby <brian at milby7.com>
Date: Sunday, April 22, 2018 at 5:27 PM
To: How LiveCode <use-livecode at lists.runrev.com>
Cc: Brahma Nathaswami <brahma at 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 at lists.runrev.com> wrote:
and I am hoping not to deal bloated htmltext, like using template

<p align="center" spacebelow="12"><font size="18" color="#DE3E42">LESSON [[tChapterNum]]</font></p>
<p align="center" spacebelow="0"><font size="18">[[tSubtitle]]</font></p>
<p align="center" spacebelow="1"><font size="18" color="#63AE33"><img src="51276" char="@"></font></p>

More information about the Use-livecode mailing list