[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Typing in a widget_text crashes my C program!

Jason Weiss (weiss@astro.ucla.edu) writes:

> Actually, I'm experiencing these problems with no event handling.  I've been
> able to reproduce the crash with the following simple code:
>   pro make_it_crash
>     base=widget_base(/col)
>     text=widget_text(base, /editable)
>     widget_control, base, /realize
>   end
> Thinking event handling could alleviate the problem, i added
>   pro text_event, event
>   end
> and
>     xmanager, 'text', text, /just_reg, /no_block
> to my program, and it still crashed...
> without you guys knowing the particulars of the C-code or perhaps the PCI
> driver, I don't expect a solution.  But info as to what IDL is doing when
> you type into a text box would be a good starting point for me...

Well, now I'm thinking the problem is LACK of
event handling. The JUST_REG keyword you set
on the XManager command is causing the program
to simply register itself. It is not generating
events, I don't think. But I guess there might
be some kind of communication going on between
the window manager and the XManager program.

Something like, "Hey, an event occurred."

"I know, but I'm not on the clock yet."

That kind of thing. 

Try taking that JUST_REG keyword away, and see
if things work correctly with proper event passing.

I originally thought the text widget event was
getting into whatever event handler it was that
was calling your C program. But, of course, it's
all guess work without some code. :-)


David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155