Well, I have to admit that my case is most likely unusual, being in the process of converting a previous HyperCard suite of projects, I have hundred of stacks or converted projects that consist of one window, one background and one field that contains list of items in the form commas' delimitated text strings. I would estimate that the cumulative number of cards of those project is well over a million.
Usually those projects are not accessible to the users. For some reasons, now I wish to modify the presentation of those cards into a more users' readable format than the legacy HyperCard format that originated during the heydays of the MacPlus 512K.
To achieve that goal I've created a model project from which I wish to replicate the visual presentation to all the selected projects. I wish to be able to perform theses changes whenever necessary.
For instance, to extract the relevant window, background and card properties, I'm testing this function:
function ExtParaFenetre -- ExtParaFenetre(ChHFSProj) L8239 -- 20220205 20220204
local ChHFSProj=param(1),LiParamsFe=Param(2)
local ParaFene01,ParaFene02,ParaFene03,ParaFene04,ParaFene05,ParaFene06,ParaFene07,ParaFene08,ParaFene09,ParaFene10,ParaFene11,ParaFene12,ParaFene13
put eC(the rect of window ONE of project ChHFSProj) into ParaFene01
put the resizable of window ONE of project ChHFSProj into ParaFene02 -- TRUE
put the style of window ONE of project ChHFSProj into ParaFene03 -- standard
put the autoBackSize of background ONE of window ONE of project ChHFSProj into ParaFene04 -- true
put the autoResize of background ONE of window ONE of project ChHFSProj into ParaFene05 -- TRUE
put eC(the rect of fld ONE of window ONE of project ChHFSProj) into ParaFene06
put eC(the anchorData of fld one of window ONE of project ChHFSProj) into ParaFene07 -- "Left,Top,Right,Botton" -- ∆ The property should be defined first
put the dontWrap of fld ONE of window ONE of project ChHFSProj into ParaFene08 -- FALSE
put the lockText of fld ONE of window ONE of project ChHFSProj into ParaFene09 -- FALSE
put the textFont of fld ONE of window ONE of project ChHFSProj into ParaFene10 -- Geneva
put the textsize of fld ONE of window ONE of project ChHFSProj into ParaFene11 -- 14
put the textstyle of fld ONE of window ONE of project ChHFSProj into ParaFene12 -- PLAIN
put the textAlign of fld ONE of window ONE of project ChHFSProj into ParaFene13 -- LEFT
return merge("[[ParaFene01]],[[ParaFene02]],[[ParaFene03]],[[ParaFene04]],[[ParaFene05]],[[ParaFene06]],[[ParaFene07]],[[ParaFene08]],[[ParaFene09]],[[ParaFene10]],[[ParaFene11]],[[ParaFene12]],[[ParaFene13]]")
end ExtParaFenetre
I am sure there should be a better way for doing it. I know that the use of the rtfText property for the text properties management would more efficient, I come to it later on.
And then to modify the target project with the equivalent test command:
on ModiFenetre -- ModiFenetre ChHFSProj,LiParamsFe L8261 -- 20220205 20220204
local ChHFSProj=param(1),LiParamsFe=Param(2)
local ParaFene01,ParaFene02,ParaFene03,ParaFene04,ParaFene05,ParaFene06,ParaFene07,ParaFene08,ParaFene09,ParaFene10,ParaFene11,ParaFene12,ParaFene13
CoerParams LiParamsFe,@ParaFene01,@ParaFene02,@ParaFene03,@ParaFene04,@ParaFene05,@ParaFene06,@ParaFene07,@ParaFene08,@ParaFene09,@ParaFene10,@ParaFene11,@ParaFene12,@ParaFene13
set the rect of window ONE of project ChHFSProj to rC(ParaFene01) -- 18,140,460,560
set the resizable of window ONE of project ChHFSProj to ParaFene02 -- TRUE
set the style of window ONE of project ChHFSProj to ParaFene03 -- standard
set the autoBackSize of background ONE of window ONE of project ChHFSProj to ParaFene04 -- true
set the autoResize of background ONE of window ONE of project ChHFSProj to ParaFene05 -- TRUE
set the rect of fld one of window ONE of project ChHFSProj to rC(ParaFene06)
define the anchorData of fld one of window ONE of project ChHFSProj to rC(ParaFene07) -- "Left,Top,Right,Botton"
set the dontWrap of fld ONE of window ONE of project ChHFSProj to ParaFene08 -- FALSE
set the lockText of fld ONE of window ONE of project ChHFSProj to ParaFene09 -- FALSE
set the textFont of fld ONE of window ONE of project ChHFSProj to ParaFene10 -- Geneva
set the textsize of fld ONE of window ONE of project ChHFSProj to ParaFene11 -- 14
set the textstyle of fld ONE of window ONE of project ChHFSProj to ParaFene12 -- PLAIN
set the textAlign of fld ONE of window ONE of project ChHFSProj to ParaFene13 -- LEFT
end ModiFenetre
The eC() and rC() function are for itemdelimiter conversion to avoid breaking up the items list.
It all works very well, but to my naive surprise, just the first card of the project have the converted text properties in field one!
Is there a way to have a unique presentation for all cards of a single field in a project or do I have to go though all cards to convert them?
My best regards and long live SuperCard!
André
-----
As a picture worth a thousand words, here is a sample the the model project: