|
Size: 1648
Comment:
|
Size: 1647
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| ##language:zh | |
| Line 18: | Line 17: |
== Examples 1: Capsulate a few functions together == |
== Example 1: Capsulate some functions together == |
| Line 37: | Line 35: |
| So you can see, three function bundle to be a single object, and can be execute together in the order of bundle. There are many methods to create a Casing object, you can also write the code as: | As you can see, three functions are bundled as a single '''Casing''' object, and it can be execute together in the order of bundle. There are many methods to create a Casing object, you can also write the code as: |
Description the usage of Casing module ::-- limodou [DateTime(2005-12-01T01:50:56Z)] TableOfContents
1. What's it?
It's an functions capsulation module, which can make sequence functions a single object, and execute in order. And it also can make functions run as a thread, you can choose onprocess callback function to show the execution status. It will support multi thread schedule. It will make all these things easily.
2. Download
Casing module is shipped with NewEdit, so you can download the NewEdit source code and find it in modules folder.
- Or you can just download it from here attachment:Casing.py
3. Examples
3.1. Example 1: Capsulate some functions together
As you can see, three functions are bundled as a single Casing object, and it can be execute together in the order of bundle. There are many methods to create a Casing object, you can also write the code as:
or using left add (+=)
using append method or
creating an empty Casing object and append function later.
