* TASH and gcc-3.2 -- no selector Obj for type Tash_List ...
@ 2003-01-19 11:48 Eric G. Miller
2003-01-19 16:04 ` Pascal Obry
2003-01-21 5:45 ` Simon Wright
0 siblings, 2 replies; 5+ messages in thread
From: Eric G. Miller @ 2003-01-19 11:48 UTC (permalink / raw)
Anyone had success compiling TASH 8.3.2 with GNAT/gcc-3.2? I guess this
must be a compiler problem and not a problem with TASH ...
gcc-3.2 -c -I../src -I/usr/include/tcl8.3 -g -O2 -gnatnU tash-arrays.adb
tash-arrays.adb:701:24: error: no selector "Obj" for type "Tash_List"
defined at tash-lists.ads:81
tash-arrays.adb:759:22: error: no selector "Obj" for type "Tash_List"
defined at tash-lists.ads:81
etc...
<tash.ads>
...
type Tash_Object is abstract tagged private;
...
private
type Tash_Object is abstract new Ada.Finalization.Controlled with
record
Obj : Tcl.Tcl_Obj;
end record;
...
<tash-lists.ads>
...
type Tash_List is new Tash.Tash_Object with null record;
...
<tash-arrays.adb>
...
procedure Set_Element (
TArray : in out Tash_Array;
Index : in String;
Value : in Tash.Lists.Tash_List) is
...
Listv(2) := Value.Obj;
...
Well, a Tash_List is a new Tash_Object which has a private member Obj
which should be visible in child packages of Tash...
Did I miss anything?
--
echo ">gra.fcw@2ztr< eryyvZ .T pveR" | rot13 | reverse
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TASH and gcc-3.2 -- no selector Obj for type Tash_List ...
2003-01-19 11:48 TASH and gcc-3.2 -- no selector Obj for type Tash_List Eric G. Miller
@ 2003-01-19 16:04 ` Pascal Obry
2003-01-20 0:19 ` Eric G. Miller
2003-01-21 5:45 ` Simon Wright
1 sibling, 1 reply; 5+ messages in thread
From: Pascal Obry @ 2003-01-19 16:04 UTC (permalink / raw)
"Eric G. Miller" <felix@calico.local> writes:
> <tash.ads>
> ...
> type Tash_Object is abstract tagged private;
> ...
> private
>
> type Tash_Object is abstract new Ada.Finalization.Controlled with
> record
> Obj : Tcl.Tcl_Obj;
> end record;
> ...
>
> <tash-lists.ads>
> ...
> type Tash_List is new Tash.Tash_Object with null record;
> ...
>
> <tash-arrays.adb>
> ...
> procedure Set_Element (
> TArray : in out Tash_Array;
> Index : in String;
> Value : in Tash.Lists.Tash_List) is
> ...
> Listv(2) := Value.Obj;
> ...
>
> Well, a Tash_List is a new Tash_Object which has a private member Obj
> which should be visible in child packages of Tash...
>
> Did I miss anything?
Obj is not visible from child package TASH.Arrays. So Set_Element can't
access it.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TASH and gcc-3.2 -- no selector Obj for type Tash_List ...
2003-01-19 16:04 ` Pascal Obry
@ 2003-01-20 0:19 ` Eric G. Miller
2003-01-20 6:03 ` Eric G. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Eric G. Miller @ 2003-01-20 0:19 UTC (permalink / raw)
In article <uhec586th.fsf@wanadoo.fr>, Pascal Obry wrote:
>> Well, a Tash_List is a new Tash_Object which has a private member Obj
>> which should be visible in child packages of Tash...
>>
>> Did I miss anything?
>
> Obj is not visible from child package TASH.Arrays. So Set_Element can't
> access it.
Errm, Is this because Tash.Arrays is a child of Tash, not Tash.Lists?
I have changed tash-arrays.adb to "with" both Tash and Tash.Lists
explicitly w/ no change.
Hmm, is this a correct "cast":
Listv(2) := List_Object'Class(Value).Obj;
It seems to move the compilation on... I didn't figure you could cast to
an abstract class object... But, I still get a bunch of elaboration
errors and "may raise Program_Error" warnings. Doesn't exactly make me
confident that the package would work even if it did compile...
I thought others were using this Tcl/Tk binding. For instace, that A#
announcement I've seen here...
--
echo ">gra.fcw@2ztr< eryyvZ .T pveR" | rot13 | reverse
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TASH and gcc-3.2 -- no selector Obj for type Tash_List ...
2003-01-20 0:19 ` Eric G. Miller
@ 2003-01-20 6:03 ` Eric G. Miller
0 siblings, 0 replies; 5+ messages in thread
From: Eric G. Miller @ 2003-01-20 6:03 UTC (permalink / raw)
Well, it seems TASH isn't really maintained anymore? But, I was able to
compile the sources after some small changes. It doesn't pass all of
it's unit tests. I tried to find a way to submit changes
to the author but there doesn't seem to be any direct route and the
mailling list listserv@adatcl.com is defunct.
I have a diff if anyone is interested (decode below for address).
--
echo ">gra.fcw@2ztr< eryyvZ .T pveR" | rot13 | reverse
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TASH and gcc-3.2 -- no selector Obj for type Tash_List ...
2003-01-19 11:48 TASH and gcc-3.2 -- no selector Obj for type Tash_List Eric G. Miller
2003-01-19 16:04 ` Pascal Obry
@ 2003-01-21 5:45 ` Simon Wright
1 sibling, 0 replies; 5+ messages in thread
From: Simon Wright @ 2003-01-21 5:45 UTC (permalink / raw)
"Eric G. Miller" <felix@calico.local> writes:
> Anyone had success compiling TASH 8.3.2 with GNAT/gcc-3.2? I guess
> this must be a compiler problem and not a problem with TASH ...
I think you are right. And the same failure occurs with 3.3
20021130. I tried the code with ObjectAda .. no complaints.
This patch gets tash-arrays.adb to compile, similar patches on the
other files ..
--- tash-arrays.adb 2003/01/21 05:31:18 1.1
+++ tash-arrays.adb 2003/01/21 05:31:54
@@ -698,7 +698,7 @@
-- Create a Tcl list to hold the index and value
------------------------------------------------
Listv(1) := Tash.To_Tcl_Obj (Index);
- Listv(2) := Value.Obj;
+ Listv(2) := Tash_Object (Value).Obj;
ListObj := Tcl.Tcl_NewListObj (Objc => Listc, Objv => Listv);
Tcl.Tcl_IncrRefCount (ListObj);
Tcl.Tcl_DecrRefCount (Listv(1));
@@ -756,7 +756,7 @@
Objv(1) := Array_Cmd;
Objv(2) := Set_Option;
Objv(3) := TArray.Obj;
- Objv(4) := List.Obj;
+ Objv(4) := Tash_Object (List).Obj;
-- Set the array elements
-------------------------
There is a tash mailing list, tash@yahoogroups.com, and the web site
is http://www.adatcl.com/ .
I recently used TASH for a project, but the Ada didn't use any of the
new thick bindings .. just exported subprograms to the Tcl
environment, so no need to build the full TASH sources.
-S
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-01-21 5:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-19 11:48 TASH and gcc-3.2 -- no selector Obj for type Tash_List Eric G. Miller
2003-01-19 16:04 ` Pascal Obry
2003-01-20 0:19 ` Eric G. Miller
2003-01-20 6:03 ` Eric G. Miller
2003-01-21 5:45 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox