Search found 40 matches

by bmcgonag
Thu Apr 02, 2020 8:53 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Cancel a Timer action on Card Change?
Replies: 2
Views: 2216

Re: Cancel a Timer action on Card Change?

Thanks klaus. Not that it's not working the way I think it should, just not working the way I understood it from the LiveCode Lessons page I found the information on. Sorry, just trying to work through those lessons, then apply them, but my use cases are just different enough that it throws me off. ...
by bmcgonag
Thu Apr 02, 2020 8:07 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Bold or Change Text color of various lines in Tree View?
Replies: 6
Views: 4175

Re: Bold or Change Text color of various lines in Tree View?

Klaus wrote:
Mon Mar 30, 2020 12:45 pm
Well, this is a tad more complicated. :D

Here a little example that will put a checkmark into a field:

Code: Select all

on mouseUp
   put numtocodepoint(0x2714) into fld 1
end mouseUp
Klaus rocks! That worked beautifully!
by bmcgonag
Thu Apr 02, 2020 8:05 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Cancel a Timer action on Card Change?
Replies: 2
Views: 2216

Cancel a Timer action on Card Change?

I have a timer that re-runs an API call every so many minutes (set by the user), and it runs great as long as I'm on that Card when it runs. But if I've moved to another card, it still tries to run, and fails because it can't find controls referenced in the function I run for the API Call. I see a f...
by bmcgonag
Mon Mar 30, 2020 8:07 pm
Forum: Internet
Topic: JSON to String but can't escape quotes sanely?
Replies: 7
Views: 6475

Re: JSON to String but can't escape quotes sanely?

Okay,

Added content type for application/json and plain/text, which is what I'm passing (along with my Authorization) in postman where it works.

Checked my JSON, and it's valid.

Now, I get 403 Forbidden...so a new thing to figure out. Getting closer. Thanks all.
by bmcgonag
Mon Mar 30, 2020 12:42 pm
Forum: Internet
Topic: JSON to String but can't escape quotes sanely?
Replies: 7
Views: 6475

Re: JSON to String but can't escape quotes sanely?

OK that's another issue. Before POST, you should perhaps create a HTTP header. Something like : put "Accept: application/json, text/javascript, */*; q=0.01"&cr&"Content-Type: application/json; charset=UTF-8" into tHeader set the httpheaders to tHeader POST xxx to url tUrl answer the result put it i...
by bmcgonag
Mon Mar 30, 2020 12:37 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Bold or Change Text color of various lines in Tree View?
Replies: 6
Views: 4175

Re: Bold or Change Text color of various lines in Tree View?

I thought the same thing, but it just put :check_mark: and :smile: in the space versus showing the character. I'll look up unicode and see if I can tell what I may have done wrong.

Thank you again.
by bmcgonag
Sun Mar 29, 2020 10:59 pm
Forum: Internet
Topic: JSON to String but can't escape quotes sanely?
Replies: 7
Views: 6475

Re: JSON to String but can't escape quotes sanely?

Thanks, I looked at the dictionary and the various JSON built in functions. I guess, my question is, how can I create JSON without an array. Not everything I have starts as an Array. It's just something I'm coding in, and using a couple of user entered variable to fill in the blanks essentially. The...
by bmcgonag
Sun Mar 29, 2020 5:15 pm
Forum: Internet
Topic: JSON to String but can't escape quotes sanely?
Replies: 7
Views: 6475

Re: JSON to String but can't escape quotes sanely?

Ok, I'll give that a shot. Was hoping I had missed a JSONToString() function somewhere....but this should at least shorten it a bit.

Thanks.
by bmcgonag
Sun Mar 29, 2020 4:44 pm
Forum: Internet
Topic: JSON to String but can't escape quotes sanely?
Replies: 7
Views: 6475

JSON to String but can't escape quotes sanely?

I have a POST i want to make through libUrl on LiveCode community edition. I have a bunch of JSON I have to send as the <data> portion of the POST. The JSON of course must use double quotes, and apparently LiveCode also doesn't like single quotes for a string... I found that you can replace a litera...
by bmcgonag
Sat Mar 28, 2020 3:10 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Bold or Change Text color of various lines in Tree View?
Replies: 6
Views: 4175

Re: Bold or Change Text color of various lines in Tree View?

Ok, thank you.

I wonder if I can add a checkmark icon or something in the tree view some how.
by bmcgonag
Fri Mar 27, 2020 11:56 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Bold or Change Text color of various lines in Tree View?
Replies: 6
Views: 4175

Bold or Change Text color of various lines in Tree View?

Hello, I have a card with a tree view on it that I'm successfully filling with the data I want pulled from an API - Yay! Now, I want to use a property of "online" from the data I pull, to set the text of that associated line in the tree view to either bold, or a different color, or something to make...
by bmcgonag
Fri Mar 27, 2020 2:48 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Merging arrays with 1 being a parent element
Replies: 3
Views: 2595

Re: Merging arrays with 1 being a parent element

Hi Klaus,

And thank you, yes, I think the syntax on your second option is what I'm looking for. Sorry, just syntax is throwing me. I appreciate it.
by bmcgonag
Fri Mar 27, 2020 2:23 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Merging arrays with 1 being a parent element
Replies: 3
Views: 2595

Merging arrays with 1 being a parent element

Good day all, I have data returned from a web-service that I use JSONtoArray() to convert to an array. I can read out the elements I want, and all is good. I'll then use data from that array to call another API endpoint to request more data based on that value. I want to use a tree view to fold the ...
by bmcgonag
Wed Mar 25, 2020 10:33 pm
Forum: Internet
Topic: Error from tsNetGetSync
Replies: 5
Views: 4351

Re: Error from tsNetGetSync

...Drop the tsNet syntax, look at POST and GET in the Dictionary (which are implemented in the LC engine in all editions), and let us know if you run into any snags. For others down the road who may be similarly misled by incomplete tutorials discussing the edition-specific tsNet, I've submitted an...
by bmcgonag
Wed Mar 25, 2020 8:52 pm
Forum: Internet
Topic: Error from tsNetGetSync
Replies: 5
Views: 4351

Re: Error from tsNetGetSync

Maybe I found my answer. The documentation in lessons doesn't specify which versions anything works on, so you just get to try it, fail with some obscure error, and not know why. I'm only guessing by a blog post from when tsNet was added, but it appears it's not available in community. Thus it won't...

Go to advanced search