home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!ede978e
- From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
- Subject: NXBrowser problem
- Message-ID: <1992Aug13.015731.12978@monu6.cc.monash.edu.au>
- Summary: Help with NXBrowser Problem
- Organization: Monash University, Caulfield Campus
- Date: Thu, 13 Aug 1992 01:57:31 GMT
- Lines: 78
-
-
- 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?
-
-