Page 1 of 1

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

Posted: Fri Sep 06, 2013 8:28 pm
by yannis72400
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

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

Posted: Fri Sep 06, 2013 8:49 pm
by Simon
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

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

Posted: Fri Sep 06, 2013 8:57 pm
by FourthWorld
You may enjoy property sheet tool, "4W Props" in the Stacks sections of RevNet - in the IDE see Development->Plugins->GoRevNet

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

Posted: Fri Sep 06, 2013 9:11 pm
by yannis72400
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

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

Posted: Fri Sep 06, 2013 11:22 pm
by FourthWorld
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.