• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
What to do?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: What to do?
      • From: Angela Brett <email@hidden>
    • Re: What to do?
      • From: Andrew Mortensen <email@hidden>
  • Prev by Date: Re: getting info from network computer
  • Next by Date: Re: What to do?
  • Previous by thread: Re: variable arguments in ObjC
  • Next by thread: Re: What to do?
  • Index(es):
    • Date
    • Thread