losing font info in fields again

Bob Sneidar bobsneidar at iotecdigital.com
Tue May 29 12:45:26 EDT 2018


By the way, I am noticing that a number of complaints about the IDE involve copying or creating and destroying lots of objects from one place to another. I'm curious why this would be necessary, unless you are building some kind of IDE tool that replicates objects like the tools pallette does. 

This seems to me to hearken back to the Hypercard method where stacks were optimized for this sort of thing, and cards and fields were considered a kind of storage object in leiu of a database for the information to be retrieved and updated. 

While I am sure you have a reason for your methodology, it may be better to simply have a script which creates new objects, then sets the appropriate properties of the objects to their counterparts. Also, if you are storing data in the above described manner, it may be a good time to cut over to using a database, even a simple one to store your data. If text formatting is an issue, you can get the htmltext of a field and store that in a blob column. 

In fact that might be a good idea for a plugin: A library of common objects stored and retrieved for recreation in an sqLite database. 

Bob S



> On May 29, 2018, at 09:35 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I just created 2 stacks. In the first, I put a field and a button, then grouped them. I then typed 2 lines of text into the field, then changed the textFont of line 1 and 2 to different fonts. I then copied the group from one stack to the other. The formatting was retained. I did this programmatically and using the menu. 
> 
> Bob S
> 
> 
>> On May 22, 2018, at 15:43 , Dr. Hawkins via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> I think I ask this every couple of years (and it would be more often, but I
>> sometimes find the answer in my archives).
>> 
>> As my program copies groups from one stack to another, I am losing field
>> formatting information.
>> 
>> This time, the offending fields have, iirc, both ArialMt and dingbat text,
>> probably both in different heights.
>> 
>> It appears that upon copy, I have a font with serifs, and the size changes.
>> 
>> The sharedText of the field is set to true.
>> 
>> I vaguely recall that the reis a field property that isn't in the inspector
>> that needs to be set, but I'm baffled at the moment :(
>> 
>> 
>> 
>> -- 
>> Dr. Richard E. Hawkins, Esq.
>> (702) 508-8462
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list