comp.lang.ada
 help / color / mirror / Atom feed
* Problem with access types using Booch components.
@ 2003-02-11 18:21 Jano
  2003-02-11 18:49 ` Jano
  2003-02-11 20:42 ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: Jano @ 2003-02-11 18:21 UTC (permalink / raw)


Hello, I'm trying to use these and I've come across this problem.

Say I have a Collection type completely instantiated:

subtype Collection_x is Abstract_x_collections.Collection;

and I define

type Collection_x_access is access all Collection_x;

Now I have a

C: Collection_x;
C_access: Collection_x_access:= C'access;

All works well until I try to create an iterator:

first try:
it: Iterator:= New_iterator(C_access.all); <-- it raises tag error
inside some booch source.

second try:
it: Iterator:= New_iterator(Collection_x(C_access.all)); <-- same as
above.

third try:
C_bis: Collection_x:= C_access.all;
it: Iterator:= New_iterator(C_bis); <-- It works!!

I would go with the first option.

I'm 99% sure that I'm calling the proper functions in the proper
packages, but if anyone demands it, I can post a more detailed example
with actual code.

What's happening??

(In a side note, in the first of the three calls, if I replace
C_access.all by
 C_access (yes!), Gnat compiles without complaint...)

Regards,

Alex.



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

end of thread, other threads:[~2003-02-13 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 18:21 Problem with access types using Booch components Jano
2003-02-11 18:49 ` Jano
2003-02-11 20:42 ` Simon Wright
2003-02-11 22:46   ` Jano
2003-02-12  9:06     ` Jano
2003-02-12 21:57       ` Simon Wright
2003-02-13 19:07         ` Jano

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