| |   |
| 56 | 56 | |
| 57 | 57 | \item A \emphind{máquina virtual} (VM) é a única parte do sistema que é diferente para cada processador e sistema operacional onde \sq roda. Máquinas virtuais pré-compiladas estão disponíveis para todos os principais ambientes computacionais. Na \figref{download} vemos que a VM do Mac é chamada de \textit{\sq 3.8.15beta1U.app}. |
| 58 | 58 | |
| 59 | | \item O arquivo \emphind{sources} contém the source code for all of the parts of \sq that don't change very frequently. In \figref{download} it is called \emph{SqueakV39.sources}. Note that the file SqueakV39.sources is only for versions 3.9 and later of \sq. For earlier versions, use a sources file corresponding to the main version \eg \textit{SqueakV3.sources} for versions of \sq from 3.0 up to 3.8. |
| 59 | \item O arquivo \emphind{sources} contém o código fonte para todas as partes do \sq que não mudam tão freqüentemente. Na \figref{download}, esse arquivo tem o nome de \emph{SqueakV39.sources}. Note que o arquivo SqueakV39.sources é somente para as versões 3.9 e superiores do ]sq. Para versões anteriores, use um arquivo correspondente à versão principal \eg \textit{SqueakV3.sources} para as versões de 3.0 a 3.8 do \sq. |
| 60 | 60 | |
| 61 | | \item The current \emph{system \ind{image}} is a snapshot of a running \sq system, frozen in time. It consists of two files: an \emph{.}\emphind{image} file, which contains the state of all of the objects in the system (including classes and methods, since they are objects too), and a \emph{.}\emphind{changes} file, which contains a log of all of the changes to the source code of the system. |
| 62 | | In \figref{download}, we see that we have grabbed the \textit{Squeak3.9-final-7067} image and changes files. |
| 61 | \item A \emph{\ind{imagem}} atual é um \foreign{snapshot} de um sistema \sq, congelado no tempo. Ele consiste em dois arquivos: um arquivo \emph{.}\emphind{image}, que contém o estado de todos objetos no sistema (incluindo métodos e classes, já que estes também são objetos), e um arquivo \emph{.}\emphind{changes}, que contém um \foreign{log} de todas as mudanças feitas ao código fonte do sistema. Na \figref{download}, vemos que o arquivo de imagem é \textit{Squeak3.9-final-7067.image} e o de mudanças é \textit{Squeak3.9-final-7067.changes}. |
| 63 | 62 | \end{enumerate} |
| 64 | 63 | |
| 65 | | \dothis{Download and install \sq on your computer.} |
| 64 | \dothis{Baixe e instale o \sq em seu computador.} |
| 66 | 65 | \index{download} |
| 67 | 66 | |
| 68 | | The version of \sq that we have used for developing the examples in this book is \emphind{Squeak-dev}, available from \url{http://damien.cassou.free.fr/squeak-dev.html}. |
| 67 | A versão do \sq que usamos para desenvolver os exemplos neste livro é a \emphind{Squeak-dev}, disponível em \url{http://damien.cassou.free.fr/squeak-dev.html}. |
| 69 | 68 | \label{sec:squeakDev} |
| 70 | | We chose this image because it has a wider variety of programming tools pre-installed, and because additional packages can be loaded with a single click. |
| 71 | | Most of the introductory material in this book will work with any version, so if you already have one installed, you may as well continue to use it. |
| 72 | | However, if you notice differences between the appearance or behaviour of your system and what is described here, do not be surprised. |
| 73 | | On the other hand, if you are about to download \sq for the first time, you may as well grab the \emph{Squeak-dev} image. |
| 69 | Nos escolhemos esta imagem porque tem uma variedade maior de ferramentas de programação instaladas, e porque pacotes adicionais podem ser instalados com um único clique. Apesar disso, a maior parte do material introdutório deste livro funcionará em qualquer versão; sendo assim, se você já tiver uma versão instalada, não há problemas em continuar a usá-la. Entretanto, se você notar alguma diferente de aparência ou comportamento entre o seu sistema e o que é descrito aqui, não fique surpreso. Por outro lado, se você estiver baixando o \sq pela primeira vez, você pode pegar a imagem \emph{Squeak-dev} mencionada anteriormente. |
| 74 | 70 | |
| 75 | | As you work in \sq, the image and changes files are modified, so you need to make sure that they are writable. |
| 76 | | Always keep these two files together. |
| 77 | | Never edit them directly with a text editor, as \sq uses them to store the objects you work with and to log the changes you make to the source code. |
| 78 | | It is a good idea to keep a backup copy of the downloaded image and changes files so you can always start from a fresh image and reload your code. |
| 71 | À medida que você trabalha com o \sq, os arquivos da imagem e de mudança serão modificados, de modo que você precisa garantir que eles tem permissões de escrita. Sempre os mantenha juntos e nunca os edite com um editor de texto, já que o \sq armazena os objetos que você está usando e as mudanças de código feito em um formato próprio. É sempre uma boa idéia manter uma cópia dos arquivos baixados para que você smpere seja capaz de começar com uma imagem nova e simplesmente recarregar seu código. |
| 79 | 72 | |
| 80 | | The \emphind{sources} file and the VM can be read-only\,---\,they can be shared between different users. |
| 81 | | All of these files can be placed in the same directory, but it is also possible to put the Virtual Machine and sources file in separate directory where everyone has access to them. |
| 82 | | Do whatever works best for your style of working and your operating system. |
| 73 | O arquivo \emphind{sources} e a VM podem ser somente-leitura\,---\,eles podem ser compartilhados entre usuários diferentes. Todos esses arquivos podem ser colocados no mesmo diretório, mas também é possível colocar a máquina virtual e o arquivo de fontes em diretórios separados onde todos possam acessá-los. Faça o que for melhor para o seu estilo de trabalho e sistema operacional. |
| 83 | 74 | |
| 84 | | \sd{it would be really nice to have a setup and startup section on PC, Mac and Linux} |
| 85 | | \ab{I agree entirely; the reason that this is not here is because I could do only the Mac section. Damien can probably do Windoze. Perhaps we can ask on the list for a Linux volunteer?} |
| 75 | \sd{seria interessante ter uma seção de instalação e inicialização para PC, MAC e Linux} |
| 76 | \ab{eu concordo inteiramente, a razão pela qual não estão aqui é porque eu somente posso fazer a versão em Mac; Damien provavelmente pode fazer para o Windows, e talvez possamos pedir na lista um voluntário para Linux?} |
| 86 | 77 | |
| 87 | 78 | %----------------------------------------------------------------- |
| 88 | 79 | \begin{figure}[htb] |
| 89 | 80 | % \centerline {\includegraphics[width=0.6\textwidth]{download}} |
| 90 | 81 | \centerline {\includegraphics[width=0.95\textwidth]{startup}} |
| 91 | | \caption{A fresh \sq image.\label{fig:startup}} |
| 82 | \caption{Uma nova imagem \sq.\label{fig:startup}} |
| 92 | 83 | \end{figure} |
| 93 | 84 | |
| 94 | | \index{launching Squeak} |
| 95 | | \paragraph{Launching.} To start \sq, do whatever your operating system expects: drag the \emph{.}\emphind{image} file onto the icon of the virtual machine, or double-click the \emph{.image} file, or at the command line type the name of the virtual machine followed by the path to the \emph{.image} file. (When you have multiple VMs installed on your machine the operating system may not automatically pick the right one; in this case it is safer to drag and drop the image onto the virtual machine, or to use the command line.) |
| 85 | \index{Rodando o \sq} |
| 86 | \paragraph{Rodando.} Para rodar o \sq, faça o que o seu sistema operacional espera: arraste o arquivo da imagem, cuja extensão é \emph{.}\emphind{image}, para sobre o ícone da máquina virtual; ou dê um duplo clique na imagem; ou ainda, na linha de comando, digite o nome do executável da máquina virtual seguido pelo nome do arquivo da imagem. (Quando você possui múltiplas máquinas virtuais instaladas na sua máuina, o seu sistema operacional pode não identificar corretamente a que você deseja usar; neste caso, é mais seguro arrastar e soltar a imagem sobre a máquina virtual ou usar a linha de comando.) |
| 96 | 87 | |
| 97 | | Once \sq is running, you should see a single large window, possibly containing some open workspace windows (see \figref{startup}), and it's not obvious how to proceed! You will notice that there is no menu bar, or at least not a useful one. Instead, \sq makes heavy use of context-dependent pop-up menus. |
| 88 | Uma vez que o \sq esteja rodando, você verá uma única janela, possivelmente contendo algumas janelas de trabalho dentro de si (veja \figref{startup}), e não é tão óbvio como proceder! Você notará que não há barra de \foreign{menu}, ou pelo menos não uma útil. Na verdade, o \sq faz uso pesado de \foreign{menus} contextuais. |
| 98 | 89 | |
| 99 | | |
| 100 | | \dothis{Start \sq. You can dismiss any open workspaces by clicking on the {\sf X} in the top left corner of the workspace window. You can collapse the windows (so that they can be expanded again later) by clicking on the \raisebox{-0.2ex}{{\Large $\circ$}} in the top-right corner.} |
| 90 | \dothis{Rode o \sq. Você pode fechar todas as janelas de trabalho abertas dentro do mesmo clicando no ícone de um {\sf X} no canto superior esquerdo das janelas. Você pode minimizar as janelas (de modo que possam ser maximizadas depois clicando no \raisebox{-0.2ex}{{\Large $\circ$}} no topo superior direito.} |
| 101 | 91 | |
| 102 | 92 | %----------------------------------------------------------------- |
| 103 | | \paragraph{First Interaction.} |
| 93 | \paragraph{Primeira interação.} |
| 104 | 94 | |
| 105 | | A good place to get started is the \ind{world menu} shown in \figref{threeButtons:red}. |
| 95 | Um bom lugar para começar é o menu principal, conhecido como \ind{\foreign{world menu}}, que você pode ver na \figref{threeButtons:red}. |
| 106 | 96 | |
| 107 | | \dothis{Click with the mouse on the background of the main window to show the world menu, then choose \menu{open \ldots \go workspace} to create a new workspace.} |
| 97 | \dothis{Clique com o \foreign{mouse} no fundo da janela principal para mostrar o \foreign{world menu}, e então escolha \menu{open \ldots \go workspace} para criar uma nova área de trabalho (\foreign{workspace}).} |
| 108 | 98 | |
| 109 | 99 | \begin{figure}[tbh] |
| 110 | 100 | \centering |
| 111 | | \subfigure[The world menu]{\label{fig:threeButtons:red}% |
| 101 | \subfigure[O \foreign{word menu}]{\label{fig:threeButtons:red}% |
| 112 | 102 | \includegraphics[width=0.2\linewidth]{worldMenu}}\hfill |
| 113 | | \subfigure[The contextual menu]{\label{fig:threeButtons:yellow}% |
| 103 | \subfigure[O \foreign{menu} contextual]{\label{fig:threeButtons:yellow}% |
| 114 | 104 | \includegraphics[width=0.25\linewidth]{yellowButtonMenuOnWorkspace}}\hfill |
| 115 | | \subfigure[The morphic halo]{\label{fig:threeButtons:blue}% |
| 105 | \subfigure[O halo do \foreign{morphic}]{\label{fig:threeButtons:blue}% |
| 116 | 106 | \includegraphics[width=0.25\linewidth]{morphicHaloOnWorkspace}}% these braces needed (else no whitespace at end of line) |
| 117 | | \caption{The world menu (brought up by the red mouse button), a contextual menu (yellow mouse button), and a morphic \subind{Morphic}{halo} (blue mouse button).\label{fig:threeButtons}} |
| 107 | \caption{O \foreign{word menu}, invocado pelo botão vermelho; o \foreign{menu} contextual, invocado pelo botão amarelo; e um subind{Morphic}{halo} do \foreign{morphic}, invocado pelo botão azul.\label{fig:threeButtons}} |
| 118 | 108 | \end{figure} |
| 119 | 109 | \index{red button} |
| 120 | 110 | \index{yellow button} |
| … | … | |
| 118 | 118 | % the placement {r} for right, and the width of the figure. Capital R will allow some float. |
| 119 | 119 | % Inside the wrapfig environment, linewidth is special --- the width of the figure. |
| 120 | 120 | \includegraphics[width=0.95\linewidth]{colouredMouse} |
| 121 | | \caption{The author's mouse. Clicking the scroll wheel activates the blue button.} |
| 121 | \caption{O \foreign{mouse} do autor. O botão azul é ativado com um clique na \foreign{scroll wheel}.} |
| 122 | 122 | \label{fig:colouredMouse} |
| 123 | 123 | \end{wrapfigure} |
| 124 | 124 | |
| 125 | | \sq was originally designed for a computer with a \ind{three button mouse}. If your mouse has fewer than three buttons, you will have to press extra keys while clicking the mouse to simulate the extra buttons. A two-button mouse works quite well with \sq, but if you have only a single-button mouse, you should seriously consider buying a two-button mouse with a clickable scroll wheel: it will make working with \sq much more pleasant. |
| 126 | | |
| 127 | | \sq avoids terms like ``left mouse click'' because different computers, mice, keyboards and personal configurations mean that different users will need to press different physical buttons to achieve the same effect. Instead, the mouse buttons are labeled with colors. The mouse button that you pressed to get the ``World'' menu is called the \emphind{red button}; it is most often used for selecting items in lists, selecting text, and selecting menu items. |
| 128 | | When you start using \sq, it can be surprisingly helpful to actually label your mouse, as shown in \figref{colouredMouse}. |
| 125 | O \sq foi projetado para um computador com um \ind{\foreign{mouse} de três botões}. Se o seu \foreign{mouse} tem menos do que três botões você precisará usar teclas extras para simular os demais botões. Um \foreign{mouse} de dois botões funciona bem com o \sq, mas se você tem um \foreign{mouse} de botão único, você dever seriamente considerar a compra de um \foreign{mouse} de dois botões com uma \foreign{scroll wheel} clicável: isso vai tornar o trabalho com o \sq bem mais prazeroso. |
| 129 | 126 | |
| 130 | | The \emphind{yellow button} is the next most used button; it is used to bring up a contextual menu, that is, a menu that offers different sets of actions depending on where the mouse is pointing; see \figref{threeButtons:yellow}. |
| 127 | O \sq evita termos como ``botão esquerdo'' porque computadores diferentes possui configurações diferentes de modo que diferentes usuários terão que pressionar diferentes botões para atingir o mesmo efeito. Os botões de um \foreign{mouse} são então associados com cores. O botão que você usar para acessar o \foreign{world menu} é chamada de \emphind{botão vermelho}--é usado principalmente para selecionar itens em uma lista, selecionar textos e itens de menu. Quando você estiver usando o \sq pode ser interessante rotular literalmente o seu \foreign{mouse}, como mostrado na \figref{colouredMouse}. |
| 131 | 128 | |
| 129 | O \emphind{botão amarelo} é o segndo mais usado dos botões do \foreign{mouse}; é usado para chamar o \foreign{menu} contextual, isto é, um \foreign{menu} com um conjunto diferente de ações dependendo do objeto que está sendo clicado; veja a \figref{threeButtons:yellow}. |
| 132 | 130 | |
| 133 | | \dothis{Type \ct{Time now} in the workspace. |
| 134 | | Now click the yellow button in the workspace. |
| 135 | | Select \menu{print it}.} |
| 131 | \dothis{Digite \ct{Time now} na janela de trabalho. |
| 132 | Depois disso, clique com o botão amarelo na janela e selecione \menu{print it}.} |
| 136 | 133 | |
| 137 | | Finally, there is the \emphind{blue button}, which is used to activate the ``morphic \subind{Morphic}{halo}'', an array of handles that are used to perform operations on the on-screen objects themselves, such as rotating them or resizing them; see \figref{threeButtons:blue}. |
| 138 | | If you let the mouse linger over a handle, a help balloon will explain its function. |
| 134 | Finalmente, há o \emphind{botão azul}, que é usado para ativar o ``\subind{Morphic}{halo}''. O halo é um conjunto de ícones que aparecem ao redor de um objeto selecionado e são usados para realizar operações sobre o mesmo como rotação e redimensionamento; veja a \figref{threeButtons:blue}. Se você parar o \foreign{mouse} sobre um dos ícones, você verá um dica sobre sua função. |
| 139 | 135 | |
| 140 | | \dothis{Click the blue button on the workspace. |
| 141 | | Grab the \raisebox{-0.4ex}{\includegraphics[width=1em]{morphicRotate}} handle near the bottom left corner and drag it to rotate the workspace.} |
| 136 | \dothis{Clique com o botão azul sobre a janela de trabalho. |
| 137 | Segure o ícone \raisebox{-0.4ex}{\includegraphics[width=1em]{morphicRotate}} perto do canto inferior esquerdo e o arraste para rotacionar a janela.} |
| 142 | 138 | |
| 143 | | We recommend that right-handed people configure their mouse to put the \ind{red button} on the left side of their mouse, the \ind{yellow button} on the right, and use a clickable scroll wheel, if one is available, for the blue button. If you don't have a clickable scroll wheel, then you can get the Morphic halo by holding down the \ct{alt} or \ct{option} key while clicking the \ind{red button}. If you are using a Macintosh without a second mouse button, you can simulate one by holding down the \clover{} key while clicking the mouse. However, if you are going to be using \sq at all often, we recommend investing in a mouse with at least two buttons. |
| 139 | Nós recomendamos que pessoas canhotas cnfigurem seu \foreign{mouse} para colocar o \ind{botão vermelho} no lado esquerdo do \foreign{mouse}, o \ind{botão amarelo} no lado direito, e usem uma \foreign{scroll wheel} clicável, se houver uma, para o \ind{botão azul}. Se você não possui uma \foreign{scroll wheel}, você pode acessar o halo segurando a tecla \ct{alt} ou \ct{option} enquanto clica com o \ind{botão vermelho}. Se você está usando um Mac sem um segundo botão do mouse, você pode simular um segurando a tecla \clover{} enquanto clica. Entrentanto, se você vai usar o \sq freqüentemente, recomendamos que você invista em um \foreign{mouse} mais adequado. |
| 144 | 140 | |
| 145 | | You can configure your mouse to work the way you want by using the preferences of your operating system and mouse driver. |
| 146 | | \sq has some preferences for customising the mouse and the meta keys on your keyboard. You can find the \ind{preference browser} in the \menu{open} item of the \menu{World} menu. |
| 147 | | In the preference browser, the \menu{general} category contains an option \menu{swapMouseButtons} that switches the yellow and blue functions (see \figref{prefBrowser}). The \menu{keyboard} category has options to duplicate the various command keys. |
| 141 | Você pode configurar o seu \foreign{mouse} de maneira que desejar usando as preferências do seu sistema operacional e \foreign{driver} do \foreign{mouse}. O \sq também possui algumas preferências para customizar o \foreign{mouse} e as meta-teclas do seu teclado. Você pode mudar essas configurações no \foreign{\ind{preference browser}}\, que está acessível através do \foreign{menu} \menu{open} dentro do menu \menu{World}. Dentro do \foreign{preference browser}, a categoria \menu{general} contém uma opção chamada \menu{swapMouseButtons} que troca as funções dos botões amarelo e azul (veja a \figref{prefBrowser}). A categoria \menu{keyboard} contém opções para duplicar as várias teclas de comando. |
| 148 | 142 | |
| 149 | | \dothis{Open the preference browser and find the \menu{swapMouseButtons} option using the search box.} |
| 143 | \dothis{Abra o \foreign{preference browser} e encontre e opção \menu{swapMouseButtons} usando a caixa de busca.} |
| 150 | 144 | |
| 151 | 145 | \begin{figure}[htb] |
| 152 | 146 | \ifluluelse |
| 153 | 147 | {\centerline {\includegraphics[width=\textwidth]{PreferenceBrowser}}} |
| 154 | 148 | {\centerline {\includegraphics[scale=0.7]{PreferenceBrowser}}} |
| 155 | | \caption{The Preference Browser.\label{fig:prefBrowser}} |
| 149 | \caption{O \foreign{Preference Browser}.\label{fig:prefBrowser}} |
| 156 | 150 | \end{figure} |
| 157 | 151 | |
| 158 | 152 | %================================================================= |
| 159 | | \section{The World menu} |
| 153 | \section{O \foreign{menu} \foreign{World}} |
| 160 | 154 | \index{world menu} |
| 161 | 155 | |
| 162 | | \dothis{Red-click again on the \sq background.} |
| 163 | | You will see the \menu{World} menu again. |
| 164 | | Most \sq menus are not modal; you can leave them on the screen for as long as you wish by clicking the push pin icon in the top-right corner. Do this. Also, notice that menus appear when you click the mouse, but do not disappear when you release it; they stay visible until you make a selection, or until you click outside of the menu. You can even move the menu around by grabbing its title bar. |
| 156 | \dothis{Clique novamente com o botão vermelho em uma área vazia da janela do \sq.} |
| 157 | Você verá o \foreign{menu} \menu{World} novamente. |
| 158 | A maior parte dos \foreign{menus} do \sq não são modais, isto é, você pode deixá-los visíveis por quanto tempo quiser simplesmente clicando no ícone de alfinete no banco superior direito dos mesmos. Faça isso. Você notará que os \foreign{menus} aparecem quando você clica, mas não desaparecem quando você solta o \foreign{mouse}; eles permanecem visíveis até que você faça outra seleção, ou clique fora do \foreign{menu}. Você pode, inclusive, mover um \foreign{menu} segurando em sua barra de título. |
| 165 | 159 | |
| 166 | | The world menu provides you a simple means to access many of the tools that \sq offers. |
| 160 | O \foreign{menu} \menu{World} lhe oferece uma maneira simples de acessar muitas das ferramentas que o \sq oferece. |
| 167 | 161 | |
| 168 | | \dothis{Have a closer look at the \menu{world\go{}open \ldots} menu.} |
| 169 | | You will see a list of several of the core tools in \sq, including the system browser (one of many available class browsers) and the workspace. |
| 170 | | We will encounter most of them in the coming chapters. |
| 162 | \dothis{Olhe as opções oferecidas pelo \foreign{menu} \menu{world\go{}open \ldots}.} |
| 163 | Você verá uma lista de várias das principais ferramentas em \sq, incluindo o \foreign{system browser}, a ferramenta que permite navegar entre as classes do \sq, e o \foreign{workspace}, ou seja, a janela de trabalho. |
| 164 | Você encontrará a maioria dessas ferramentas nos capítulos adiante. |
| 171 | 165 | |
| 172 | 166 | \begin{figure}[htb] |
| 173 | 167 | \ifluluelse |
| 174 | 168 | %{\centerline {\includegraphics[width=0.3\textwidth]{OpenMenu}}} |
| 175 | 169 | {\centerline {\includegraphics[scale=0.5]{OpenMenu}}} |
| 176 | 170 | {\centerline {\includegraphics[scale=0.7]{OpenMenu}}} |
| 177 | | \caption{The \menu{open \ldots} dialogue of the world menu.\label{fig:openmenu}} |
| 171 | \caption{O \foreign{menu} \menu{open \ldots} dentro do \foreign{menu} \menu{World}.\label{fig:openmenu}} |
| 178 | 172 | \end{figure} |
| 179 | 173 | |
| 180 | 174 | %================================================================= |
| 181 | | \section{Saving, quitting and restarting a \sq session} |
| 175 | \section{Salvando, saindo e voltando a uma sessão \sq} |
| 182 | 176 | |
| 183 | | \dothis{Bring up the world menu. |
| 184 | | Now select \menu{new morph \ldots} and navigate to \menu{from alphabetical list{\go}A-C{\go}BlobMorph}. |
| 185 | | You now have a blob ``in hand''. |
| 186 | | Put the blob down (by red-clicking) somewhere. It will start to move.} |
| 177 | \dothis{Abra o \foreign{menu} \menu{World}. |
| 178 | Agora selecione o \foreign{menu} \menu{new morph \ldots} e navegue até o \foreign{menu} \menu{from alphabetical list{\go}A-C{\go}BlobMorph}. |
| 179 | Agora você tem um ``blob'' em mãos. |
| 180 | Solte o ``blob'' em algum lugar, clicando com o botão vermelho. Ele começará a se mover.} |
| 187 | 181 | \index{Morphic} |
| 188 | 182 | |
| 189 | 183 | \begin{figure}[htb] |
| … | … | |
| 185 | 185 | \ifluluelse |
| 186 | 186 | {\centerline{\includegraphics[scale=0.5]{Blob}}} |
| 187 | 187 | {\centerline{\includegraphics[scale=0.7]{Blob}}} |
| 188 | | \caption{An instance of \lct{BlobMorph}.\label{fig:blob}} |
| 188 | \caption{Uma instância de um \lct{BlobMorph}.\label{fig:blob}} |
| 189 | 189 | \end{minipage} |
| 190 | 190 | \hfill |
| 191 | 191 | \begin{minipage}[b]{0.48\textwidth} |
| 192 | 192 | \ifluluelse |
| 193 | 193 | {\centerline {\includegraphics[scale=0.5]{saveAs}}} |
| 194 | 194 | {\centerline {\includegraphics[scale=0.7]{saveAs}}} |
| 195 | | \caption{The \menu{save as \ldots} dialogue.\label{fig:saveas}} |
| 195 | \caption{A caixa de diálogo \menu{save as \ldots}.\label{fig:saveas}} |
| 196 | 196 | \end{minipage} |
| 197 | 197 | \end{figure} |
| 198 | 198 | |
| 199 | | \dothis{Select \menu{World\go{}save as \ldots}, and enter the name ``SBE''. |
| 200 | | Now click on the \menu{Accept(s)} button. |
| 201 | | Now select \menu{World\go{}save and quit}.} |
| 199 | \dothis{Selecione o \foreign{menu} \menu{World\go{}save as \ldots}, e digite o nome ``SBE''. |
| 200 | Depois clique no botão \menu{Accept(s)}. |
| 201 | E então, selecione \menu{World\go{}save and quit}.} |
| 202 | 202 | |
| 203 | | Now if you go to the location where the original image and changes files were, you will find two new files called ``SBE.\ind{image}'' and ``SBE.\ind{changes}'' that represent the working state of the \sq image at the moment before you told \sq to \menu{save and quit}. |
| 204 | | If you wish, you can move these two files anywhere that you like on your disk, but if you do so you may (depending on your operating system) need to also move, copy or link to the virtual machine and the \emph{.source} file. |
| 203 | Se você for agora para o local onde a imagem e arquivo de mudança originais estavam, você verá que há dois novos arquivos lá, chamados``SBE.\ind{image}'' e ``SBE.\ind{changes}'', que representam o estado operacional da imagem \sq até o momento em que você executou \menu{save and quit}. Se você quiser, você pode mover esses arquivos para qualquer outro local conveniente do seu disco, embora, dependendo do seu sistema operacional, você também tenha que mover, copiar ou pelo menos criar um \foreign{link} simbólico para a máquina virtual e o arquivos \emph{.source} associado. |
| 205 | 204 | |
| 206 | | \dothis{Start up \sq from the newly created ``SBE.image'' file.} |
| 205 | \dothis{Inicie o \sq com a recém-criada imagem ``SBE.image''.} |
| 207 | 206 | |
| 208 | | Now you should find yourself in precisely the state you were when you quit \sq. The blob is there again and it continues to move from where it was when you left it. |
| 207 | Agora você verá que o sistema se encontra precisamente no estado em que você o deixou quando saiu do \sq. O ``blob'' ainda está lá e continua a se mover da posição em que você o deixou. |
| 209 | 208 | |
| 210 | | When you start \sq for the first time, the \sq \ind{virtual machine} loads the image file that you provide. This file contains a snapshot of a large number of objects, including a vast amount of pre-existing code and a large number of programming tools (all of which are objects). As you work with \sq, you will send messages to these objects, you will create new objects, and some of these objects will die and their memory will be reclaimed (\ie garbage-collected). |
| 209 | Quanto você inicia o \sq pela primeira vez, a \ind{máquina virtual} carrega a imagem que você especifica. O arquivo contém um \foreign{snapshot} (um ``retrato'', por assim dizer) de um grande número de objetos, incluindo uma enorme quantidade de código pré-existente e um grande número de ferramentas de programação (todas sendo objetos também). Enquanto você trabalha com o \sq, você enviará mensagens para esses objetos, e isso criará novos objetos, enquanto outros morrerão e terão o espaço que ocupavam devolvido ao sistema (isso é, serão coletados dentro o processo conhecido como \foreign{garbage-collection}). |
| 211 | 210 | |
| 212 | | When you quit \sq, you will normally save a snapshot that contains all of your objects. If you save normally, you will overwrite your old image file with the new snapshot. Alternatively you may save the image under a new name, as we just did. |
| 211 | Quanto você fecha o \sq, você normalmente salva o estado de todos os seus objetos. Se você salva normalmente, você sobrescreverá a sua imagem antiga com um novo \foreign{snapshot}. Alternativamente, você pode salvar a imagem com um novo nome, como fizemos. |
| 213 | 212 | |
| 214 | | In addition to the \emph{.image} file, there is also a \emph{.changes} file. |
| 215 | | This file contains a log of all the changes to the source code that you have made using the standard tools. |
| 216 | | Most of the time you do not need to worry about this file at all. |
| 217 | | As we shall see, however, the \emph{.changes} file can be very useful for recovering from errors, or replaying lost changes. |
| 218 | | More about this later! |
| 213 | Em adição ao arquivo \emph{.image}, há também o arquivo \emph{.changes}. Este arquivo contém um \foreign{log} de todas as mudanças feitas no código fonte usando as ferramentas de programação do \sq. Na maioria das vezes, você não precisa de preocupar com esse arquivo, somente em mantê-lo junto com a imagem. Nós veremos mais tarde, entretanto, que esse arquivo pode ser bem útil para a recuperação de erros ou de mudanás perdidas. |
| 219 | 214 | |
| 220 | | The image that you have been working with is a descendant of the original \st-80 image created in the late 1970s. |
| 221 | | Some of these objects have been around for decades! |
| 215 | A imagem com a qual você esteve trabalhando até o momento descende da imagem original criada para o \st-80 no fim dos anos 70. Alguns dos objetos na mesma estão instanciadas há décadas! |
| 222 | 216 | |
| 223 | | You might think that the image is the key mechanism for storing and managing software projects, but you would be wrong. |
| 224 | | As we shall see very soon, there are much better tools for managing code and sharing software developed by teams. |
| 225 | | Images are very useful, but you should learn to be very cavalier about creating and throwing away images, since tools like Monticello offer much better ways to manage versions and share code amongst developers. |
| 217 | Você pode estar pensando que a imagem é o principal mecanismo para armazenar e gerenciar projetos em \sq, mas isso não é inteiramente correto. Veremos em breve que há outras ferramentas úteis para gerenciar e compartilhar código entre projetos desenvolvidos em time. Imagens são bem úteis, mas é necessário considerar que imagens são grandes, auto-contidas e você deve ficar bem tranqüilo quanto a descartá-las e criá-las novamente quando necessário já que ferramentas como o Monticello oferecem meios melhores de gerenciar versões e compartilhar código entre desenvolvedores. |
| 226 | 218 | |
| 227 | | \dothis{Blue-click on the Blob.} |
| 228 | | You will see a collection of colored dots that are collectively called the blob's morphic \subind{Morphic}{halo}. |
| 229 | | Each dot is called a \emph{handle}. |
| 230 | | Click in the pink handle containing the cross; the blob should go away. |
| 231 | | (You may have to try several times as the Blob squirms around and tries to get away from the mouse.) |
| 219 | \dothis{Clique no ``blob'' com o botão azul.} |
| 220 | Você verá uma coleção de pontos coloridos que são coletivamente chamados de \subind{Morphic}{halo}. |
| 221 | Cada um deles é um \foreign{\emph{handle}}, aqui referenciados simplesmente como ícones. |
| 222 | Clique no ícone rosa que contém uma cruz e o ``blob'' será destruído. |
| 223 | (Você provavelmente vai ter que tentar várias vezes até conseguir já que o ``blob'' pode tentar se safar do \foreign{mouse}). |
| 232 | 224 | |
| 233 | 225 | \begin{figure}[htb] |
| 234 | 226 | \ifluluelse |
| toggle raw diff |
--- a/PortugueseBook/QuickTour/QuickTour.tex
+++ b/PortugueseBook/QuickTour/QuickTour.tex
@@ -56,65 +56,55 @@ Há três partes que você precisa baixar, consistindo de quatro arquivos: (veja
\item A \emphind{máquina virtual} (VM) é a única parte do sistema que é diferente para cada processador e sistema operacional onde \sq roda. Máquinas virtuais pré-compiladas estão disponíveis para todos os principais ambientes computacionais. Na \figref{download} vemos que a VM do Mac é chamada de \textit{\sq 3.8.15beta1U.app}.
- \item O arquivo \emphind{sources} contém the source code for all of the parts of \sq that don't change very frequently. In \figref{download} it is called \emph{SqueakV39.sources}. Note that the file SqueakV39.sources is only for versions 3.9 and later of \sq. For earlier versions, use a sources file corresponding to the main version \eg \textit{SqueakV3.sources} for versions of \sq from 3.0 up to 3.8.
+ \item O arquivo \emphind{sources} contém o código fonte para todas as partes do \sq que não mudam tão freqüentemente. Na \figref{download}, esse arquivo tem o nome de \emph{SqueakV39.sources}. Note que o arquivo SqueakV39.sources é somente para as versões 3.9 e superiores do ]sq. Para versões anteriores, use um arquivo correspondente à versão principal \eg \textit{SqueakV3.sources} para as versões de 3.0 a 3.8 do \sq.
- \item The current \emph{system \ind{image}} is a snapshot of a running \sq system, frozen in time. It consists of two files: an \emph{.}\emphind{image} file, which contains the state of all of the objects in the system (including classes and methods, since they are objects too), and a \emph{.}\emphind{changes} file, which contains a log of all of the changes to the source code of the system.
-In \figref{download}, we see that we have grabbed the \textit{Squeak3.9-final-7067} image and changes files.
+ \item A \emph{\ind{imagem}} atual é um \foreign{snapshot} de um sistema \sq, congelado no tempo. Ele consiste em dois arquivos: um arquivo \emph{.}\emphind{image}, que contém o estado de todos objetos no sistema (incluindo métodos e classes, já que estes também são objetos), e um arquivo \emph{.}\emphind{changes}, que contém um \foreign{log} de todas as mudanças feitas ao código fonte do sistema. Na \figref{download}, vemos que o arquivo de imagem é \textit{Squeak3.9-final-7067.image} e o de mudanças é \textit{Squeak3.9-final-7067.changes}.
\end{enumerate}
-\dothis{Download and install \sq on your computer.}
+\dothis{Baixe e instale o \sq em seu computador.}
\index{download}
-The version of \sq that we have used for developing the examples in this book is \emphind{Squeak-dev}, available from \url{http://damien.cassou.free.fr/squeak-dev.html}.
+A versão do \sq que usamos para desenvolver os exemplos neste livro é a \emphind{Squeak-dev}, disponível em \url{http://damien.cassou.free.fr/squeak-dev.html}.
\label{sec:squeakDev}
-We chose this image because it has a wider variety of programming tools pre-installed, and because additional packages can be loaded with a single click.
-Most of the introductory material in this book will work with any version, so if you already have one installed, you may as well continue to use it.
-However, if you notice differences between the appearance or behaviour of your system and what is described here, do not be surprised.
-On the other hand, if you are about to download \sq for the first time, you may as well grab the \emph{Squeak-dev} image.
+Nos escolhemos esta imagem porque tem uma variedade maior de ferramentas de programação instaladas, e porque pacotes adicionais podem ser instalados com um único clique. Apesar disso, a maior parte do material introdutório deste livro funcionará em qualquer versão; sendo assim, se você já tiver uma versão instalada, não há problemas em continuar a usá-la. Entretanto, se você notar alguma diferente de aparência ou comportamento entre o seu sistema e o que é descrito aqui, não fique surpreso. Por outro lado, se você estiver baixando o \sq pela primeira vez, você pode pegar a imagem \emph{Squeak-dev} mencionada anteriormente.
-As you work in \sq, the image and changes files are modified, so you need to make sure that they are writable.
-Always keep these two files together.
-Never edit them directly with a text editor, as \sq uses them to store the objects you work with and to log the changes you make to the source code.
-It is a good idea to keep a backup copy of the downloaded image and changes files so you can always start from a fresh image and reload your code.
+À medida que você trabalha com o \sq, os arquivos da imagem e de mudança serão modificados, de modo que você precisa garantir que eles tem permissões de escrita. Sempre os mantenha juntos e nunca os edite com um editor de texto, já que o \sq armazena os objetos que você está usando e as mudanças de código feito em um formato próprio. É sempre uma boa idéia manter uma cópia dos arquivos baixados para que você smpere seja capaz de começar com uma imagem nova e simplesmente recarregar seu código.
-The \emphind{sources} file and the VM can be read-only\,---\,they can be shared between different users.
-All of these files can be placed in the same directory, but it is also possible to put the Virtual Machine and sources file in separate directory where everyone has access to them.
-Do whatever works best for your style of working and your operating system.
+O arquivo \emphind{sources} e a VM podem ser somente-leitura\,---\,eles podem ser compartilhados entre usuários diferentes. Todos esses arquivos podem ser colocados no mesmo diretório, mas também é possível colocar a máquina virtual e o arquivo de fontes em diretórios separados onde todos possam acessá-los. Faça o que for melhor para o seu estilo de trabalho e sistema operacional.
-\sd{it would be really nice to have a setup and startup section on PC, Mac and Linux}
-\ab{I agree entirely; the reason that this is not here is because I could do only the Mac section. Damien can probably do Windoze. Perhaps we can ask on the list for a Linux volunteer?}
+\sd{seria interessante ter uma seção de instalação e inicialização para PC, MAC e Linux}
+\ab{eu concordo inteiramente, a razão pela qual não estão aqui é porque eu somente posso fazer a versão em Mac; Damien provavelmente pode fazer para o Windows, e talvez possamos pedir na lista um voluntário para Linux?}
%-----------------------------------------------------------------
\begin{figure}[htb]
% \centerline {\includegraphics[width=0.6\textwidth]{download}}
\centerline {\includegraphics[width=0.95\textwidth]{startup}}
-\caption{A fresh \sq image.\label{fig:startup}}
+\caption{Uma nova imagem \sq.\label{fig:startup}}
\end{figure}
-\index{launching Squeak}
-\paragraph{Launching.} To start \sq, do whatever your operating system expects: drag the \emph{.}\emphind{image} file onto the icon of the virtual machine, or double-click the \emph{.image} file, or at the command line type the name of the virtual machine followed by the path to the \emph{.image} file. (When you have multiple VMs installed on your machine the operating system may not automatically pick the right one; in this case it is safer to drag and drop the image onto the virtual machine, or to use the command line.)
+\index{Rodando o \sq}
+\paragraph{Rodando.} Para rodar o \sq, faça o que o seu sistema operacional espera: arraste o arquivo da imagem, cuja extensão é \emph{.}\emphind{image}, para sobre o ícone da máquina virtual; ou dê um duplo clique na imagem; ou ainda, na linha de comando, digite o nome do executável da máquina virtual seguido pelo nome do arquivo da imagem. (Quando você possui múltiplas máquinas virtuais instaladas na sua máuina, o seu sistema operacional pode não identificar corretamente a que você deseja usar; neste caso, é mais seguro arrastar e soltar a imagem sobre a máquina virtual ou usar a linha de comando.)
-Once \sq is running, you should see a single large window, possibly containing some open workspace windows (see \figref{startup}), and it's not obvious how to proceed! You will notice that there is no menu bar, or at least not a useful one. Instead, \sq makes heavy use of context-dependent pop-up menus.
+Uma vez que o \sq esteja rodando, você verá uma única janela, possivelmente contendo algumas janelas de trabalho dentro de si (veja \figref{startup}), e não é tão óbvio como proceder! Você notará que não há barra de \foreign{menu}, ou pelo menos não uma útil. Na verdade, o \sq faz uso pesado de \foreign{menus} contextuais.
-
-\dothis{Start \sq. You can dismiss any open workspaces by clicking on the {\sf X} in the top left corner of the workspace window. You can collapse the windows (so that they can be expanded again later) by clicking on the \raisebox{-0.2ex}{{\Large $\circ$}} in the top-right corner.}
+\dothis{Rode o \sq. Você pode fechar todas as janelas de trabalho abertas dentro do mesmo clicando no ícone de um {\sf X} no canto superior esquerdo das janelas. Você pode minimizar as janelas (de modo que possam ser maximizadas depois clicando no \raisebox{-0.2ex}{{\Large $\circ$}} no topo superior direito.}
%-----------------------------------------------------------------
-\paragraph{First Interaction.}
+\paragraph{Primeira interação.}
-A good place to get started is the \ind{world menu} shown in \figref{threeButtons:red}.
+Um bom lugar para começar é o menu principal, conhecido como \ind{\foreign{world menu}}, que você pode ver na \figref{threeButtons:red}.
-\dothis{Click with the mouse on the background of the main window to show the world menu, then choose \menu{open \ldots \go workspace} to create a new workspace.}
+\dothis{Clique com o \foreign{mouse} no fundo da janela principal para mostrar o \foreign{world menu}, e então escolha \menu{open \ldots \go workspace} para criar uma nova área de trabalho (\foreign{workspace}).}
\begin{figure}[tbh]
\centering
- \subfigure[The world menu]{\label{fig:threeButtons:red}%
+ \subfigure[O \foreign{word menu}]{\label{fig:threeButtons:red}%
\includegraphics[width=0.2\linewidth]{worldMenu}}\hfill
- \subfigure[The contextual menu]{\label{fig:threeButtons:yellow}%
+ \subfigure[O \foreign{menu} contextual]{\label{fig:threeButtons:yellow}%
\includegraphics[width=0.25\linewidth]{yellowButtonMenuOnWorkspace}}\hfill
- \subfigure[The morphic halo]{\label{fig:threeButtons:blue}%
+ \subfigure[O halo do \foreign{morphic}]{\label{fig:threeButtons:blue}%
\includegraphics[width=0.25\linewidth]{morphicHaloOnWorkspace}}% these braces needed (else no whitespace at end of line)
- \caption{The world menu (brought up by the red mouse button), a contextual menu (yellow mouse button), and a morphic \subind{Morphic}{halo} (blue mouse button).\label{fig:threeButtons}}
+ \caption{O \foreign{word menu}, invocado pelo botão vermelho; o \foreign{menu} contextual, invocado pelo botão amarelo; e um subind{Morphic}{halo} do \foreign{morphic}, invocado pelo botão azul.\label{fig:threeButtons}}
\end{figure}
\index{red button}
\index{yellow button}
@@ -128,72 +118,66 @@ A good place to get started is the \ind{world menu} shown in \figref{threeButton
% the placement {r} for right, and the width of the figure. Capital R will allow some float.
% Inside the wrapfig environment, linewidth is special --- the width of the figure.
\includegraphics[width=0.95\linewidth]{colouredMouse}
-\caption{The author's mouse. Clicking the scroll wheel activates the blue button.}
+\caption{O \foreign{mouse} do autor. O botão azul é ativado com um clique na \foreign{scroll wheel}.}
\label{fig:colouredMouse}
\end{wrapfigure}
-\sq was originally designed for a computer with a \ind{three button mouse}. If your mouse has fewer than three buttons, you will have to press extra keys while clicking the mouse to simulate the extra buttons. A two-button mouse works quite well with \sq, but if you have only a single-button mouse, you should seriously consider buying a two-button mouse with a clickable scroll wheel: it will make working with \sq much more pleasant.
-
-\sq avoids terms like ``left mouse click'' because different computers, mice, keyboards and personal configurations mean that different users will need to press different physical buttons to achieve the same effect. Instead, the mouse buttons are labeled with colors. The mouse button that you pressed to get the ``World'' menu is called the \emphind{red button}; it is most often used for selecting items in lists, selecting text, and selecting menu items.
-When you start using \sq, it can be surprisingly helpful to actually label your mouse, as shown in \figref{colouredMouse}.
+O \sq foi projetado para um computador com um \ind{\foreign{mouse} de três botões}. Se o seu \foreign{mouse} tem menos do que três botões você precisará usar teclas extras para simular os demais botões. Um \foreign{mouse} de dois botões funciona bem com o \sq, mas se você tem um \foreign{mouse} de botão único, você dever seriamente considerar a compra de um \foreign{mouse} de dois botões com uma \foreign{scroll wheel} clicável: isso vai tornar o trabalho com o \sq bem mais prazeroso.
-The \emphind{yellow button} is the next most used button; it is used to bring up a contextual menu, that is, a menu that offers different sets of actions depending on where the mouse is pointing; see \figref{threeButtons:yellow}.
+O \sq evita termos como ``botão esquerdo'' porque computadores diferentes possui configurações diferentes de modo que diferentes usuários terão que pressionar diferentes botões para atingir o mesmo efeito. Os botões de um \foreign{mouse} são então associados com cores. O botão que você usar para acessar o \foreign{world menu} é chamada de \emphind{botão vermelho}--é usado principalmente para selecionar itens em uma lista, selecionar textos e itens de menu. Quando você estiver usando o \sq pode ser interessante rotular literalmente o seu \foreign{mouse}, como mostrado na \figref{colouredMouse}.
+O \emphind{botão amarelo} é o segndo mais usado dos botões do \foreign{mouse}; é usado para chamar o \foreign{menu} contextual, isto é, um \foreign{menu} com um conjunto diferente de ações dependendo do objeto que está sendo clicado; veja a \figref{threeButtons:yellow}.
-\dothis{Type \ct{Time now} in the workspace.
-Now click the yellow button in the workspace.
-Select \menu{print it}.}
+\dothis{Digite \ct{Time now} na janela de trabalho.
+Depois disso, clique com o botão amarelo na janela e selecione \menu{print it}.}
-Finally, there is the \emphind{blue button}, which is used to activate the ``morphic \subind{Morphic}{halo}'', an array of handles that are used to perform operations on the on-screen objects themselves, such as rotating them or resizing them; see \figref{threeButtons:blue}.
-If you let the mouse linger over a handle, a help balloon will explain its function.
+Finalmente, há o \emphind{botão azul}, que é usado para ativar o ``\subind{Morphic}{halo}''. O halo é um conjunto de ícones que aparecem ao redor de um objeto selecionado e são usados para realizar operações sobre o mesmo como rotação e redimensionamento; veja a \figref{threeButtons:blue}. Se você parar o \foreign{mouse} sobre um dos ícones, você verá um dica sobre sua função.
-\dothis{Click the blue button on the workspace.
-Grab the \raisebox{-0.4ex}{\includegraphics[width=1em]{morphicRotate}} handle near the bottom left corner and drag it to rotate the workspace.}
+\dothis{Clique com o botão azul sobre a janela de trabalho.
+Segure o ícone \raisebox{-0.4ex}{\includegraphics[width=1em]{morphicRotate}} perto do canto inferior esquerdo e o arraste para rotacionar a janela.}
-We recommend that right-handed people configure their mouse to put the \ind{red button} on the left side of their mouse, the \ind{yellow button} on the right, and use a clickable scroll wheel, if one is available, for the blue button. If you don't have a clickable scroll wheel, then you can get the Morphic halo by holding down the \ct{alt} or \ct{option} key while clicking the \ind{red button}. If you are using a Macintosh without a second mouse button, you can simulate one by holding down the \clover{} key while clicking the mouse. However, if you are going to be using \sq at all often, we recommend investing in a mouse with at least two buttons.
+Nós recomendamos que pessoas canhotas cnfigurem seu \foreign{mouse} para colocar o \ind{botão vermelho} no lado esquerdo do \foreign{mouse}, o \ind{botão amarelo} no lado direito, e usem uma \foreign{scroll wheel} clicável, se houver uma, para o \ind{botão azul}. Se você não possui uma \foreign{scroll wheel}, você pode acessar o halo segurando a tecla \ct{alt} ou \ct{option} enquanto clica com o \ind{botão vermelho}. Se você está usando um Mac sem um segundo botão do mouse, você pode simular um segurando a tecla \clover{} enquanto clica. Entrentanto, se você vai usar o \sq freqüentemente, recomendamos que você invista em um \foreign{mouse} mais adequado.
-You can configure your mouse to work the way you want by using the preferences of your operating system and mouse driver.
-\sq has some preferences for customising the mouse and the meta keys on your keyboard. You can find the \ind{preference browser} in the \menu{open} item of the \menu{World} menu.
-In the preference browser, the \menu{general} category contains an option \menu{swapMouseButtons} that switches the yellow and blue functions (see \figref{prefBrowser}). The \menu{keyboard} category has options to duplicate the various command keys.
+Você pode configurar o seu \foreign{mouse} de maneira que desejar usando as preferências do seu sistema operacional e \foreign{driver} do \foreign{mouse}. O \sq também possui algumas preferências para customizar o \foreign{mouse} e as meta-teclas do seu teclado. Você pode mudar essas configurações no \foreign{\ind{preference browser}}\, que está acessível através do \foreign{menu} \menu{open} dentro do menu \menu{World}. Dentro do \foreign{preference browser}, a categoria \menu{general} contém uma opção chamada \menu{swapMouseButtons} que troca as funções dos botões amarelo e azul (veja a \figref{prefBrowser}). A categoria \menu{keyboard} contém opções para duplicar as várias teclas de comando.
-\dothis{Open the preference browser and find the \menu{swapMouseButtons} option using the search box.}
+\dothis{Abra o \foreign{preference browser} e encontre e opção \menu{swapMouseButtons} usando a caixa de busca.}
\begin{figure}[htb]
\ifluluelse
{\centerline {\includegraphics[width=\textwidth]{PreferenceBrowser}}}
{\centerline {\includegraphics[scale=0.7]{PreferenceBrowser}}}
-\caption{The Preference Browser.\label{fig:prefBrowser}}
+\caption{O \foreign{Preference Browser}.\label{fig:prefBrowser}}
\end{figure}
%=================================================================
-\section{The World menu}
+\section{O \foreign{menu} \foreign{World}}
\index{world menu}
-\dothis{Red-click again on the \sq background.}
-You will see the \menu{World} menu again.
-Most \sq menus are not modal; you can leave them on the screen for as long as you wish by clicking the push pin icon in the top-right corner. Do this. Also, notice that menus appear when you click the mouse, but do not disappear when you release it; they stay visible until you make a selection, or until you click outside of the menu. You can even move the menu around by grabbing its title bar.
+\dothis{Clique novamente com o botão vermelho em uma área vazia da janela do \sq.}
+Você verá o \foreign{menu} \menu{World} novamente.
+A maior parte dos \foreign{menus} do \sq não são modais, isto é, você pode deixá-los visíveis por quanto tempo quiser simplesmente clicando no ícone de alfinete no banco superior direito dos mesmos. Faça isso. Você notará que os \foreign{menus} aparecem quando você clica, mas não desaparecem quando você solta o \foreign{mouse}; eles permanecem visíveis até que você faça outra seleção, ou clique fora do \foreign{menu}. Você pode, inclusive, mover um \foreign{menu} segurando em sua barra de título.
-The world menu provides you a simple means to access many of the tools that \sq offers.
+O \foreign{menu} \menu{World} lhe oferece uma maneira simples de acessar muitas das ferramentas que o \sq oferece.
-\dothis{Have a closer look at the \menu{world\go{}open \ldots} menu.}
-You will see a list of several of the core tools in \sq, including the system browser (one of many available class browsers) and the workspace.
-We will encounter most of them in the coming chapters.
+\dothis{Olhe as opções oferecidas pelo \foreign{menu} \menu{world\go{}open \ldots}.}
+Você verá uma lista de várias das principais ferramentas em \sq, incluindo o \foreign{system browser}, a ferramenta que permite navegar entre as classes do \sq, e o \foreign{workspace}, ou seja, a janela de trabalho.
+Você encontrará a maioria dessas ferramentas nos capítulos adiante.
\begin{figure}[htb]
\ifluluelse
%{\centerline {\includegraphics[width=0.3\textwidth]{OpenMenu}}}
{\centerline {\includegraphics[scale=0.5]{OpenMenu}}}
{\centerline {\includegraphics[scale=0.7]{OpenMenu}}}
-\caption{The \menu{open \ldots} dialogue of the world menu.\label{fig:openmenu}}
+\caption{O \foreign{menu} \menu{open \ldots} dentro do \foreign{menu} \menu{World}.\label{fig:openmenu}}
\end{figure}
%=================================================================
-\section{Saving, quitting and restarting a \sq session}
+\section{Salvando, saindo e voltando a uma sessão \sq}
-\dothis{Bring up the world menu.
-Now select \menu{new morph \ldots} and navigate to \menu{from alphabetical list{\go}A-C{\go}BlobMorph}.
-You now have a blob ``in hand''.
-Put the blob down (by red-clicking) somewhere. It will start to move.}
+\dothis{Abra o \foreign{menu} \menu{World}.
+Agora selecione o \foreign{menu} \menu{new morph \ldots} e navegue até o \foreign{menu} \menu{from alphabetical list{\go}A-C{\go}BlobMorph}.
+Agora você tem um ``blob'' em mãos.
+Solte o ``blob'' em algum lugar, clicando com o botão vermelho. Ele começará a se mover.}
\index{Morphic}
\begin{figure}[htb]
@@ -201,50 +185,42 @@ Put the blob down (by red-clicking) somewhere. It will start to move.}
\ifluluelse
{\centerline{\includegraphics[scale=0.5]{Blob}}}
{\centerline{\includegraphics[scale=0.7]{Blob}}}
- \caption{An instance of \lct{BlobMorph}.\label{fig:blob}}
+ \caption{Uma instância de um \lct{BlobMorph}.\label{fig:blob}}
\end{minipage}
\hfill
\begin{minipage}[b]{0.48\textwidth}
\ifluluelse
{\centerline {\includegraphics[scale=0.5]{saveAs}}}
{\centerline {\includegraphics[scale=0.7]{saveAs}}}
- \caption{The \menu{save as \ldots} dialogue.\label{fig:saveas}}
+ \caption{A caixa de diálogo \menu{save as \ldots}.\label{fig:saveas}}
\end{minipage}
\end{figure}
-\dothis{Select \menu{World\go{}save as \ldots}, and enter the name ``SBE''.
-Now click on the \menu{Accept(s)} button.
-Now select \menu{World\go{}save and quit}.}
+\dothis{Selecione o \foreign{menu} \menu{World\go{}save as \ldots}, e digite o nome ``SBE''.
+Depois clique no botão \menu{Accept(s)}.
+E então, selecione \menu{World\go{}save and quit}.}
-Now if you go to the location where the original image and changes files were, you will find two new files called ``SBE.\ind{image}'' and ``SBE.\ind{changes}'' that represent the working state of the \sq image at the moment before you told \sq to \menu{save and quit}.
-If you wish, you can move these two files anywhere that you like on your disk, but if you do so you may (depending on your operating system) need to also move, copy or link to the virtual machine and the \emph{.source} file.
+Se você for agora para o local onde a imagem e arquivo de mudança originais estavam, você verá que há dois novos arquivos lá, chamados``SBE.\ind{image}'' e ``SBE.\ind{changes}'', que representam o estado operacional da imagem \sq até o momento em que você executou \menu{save and quit}. Se você quiser, você pode mover esses arquivos para qualquer outro local conveniente do seu disco, embora, dependendo do seu sistema operacional, você também tenha que mover, copiar ou pelo menos criar um \foreign{link} simbólico para a máquina virtual e o arquivos \emph{.source} associado.
-\dothis{Start up \sq from the newly created ``SBE.image'' file.}
+\dothis{Inicie o \sq com a recém-criada imagem ``SBE.image''.}
-Now you should find yourself in precisely the state you were when you quit \sq. The blob is there again and it continues to move from where it was when you left it.
+Agora você verá que o sistema se encontra precisamente no estado em que você o deixou quando saiu do \sq. O ``blob'' ainda está lá e continua a se mover da posição em que você o deixou.
-When you start \sq for the first time, the \sq \ind{virtual machine} loads the image file that you provide. This file contains a snapshot of a large number of objects, including a vast amount of pre-existing code and a large number of programming tools (all of which are objects). As you work with \sq, you will send messages to these objects, you will create new objects, and some of these objects will die and their memory will be reclaimed (\ie garbage-collected).
+Quanto você inicia o \sq pela primeira vez, a \ind{máquina virtual} carrega a imagem que você especifica. O arquivo contém um \foreign{snapshot} (um ``retrato'', por assim dizer) de um grande número de objetos, incluindo uma enorme quantidade de código pré-existente e um grande número de ferramentas de programação (todas sendo objetos também). Enquanto você trabalha com o \sq, você enviará mensagens para esses objetos, e isso criará novos objetos, enquanto outros morrerão e terão o espaço que ocupavam devolvido ao sistema (isso é, serão coletados dentro o processo conhecido como \foreign{garbage-collection}).
-When you quit \sq, you will normally save a snapshot that contains all of your objects. If you save normally, you will overwrite your old image file with the new snapshot. Alternatively you may save the image under a new name, as we just did.
+Quanto você fecha o \sq, você normalmente salva o estado de todos os seus objetos. Se você salva normalmente, você sobrescreverá a sua imagem antiga com um novo \foreign{snapshot}. Alternativamente, você pode salvar a imagem com um novo nome, como fizemos.
-In addition to the \emph{.image} file, there is also a \emph{.changes} file.
-This file contains a log of all the changes to the source code that you have made using the standard tools.
-Most of the time you do not need to worry about this file at all.
-As we shall see, however, the \emph{.changes} file can be very useful for recovering from errors, or replaying lost changes.
-More about this later!
+Em adição ao arquivo \emph{.image}, há também o arquivo \emph{.changes}. Este arquivo contém um \foreign{log} de todas as mudanças feitas no código fonte usando as ferramentas de programação do \sq. Na maioria das vezes, você não precisa de preocupar com esse arquivo, somente em mantê-lo junto com a imagem. Nós veremos mais tarde, entretanto, que esse arquivo pode ser bem útil para a recuperação de erros ou de mudanás perdidas.
-The image that you have been working with is a descendant of the original \st-80 image created in the late 1970s.
-Some of these objects have been around for decades!
+A imagem com a qual você esteve trabalhando até o momento descende da imagem original criada para o \st-80 no fim dos anos 70. Alguns dos objetos na mesma estão instanciadas há décadas!
-You might think that the image is the key mechanism for storing and managing software projects, but you would be wrong.
-As we shall see very soon, there are much better tools for managing code and sharing software developed by teams.
-Images are very useful, but you should learn to be very cavalier about creating and throwing away images, since tools like Monticello offer much better ways to manage versions and share code amongst developers.
+Você pode estar pensando que a imagem é o principal mecanismo para armazenar e gerenciar projetos em \sq, mas isso não é inteiramente correto. Veremos em breve que há outras ferramentas úteis para gerenciar e compartilhar código entre projetos desenvolvidos em time. Imagens são bem úteis, mas é necessário considerar que imagens são grandes, auto-contidas e você deve ficar bem tranqüilo quanto a descartá-las e criá-las novamente quando necessário já que ferramentas como o Monticello oferecem meios melhores de gerenciar versões e compartilhar código entre desenvolvedores.
-\dothis{Blue-click on the Blob.}
-You will see a collection of colored dots that are collectively called the blob's morphic \subind{Morphic}{halo}.
-Each dot is called a \emph{handle}.
-Click in the pink handle containing the cross; the blob should go away.
-(You may have to try several times as the Blob squirms around and tries to get away from the mouse.)
+\dothis{Clique no ``blob'' com o botão azul.}
+Você verá uma coleção de pontos coloridos que são coletivamente chamados de \subind{Morphic}{halo}.
+Cada um deles é um \foreign{\emph{handle}}, aqui referenciados simplesmente como ícones.
+Clique no ícone rosa que contém uma cruz e o ``blob'' será destruído.
+(Você provavelmente vai ter que tentar várias vezes até conseguir já que o ``blob'' pode tentar se safar do \foreign{mouse}).
\begin{figure}[htb]
\ifluluelse |