ftp.nice.ch/pub/next/tools/gtools/GTools.API.tar.gz#/GTools.API/Documentation/Libraries/GKappkit/GKIOCtrl.rtf

This is GKIOCtrl.rtf in view mode; [Download] [Up]

Release 1.0  Copyright ©1994 by BITart, Regensburg.  All Rights Reserved.  Author: Gerd Knops.




GKIOCtrl






Inherits From:	Object

Declared In:	GKIOCtrl.h





Class Description

GKIOCtrl is a more comfortable frontend to the open and save panel classes. It also stores type dependend paths for you. there are also to copy files or directories, or to delete directories.  





Instance Variables

char *{
b1 pathType};
char *{
b1 path};
char *{
b1 file};

pardtx6140tx9660tx10180fs16fi-4040li6140fc0cf0 
pathType	

path	

file	




Method Types

fs16 
class methods 	+ homePath
	+ privatePath
	+ homeLibrary:
	+ localLibrary:
	+ nextLibrary:
	+ relativePathFor:
	+ getOpenPathFor:title:type:flags:
	+ getOpenPathFor:title:type:flags:accessoryView:
	+ getSavePathFor:title:type:flags:
	+ getSavePathFor:title:type:flags:accessoryView:
	+ getPathFor:
	+ copyFile:to:
	+ copyPathToPrivate:
	+ copyPath:to:
	+ mkdirs:
	+ deletePath:

convenience methods 	+ loadErrorFor:
	+ saveErrorFor:
	+ createErrorFor:
	+ executeErrorFor:

pardtx9660tx10180fi-520li6640fc0cf0 


li1360fc0cf0 
Class Methods

homePath
+ (const char *)homePath 

This method returns the {
i1 path} to the current users home directory. 

fi-380li2480fc0cf0 


privatePath
+ (const char *)privatePath 

This method returns the {
i1 path} to the applications 'private' directory; this will be ".<NXApp name>" in the users home directory. The directory is created, if it does not exist yet. 

fi-380li2480fc0cf0 


homeLibrary:
+ (char *)homeLibrary:(char *)returnPath

Returns the full {
i1 path} to "~/Library/<NXApp name>. This directory is NOT automatically created. 

fi-380li2480fc0cf0 


localLibrary:
+ (char *)localLibrary:(char *)returnPath

Returns the full {
i1 path} to "/LocalLibrary/<NXApp name>. This directory is NOT automatically created. 

fi-380li2480fc0cf0 


nextLibrary:
+ (char *)nextLibrary:(char *)returnPath

Returns the full {
i1 path} to "/NextLibrary/<NXApp name>. This directory is NOT automatically created. 

fi-380li2480fc0cf0 


relativePathFor:
+ (const char *)relativePathFor:(const char *)thePath

If {
i1 thePath} points to somewhere behind the users home dir, that part of the {
i1 path} will be replaced by "~/". 

fi-380li2480fc0cf0 


getOpenPathFor:title:type:flags:
+ (const char *)getOpenPathFor :(const char *const *)fileExtensions
title :(const char *)title
type :(const char *)type
flags :(short)flags

Calls getOpenPathFor:{
i1 title}:{
i1 flags}:{
i1 flags}:accessoryView: with {
b1 nil} as argument for accessoryView. 

bfs28 See also:   getOpenPathFor:title:flags:flags:accessoryView: 

fi-380li2480fc0cf0 


getOpenPathFor:title:type:flags:accessoryView:
+ (const char *)getOpenPathFor :(const char *const *)fileExtensions
title :(const char *)title
type :(const char *)type
flags :(short)flags
accessoryView :accView

This method runs the open panel. {
i1 {
i1 fileExtensions}} is a NULL terminated list of valid extensions. {
i1 {
i1 title}} will be displayed as the {
i1 {
i1 title}} of the panel. {
i1 {
i1 type}} is a short identifier. GKIOCtrl uses this to keep track of the paths the user selected. {
i1 {
i1 flags}} is and ored mask of one ore more of the following: 

pardfs22li2480fc0cf0  GK_SHOWFILE    preselect the {
i1 file}  
 GK_MULTIPLE    multiple selection allowed  
 GK_DIRECTORIES    select a directory  
 GK_PACKAGES    treat {
i1 file} wrapper as directories  
 

pardtx2480tx2860tx3240b0fs28li2100fc0cf0 {
i1 accView} is an optional accessory view. This method returns NULL, if the user canceled the panel. Otherwise, if the {
i1 {
i1 flags}} do not contain GK_MULTIPLE, this method returns the {
i1 path} of the selected {
i1 file}. If GK_MULTIPLE was in the {
i1 {
i1 flags}}, you could use a method simular to the following: 

