Information Technology Reference
In-Depth Information
items that apply only to the
View
of this object (as in-
dicated by the
View:
label). Although this division
may seem confusing, it is very useful for having mul-
tiple views of each object (e.g., multiple views of the
same network, each displaying different information).
The buttons at the left of the window give you the
tools for constructing and configuring your network.
Notice that the
New Layer(s)
button is highlighted
for you. These highlighted buttons often (but not al-
ways) are the right ones to press.
Do
.scripts/New/Script
.
You will get a new object dialog. The initial val-
ues in the dialog are fine. However, there is an im-
portant time-saving trick that we will use now, because
we want to edit this new Script object that we will be
creating. Instead of clicking on the
Ok
button with
the usual left mouse button and then going back to
the
.scripts/Edit/Script_0
menu, we can just
use the
right mouse button
to click on the
Ok
button,
which will create the object and immediately pull up an
edit window on that object.
Press
New Layer(s)
now. Again, you see the
new object dialog. This time, let's create 3 objects
(
LeabraLayer
s). Note that you can use those little
up/down arrows to change the
Number
field without hav-
ingtotypeinanumber.
You will see 3 layers in the network, but they are of
zero dimension so they look like lines. The
ReShape
tool is activated, indicating that you can reshape the lay-
ers to the size that they should be. Let's make all 3 lay-
ers
5
x
5
in size.
Right-click on the
Ok
button.
The script edit window has a
script_file
field
that we need to set to the name of the script file that we
want to record our actions into.
Click on the
----No File----
button, and select
Open
from the menu you get, and then type in a new
file name (e.g.,
constr
) in the file dialog that comes up,
and press the
Open
button.
You will now see that
script_file
has
constr.css
next to it, telling you the file name.
Just click on the line, and drag to the upper right.
You will see a grid representing the units as you drag,
and the size of the layer will be displayed in the upper
left hand side of the network window. After each layer
is reshaped the display will automatically resize and re-
center to fit the current layer sizes.
After reshaping all the layers, you will notice that the
Build All
button is highlighted.
The
Apply
button is highlighted, so go ahead and
press it to apply this change.
You may notice that the terminal window reports an
error that it can't open the file — this makes sense be-
cause this file doesn't exist yet!
Now, hit the
Record
button.
This will record all subsequent actions to this script
file.
,
!
Press
Build All
.
This will create the actual units to fill in the layers to
the size they were shaped. Before continuing, let's con-
sider what would happen if you wanted to later change
the size of one of these layers. Let's say you wanted to
reduce the hidden layer to
4
x
4
in size.
Use your window manager to iconify this script win-
dow.
We will return to this window later. You should no-
tice that the pointer now has a
rec
under it, indicating
that recording is active.
,
!
Try clicking on the
ReShape
button again, and then
reshaping the layer to a smaller size — you should see
that it does not work.
You should notice that you can alter the geometry of
the layer (e.g., making it
4
x
7
), but you can't shrink it.
This is because
ReShape
works differently on layers
that already have units in them as opposed to those that
are empty. When empty,
ReShape
sets the geome-
try (and number of units) to whatever shape you want.
When units are present, it simply rearranges the shape,
but does not affect the number of units. Thus, to change
B.2.3
Creating a Network and Layers
Now, let's go to the
.network
menu, and select
New/Network
. Again you will see the new object dia-
log, which you can just press
Ok
to.
An empty network window will now appear. In the
network, environment, and log windows, the menus at
the top are divided into two categories — at the left
are menu items that apply to the object being viewed
(i.e., the Network in this case), and at the right are menu
,
!
Search WWH ::
Custom Search