home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!uwm.edu!ogicse!cs.uoregon.edu!news.uoregon.edu!news.uoregon.edu!systems
- From: jfosback@darmok.uoregon.edu (Jason Fosback)
- Newsgroups: comp.sys.next.programmer
- Subject: HELP: Providing services under 3.0?
- Message-ID: <1dn081INNgag@pith.uoregon.edu>
- Date: 10 Nov 92 00:37:21 GMT
- Organization: University of Oregon Network Services
- Lines: 85
- NNTP-Posting-Host: darmok.uoregon.edu
-
- I'm currently writing an application that will provide a service to
- other applications under NS 3.0. However, I can't get other
- applications to recognize the fact that my application is indeed
- providing a service.
-
- I've tried placing copies in /LocalApps and ~/Apps as per instructions,
- but to no avail. It doesn't help that the documentation in Librarian
- gives TWO possible link commands for the Makefile.preamble. I've tried
- *both*.
-
- I've tried using different send and return types, but it doesn't seem to
- make a difference. My ultimate goal is to provide a service that
- doesn't require any information, thus providing the service from any
- application with a service menu. However, I haven't been able to even
- get an enabled or disabled menu item to appear anywhere.
-
- Below is an abridged version of what I have. I've tried changing the
- main() function to give the commands to theListener (Application
- listener), but it didn't make a difference.
-
- I've also tried the dynamic method of installing the services.text
- information in ~/Library/Services in a file called BlahBlah.service, and
- then called NXUpdateDynamicServices(). No luck. Since I know exactly
- what I want to do, I'd like to avoid this method.
-
- Any help will be MUCH appreciated. Thank you in advance!
-
- -jason
-
-
- Makefile.preamble
-
- #
- # Set up the services handler
- #
-
- LDFLAGS = -sectcreate __ICON __services services.text
-
- #LDFLAGS = -segcreate __ICON __services services.text
-
-
- services.text:
-
- Message: getMail
- Port: PopOver
- Send Type: NXAsciiPboard
- Send Type: NULL
- Return Type: NXAsciiPBoard
- Return Type: NULL
- Menu Item: Retrieve Mail
- Key Equivalent: R
-
-
- Controller.m (File Owner delegate, connected via IB):
-
- - appDidInit:sender
- {
- id theListener;
-
- theListener = [NXApp appListener];
- [theListener setServicesDelegate:self];
- return self;
-
- }
-
- - getMail:(id)pasteboard
- userData:(const char *)userData
- error:(char **)msg
- {
- [self retrieveMail:self];
- return self;
- }
-
- - retrieveMail:sender
- {
- blah blah; // do stuff
-
- return self;
- }
-
- ______________________________________________________________________
- Jason Fosback, Student Programmer/Consultant| No sir, I didn't like it
- ---- University of Oregon ---- | -R&S
- Internet: jfosback@oregon.uoregon.edu | Star Trek:
- NeXT mail: jfosback@darmok.uoregon.edu | The NeXT Generation...
-