Skip to content

Commit

Permalink
doc: revisions to lang.py (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-CODE committed Nov 28, 2013
1 parent 87a840b commit bc3f4e7
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions kivy/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
Value Expressions and Reserved Keywords
---------------------------------------
When you specify a property's value, the value is evaluated as a python
When you specify a property's value, the value is evaluated as a Python
expression. This expression can be static or dynamic, which means that
the value can use the values of other properties using reserved keywords.
Expand All @@ -140,7 +140,7 @@
text: 'My state is %s' % self.state
root
This keyword is available only in rule definitions, and represents the
This keyword is available only in rule definitions and represents the
root widget of the rule (the first instance of the rule)::
<Widget>:
Expand All @@ -149,8 +149,8 @@
text: root.custom
app
This keyword always refers to your app instance, it's equivalent
to a call to :meth:`App.get_running_app` in python.::
This keyword always refers to your app instance. It's equivalent
to a call to :meth:`kivy.app.App.get_running_app` in Python.::
Label:
text: app.name
Expand All @@ -160,9 +160,7 @@
arguments passed to the callback.::
TextInput:
on_focus:
self.insert_text("I'm focused!") \
if args[1] else self.insert_text("I'm not focused.")
on_focus: self.insert_text("Focus!" if args[1] else "No focus.")
Furthermore, if a class definition contains an id, you can use it as a
keyword::
Expand All @@ -173,8 +171,8 @@
Button:
text: 'The state of the other button is %s' % btn1.state
Please note that the `id` will not be available in the widget instance;
The `id` attribute will be not used.
Please note that the `id` will not be available in the widget instance:
it is used exclusively for external references.
Relation Between Values and Properties
Expand Down

0 comments on commit bc3f4e7

Please sign in to comment.