Page 1 of 1

Sample Property Inspector

Posted: Thu Aug 01, 2013 6:53 pm
by andrewferguson
Hi,
I am trying to modify the LiveCode IDE by making new stacks and replacing them with the existing components. However I have run into a problem with the property inspector. I cannot seem to make a stack that is opened instead of the property inspector.
Does anyone have a property inspector demo stack that shows the basics of the property inspector. (Something that just opens in place of the property inspector and changes the name of the selected object to the text of a field).
Thanks,
Andrew

Re: Sample Property Inspector

Posted: Thu Aug 01, 2013 8:36 pm
by dunbarx
When you say you cannot make a stack that is opened instead of the property inspector, do you mean when you double-click on an object in edit mode?

You can certainly roll your own inspector. I am not sure where you can trap the automatic appearance of the IDE inspector and divert that process. It is likely one of the "revxxx" messages. But someone will know.

Craig Newman

Re: Sample Property Inspector

Posted: Fri Aug 02, 2013 6:40 am
by shaosean
The IDE sends uses this code:

Code: Select all

send "revBuildPropertyPalette" to stack "revTemplatePalette"
So your replacement Properties palette would need to handle the "revBuildPropertyPalette" message, there is a single parameter that is passed to the message that looks like it might contain an object (it was always empty in my tests, so no idea what it should be)

Re: Sample Property Inspector

Posted: Fri Aug 02, 2013 1:48 pm
by andrewferguson
Hi,
Thanks!
Is there a way to know if the user has double clicked to object, or has chosen Card Inspector/ Stack Inspector.
Thanks,
Andrew

Re: Sample Property Inspector

Posted: Sat Aug 03, 2013 6:09 am
by shaosean

Code: Select all

if (item 2 of line 1 of the executionContexts = "mouseDoubleUp") then
  answer "They double clicked in the Application Browser"
else if (item 2 of line 1 of the executionContexts = "mouseDown") then
  answer "Used the context menu"
else if (item 2 of line 1 of the executionContexts = "menuPick") then
  answer "Used the Object menu"
end if

Re: Sample Property Inspector

Posted: Sat Aug 03, 2013 10:42 am
by andrewferguson
Hi,
Thanks. However when I right-click on an object an choose "Property Inspector" I get the message: "Used the Object menu."
Is this right or should it display: "Used the context menu"?
Thanks,
Andrew

Re: Sample Property Inspector

Posted: Sat Aug 03, 2013 11:33 am
by shaosean
Let me take a look.. What operating system are you on?

Re: Sample Property Inspector

Posted: Sat Aug 03, 2013 1:13 pm
by andrewferguson
Hi,
I am on:
Windows 7 64-bit
AMD Athlon II x3 processor
3gb Ram

LiveCode 6.1.0