New to LiveCode- Issue with Documentation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 1
- Joined: Fri Feb 16, 2018 5:53 pm
New to LiveCode- Issue with Documentation
I am new to LiveCode. My background in programming comes from Python and also Javascript.
The main issue I have is reading the documentation. For example, I am working with a Table Field. I would like to know all of the properties and actions of a Table Field. I cannot find anything on the Doc API where it shows me all of the properties and actions of the Table Field.
Is there a way to find out what properties/methods an object contains?
Am I missing something?
Thanks!!
The main issue I have is reading the documentation. For example, I am working with a Table Field. I would like to know all of the properties and actions of a Table Field. I cannot find anything on the Doc API where it shows me all of the properties and actions of the Table Field.
Is there a way to find out what properties/methods an object contains?
Am I missing something?
Thanks!!
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: New to LiveCode- Issue with Documentation
Welcome to this forum,
This should be useful:
http://lessons.livecode.com/m/datagrid/ ... -s-columns
Best regards
Jean-Marc
This should be useful:
http://lessons.livecode.com/m/datagrid/ ... -s-columns
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 9665
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: New to LiveCode- Issue with Documentation
Every control has a property, "the properties". You must know, though, that this is in array form, so you would need to:
Um, that third line is just for grins. Hey, can you see that you can merge lines 2 and 3?
Craig Newman
Code: Select all
on mouseUp
put the properties of fld "yourtableField" into temp
combine temp with return and comma
replace comma with " - has a value of: " in temp
answer temp
end mouseUp
Craig Newman
Last edited by dunbarx on Sat Feb 17, 2018 10:38 pm, edited 1 time in total.
Re: New to LiveCode- Issue with Documentation
Thanks Craig, that is neat to know You know, somewhere I seem to remember having found all the properties for all the objects in the docs, but danged if I remember where I was looking at the time. Probably when I was going through Mc
This may work for you as well, and can be executed from the message box, multi line section (remember to hit ctrl/Enter) -
So for example, a card with one button on it, you want the buttons properties --
returns below -
As well, you want to keep in mind the following -
This may work for you as well, and can be executed from the message box, multi line section (remember to hit ctrl/Enter) -
Code: Select all
put the properties of [object] "name" into arrayVariable
put the keys of arrayVariable into propertiesList
put propertiesList
Code: Select all
put the properties of button 1 into arrayVariable
put the keys of arrayVariable into propertiesList
put propertiesList
Code: Select all
traversalOn
ink
threeD
hiliteBorder
rect
mnemonic
armFill
visitedIcon
patterns
showName
showIcon
colors
hilited
sharedHilite
shadow
textAlign
armed
menuMouseButton
id
altId
labelWidth
accelKey
armedIcon
textStyle
lockLoc
visited
showHilite
label
autoHilite
style
disabledIcon
armBorder
name
icon
toolTip
layer
accelText
visible
cantSelect
borderWidth
menuLines
margins
opaque
accelMods
text
shadowOffset
default
menuName
hiliteFill
showBorder
textSize
hiliteIcon
disabled
autoArm
menuMode
family
textFont
showFocusBorder
menuHistory
Comments:
Not every property is included in the properties property. The following types of properties are excluded:
- Read-only properties
- The script property and custom properties
- Synonyms: Only one synonym for each property is included.
- Duplicates: Properties that are functionally duplicated by other properties are not included. For example, the rectangle property is included, but not the height, width, top, bottom, left, right, or location properties, because you can derive all of them from the object's rectangle.
- Properties other than object properties: Global properties, local properties, properties of a character or chunk in a field, and adjectives such as short that are implemented internally as properties are all excluded.
- Others: Some other properties are excluded.
Re: New to LiveCode- Issue with Documentation
As I was poking around (like I am wont to do on occasion), I did think of another way to see all the properties of an object without having to write any code.
If you open the property inspector for the object your curious about, you can go to the 'property profiles' section. If you click the + sign to the right of 'Profiles', you can add a profile set, in this case I added 'oneTwo', but it doesn't matter as I will be deleting it when done.
In the middle section, after you select the profile you just made, you'll see 'oneTwo profile properties'. If you click the + there, you'll see the list 'Add Property', which effectively shows you all the properties you can put in.
Again, this is just another way to view them, The way Craig listed, or through the message box as I put above is far more versatile.
If you open the property inspector for the object your curious about, you can go to the 'property profiles' section. If you click the + sign to the right of 'Profiles', you can add a profile set, in this case I added 'oneTwo', but it doesn't matter as I will be deleting it when done.
In the middle section, after you select the profile you just made, you'll see 'oneTwo profile properties'. If you click the + there, you'll see the list 'Add Property', which effectively shows you all the properties you can put in.
Again, this is just another way to view them, The way Craig listed, or through the message box as I put above is far more versatile.
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: New to LiveCode- Issue with Documentation
If you go to the dictionary entry for the field object, you will find a table of associated properties and messages beneath it:
Unfortunately this is not a list of properties that are specific to list fields, just fields in general. At some point I think it would be good to split these out into the specific sub-types of object. This has been done to some extent in the IDE with the property inspector, so that is probably the best place to look as others have said.
The following might be the best at-a-glance guide to the properties that apply to a list field (this file is used to generate the property inspector). Although beware that this file is manually maintained, and might have things in that are not actually engine properties but custom properties that are handled in the IDE.
https://github.com/livecode/livecode-id ... tField.tsv
I can't remember off the top of my head what version this was added in, it's definitely in 9 and probably in 8.Unfortunately this is not a list of properties that are specific to list fields, just fields in general. At some point I think it would be good to split these out into the specific sub-types of object. This has been done to some extent in the IDE with the property inspector, so that is probably the best place to look as others have said.
The following might be the best at-a-glance guide to the properties that apply to a list field (this file is used to generate the property inspector). Although beware that this file is manually maintained, and might have things in that are not actually engine properties but custom properties that are handled in the IDE.
https://github.com/livecode/livecode-id ... tField.tsv
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: New to LiveCode- Issue with Documentation
This is the same, I think, in the docset I make for Dash.
For each entry of type “object”, “widget”, “library” and “module” a search is performed for any other entry that lists this type as “Associated”.
The results of these are thus presented, sorted by type and name under each “object”, “widget”, “library” or “module” (and the Data Grid) entry.
BTW, module is a new category introduced in lc9dp11 for the widget utility scripts that were formerly called libraries.
For each entry of type “object”, “widget”, “library” and “module” a search is performed for any other entry that lists this type as “Associated”.
The results of these are thus presented, sorted by type and name under each “object”, “widget”, “library” or “module” (and the Data Grid) entry.
BTW, module is a new category introduced in lc9dp11 for the widget utility scripts that were formerly called libraries.
Re: New to LiveCode- Issue with Documentation
I started poking around in 6.x and 7.x, and found you could also get to what I saw in Mc by going to the dictionary -> object (field is the base object for a table field) -> then sort by [Type].
If your in 8.x, you can open the dictionary, go to associations: -> field
then sort the entries by 'type' and properties will fall right below 'messages'.
Re: New to LiveCode- Issue with Documentation
See http://livecode.wikia.com/wiki/Field#All_properties
and on the top of the page there is:
and on the top of the page there is:
Pay attention to the basic table object option, since it creates "phantom fields", one per cell like field "revCell-2,3" (row,column); this way you can intercept messages easily when working with cells.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w