[Q] LCB Library - capture a setProp

Moderators: LCMark, LCfraser

Post Reply
shaosean
Posts: 905
Joined: Thu Nov 04, 2010 7:53 am

[Q] LCB Library - capture a setProp

Post by shaosean » Sat Dec 02, 2017 12:19 pm

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?

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 160
Joined: Thu Apr 18, 2013 2:48 pm

Re: [Q] LCB Library - capture a setProp

Post by livecodeali » Mon Dec 04, 2017 11:00 am

No, there isn't. You would have to handle the setProp in script and call the library.

shaosean
Posts: 905
Joined: Thu Nov 04, 2010 7:53 am

Re: [Q] LCB Library - capture a setProp

Post by shaosean » Mon Dec 04, 2017 11:55 am

Thought as much, but seeing as this is all new, I thought I would ask..

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 973
Joined: Thu Apr 11, 2013 11:27 am

Re: [Q] LCB Library - capture a setProp

Post by LCMark » Mon Dec 04, 2017 4:30 pm

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).

Post Reply

Return to “LiveCode Builder”