How do I see all the "callable" attributes of an object

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
yannis72400
Posts: 2
Joined: Fri Sep 06, 2013 8:17 pm

How do I see all the "callable" attributes of an object

Post by yannis72400 » Fri Sep 06, 2013 8:28 pm

Hi folks,
on my second day with Livecode and an avid Visual Studio programmer (VB/C++).

In Visual Studio, every object had attributes e.g. a label had label.text for the text...

How do I see the callable attributes of an object in LiveCode?
I tried to get a simple checkbox and print an "answer" as to whether the checkbox was true or false.

I tried the code below

Code: Select all

on mouseUp
   if  selected then answer "Checked" else answer "Boo"
end mouseUp
...but I only get the "Boo". Didn't know what to check after the "if" statement.

I went through the tutorials, but I couldn't find a spot where I could access all the attributes of an object. Maybe I got all this wrong and have to forget all my VS programming habits. I looked in the dictionary, but didn't get much help. Went through the manual, no success either.

Any pointers would be welcomed. I have the same problem with all the controls...table, scrollbars etc. I am missing something, so any help is welcomed!

Thanks

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: How do I see all the "callable" attributes of an object

Post by Simon » Fri Sep 06, 2013 8:49 pm

Hi yannis72400,
Welcome to the forum!

I think half of your question is "Property Inspector" it's where you can set label's, names and stuff. Right click on an object to see it.

The other part is a checkbox, the code you want is slightly different:

Code: Select all

on mouseUp
   if the highlight of me is true then
      answer "hot"
   else 
      answer "cold"
   end if
end mouseUp
It's that "highlight" word, not far from intuitive but not really close either.

Simon
Edit: Here from the dictionary, they all work:
Synonyms:
highlight
highlite
hilight
highlighted
highlited
hilighted
hilited

Edit 2: Your style:

Code: Select all

on mouseUp
   if the highlight of me  then answer "hot" else  answer "cold"
end mouseUp
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How do I see all the "callable" attributes of an object

Post by FourthWorld » Fri Sep 06, 2013 8:57 pm

You may enjoy property sheet tool, "4W Props" in the Stacks sections of RevNet - in the IDE see Development->Plugins->GoRevNet
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

yannis72400
Posts: 2
Joined: Fri Sep 06, 2013 8:17 pm

Re: How do I see all the "callable" attributes of an object

Post by yannis72400 » Fri Sep 06, 2013 9:11 pm

Thanks folks! your help moved me forward a bit...will probably come back with more questions...!

Edit1:
BTW the 4W_Props made me feel right "at home"... :D

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How do I see all the "callable" attributes of an object

Post by FourthWorld » Fri Sep 06, 2013 11:22 pm

yannis72400 wrote:BTW the 4W_Props made me feel right "at home"... :D
Glad you like it. One of the things I had missed from my old ToolBook days was a comprehensive property sheet. So in collaboration with Ken Ray, we kicked that out and it's what we use for most property editing.

In the future we'll have another version with filterable lists, properties grouped by type, and more, but for now it works well enough that the urgency for the new version is low.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply