bugGNU Octave - Bugs: bug #45364, waitbar function doesnt implement...

 
 

bug #45364: waitbar function doesnt implement the CreateCancelBtn option

Submitted by:  Amro <amro_octave>
Submitted on:  Sat 20 Jun 2015 09:17:57 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 22 Jun 2015 10:02:00 PM UTC, comment #4:

I pushed the patch on default:
http://hg.savannah.gnu.org/hgweb/octave/rev/ae68b331d6e4

The new feature will be available in Octave 4.2.
Closing report.

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Jun 2015 09:23:23 PM UTC, comment #3:

All *fcn graphics callback properties specified using a string should be executed in the base workspace?

If you can produce a simple example that shows the compatibility issue, please file a bug report (there is a "WTF Matlab" category for this kind of bugs :-))

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Jun 2015 08:20:13 PM UTC, comment #2:

Many thanks @pantxo.

I tested the patch by manually applying it on top of my existing 4.0.0, and it works!


Regarding the scope of the handle "h", the example will actually work in MATLAB as long as you run it in the command prompt or from a script (where "h" will be stored in the base workspace).

Obviously it is more robust to use "gcbf" as you noted. This is required if you run the example from an M-function, in which case "h" will be undefined when the callback is exectued...

Is that a separate bug in Octave regarding the context in which string callbacks are executed?

If it helps, here are the relevant docs from MATLAB:

- http://www.mathworks.com/help/matlab/creating_guis/write-callbacks-using-the-programmatic-workflow.html#brqowqm
- http://www.mathworks.com/help/opc/ug/create-and-execute-callback-functions.html#f3-128874

Amro <amro_octave>
Mon 22 Jun 2015 06:12:26 PM UTC, comment #1:

Hi,

I attached a patch that implements this functionality using an uicontrol object thus for qt toolkit only.

I can run the examples in ML doc but your example fails and I am surprised that it may ever work. In the function string

The handle "h" is not defined in the execution scope. It should be replaced by e.g. "gcbf ()". Am I missing something?

(file #34294)

Pantxo Diribarne <pantxo>
Project Member
Sat 20 Jun 2015 09:17:57 AM UTC, original submission:

Octave doesn't support creating a waitbar with a cancel button.

Example that works in MATLAB (tested in latest R2015a):

Octave throws an error on the first line:

Amro <amro_octave>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34294:  add_cancel.patch added by pantxo (6KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by amro_octave (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 22 Jun 2015 10:02:00 PM UTCpantxoStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 22 Jun 2015 06:12:26 PM UTCpantxoAttached File-=>Added add_cancel.patch, #34294
      Item GroupMatlab Compatibility=>Feature Request
      StatusNone=>Patch Submitted

    Back to the top


    Powered by Savane 3.1-cleanup1