Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Conversation

@mwieder
Copy link
Contributor

@mwieder mwieder commented Aug 8, 2019

This patches the property inspector to do a revUnsubscribeAll on closing.

The problem reported in bug report 22297 being that the property inspector subscribes to the idePropertyChanged message but doesn't unsubscribe from that message if the selected object hasn't changed, as for example if you try to edit the script of an object after having looked at its properties. This will trigger a recurring error display and require closing the IDE.

…ing.

The problem reported in bug report 22297 being that the property inspector
subscribes to the idePropertyChanged message but doesn't unsubscribe from
that message if the selected object hasn't changed, as for example if you
try to edit the script of an object after having looked at its properties.
@livecodepanos
Copy link
Contributor

Hello all,

This patch - although it seems correct anyway - does not fix the original problem. An idePropertyChanged message is still sent to the Property Inspector when it is closed, and the SE throws an error.

Recipe:

  • in the msg box: put true into gRevDevelopment. Close msg box
  • Create a stack
  • Open the PI for the stack
  • Go to custom properties
  • Add a couple of custom props, and click on a custom prop, so as the "key" field is highlighted
  • Close the Property Inspector
  • Click on the "Code" button in the LC menubar to open the script editor for the stack

--> Error

@livecodepanos
Copy link
Contributor

Hmm I think I have found the problem.

The new line added in this patch, i.e. revIDEUnsubscribeAll with no param, unsubscribes the target from all subscribed messages. In the case of the recipe above ^^^^ the target is the card of the Property Inspector template stack. However, the Property inspector stack itself has not unsubscribed from all messages at this point. So doing this explicitly, by adding an extra line as below seems to fix the problem:

revIDEUnsubscribeAll -- Unsubscribes the card
// ADDED THE FOLLOWING LINE
revIDEUnsubscribeAll the long id of me -- Unsubscribes the stack

@mwieder mwieder closed this by deleting the head repository Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants