Skip to content

NodeTreeView: fix a bug & add scroll to view parent#6948

Merged
dyfer merged 6 commits intosupercollider:3.14from
prko:topic/make_plotTree_singleton_window
Jun 19, 2025
Merged

NodeTreeView: fix a bug & add scroll to view parent#6948
dyfer merged 6 commits intosupercollider:3.14from
prko:topic/make_plotTree_singleton_window

Conversation

@prko
Copy link
Contributor

@prko prko commented Jun 8, 2025

Purpose and Motivation

#6294 introduces the following error

ERROR: Message 'view' not understood.
Perhaps you misspelled 'asView', or meant to call 'view' on another receiver?
RECEIVER:
Instance of View {    (00000298416839C8, gc=F4, fmt=00, flg=00, set=06)
  instance variables [34]
    qObject : RawPointer 000002983DF33270
    finalizer : instance of Finalizer (00000298420542F8, size=2, set=1)
    virtualSlots : nil
    wasRemoved : false
    font : nil
    resize : Integer 1
    alpha : Float 1.000000   00000000 3FF00000
    decorator : nil
    layout : nil
    userCanClose : true
    deleteOnClose : true
    action : nil
    mouseDownAction : nil
    mouseUpAction : nil
    mouseEnterAction : nil
    mouseLeaveAction : nil
    mouseMoveAction : nil
    mouseOverAction : nil
    mouseWheelAction : nil
    keyDownAction : nil
    keyUpAction : nil
    keyModifiersChangedAction : nil
    keyTyped : nil
    focusGainedAction : nil
    focusLostAction : nil
    dragLabel : nil
    beginDragAction : nil
    canReceiveDragHandler : nil
    receiveDragHandler : nil
    toFrontAction : nil
    endFrontAction : nil
    onClose : nil
    onResize : nil
    onMove : nil
}
ARGS:
KEYWORD ARGUMENTS:
CALL STACK:
	DoesNotUnderstandError:reportError
		arg this = <instance of DoesNotUnderstandError>
	Nil:handleError
		arg this = nil
		arg error = <instance of DoesNotUnderstandError>
	Thread:handleError
		arg this = <instance of Thread>
		arg error = <instance of DoesNotUnderstandError>
	Object:throw
		arg this = <instance of DoesNotUnderstandError>
	Object:doesNotUnderstand
		arg this = <instance of View>
		arg selector = 'view'
		arg args = [*0]
		arg kwargs = [*0]
	NodeTreeView:makeWindow
		arg this = <instance of NodeTreeView>
		arg bounds = <instance of Rect>
		arg parent = <instance of View>
	Server:plotTreeView
		arg this = <instance of Server>
		arg interval = 0.5
		arg parent = <instance of View>
		arg actionIfFail = nil
	Interpreter:interpretPrintCmdLine
		arg this = <instance of Interpreter>
		var res = nil
		var func = <instance of Function>
		var code = "(
w = Window();
w.front;

b ..."
		var doc = nil
		var ideClass = <instance of Meta_ScIDE>
	Process:interpretPrintCmdLine
		arg this = <instance of Main>
^^ ERROR: Message 'view' not understood.
Perhaps you misspelled 'asView', or meant to call 'view' on another receiver?
RECEIVER: a View

when evaluating the following code:

(
w = Window();

b = View(w, w.bounds.moveTo(0, 0));
n = View(b, b.bounds);
s.plotTreeView(0.5, n);

w.front;
)

This PR fixes this wrong behaviour. (SC3.13.0 does not return this error and creates the requested GUI.)
(In #6834, #6853, #6914 and #6917, this bug is not addressed.)

Types of changes

  • Bug fix

To-do list

  • Code is tested
  • All tests are passing
  • This PR is ready for review

@prko
Copy link
Contributor Author

prko commented Jun 8, 2025

(
w = Window();

b = View(w, w.bounds.moveTo(0, 0));
n = View(b, b.bounds);
s.plotTreeView(0.5, n);

w.front;
)

This code does not produce a vertical scroll when evaluated. This functionality was implemented this way prior to the introduction of issue #6294.
The commit ff1cd95 introduces a vertical scroll even when the NodeTreeView's parent is a view.

@prko prko changed the title NodePlotView: fix a bug NodePlotView: fix a bug & add scroll to view parent Jun 8, 2025
@prko
Copy link
Contributor Author

prko commented Jun 9, 2025

@dyfer
Could this PR be considered for inclusion in version 3.14.0?
Apologies for any oversight on my part.

@capital-G capital-G added comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead comp: class library SC class library labels Jun 9, 2025
@capital-G capital-G added this to 3.14.0 Jun 9, 2025
@capital-G capital-G moved this to Backlog in 3.14.0 Jun 9, 2025
@dyfer dyfer changed the base branch from develop to 3.14 June 9, 2025 22:33
@prko
Copy link
Contributor Author

prko commented Jun 10, 2025

@capital-G, @dyfer
Should I open a new PR using 3.14 branch as I made #6968 for #6965?

@dyfer
Copy link
Member

dyfer commented Jun 10, 2025

Should I open a new PR using 3.14 branch as I made #6968 for #6965?

@prko no need, I changed the destination branch to 3.14 here and this is still a clean merge against 3.14, as there were no diverging commits between develop and 3.14 yet.

@prko
Copy link
Contributor Author

prko commented Jun 11, 2025

As .isView is not a built-in method, I changed the algorithm to check whether the instance's class is "View".

Copy link
Member

@telephon telephon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be better with layouts, but for now it is good.

Copy link
Member

@dyfer dyfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! I have small outstanding requests.

Copy link
Member

@dyfer dyfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dyfer dyfer merged commit 362fa90 into supercollider:3.14 Jun 19, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in 3.14.0 Jun 19, 2025
@dyfer dyfer changed the title NodePlotView: fix a bug & add scroll to view parent NodeTreeView: fix a bug & add scroll to view parent Jul 2, 2025
dyfer pushed a commit to dyfer/supercollider that referenced this pull request Jul 16, 2025
@prko prko deleted the topic/make_plotTree_singleton_window branch October 13, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: class library SC class library comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead squash on merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants