bugpyFormex - Bugs: bug #38426, script/app and cwd buttons of the...

 
 

bug #38426: script/app and cwd buttons of the gui do not work

Submitted by:  francesco <francio>
Submitted on:  Wed 27 Feb 2013 02:07:04 PM UTC  
 
Category: GUISeverity: 3 - Normal
Item Group: Functionality errorStatus: Fixed
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 28 Feb 2013 11:20:53 AM UTC, comment #2:

This has been fixed in commit 412f740.

Some technical explanation (because similar problems may lurk
around).

The button clicked signal can send an optional bool argument to
the slot function it connects to. Therefore you can do

b.clicked.connect(function_without_arg)
b.clicked[bool].connect(function_with_bool_arg)

Now in some cases we connect a function having an optional (non-bool) argument. We want this to be used as function
without argument, so the first syntax is used.
The first syntax is supposed to do default connection (I did not find a way to force 'without argument').

So I guess that
- PySide notes that the argument in the connected function is optional, and therefore uses the without_argument version,
- PyQt4 notes there is an argument, and therefore connects the version with_bool_arg
Both are legitimate choices: there is no way, and no need, to detect type of expected arguments in Python, as there is in the underlying Qt4 C++ libraries. But I like the PySide choice better, because we can explicitely link to the clicked[bool] signal if we want the bool argument to be passed.

To solve the different behavior, I added a function decorator
(stripFirstArg) that strips the bool argument off the connected function. The decorator is only applied when not using PySide.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Wed 27 Feb 2013 09:00:15 PM UTC, comment #1:

This has most likely the same cause as https://savannah.nongnu.org/bugs/?38430

The bug does not occur with PySide. Use it, as a workaround, until the bug gets fixed.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Wed 27 Feb 2013 02:07:04 PM UTC, original submission:
francesco <francio>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by francio (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 logged-in users 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
    Thu 28 Feb 2013 11:20:53 AM UTCbverhegStatusConfirmed=>Fixed
      Assigned toNone=>bverheg
      Open/ClosedOpen=>Closed
    Wed 27 Feb 2013 09:00:15 PM UTCbverhegItem GroupNone=>Functionality error
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1