Ticket #360 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Drag and drop broken

Reported by: gz Owned by: gb
Priority: normal Milestone: Cocoa IDE v1
Component: IDE Version: 1.2
Keywords: Cc:

Description

From Alex Repenning:

drag and drop does not appear to work in CCL version 1.2-r9226-RC1 (DarwinPPC32)!:

This seems to be the case for any kind of drag and drop including dragging files (to get the path) into the listener.

*** Error in event process: Failed assertion: (EQL (SLOT-VALUE GUI::TS 'GUI::EDIT-COUNT) 0)

 (BFFFD530) : 0 (FUNCALL #'#<(:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|)> #<SIMPLE-ERROR #x87AFC5E>) 112
  (#:G7515)
   #:G7515: #<SIMPLE-ERROR #x87AFC5E>

  #:COMPILER-VAR: (NIL)
  #:G7512: #<A Foreign Pointer [stack-allocated] #xBFFFD6F8>

 (BFFFD540) : 1 (SIGNAL #<SIMPLE-ERROR #x87AFC5E> [...]) 528
  (CONDITION &REST CCL::ARGS)
   CONDITION: #<SIMPLE-ERROR #x87AFC5E>
   CCL::ARGS: NIL

  CCL::%HANDLERS%: ((ERROR) (CONDITION #) (CONDITION #) (CONDITION #) (ERROR))
  CCL::TAG: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #xADADE>)
  CCL::HANDLERS: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #xADADE>)

 (BFFFD550) : 2 (%ERROR #<SIMPLE-ERROR #x87AFC5E> NIL -268438172) 84
  (CONDITION CCL::ARGS CCL::ERROR-POINTER)
   CONDITION: #<SIMPLE-ERROR #x87AFC5E>
   CCL::ARGS: NIL
   CCL::ERROR-POINTER: -268438172



 (BFFFD570) : 4 (CERROR "test the assertion again." #<SIMPLE-ERROR #x87AFC5E> [...]) 492
  (CCL::CONT-STRING CONDITION &REST CCL::ARGS)
   CCL::CONT-STRING: "test the assertion again."
   CONDITION: #<SIMPLE-ERROR #x87AFC5E>
   CCL::ARGS: NIL

  CCL::FP: -268438172
  #:G33655: #<RESTART CONTINUE #xADA6E>
  #:G33652: (#<RESTART CONTINUE #xADA6E>)
  CCL::%RESTARTS%: ((#<# # #xADA6E>) (#<# # #xAE066> #<# # #xAE08E>))
  #:G33653: #<SIMPLE-ERROR #x87AFC5E>
  CCL::*CONDITION-RESTARTS*: ((#<# # #xADA6E> . #))

 (BFFFD590) : 5 (%ASSERTION-FAILURE NIL '(EQL # 0) NIL [...]) 424
  (CCL::SETF-PLACES-P CCL::TEST-FORM STRING &REST CCL::CONDITION-ARGS)
   CCL::SETF-PLACES-P: NIL
   CCL::TEST-FORM: (EQL (SLOT-VALUE GUI::TS #) 0)
   STRING: NIL
   CCL::CONDITION-ARGS: NIL



 (BFFFD5A0) : 6 (FUNCALL #'#<#<STANDARD-METHOD GUI::ASSUME-NOT-EDITING (GUI::HEMLOCK-TEXT-STORAGE)>> #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Listener">> (#x85C400)>) 88
  (GUI::TS)
   GUI::TS: #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Listener">> (#x85C400)>



 (BFFFD5B0) : 7 (FUNCALL #'#<GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|> -268438082) 844
  (#:G7511)
   #:G7511: -268438082

  #:G7518: #<A Foreign Pointer [stack-allocated] #xBFFFD6F8>
  #:G7512: #<A Foreign Pointer [stack-allocated] #xBFFFD6F8>
  #:COMPILER-VAR: (NIL)
  #:G7517: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #xADADE>
  #:G7519: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #xADADE>)
  CCL::%HANDLERS%: ((CONDITION #) (CONDITION #) (CONDITION #) (CONDITION #) (ERROR))
  GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)>
  GUI::_CMD: #<A Foreign Pointer #x1183E0>
  GUI::POS: 85
  LENGTH: 0
  GUI::AFFINITY: 1
  GUI::RANGE: #<NS-RANGE 85/0 [stack-allocated] (#xADAA0) #xADA96>

 (BFFFD5E0) : 9 (%PASCAL-FUNCTIONS% 80 -268438082) 228
  (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
   CCL::INDEX: 80
   CCL::ARGS-PTR-FIXNUM: -268438082

  CCL::LISP-FUNCTION: #<Compiled-function GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]| (Non-Global)  #x86C236E>
  WITHOUT-INTERRUPTS: NIL
  CCL::*CALLBACK-TRACE-P*: NIL

 (BFFFD720) : 11 (FUNCALL #'#<Anonymous Function #x86C253E> #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)> #S(CCL::OBJC-SELECTOR :NAME "updateSelection:length:affinity:" :%SEL #<A Foreign Pointer #x1183E0>) 85 0 1) 296
  (#:G8633 #:G8634 CCL::ARG0 CCL::ARG1 CCL::ARG2)
   #:G8633: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)>
   #:G8634: #S(CCL::OBJC-SELECTOR :NAME "updateSelection:length:affinity:" :%SEL #<A Foreign Pointer #x1183E0>)
   CCL::ARG0: 85
   CCL::ARG1: 0
   CCL::ARG2: 1



 (BFFFD740) : 13 (FUNCALL #'#<(:INTERNAL CCL::SEND-UNAMBIGUOUS-MESSAGE (SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION T)))> #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)> [...]) 552
  (CCL::RECEIVER &REST CCL::ARGS)
   CCL::RECEIVER: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)>
   CCL::ARGS: (85 0 1)

  #:G1015: #<A Foreign Pointer [stack-allocated] (:* #) #xADC10>
  #:G1016: -268438060
  CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME "updateSelection:length:affinity:" :%SEL #<A Foreign Pointer #x1183E0>)
  FUNCTION: #<Anonymous Function #x86C253E>

 (BFFFD7C0) : 14 (FOR-EACH-TEXTVIEW-USING-STORAGE #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Listener">> (#x85C400)> #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x87AFF26>) 308
  (GUI::TEXTSTORAGE GUI::F)
   GUI::TEXTSTORAGE: #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "Listener">> (#x85C400)>
   GUI::F: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x87AFF26>

  GUI::LAYOUTS: #<NS-MUTABLE-ARRAY (
    <NSLayoutManager: 0x196dd0>
    1 containers, text backing has 88 characters
    selected character range {85, 0} affinity: downstream granularity: character
    marked character range {88, 0}
    Currently holding 84 glyphs.
    Glyph tree contents:  84 characters, 84 glyphs, 1 nodes, 32 node bytes, 128 storage bytes, 160 total bytes, 1.90 bytes per character, 1.90 bytes per glyph
    Layout tree contents:  88 characters, 84 glyphs, 84 laid glyphs, 2 laid line fragments, 1 nodes, 32 node bytes, 792 storage bytes, 824 total bytes, 9.36 bytes per character, 9.81 bytes per glyph, 42.00 laid glyphs per laid line fragment, 412.00 bytes per laid line fragment

) (#x1C0C80)>
  #:G7307: 1
  GUI::I: 0
  GUI::LAYOUT: #<NS-LAYOUT-MANAGER <NSLayoutManager: 0x196dd0>
    1 containers, text backing has 88 characters
    selected character range {85, 0} affinity: downstream granularity: character
    marked character range {88, 0}
    Currently holding 84 glyphs.
    Glyph tree contents:  84 characters, 84 glyphs, 1 nodes, 32 node bytes, 128 storage bytes, 160 total bytes, 1.90 bytes per character, 1.90 bytes per glyph
    Layout tree contents:  88 characters, 84 glyphs, 84 laid glyphs, 2 laid line fragments, 1 nodes, 32 node bytes, 792 storage bytes, 824 total bytes, 9.36 bytes per character, 9.81 bytes per glyph, 42.00 laid glyphs per laid line fragment, 412.00 bytes per laid line fragment
 (#x196DD0)>
  GUI::CONTAINERS: #<NS-MUTABLE-ARRAY (
    <NSTextContainer: 0x1970b0>
) (#x196EB0)>
  #:G7309: 1
  GUI::J: 0
  GUI::CONTAINER: #<NS-TEXT-CONTAINER <NSTextContainer: 0x1970b0> (#x1970B0)>
  GUI::TV: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x84b09000>
    Frame = {{0.00, 0.00}, {570.00, 224.00}}, Bounds = {{0.00, 0.00}, {570.00, 224.00}}
    Horizontally resizable: NO, Vertically resizable: YES
    MinSize = {570.00, 224.00}, MaxSize = {10000000.00, 10000000.00}
 (#x84B09000)>

 (BFFFD7D0) : 15 (INVOKE-MODIFYING-BUFFER-STORAGE #<Hemlock Buffer "Listener"> ?) 200
  (GUI::BUFFER GUI::THUNK)
   GUI::BUFFER: #<Hemlock Buffer "Listener">
   GUI::THUNK: #<Unavailable>

  GUI::OLD: NIL

 (BFFFD7F0) : 17 (INVOKE-MODIFYING-BUFFER-STORAGE ? #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x87B0266>) 284
  (GUI::BUFFER GUI::THUNK)
   GUI::BUFFER: #<Unavailable>
   GUI::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x87B0266>

  GUI::OLD: #<Unavailable>

 (BFFFD800) : 18 (FUNCALL #'#<#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)>> #<HI:HEMLOCK-VIEW #x87A7566> #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextStorage replaceCharactersInRange:withString:]|) #x87B02A6>) 552
  (HI::VIEW HI::KEY)
   HI::VIEW: #<HI:HEMLOCK-VIEW #x87A7566>
   HI::KEY: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextStorage replaceCharactersInRange:withString:]|) #x87B02A6>

  #:ABORT-BREAK: #<RESTART ABORT-BREAK #xAE08E>
  #:ABORT: #<RESTART ABORT #xAE066>
  #:G4141: (#<RESTART ABORT #xAE066> #<RESTART ABORT-BREAK #xAE08E>)
  CCL::%RESTARTS%: ((#<# # #xAE066> #<# # #xAE08E>))
  HI::*CURRENT-VIEW*: #<HI:HEMLOCK-VIEW #x87A7566>
  HI::*CURRENT-BUFFER*: #<Hemlock Buffer "Listener">
  HI::*NEXT-VIEW-START*: NIL
  HI::TEXT-BUFFER: #<Hemlock Buffer "Listener">
  MOD: (15 81 . 81)




2008-09-04 16:23:49.865 dppccl[3193:20b] Error in event loop: Failed assertion: (EQL (SLOT-VALUE GUI::TS 'GUI::EDIT-COUNT) 0)

Change History

comment:1 Changed 6 years ago by jaj

  • Priority changed from major to normal
  • Milestone set to Cocoa IDE v1

Easily reproduced. Priority normal, since I don't think this is a common thing to do. It shouldn't error. It should either be made to work, or do nothing.

comment:2 Changed 6 years ago by gb

This seems to be a duplicate of ticket:424, which seems to think that dragging-and-dropping icons is somehow different from dragging and dropping anything else.

I'd vote for keeping this and marking 424 as the duplicate, since this actually bothers to describe the assertion failure which is perhaps the most likely symptom.

The comment in ticket:424 tries to explain what the problem is.

See also ticket:258.

comment:3 Changed 6 years ago by alms

I use this functionality all the time in Terminal.app. To see it in action, open a terminal window, type "cd " and then drag a file or folder icon from the finder into the terminal window. The absolute path to the file/folder shows up.

I lived without this for years with MCL, but I really like it in the Terminal.

comment:4 Changed 6 years ago by gb

  • Status changed from new to closed
  • Resolution set to fixed

This was the same problem that caused pasting in the echo area to crash (and some other symptoms); #/replaceCharactersInRange:withString: complained if it was called while editing was in progress on the textstorage, and most callers bracket calls to that method with #/beginEditing / #/endEditing.

Note: See TracTickets for help on using tickets.