Sample Property Inspector

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 184
Joined: Wed Apr 10, 2013 5:09 pm

Sample Property Inspector

Post by andrewferguson » Thu Aug 01, 2013 6:53 pm

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

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

Re: Sample Property Inspector

Post by dunbarx » Thu Aug 01, 2013 8:36 pm

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

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

Re: Sample Property Inspector

Post by shaosean » Fri Aug 02, 2013 6:40 am

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)

andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 184
Joined: Wed Apr 10, 2013 5:09 pm

Re: Sample Property Inspector

Post by andrewferguson » Fri Aug 02, 2013 1:48 pm

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

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

Re: Sample Property Inspector

Post by shaosean » Sat Aug 03, 2013 6:09 am

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

andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 184
Joined: Wed Apr 10, 2013 5:09 pm

Re: Sample Property Inspector

Post by andrewferguson » Sat Aug 03, 2013 10:42 am

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

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

Re: Sample Property Inspector

Post by shaosean » Sat Aug 03, 2013 11:33 am

Let me take a look.. What operating system are you on?

andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 184
Joined: Wed Apr 10, 2013 5:09 pm

Re: Sample Property Inspector

Post by andrewferguson » Sat Aug 03, 2013 1:13 pm

Hi,
I am on:
Windows 7 64-bit
AMD Athlon II x3 processor
3gb Ram

LiveCode 6.1.0

Post Reply