Author:halw

Date:2011-03-31T19:21:05.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@867 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2011-04-04 01:52:10 +00:00
parent 0a933cf814
commit 5dcc4603a9
2 changed files with 16 additions and 32 deletions

View File

@@ -27,22 +27,6 @@ To use the EiffelRibbon library and tools you must have:
## Windows SDK 7.0 or greater
## Visual Studio 2008 or greater
=Current state of development=
Initial distribution:
:The EiffelRibbon library is not usable directly. The EiffelRibbon design tool allows you to design a ribbon and will generate code that relies on the EiffelRibbon library.
:A class <code>EV_RIBBON_TITLED_WINDOW</code> is provided with the library. <code>EV_RIBBON_TITLED_WINDOW</code> is a descendant of the standard EiffelVision 2 class <code>EV_TITLED_WINDOW</code>. The ribbon classes generated by EiffelRibbon tool can be added only to instances of <code>EV_RIBBON_TITLED_WINDOW</code>.
==Known issues and limitations==
Initial distribution:
* Not all elements shown in the Type selector can actually be used in a design. For the unusable elements, pick-and-drop is disabled.
* Resizing policy is not yet supported.
* It is necessary to freeze the target system each time the EiffelRibbon code is regenerated.
* When using EV_RICH_TEXT within a ribbon, the EV_RICH_TEXT may not be refreshed right after the ribbon has been displayed.
=The EiffelRibbon design tool=
The EiffelRibbon design tool allows you to design a ribbon graphically, then generate the corresponding Eiffel classes necessary to implement your design.
@@ -70,6 +54,22 @@ The typical usage of the design tool is much like the typical usage of EiffelBui
* Use EiffelStudio to compile the generated code.
=Current state of development=
Initial distribution:
:The EiffelRibbon library is not usable directly. The EiffelRibbon design tool allows you to design a ribbon and will generate code that relies on the EiffelRibbon library.
:A class <code>EV_RIBBON_TITLED_WINDOW</code> is provided with the library. <code>EV_RIBBON_TITLED_WINDOW</code> is a descendant of the standard EiffelVision 2 class <code>EV_TITLED_WINDOW</code>. The ribbon classes generated by EiffelRibbon tool can be added only to instances of <code>EV_RIBBON_TITLED_WINDOW</code>.
==Known issues and limitations==
Initial distribution:
* Not all elements shown in the Type selector can actually be used in a design. For the unusable elements, pick-and-drop is disabled.
* Resizing policy is not yet supported.
* It is necessary to freeze the target system each time the EiffelRibbon code is regenerated.
* When using EV_RICH_TEXT within a ribbon, the EV_RICH_TEXT may not be refreshed right after the ribbon has been displayed.

View File

@@ -26,22 +26,6 @@ The <code>SHOP</code> includes features <code>enter</code> and <code>leave</code
A typical customer lives in this way: As long as he still needs haircuts, he repeatedly does the following steps: He tries to enter the shop. If he's unsuccessful because all the chairs are occupied, he goes off for a while (in the implementation, his processor sleeps and then comes to the end of this step). If he is able to enter the shop, then he puts himself in the queue for a haircut. Once his haircut is complete, he reduces his number of haircuts needed by one, and leaves the shop.
One thing that you might find curious about this example is the feature <code>do_hair_cut</code> in class <code>BARBER</code>. This feature is called by a customer when the barber becomes available to cut the customer's hair. <code>do_hair_cut</code> is a function that returns a <code>BOOLEAN</code>. If you look at the source code for <code>do_hair_cut</code>, you'll see that the routine cannot complete with any result other than <code>True</code> ... and this may seem odd.
<code>
do_hair_cut (an_id: INTEGER): BOOLEAN
-- Called from a customer who wants to get hair cut
require
an_id >= 0
do
(create {EXECUTION_ENVIRONMENT}).sleep (hair_cut_time * 1000000)
result := true
end
</code>
Couldn't a function that always returns the exact same predictable result be safely made a procedure? Certainly it could. However, there is a SCOOP oriented reason for this routine being a function rather than a procedure.
<code>{BARBER}.do_hair_cut</code> is a function in order to become synchronous. Remember that a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] which is a query is always a [[Concurrent Eiffel with SCOOP#Synchronous and asynchronous feature calls|synchronous call]]. In the case of the customer, he needs to leave the shop only after his haircut is complete. Therefore, the query <code>do_hair_cut</code> will be synchronous and ensure that the haircut is complete before the customer leaves the shop.