From 4fb4ceab69b79b78f2833f431f376942624ff519 Mon Sep 17 00:00:00 2001 From: EdTheDev Date: Tue, 2 Oct 2012 21:19:42 -0500 Subject: [PATCH] Added section titles that spell out which files the code and layout go in. I got a little lost working through this example because I made an incorrect assumption about the filename needed for controller.kv. The goal to this change is to draw more attention to the filename and keep future users from making the same mistake. --- doc/sources/guide/designwithkv.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/sources/guide/designwithkv.rst b/doc/sources/guide/designwithkv.rst index 3291d3ae4..9f6702922 100644 --- a/doc/sources/guide/designwithkv.rst +++ b/doc/sources/guide/designwithkv.rst @@ -6,6 +6,9 @@ Designing with the Kivy Language ================================ +The code goes in main.py +~~~~~~~~~~~~~~~~~~~~~~~~ + Let's start with a little example. First, the Python file named `main.py`: .. include:: ../../../examples/guide/designwithkv/main.py @@ -20,6 +23,9 @@ In addition, we are creating a ``do_action()`` method, that will use both of these properties. It will change the ``info`` text, and change text in the ``label_wid`` widget. +The layout goes in controller.kv +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Executing this application without a corresponding `.kv` file will work, but nothing will be shown on the screen. This is expected, because the ``Controller`` class has no widgets in it, it's just a ``FloatLayout``. We can