Skip to content

Pane feature methods (pin button etc) don't seem to have any effect #143

Description

@halfer

I am rather stuck on a redraw issue in the AUI demo, for which I have been periodically sending pull requests. I mentioned this on #135.

I am using the following methods on wxAuiPaneInfo objects:

  • MaximizeButton
  • PinButton
  • MinimizeButton
  • Gripper
  • GripperTop

After doing so, I find I can get the manager to redraw the pane with the new control(s) by detaching the pane, reattaching, and then running an update. Thus:

$manager->DetachPane($window);
$manager->AddPane($window, $paneInfo);

// Now redraw the panes
$manager->Update();

However this is not ideal as detach/reattach can move the dock position. I therefore think it should work without it, e.g. by resetting the perspective:

$perspective = $manager->SavePaneInfo($paneInfo);
$manager->LoadPaneInfo($perspective, $paneInfo);

// Now redraw the panes
$this->getManagedWindow()->getAuiManager()->Update();

However this apparently better approach works for resetting the gripper, but not for maximise or pin, and it feels like it should work. (Incidentally the minimise button doesn't seem to do anything here, but then I have not got that to work with attaching and reattaching either, so perhaps it is not implemented in my desktop environment).

Is using the LoadPaneInfo method appropriate here, and if not, is there a better way to do this? (Anyone can try the new code on the master branch and temporarily replacing the first approach with the second).

I am on Ubuntu 14.04 with PHP 5.5.9.

Activity

  1. changed the title [-]Pane feature methods (pin button etc) don't seem to stick[/-] [+]Pane feature methods (pin button etc) don't seem to have any affect[/+] on Feb 5, 2016
  2. changed the title [-]Pane feature methods (pin button etc) don't seem to have any affect[/-] [+]Pane feature methods (pin button etc) don't seem to have any effect[/+] on Feb 5, 2016
  3. halfer commented on Feb 6, 2016

    @halfer
    ContributorAuthor

    I wondered if using both approaches would be an acceptable workaround for now. The strategy would go like this:

    • Get the perspective string
    • Detach and re-add the pane
    • Load the perspective string

    This can be done by applying this perspective patch to master (apply using patch -p1 < perspective-patch.txt in the project root). Unfortunately I get a bunch of crashes, so I am rather stuck:

    x@x:~/Development/Personal/WX Projects/wxphp/examples$ /usr/bin/php -d extension=wxwidgets.so AUI/main.php
    *** Error in `/usr/bin/php': corrupted double-linked list: 0x0000000004496890 ***
    Aborted (core dumped)
    x@x:~/Development/Personal/WX Projects/wxphp/examples$ /usr/bin/php -d extension=wxwidgets.so AUI/main.php
    Segmentation fault (core dumped)
    x@x:~/Development/Personal/WX Projects/wxphp/examples$ /usr/bin/php -d extension=wxwidgets.so AUI/main.php
    *** Error in `/usr/bin/php': corrupted double-linked list: 0x0000000002965620 ***
    Aborted (core dumped)
    

    The "corrupted double-linked list" is interesting - I wonder if this is the source of the crashy AUI behaviour generally? Either way I don't think I can do much more work on this example until the module is more stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions