Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging across a CompositeView throws repeated NotYetImplemented errors #2804

Closed
jamshark70 opened this issue Mar 20, 2017 · 1 comment
Closed
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead

Comments

@jamshark70
Copy link
Contributor

d54805e

QView.sc:

+	defaultGetDrag { ^thisMethod.notYetImplemented }
+	defaultCanReceiveDrag { ^thisMethod.notYetImplemented }
+	defaultReceiveDrag { ^thisMethod.notYetImplemented }

Test case:

(
var w = Window("drag fail", Rect(800, 200, 300, 250)),
v = CompositeView(w, w.view.bounds.insetBy(5, 5)).background_(Color(0.9, 0.9, 0.3)),
d = DragSource(v, Rect(5, 5, 100, 20)).object_("Drag me")
.background_(Color.gray(0.9)).stringColor_(Color.black);

w.front;
)

Drag the DragSource outside of its own bounds. When the mouse touches the yellow v CompositeView, you get:

ERROR: NotYetImplementedError
RECEIVER:
Instance of Method {    (0x33675c0, gc=01, fmt=00, flg=11, set=04)
  instance variables [15]
    raw1 : Float 0.000000   00000000 00600000
    raw2 : Float 0.000000   00000100 01000001
    code : instance of Int8Array (0x3367740, size=6, set=2)
    selectors : nil
    constants : nil
    prototypeFrame : instance of Array (0x2334540, size=1, set=2)
    context : nil
    argNames : instance of SymbolArray (0x2334600, size=1, set=2)
    varNames : nil
    sourceCode : nil
    ownerClass : instance of Meta_View (0x33485c0, size=19, set=5)
    name : Symbol 'defaultReceiveDrag'
    primitiveName : nil
    filenameSymbol : Symbol '/home/dlm/share/sc-hjh.git/SCClassLibrary/Common/GUI/Base/QView.sc'
    charPos : Integer 10381
}
CALL STACK:
	MethodError:reportError   0x6a24bd8
		arg this = <instance of NotYetImplementedError>
	Nil:handleError   0x6539b68
		arg this = nil
		arg error = <instance of NotYetImplementedError>
	Thread:handleError   0x67a5d88
		arg this = <instance of Thread>
		arg error = <instance of NotYetImplementedError>
	Object:throw   0x68289d8
		arg this = <instance of NotYetImplementedError>
	Object:notYetImplemented   0x2901098
		arg this = View:defaultReceiveDrag
	View:receiveDrag   0x5fa7388
		arg this = <instance of CompositeView>
		arg x = 128
		arg y = 50
	View:dropEvent   0x68adc28
		arg this = <instance of CompositeView>
		arg x = 128
		arg y = 50
^^ The preceding error dump is for ERROR: NotYetImplementedError
RECEIVER: View:defaultReceiveDrag

This is disquieting for users.

@jamshark70 jamshark70 added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead labels Mar 20, 2017
@jamshark70
Copy link
Contributor Author

FWIW I think the issue stems from one of the changes from Cocoa to Qt. In Cocoa gui, View was only an abstract class and you had to put other views into some kind of ContainerView, usually CompositeView.

In Qt, there is no CompositeView. We have a CompositeView stub for backward compatibility, but you get an instance of View.

This means View itself must implement the required methods, and View is not allowed to do NotYetImplemented or ShouldNotImplement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead
Projects
None yet
Development

No branches or pull requests

1 participant