comp.lang.ada
 help / color / mirror / Atom feed
* Visibility rules and package names
@ 2004-10-16 20:26 Jacob Sparre Andersen
  2004-10-17  0:30 ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Sparre Andersen @ 2004-10-16 20:26 UTC (permalink / raw)


When I started thinking about structuring the GUI code for a project I
am working on, I quickly came to a point where I had the following
piece of code:

   package Project_Name is
      type Data_Type is null record;
   end Project_Name;

   package GtkAda is
   end GtkAda;

   package GtkAda.Project_Name is
   end GtkAda.Project_Name;

   with Project_Name;
   package GtkAda.Project_Name.Specialized_Widget is
      use type Project_Name.Data_Type;               -- Problem!
   end GtkAda.Project_Name.Specialized_Widget;

Since "Project_Name" refers to "GtkAda.Project_Name" in child packages
of "GtkAda.Project_Name" this will not compile.

Is there a way to refer to package "Project_Name" inside children of
"GtkAda.Project_Name"?  Or will I have to rename one of the packages
"GtkAda.Project_Name" and "Project_Name"?

Jacob
-- 
"[...] *transfer* a bit of salary from the person who writes
 a bug to the person that finds a bug..." -- Keith Ray




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-17  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-16 20:26 Visibility rules and package names Jacob Sparre Andersen
2004-10-17  0:30 ` Stephen Leake

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