Page 1 of 1

[Q] LCB Library - capture a setProp

Posted: Sat Dec 02, 2017 12:19 pm
by shaosean
I know for widgets you can have properties, but is there a way to trap setting a property in a library?

So for example:
set the foo of stack "bar" to TRUE

If nothing handles the setProp foo, the library code would handle it and do whatever, or would I need to fudge in a backScript/frontScript to pass the setProp to the library?

Re: [Q] LCB Library - capture a setProp

Posted: Mon Dec 04, 2017 11:00 am
by livecodeali
No, there isn't. You would have to handle the setProp in script and call the library.

Re: [Q] LCB Library - capture a setProp

Posted: Mon Dec 04, 2017 11:55 am
by shaosean
Thought as much, but seeing as this is all new, I thought I would ask..

Re: [Q] LCB Library - capture a setProp

Posted: Mon Dec 04, 2017 4:30 pm
by LCMark
Its an interesting idea though - being able to implement properties in an LCB library for existing objects. This would be a little like 'categories' in obj-c I suppose. However, I'm not sure how wide the utility would be as it only really applies to stacks I guess, where they are backed by an LCB accessible native object (i.e the OS Window).