[comp.sys.next] icon views?

dastrout@miavx1.acs.muohio.edu (root@next1) (08/19/90)

Does anyone have a quick answer as to what flavor of view is needed to deal
with icons?  What I want is to set up some apps I've written to work more like
the browser or killwindow where the user can just drag an Icon into the app &
the app does its thing on the file rep. by the icon.  All hints appreciated,
I will sumarize If people wish.
-- 
Dave Strout
dastrout@miavx1.acs.muohio.edu
dastrout%miavx1.bitnet@pucc.princeton.edu
root@next1.acs.muohio.edu
513-523-8245

wiml@milton.u.washington.edu (William Lewis) (08/20/90)

In article <2156.26cd7faf@miavx1.acs.muohio.edu> dastrout@miavx1.acs.muohio.edu (root@next1) writes:
>Does anyone have a quick answer as to what flavor of view is needed to deal
>with icons?  What I want is to set up some apps I've written to work more like
>the browser or killwindow where the user can just drag an Icon into the app &
>the app does its thing on the file rep. by the icon.
>I will sumarize If people wish.

  Dragged-icon-handling is implemented on a per-window basis, not a per-
view basis, although you're free to modify your application's behavior
according to where in your window the icon is dropped, of course. The
way this is done is to use a Speaker object (usually your application's
AppSpeaker) to message the Workspace that a certain window of yours is
interested in any dragged icons that may pass over it. You send the WM.
the port of a Listener object whose delegate will receive appropriate method
calls from time to time (such as iconEntered:...). The actual implementation
is sort of complex; look in the manual entries for Speaker and Listener,
and in the Draw example (/NextDeveloper/Example/DrawDocument.m I think, 
though I could be wrong).


-- 
wiml@blake.acs.washington.edu       Seattle, Washington  | No sig under
(William Lewis)  |  47 41' 15" N   122 42' 58" W  |||||||| construction