How to get the label from a Menu_Item?

View: New views
1 Messages — Rating Filter:   Alert me  

How to get the label from a Menu_Item?

by Scott.Loyd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi all,

 

How do I properly get the label contained by a menu_item?  Here is my code:

 

procedure Menu_Handler(Object : access Gtk_Menu_Item_Record'Class) is

            Child : Gtk_Widget;

            Label : Gtk_Label;

begin

Child := Get_Child(Object);

Label := Gtk_Label(Child);

end Menu_Handler;

 

This compiles fine but when it gets to the line where Label is assigned to I get a tag check exception.  Any ideas?

 

Scott

 


_______________________________________________
gtkada mailing list
gtkada@...
http://lists.adacore.com/mailman/listinfo/gtkada
LightInTheBox - Buy quality products at wholesale price