Search found 3863 matches

by bn
Wed Mar 13, 2024 8:56 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Bernd. So the metadata is never set as a property to the words themselves, but rather in the "owner" of those words, that is, the line? In that case how do you pull the individual metaDatas for each word? Is the line metadata an associated list of pairs, each word in the line to a string of some so...
by bn
Wed Mar 13, 2024 5:52 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Jeff, I made another attempt at being able to set the backgroundColor of words in a text and provide metadata for each word. For me this works. I store the metadata of words in the metadata of line 1 of the field. Have a look at the demo stack and see if it fits your needs. There is a little more in...
by bn
Tue Mar 12, 2024 10:52 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Jeff, see edit below One way to work around the backgroundColor problem with metadata is to use linkText as a property of the word. You just set the linkText of a word and you could handle it just like metaData. As far as I can see there is no functional difference. You do NOT set the textStyle to "...
by bn
Tue Mar 12, 2024 3:25 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Jeff,

I probably got carried away by how to process metadata/linkText upon user action.

But I am sure you will find a solution for your interface without the backgroundColor.

Kind regards
Bernd
by bn
Tue Mar 12, 2024 1:00 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Hi Jeff, here is a stack that shows what I mean. The card script has the logic to process clicks. Button "cleanFieldTXT" resets the field. Button "setWordsToLinked" sets up links and linkText Button "setMetadatafldTXT" sets metadata of the words Set up the text using the buttons and click on any lin...
by bn
Tue Mar 12, 2024 12:25 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Missing Fonts
Replies: 37
Views: 2848

Re: Missing Fonts

Gary,

I am running out of ideas and have the impression that it is Windows specific.

Maybe someone using Windows could chime in.

Kind regards
Bernd
by bn
Tue Mar 12, 2024 12:23 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Richmond,

try:

Code: Select all

on mouseUp
   repeat with i = 1 to the number of words of field "ff"
      set the metadata of word i of field "ff" to i
   end repeat
end mouseUp
Kind regards
Bernd
by bn
Tue Mar 12, 2024 11:57 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Richmond,

That looks very nice.
Now set the metadata of some of the words and see if the colors are still contiguous.

Kind regards
Bernd
by bn
Tue Mar 12, 2024 11:48 am
Forum: Android Deployment
Topic: Could not encode class bundle
Replies: 1
Views: 456

Re: Could not encode class bundle

Hi deniolps, Welcome to the forum. I have no experience with Android but the dictionary says Description This widget wraps an MKMapView on iOS and 64-bit Mac, and a GoogleMap on Android. It supports simple markers and polylines (on Android). Note: In order to use the map widget on Android, you must ...
by bn
Tue Mar 12, 2024 11:40 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: background color of text with metadata
Replies: 35
Views: 2164

Re: background color of text with metadata

Hi Jeff, I see the same behavior regarding the backgroundColor you see. And it has bugged me also. If I understand correctly what you want is to store information regarding certain words for further processing. LC has the option to setting the textStyle of textChunks (chars, words etc.) to "link". T...
by bn
Mon Mar 11, 2024 3:07 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Missing Fonts
Replies: 37
Views: 2848

Re: Missing Fonts

Gary, after installing open sans of your choice could you do the following from the message box? put the fontNames into tNames; sort tNames; filter tNames with "*open sans*"; put tNames Put the code into the single line message box and hit return. What shows up in the message box? Kind regards Bernd
by bn
Mon Mar 11, 2024 2:11 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Missing Fonts
Replies: 37
Views: 2848

Re: Missing Fonts

Gary,

Just a wild guess:
Did you close the Properties Inspector after installing a new font?
In my experience the Properties Inspector does not refresh the list of available fonts once open.

Kind regards
Bernd
by bn
Sun Mar 10, 2024 9:14 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Missing Fonts
Replies: 37
Views: 2848

Re: Missing Fonts

Gary, I downloaded the open sans family from Google. It gave me 2 variable fonts and a folder of static fonts. That folder of static fonts contained the ones you are asking for. I installed the fonts using a button on mouseUp answer file "choose font" if it is not empty then put it into tFile start ...
by bn
Sun Mar 10, 2024 9:06 am
Forum: Talking LiveCode
Topic: Reading and writing text to / from a file
Replies: 26
Views: 1874

Re: Reading and writing text to / from a file

If I understand your algorithm correctly, this requires knowing approximately how many chars per line there are, and that all lines have a more or less similar number of chars. In the context of what is being asked your solution works extraordinarily well. Wild variation in the number of chars per ...
by bn
Sun Mar 10, 2024 12:29 am
Forum: Talking LiveCode
Topic: Reading and writing text to / from a file
Replies: 26
Views: 1874

Re: Reading and writing text to / from a file

I did another test on a 1 billion numbers version of pi. The file size is 1 GB. I set the lineDelimiter to 5 and then repeated the tests. "put url" took just short of 7 seconds, whereas "open file" stayed at 1 millisecond. (I saved everything before the test because I was not sure how LC would handl...

Go to advanced search