The right procedure to replicate a window's project properties to multiples projects

17 views
Skip to first unread message

PhotoGraphex

unread,
Nov 28, 2022, 9:11:12 PM11/28/22
to SuperCard Discussion
I wonder what is the right procedure to replicate a window's project properties to multiples projects? 

My particular objective is to extract the relevant properties of a model project, which contains one window and one background field and replicate its properties to hundred of similar projects. The projects are used as databases and the background field contains text.

According to my understanding I would need to obtain: 

  • the rect of window ONE of projectdescriptor 
  • the resizable of window ONE of projectdescriptor
  • the style of window ONE of projectdescriptor 
  • the autoBackSize of background ONE of window ONE of projectdescriptor
  • the autoResize of background ONE of window ONE of  projectdescriptor
  • the rect of fld ONE of window ONE of projectdescriptor 
  • the anchorData of fld one of window ONE of projectdescriptor
  • the dontWrap of fld ONE of window ONE of projectdescriptor
  • the lockText of fld ONE of window ONE of projectdescriptor
  • the textFont of fld ONE of window ONE of projectdescriptor
  • the textsize of fld ONE of window ONE of projectdescriptor 
  • the textstyle of fld ONE of window ONE of projectdescriptor
  • the textAlign of fld ONE of window ONE of projectdescriptor
And thereafter set the target projects properties to those extracted parameters. 

For some reason, this theory doesn't work in practice as the window size and background field do not get readjusted to the model's similar settings, mainly, the windows get too small and the background field too big. 

Any suggestion for the right procedure?

Many thanks

Joe Koomen

unread,
Nov 28, 2022, 9:18:40 PM11/28/22
to superca...@googlegroups.com

You can actually, just create a target project with all the desired cards etc.,  and read it into your “Replicator” project as text. Save it as a user property, then you can write it out again for each iteration you want. The script would be shorter and faster.

 

I’ve done this in the past, but it would probably take me a while to find an example project.

 

 

Joe

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/5a477262-0c37-43f6-bbb4-2756ece1539en%40googlegroups.com.

André Tremblay

unread,
Nov 28, 2022, 11:08:43 PM11/28/22
to 'MARK LUCAS' via SuperCard Discussion
Hello Joe, 


Le 28-nov.-2022 à 21:18:36, Joe Koomen <joek...@gmail.com> a écrit :

You can actually, just create a target project with all the desired cards etc.,  and read it into your “Replicator” project as text. Save it as a user property, then you can write it out again for each iteration you want. The script would be shorter and faster.

Well, thanks for the feedback, I used that procedure a lot during the ancestral time of HyperCard, when from time to time we would get a corrupted stack and the only way to get the stack back was to copy each accessible cards and rewrite them, one at the time, to a new stack. 

Good old time! Fortunately SuperCard doesn't seem to have those issues! 

I should have mentioned that the replication process of the properties from the model projet to another can be separated in two groups. There are the window properties and the individual cards properties. 

In the case of the windows' properties, the process is quick, a few minutes to go through the first window of hundred of projects. In the case of individual cards it takes several days to process hundred of thousands of cards. I would be possible to rewrite all the cards to new projects, but I feel it isn't necessary, nor would it be quicker, as most of the time the windows' properties would be enough. And at the end I would also need to script the construction of the new projects. 

I feel my difficulties are related to the order of processing the properties! I am fairly new with SuperCard window's construction!

Thanks a bunch!

André


Reply all
Reply to author
Forward
0 new messages