comp.lang.ada
 help / color / mirror / Atom feed
From: "Michael Quinn" <mtquinn@hom.net>
Subject: Re: ObjectAda & Menus
Date: 1997/04/29
Date: 1997-04-29T00:00:00+00:00	[thread overview]
Message-ID: <01bc54cb$a60c27c0$7774d8cc@fatman> (raw)
In-Reply-To: 336628FF.39F39EB7@hiway.net



I have used the GUI builder tool to generate a menus.   You probably failed
to pass the name of your resource file to the linker.  In ObjectAda IDE see
Projects/Settings - LINK tab.    

Try the following example:

Open a new GUI project.  
Click on the menu editor.

In Caption enter "File"
In Name enter "m_file"
Level should = 0
Click on Next

In Caption enter "Open"
In Name enter "m_open"
set Level = 1
Click on Next

In Caption enter "Help"
In Name enter "m_help"
set Level = 0
Click on Next


In Caption enter "About"
In Name enter "m_about"
set Level = 1
Click on OK

File and Help should now appear on your GUI Form.

Click on "File" and the "Open" item appears.  Click on Open  and the GUI
builder editor appears with the code stub for m_open_Selected.  Add a
msgbox call to the method.

procedure m_open_Selected is
begin
  MsgBox("Open - Selected")
end m_open_selected;

Back at your GUI form click on "Help" and your "About" menu item.  Add
another message box to the procedure stub.

Save your GUI project and Create an ObjectAda project.  Include the
following files in your objectAda project file list.   

public.ada, window1.ada, 

When you save your GUI project the GUI builder creates a file: Project1.RES
 (default name, named after project.)

YOU MUST LET THE LINKER KNOW THAT PROJECT1.RES EXISTS.  

In ObjectAda IDE go to Project/Settings and go to the LINK tab.  In the
"Pass to Linker" field enter "e:\<your project path>\project1.res".  

The menu will not appear if you fail to pass the resource name to the
linker.


Michael Quinn d.b.a Caitisys
mtquinn@hom.net


Philip Johnson <philipj@hiway.net> wrote in article
<336628FF.39F39EB7@hiway.net>...
> Mark & Zurima McKinney wrote:
> 
> > Marin David Condic, 561.796.8997, M/S 731-93 wrote:
> > >     Is there anyone out there with experience in using the
> > ObjectAda
> > >     GUI-Builder to build a program with menus in it?
> > When I checked out ObjectAda I noticed that most of the graphical
> > objects
> > are in the generated code from the gui builder. However the menus
> > were not.
> > They were in the resource file along with a few other things. The
> > resource
> > file is used to store data that describes dialog boxes menus etc.
> > There is
> > an external tool called a resource compiler that converts this into
> > a linkable
> > file with the extension of .rbj. Somewhere in the linker options,
> > (I'm sorry I
> > can't be more specific I was transfered right after I evaluated it.)
> > you can add
> > the resource file. Check the sample windows program files to see
> > where to add
> > the option.
> > Hopefully this limited information will help.
> > MArk D. McKinney.
> 
> David,
> 
> Mark is correct.  You must compile the menu resource file with the
> resource compiler
> (rc) found in the ObjectAda\bin directory.  There is an RC.hlp file
> located there also
> that will give you all the rc info you need.  If I remember the
> GUIbuilder tutorial does
> mention the need to compile menues with the resource compiler.
> Unfortunately,  the
> GUIbuilder help page did not have this included.  I hope this oversight
> will be corrected
> in the 7.1 release.
> 
> Phil
> ----
>  ________________________________________________
> |
> |
> |               Ceilidh [Kay Lee] gaelic: A gathering of
> friends            |
> |
> |
> |Philip Johnson                                      Telco: (205)
> 830-9663   |
> |Sr. Software Engineer                      email:philipj@HIWAAY.net|
> |Ceilidh Systems
> Inc.                                                                   |
> 
> |Madison, AL
> 35758                                                                  |
> 
>  -----------------------------------------------------------------
> 




      reply	other threads:[~1997-04-29  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-23  0:00 ObjectAda & Menus Marin David Condic, 561.796.8997, M/S 731-93
1997-04-24  0:00 ` Mark & Zurima McKinney
1997-04-29  0:00   ` Philip Johnson
1997-04-29  0:00     ` Michael Quinn [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox