Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Robert D. Nicholson
Thu, 13 Aug 1992 01:57
NXBrowser problem
Author: Robert D. Nicholson
Date: Thu, 13 Aug 1992 01:57
Date: Thu, 13 Aug 1992 01:57
77 lines
2821 bytes
2821 bytes
Strange,
As I explained I have this set up.
A list of employees and a list of rooms.
Say I create 3 rooms and each room appears at a branch in column 0
then I create 3 employees each in different rooms. As mentiond
employees are leafs in column 1 hanging off a room branch.
The first employee I add gets loaded correctly and there in after
all other employees appear as "BrowserItem" off their corresponding
room branch.
Signed confused.
Another thing, I cannot accept the exception error im getting since
I have two multicolumn browser examples and they don't give me this
error. Everytime I click on a branch I get an exception error.
Aug 13 11:36:42 steffi Romper[1788]: Exception handlers were not properly removed.
My browser fill method looks like this.
Code follows.
- (int)browser:sender fillMatrix:matrix inColumn:(int)column
{
int row;
int count = 0;
NXBrowserCell *cell;
String *roomDescription;
List *employeesList;
List *roomsList;
employeesList = [[NXApp currentDocument] employeesList];
roomsList = [[NXApp currentDocument] roomsList];
if (column == 0) {
count = [roomsList count];
for (row = 0; row < count; row++) {
[matrix addRow];
cell = [matrix cellAt:row :0];
roomDescription = [[roomsList objectAt: row] roomDescription];
[cell setStringValue:[roomDescription str]];
[cell setLeaf:NO];
[cell setLoaded:YES];
}
return count;
}
else {
String *employeesRoom;
int empCount = [employeesList count];
const char *roomDescription;
Employee *anEmployee;
roomDescription = [[[sender matrixInColumn:column-1] selectedCell] stringValue];
for (row = 0; row < empCount; row++) {
anEmployee = [employeesList objectAt:row];
employeesRoom = [anEmployee employeeRoom];
if (![employeesRoom compareSTR:roomDescription]) {
[matrix addRow];
cell = [matrix cellAt:row :0];
[cell setStringValue:[[anEmployee employeeName] str]];
[cell setLeaf:YES];
[cell setLoaded:YES];
count++;
}
}
return count;
}
return 0;
}
Any ideas?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads