The purpose for How To use the Class Designer is to cover some simple
ideas like creating your first project, creating a simple Hello World
Form that will be used in other How To Class Designer. I will also
explain where to go for more details in the Dabo Documentation and Wiki
for more details. I will also list in the section call "Key Points" that
will contain important ideas that will be covered in this How To.
******** KEY POINTS **
Four primary design windows
Trace-Back
Sizers
RegID
******** CREATE PROJECT DIRECTORY **
When using the Dabo Class Designer for any size application it would be
nice to have Dabo create the project directory and all sub directories.
The Dabo has a python command dabo.quickStart(ProjectName) will create
your primary project directory and all the sub-directories biz, db,
reports, resources, test and ui. The ProjectName will be the name of the
project directory name. For more explanation go to Dabo site and select
Documentation then Tutorial and select the Step-By-Step Guide to Dabo
Programming by Ed Leafe and read Chapter 2: Getting Started.
Linux ------------------------------------------------------------------
Start by running your terminal. Use the linux cd command to move to the
directory you want to create your project directory then type in your
terminal:
mkdir temp
cd temp
python
import dabo
dabo.quickStart("HelloWorld")
Mac --------------------------------------------------------------------
+++++ Dabo-Mac-User Can Someone fill what is need for the Mac.
Windows ----------------------------------------------------------------
+++++ Dabo-Window-User Can Someone fill what is need for the Window.
------------------------------------------------------------------------
******** CREATE START-UP CLASS DESIGNER SCRIPT **
To making it easy to use the Dabo Class Designer, we will create a
simple start-up script in your project directory HelloWorld. From then
on all you need to do is click on the script to fire up the Dabo Class
Designer with out having to use the terminal directly.
Linux ------------------------------------------------------------------
Use any text editor and enter the text below and save it in the
HelloWord directory under "My Hello World" in plain text with no
extension.
export PYTHONPATH=$HOME/temp/HelloWorld
cd $HOME/temp/HelloWorld
$HOME/src/dabo/ide/ClassDesigner.py ui/HelloWorld.cdxml
Mac --------------------------------------------------------------------
+++++ Dabo-Mac-User Can Someone fill what is need for the Mac.
Windows ----------------------------------------------------------------
+++++ Dabo-Window-User Can Someone fill what is need for the Window.
------------------------------------------------------------------------
******** RUN CLASS DESIGNER SCRIPT **
Exit out of your text editor and make sure you are in the HelloWorld
Directory. You will see two files main.py and My Hello World and all the
sub-directories: biz, db, reports, resources, test and ui. In the
Step-By-Step Guide to Dabo Programming by Ed Leafe "Define Dabo Terms"
will give you a little idea on the terminology, but keep in mind that we
will not be talking about database interface at this time.
The first thing we need to do is use your Gui File manger and go into
the HelloWorld directory and click on My Hello World script.
Linux ------------------------------------------------------------------
In Ubuntu gnome you will be ask in a dialog to select one of four
buttons which are: Run Terminal, Display, Cancel and Run. Display will
bring up the text editor that will contain the script My Hello World.
What you want to do is select the button "Run in Terminal".
Mac --------------------------------------------------------------------
+++++ Dabo-Mac-User Can Someone fill what is need for the Mac.
Windows ----------------------------------------------------------------
+++++ Dabo-Window-User Can Someone fill what is need for the Window.
------------------------------------------------------------------------
Because we have not create the HelloWorld project you get a dialog the
will say "File Not Found" ui/HelloWorld.cdxml does not exist. Create
it? Select Yes.
The dialog "New Class" will appear. Form should be selected in the
class to create and Use Sizers plus Add Base Panel should be checked.
Click Ok to create a blank Form. You will have four windows which are:
Terminal, Dabo Class Designer, Object info and Editor.
Select the "Dabo Class Designer" window and click in the center of the
Dabo Class Designer and in the status bar below you will see Selected
Object: LayoutPanel. Right click on the center area to bring up a menu
and select "Display Controls" -> Add Panel and selected.
Select the "Object Info" Window and bellow the menu and to the right
select the pull down arrow and select the top item DesForm. In the
Caption field enter "My First Dabo Hello World". The Dabo Class
Designer" window title has changed to "My First Dabo Hello World"
window. Select "My First Dabo Hello World" window and the select File ->
Save to save all your changes. Know let us run your form by Selecting
File -> Run. You just created a simple My First Dabo Hello World demo.
If you select the menu and move your curse over a menu item you will see
the status bar will display a message about each menu item for you. In
our series of Ho To Class Designer we will go over how you can simply
customize your menu. Select File -> Quit to exit your demo.
Select the "Object Info" window and select File -> Save. All three
windows have the same menus and can be used in the Class Designer know
called "My First Dabo Hello World", "Object Info" or Editor windows. In
the "Object Info" window select File -> Quit to exit and all four
windows will be closed.
Open up the main.py file in a text editor. Change the line that defines
the MainFormClass:
app.MainFormClass = dabo.ui.dFormMain
TO:
app.MainFormClass = "HelloWorld.cdxml"
** PROBLEM *** PROBLEM ***************************** I Had to stop here
The problem I am having is in Ubuntu 8.04 when I click on main.py and
then select run or run in terminal NO WINDOW is being displayed. If I
run the terminal in the HelloWorld Directory I can run the main by
typing:
python main.py
But for a customer that would not be a option! So what I could do is
create another script called run Hello World that would have in the
script:
export PYTHONPATH=$HOME/temp/HelloWorld
cd $HOME/temp/HelloWorld
python main.py
My Quiestion is there a simpler way that I can include in this How To?
Bob
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/1233178243.6396.101.ca...@sysero-rkm-laptop