Reader small image

You're reading from  Kivy: Interactive Applications in Python

Product typeBook
Published inSep 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781783281596
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Roberto Ulloa
Roberto Ulloa
author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa

Right arrow

Dock – automatic binding in the Kivy language


You might realize from previous chapters that Kivy language does more than simply transforming its rules to Python instructions. For instance, you might see that when it creates properties, it also binds them.

Note

When we do something common like pos: self.parent.pos inside a layout, then the property of the parent is bound to its child. The child always moves to the parent position when the parent moves.

This is usually desirable but not all the time. Think about the solo_attack of the Invader. We need it to break formation and follow a free trajectory on the screen. While this happens, the whole formation of Invaders continues moving from right to left and vice versa. This means that the Invader will receive two orders at the same time. One from the moving parent and another from the trajectory's Animation.

That means that we need a placeholder (the Dock) for each Invader. This will secure the space for the Invader when it comes back from executing...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kivy: Interactive Applications in Python
Published in: Sep 2013Publisher: PacktISBN-13: 9781783281596

Author (1)

author image
Roberto Ulloa

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.
Read more about Roberto Ulloa