Toolbars Currently only predefined icons are supported. Further experimentation with user defined images can proceed when the Image List package is done. Improper Context Exception - Compiler Bug? Using the following code to extract button text caused an improper context exception to be raised when GetButtonText was implemented as a function call. Changing it to a procedure call would solve the problem. This happened at the return statement. function ButtonTextOf(Control : Controls; Mode : Modes) return Wide_String is Str1 : Wide_String(1 .. 1) := (others => ' '); Length : natural; begin GetButtonText(Control, Mode, Str1, Length); if Length = 0 then return ""; end if; BLOCK : declare Text : Wide_String(1 .. Length) := (others => ' '); begin GetButtonText(Control, Mode, Text, Length); OS.MsgBoxes.Info("IMPROPER CONTEXT", "EXCEPTION RAISED HERE"); return Text; end BLOCK; end ButtonTextOf; The routine worked as expected as long as the current button text remained unchanged. Using the routine after a call to SetButtonText caused another improper context exception being raised at the return statement of the block. The value of Text was shown to be correct while in the debugging mode. Implementing ButtonTextOf as a procedure did not solve the problem this time. However when a call to OS.MsgBoxes.Info was made, the problem went away and returning the correct value Text. GetButtonInfo was used to get around this anomaly. Back To Home |