What to do?
What to do?
- Subject: What to do?
- From: Lukasz Kuczborski <email@hidden>
- Date: Fri, 22 Feb 2002 15:53:25 +0100
I have such an action:
- (IBAction)List:(id)sender
{
int all;
NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager]
enumeratorAtPath:[path stringValue]];
[progress setIndeterminate:YES];
[progress startAnimation:progress];
if(!(pname = [direnum nextObject]))
{
NSRunAlertPanel(@"No path selected!",@"Please choose path, and then
continue", @"Okie Dokie", nil, nil);
}
else
{
fileSpecs = [[NSMutableArray alloc] init];
}
while(pname = [direnum nextObject])
{
if(isFile) // <- What should i insert here, so it would work????
{
Table *nowy = [[Table alloc] init];
[nowy setIconCell:[[NSWorkspace sharedWorkspace]
iconForFile:pname]];
[nowy setPathToFile:pname];
[nowy setFileExtension:[pname pathExtension]];
[nowy setFileName:[pname lastPathComponent]];
[fileSpecs addObject:nowy];
[nowy release];
[table reloadData];
}
}
all = [fileSpecs count];
[found setIntValue:all];
[list setState:NO];
[progress stopAnimation:progress];
[progress setIndeterminate:NO];
}
And i would like to implement files only listing (without directories) -
what loop should i insert and method inside?
Also...i can't get icons of files to be drawn into my NSTableView proper
column...As u see i have another class called "Table" with all variables for
my NSTableView including NSImageCell for my icons to be displayed in
column...H E L P....i really need to do this!!!
P.S. One more: How to implement here NSThred, so my progress indicator would
start spinning during the listing of files....cause now it doesn't..;(
TIA
Cheers,
Lukasz
H E L P ! ! !
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.