Re: Need widget help... [message #5442] |
Mon, 18 December 1995 00:00 |
James Tappin
Messages: 54 Registered: December 1995
|
Member |
|
|
newman@vulcan1.es.hac.com (Art Newman ) wrote:
> What does it mean when XMANAGER complains about
> "... array length of zero not allowed..."?
>
> I try to run my [previously working] widget program,
> and when I button click inside a widget I get the error
> message above. If, however, I mouse click a different
> button first, then I can button click the first one
> without error.
>
> Am I making a common mistake?
[.SIG removed]
Probably not a common one but not unknown. I don't know why the particular
error message arises, but I eventually traced it to a homemade compound widget
which was returning a WIDGET_BUTTON structure but with an INT instead of a LONG
in the SELECT field. If the first menu in an XMANAGER invokation did not
contain the offending widget there was not problem, but if it did, there was a
problem with a button press (even if the first button pressed was not part of
the offending compound).
The solution was to rename the event structure returned as CW_TBUTTON (in this
case) as it turned out that even when I fixed the SELECT length the problem
continued. So I guess the key thing is that you may be re-defining an event
structure in a compond widget.
--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
|
|
|