12450 ! |
12451 ! |
12451 |
12452 |
12452 selectionNotify:aView selection:aSelectionID target:aTargetID property:aPropertyID requestor:requestorID time:time |
12453 selectionNotify:aView selection:aSelectionID target:aTargetID property:aPropertyID requestor:requestorID time:time |
12453 "this is a forwarded selectionNotify event from XWorkstation" |
12454 "this is a forwarded selectionNotify event from XWorkstation" |
12454 |
12455 |
12455 |property propertyKey| |
12456 |property propertyKey atomName| |
12456 |
12457 |
12457 aSelectionID ~~ selectionID ifTrue:[ |
12458 aSelectionID ~~ selectionID ifTrue:[ |
12458 "ignore notification that is not for our selection" |
12459 "ignore notification that is not for our selection" |
12459 ^ self. |
12460 ^ self. |
12460 ]. |
12461 ]. |
12464 done := true. |
12465 done := true. |
12465 ^ self. |
12466 ^ self. |
12466 ]. |
12467 ]. |
12467 |
12468 |
12468 property := display getProperty:aPropertyID from:drawableID delete:true. |
12469 property := display getProperty:aPropertyID from:drawableID delete:true. |
|
12470 property isNil ifTrue:[ |
|
12471 "the property does not exist in the specified window" |
|
12472 done := true. |
|
12473 ^ self |
|
12474 ]. |
|
12475 |
12469 propertyKey := property key. |
12476 propertyKey := property key. |
12470 propertyKey == aTargetID ifTrue:[ |
12477 propertyKey == aTargetID ifTrue:[ |
12471 "good, the property is consistent with our request. |
12478 "good, the property is consistent with our request. |
12472 The whole selection is in the property" |
12479 The whole selection is in the property" |
12473 buffer := property value. |
12480 buffer := property value. |
12474 done := true. |
12481 done := true. |
12475 ] ifFalse:[propertyKey == (display atomIDOf:#INCR) ifTrue:[ |
12482 ] ifFalse:[propertyKey == (display atomIDOf:#INCR) ifTrue:[ |
12476 "this is an incremental transfer. Wait for property change" |
12483 "this is an incremental transfer. Wait for property change" |
12477 incremental := true. |
12484 incremental := true. |
12478 ] ifFalse:[ |
12485 ] ifFalse:[ |
|
12486 atomName := (display atomName:propertyKey) ? propertyKey. |
12479 'XWorkstation(error): unexpected targetID (' errorPrint. |
12487 'XWorkstation(error): unexpected targetID (' errorPrint. |
12480 (display atomName:propertyKey) errorPrint. |
12488 atomName errorPrint. |
12481 ')in selectionNotify: ' errorPrint. |
12489 ') in selectionNotify: ' errorPrint. |
12482 display errorPrintCR. |
12490 display errorPrintCR. |
12483 done := true. |
12491 done := true. |
12484 ]]. |
12492 ]]. |
12485 ! ! |
12493 ! ! |
12486 |
12494 |