From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: have to use unrestricted access but just what about access
Date: Thu, 20 Jun 2002 00:32:50 +0100
Date: 2002-06-20T00:32:50+01:00 [thread overview]
Message-ID: <0x8Q8.6779$ZP1.1263481@news11-gui.server.ntli.net> (raw)
Hi,
How can the unrestricted_access attribute be replaced by just access in the
following code?
procedure on_create (window : in out dot_window) is
begin
...
-- watcher is a task which uses key_coordinator
-- (a protected object) to record certain keypresses
-- which another task retrieves and does it's thing
-- with.
--
Window.Watcher
:= new Dot_Key_Watcher.Watcher
(Window.Key_Coordinator'Unrestricted_Access);
...
end on_create;
-- this is the window where watcher and key_coordinator live.
--
type Dot_Window
is new Gwindows.Windows.Main.Main_Window_Type
with record
Drawing_Surface : Gwindows.Drawing_Panels.Drawing_Panel_Type;
Key_Coordinator : aliased Dot_Key_Coor.Coordinator;
Watcher : Dot_Key_Watcher.Watcher_Access;
Builder : Dot_Builder.Builder_Access;
end record;
I understand what is meant by "non-local pointer cannot point to local
object" in the case of 'access I just can't think of a way to fix it.
It's really just curiosity, (the code is limited to GNAT anyway!) it'd just
be nice to find out a more general solution since this problem could arise
elsewhere.
Chris
next reply other threads:[~2002-06-19 23:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-19 23:32 chris.danx [this message]
2002-06-20 8:41 ` have to use unrestricted access but just what about access chris.danx
2002-06-20 12:10 ` SteveD
2002-06-20 14:22 ` Robert A Duff
2002-06-21 11:45 ` Robert Dewar
2002-06-22 0:49 ` Robert A Duff
2002-06-22 1:05 ` Ted Dennison
2002-06-22 12:09 ` Robert Dewar
2002-07-20 4:59 ` Craig Carey
2002-07-20 17:47 ` Robert A Duff
2002-07-21 8:45 ` Craig Carey
2002-06-20 16:05 ` Robert Dewar
2002-06-20 17:11 ` chris.danx
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox