octave-maintainers
[Top][All Lists]
Advanced

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

Re: Edit-Grid doesn't work


From: Rik
Subject: Re: Edit-Grid doesn't work
Date: Tue, 29 Jul 2014 07:53:48 -0700

On 07/29/2014 01:05 AM, Andreas Weber wrote:
> Am 29.07.2014 09:06, schrieb Rik:
>> On 07/28/2014 10:58 PM, Andreas Weber wrote:
>>> Am 29.07.2014 05:41, schrieb Rik:
>>>> On 07/28/2014 09:01 AM, address@hidden wrote:
>>>> I remarked on this before as well.  You can get it to work by causing
>>>> the event loop to run.  For example, if you return to the command window
>>>> and hit <RETURN> the grid will appear.  We need to use the same solution
>>>> that was used for the 'g'.  In this case, I just added a drawnow ()
>>>> command at the end of the grid_cb function in __add_default_menu__ and
>>>> it works correctly.
>>> Hi Rik, does this still not work correctly after changeset b2db129c664d?
>> It still didn't work.  I used the following test code
>>
>> plot (1:10)
>> Edit->Toggle grid on all axes
> This works for me (and always had). Which fltk version do you use? I
> have 1.3.2-5 in debian jessie.

I'm using version 1.3.0-5 in Linux Mint 13 (really Kubuntu 12.04 LTS).

>
>> I just added a drawnow call to get it to work.
> I hesitate to do this immediately because this may shadow the real
> problem. If you add
>
> +++ b/scripts/plot/util/private/__add_default_menu__.m  Tue Jul 29
> 09:46:24 2014
> @@ -97,6 +97,7 @@
>  endfunction
>
>  function grid_cb (h, e)
> +disp("this is grid_cb"); fflush(stdout);
>    hax = __get_axes__ (h);
>
> Do you see the msg when clicking on Menu->Toggle grid on all axes?
> And if the grid doesn't appear, can you move the window outside the
> screen and back (this causes a fltk redraw).

I do see the disp statement so the callback is being executed.

>
> I hope you understand that I just want to grasp the cause for this
> problem and to my understanding the event propagation after grid_cb
> should be:
>
> grid.m:  set (hax, "xgrid", "on", "ygrid", "on", "zgrid", "on",
> graphics.h: void set_xgrid (const octave_value& val): mark_modified ();
>
> which should do the toolkit notification and then trigger the redraw.

Isn't the redraw done when the event loop is called which has Fl::check?  I
think the grid is correctly being marked as modified, but it isn't updated
until a Octave calls for an update which it does after processing each
command line.  I think this is why hitting <RETURN> or entering any
statement on the command window such as "a=1" works.

Alas, I'm away on vacation for the next few days so I can't help debug
until the weekend.

--Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]