pardfs22li2480fc0cf0  {  
 //  
 // load, multiple files allowed...  
 //  
 id 					openPanel;  
 const char			*directory;  
 const char *const	*filenames;  
 int 				i;  
 char 				{
i1 path}[MAXPATHLEN+1];  
   
 openPanel=[OpenPanel new];  
 directory=[openPanel directory];  
 filenames=[openPanel filenames];  
 i=0;  
 while(filenames[i])  
 {  
     strcpy({
i1 path},directory);  
     strcat({
i1 path},"/");  
     strcat({
i1 path},filenames[i++]);  
       
     [{
b1 self} openDocumentFromFile:{
i1 path}];  
 }  
 }  
 

pardtx2480tx2860tx3240b0fs28li2100fc0cf0 

fi-380li2480fc0cf0 


getSavePathFor:title:type:flags:
+ (const char *)getSavePathFor :(const char *)fileExtension
title :(const char *)title
type :(const char *)type
flags :(short)flags

Calls getSavePathFor:{
i1 {
i1 {
i1 title}}}:{
i1 {
i1 {
i1 flags}}}:{
i1 {
i1 {
i1 flags}}}:accessoryView: with {
b1 nil} as argument for accessoryView. 

bfs28 See also:   getSavePathFor:title:flags:flags:accessoryView: 

fi-380li2480fc0cf0 


getSavePathFor:title:type:flags:accessoryView:
+ (const char *)getSavePathFor :(const char *)fileExtension
title :(const char *)title
type :(const char *)type
flags :(short)flags
accessoryView :accView

This method runs the save panel. {
i1 {
i1 fileExtension}} is the extension to be used. {
i1 {
i1 {
i1 {
i1 title}}}} will be displayed as the {
i1 {
i1 {
i1 {
i1 title}}}} of the panel. {
i1 {
i1 {
i1 {
i1 type}}}} is a short identifier. GKIOCtrl uses this to keep track of the paths the user selected. {
i1 {
i1 {
i1 {
i1 flags}}}} is and ored mask of one ore more of the following: 

pardfs22li2480fc0cf0  GK_SHOWFILE    preselect the {
i1 file}  
 GK_MULTIPLE    multiple selection allowed  
 

pardtx2480tx2860tx3240b0fs28li2100fc0cf0 {
i1 {
i1 accView}} is an optional accessory view. This method returns NULL, if the user canceled the panel. Otherwise, this method returns the {
i1 path} of the selected {
i1 file}. 

fi-380li2480fc0cf0 


getPathFor:
+ (const char *)getPathFor:(const char *)type

Returns the last {
i1 path}, the user used for {
i1 {
i1 {
i1 {
i1 {
i1 type}}}}}, NULL otherwise. 

fi-380li2480fc0cf0 


copyFile:to:
+ (BOOL)copyFile:(const char *)srcFile to:(const char *)destFile

This method copies {
i1 srcFile} to {
i1 destFile}, if {
i1 destFile} does not exist yet. Returns NO, if some error occured, YES otherwise. 

fi-380li2480fc0cf0 


copyPathToPrivate:
+ (BOOL)copyPathToPrivate:(const char *)thePath

This method copies the directory {
i1 {
i1 thePath}} to the {
b1 privatePath}. Existing files will not be overwritten. Returns NO, if some error occured, YES otherwise. 

fi-380li2480fc0cf0 


copyPath:to:
+ (BOOL)copyPath:(const char *)source to:(const char *)destination

This method copies the directory {
i1 source} to {
i1 destination}. Existing files will not be overwritten. Returns NO, if some error occured, YES otherwise. 

fi-380li2480fc0cf0 


mkdirs:
+ (BOOL)mkdirs:(const char *)mkpath

This method creates the directory {
i1 mkpath}. Returns NO, if some error occured, YES otherwise. 

fi-380li2480fc0cf0 


deletePath:
+ (BOOL)deletePath:(const char *)delPath

This method deletes the directory {
i1 delPath}. It may not work properly on nets (because of those .nfs* files). Returns NO, if some error occured, YES otherwise. 

fi-380li2480fc0cf0 


loadErrorFor:
+ loadErrorFor:(const char *)theFile

This method displays a localized panel, that announces, that {
i1 theFile} could not be loaded. Returns {
b1 self}. 

fi-380li2480fc0cf0 


saveErrorFor:
+ saveErrorFor:(const char *)theFile

This method displays a localized panel, that announces, that {
i1 {
i1 theFile}} could not be written. Returns {
b1 self}. 

fi-380li2480fc0cf0 


createErrorFor:
+ createErrorFor:(const char *)theFile

This method displays a localized panel, that announces, that {
i1 {
i1 {
i1 theFile}}} could not be created. Returns {
b1 self}. 

fi-380li2480fc0cf0 


executeErrorFor:
+ executeErrorFor:(const char *)theFile

This method displays a localized panel, that announces, that the command {
i1 {
i1 {
i1 {
i1 theFile}}}} could not be executed. Returns {
b1 self}. 

fi-380li2480fc0cf0 




Generated by DocMaker on Wed May  4 00:51:02 1994
}

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