Why me?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Why me?

Post by dunbarx » Wed Jan 28, 2026 11:38 pm

I am, right now, in the inspector, looking at the list of custom properties of a field.

One of those properties is "the enteredLength" and it has a value of "444". Another property is "the sessionLengths", and it has a value of:
222
333
444
If I, from msg, say, ask for the value of "the enteredLength" I get 444. But if I ask for the value of "the sessionlengths" I get empty.

Did I mention I am looking at both right now? Or that I can get one but not the other? :cry: :x

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Wed Jan 28, 2026 11:42 pm

Never mind. I restarted LC and all works fine. That is worrisome for me, though, since this stack is used as a standalone every day by several others...

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Wed Jan 28, 2026 11:58 pm

Well, the problem is back. I can get the value of that custom prop from message but not in a handler. I even restarted my machine.

Do I have to populate a field instead????

LC 9.6.9 Mac Ventura 13.4

Craig

stam
Posts: 3182
Joined: Sun Jun 04, 2006 9:39 pm

Re: Why me?

Post by stam » Thu Jan 29, 2026 11:04 am

Craig, just checking that the sessionLengths is a multi-line string rather than an array?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10330
Joined: Fri Feb 19, 2010 10:17 am

Re: Why me?

Post by richmond62 » Thu Jan 29, 2026 11:42 am

Craig, your 'problem' is so gnomic that without a far more comprehensive explanation . . .

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Thu Jan 29, 2026 3:03 pm

Stam. Yep, just a list of three numbers on three lines. But a good idea about the possible issue.

Richmond. Gnomic? Really? Have you read my simple, precise and straightforward posts? :shock: Can you give an example of a better way to describe the issue?

Craig
Last edited by dunbarx on Thu Jan 29, 2026 3:10 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Thu Jan 29, 2026 3:09 pm

To move forward I have populated a global variable. This works fine, especially since I do not need that particular data between sessions.

But the issue is structural within LC, or at least between LC and my machine. And why, now, does getting the custom prop value from msg work, but not from a running handler? I suppose that is an improvement from the original condition, where even from msg I could not retrieve that data.

Craig

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4202
Joined: Sun Jan 07, 2007 9:12 pm

Re: Why me?

Post by bn » Thu Jan 29, 2026 4:51 pm

Craig,

Would it be too much to ask you to make a small sample stack that shows how you populate and retrieve the custom properties of the field?

And then post this sample stack here?

I use custom properties a lot and never ran into issues you describe. It makes me nervous if there are problems lurking.

Thank you.

Kind regards
Bernd

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Thu Jan 29, 2026 8:40 pm

Bernd.

I use them a lot as well, and have had no issues at all until now.

I just went back to the list of custom properties of that field. There are nine, all "ordinary" contents, that is, no arrays. The "customKeys" of that field shows a list of all nine, one per line, and the troublesome one is number 7. So I made a button with:

Code: Select all

on mouseup
   put the customKeys of fld "fixturelength" into cList
   
   repeat with y = 1 to 9
      get line y of cList
      do "answer the" && it && "of fld fixtureLength"
   end repeat
end mouseup
And what do you know? All nine results come out of that handler, one at a time. But from msg, nothing. And from the handler I want to use, nothing.
So it is not just that a handler somewhere does not work. I will keep up with this for a while...

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7414
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Why me?

Post by jacque » Fri Jan 30, 2026 7:20 pm

Is it possible the msg box changes the customPropertySet?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10451
Joined: Wed May 06, 2009 2:28 pm

Re: Why me?

Post by dunbarx » Fri Jan 30, 2026 7:34 pm

Jacque.

Hi.
Is it possible the msg box changes the customPropertySet?
Yipes, Jacque, How? Anyway the contents of that field have not changed in any way. That "do" handler ditty still shows the same suite of props.

And guess what? Msg now pulls the data from that custom prop. All I had to do was wait a few days. Now to try it from the handler. Watch this space...

Craig

Post Reply