ftp.nice.ch/pub/next/developer/resources/classes/IconView.README

This is the README for IconView.s.tar.gz [Download] [Browse] [Up]

IconView
(a reworking of code provided by NeXT in their 2.0 Examples) 


by Mark Onyschuk
Plexus Software and Consulting, Toronto


mark@plexus.beltrix.guild.org
73700.3114@compuserve.com



You may freely copy, distribute, and reuse the code in this example.
Plexus Software disclaims any warranty of any kind, expressed or implied,
as to its fitness for any particular use.

also...

Please include this file when distributing this code so that it is not mistaken for the original provided by NeXT.



IconView is a a reworking of the IconView object provided in NeXT's 2.0 Examples distribution. 

What's new in this mutation is the bundling of Speaker/Listener code with the IconView object, a method to activate the IconView at startup, and a delegate method to notify the IconView's controller that an icon will be dropped into the view.

 To use an IconView in your own projects, place this code into your project directory, and drag IconView.h into your project's Classes suitcase.  After IconView.h is parsed by Interface Builder, drag a CustomView into any window, and set its class to IconView from the CustomView Attributes Inspector panel.

To activate the IconView, send it a beginListening message (this can only be done from Objective-C code).  To control whether files are accepted or rejected by the IconView, implement an (int)willAcceptIcon:sender ok:(int*)flag method in your IconView's  delegate:


- (int)willAcceptIcon:sender ok:(int*)flag
{
    if(pathNamesAreOk([sender filename]))
        *flag = YES;
    else
        *flag = NO;

    return 0;
}


The default behaviour of the IconView object is to accept all dropped files.

Please send all comments and flames to  mark@plexus.beltrix.guild.org.  I'm interested in hearing from you!


Best Regards,
Mark.


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.