🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
5 messages
5 total messages Started by Alexander Scott Hinds Wed, 29 Jul 1992 04:21
Problems implementing services
#305
Author: Alexander Scott Hinds
Date: Wed, 29 Jul 1992 04:21
34 lines
1570 bytes
I have a program in which I'd like to implement services.  That is, I'd  
like it available as a service to other programs.  As per the Appkit  
documentation in the release notes (2.0) I created a file that looks like  
this: (called services.txt)

--
Message: servicesMessage
Port: DATer 
Menu Item: Create DAT Contents
Send Type: NeXT filename pasteboard type
--
(above taken more or less from CopyPath.services)

and added the following line to my Makefile.preamble:
--
LDFLAGS = -sectcreate __ICON __services services.txt
--

This brings me to two questions:

	1.  Where is a list of the valid send types?  I don't really have
	write a program that asks the pasteboard for those strings, do I?

	2.  Why doesn't my program show up in the Services menu?  I tried
	rebooting with the program in LocalApps, and it doesn't show up in
	the workspace like the services for CopyPath do.

Note that I haven't implemented my Listner and servicesMessage method in  
my delegate yet.  I assume that his shouldn't prevent the service from at  
least showing up, right?  

I'd greatly appreciate ANY help.  Thanks in advance.

--X
Re: Problems implementing services
#316
Author: "For deposit only"
Date: Wed, 29 Jul 1992 18:13
20 lines
1506 bytes
In article <1992Jul29.042157.18366@morrow.stanford.edu> hinds@cmgm.Stanford  
(Alexander Scott Hinds) writes:
> I have a program in which I'd like to implement services.  That is, I'd  
> like it available as a service to other programs.  As per the Appkit  
> documentation in the release notes (2.0) I created a file that looks like  
> this: (called services.txt)
> 
> 	2.  Why doesn't my program show up in the Services menu?  I tried
> 	rebooting with the program in LocalApps, and it doesn't show up in
> 	the workspace like the services for CopyPath do.
> 
> --X
You have to add a Services Item to your menu before your application can  
provide services to other applications.  Why? I'm not sure.  Maybe adding the  
Services item forces the linker to bring in other code or maybe the services  
menu communicates with the WorkSpaceManager.  All I know is that it works.  To  
add a Services item in IB, simply drag the Services item from the menu palette  
to your main menu.

Imran
Re: Problems implementing services and new problem
#328
Author: Patrick W Hayes
Date: Wed, 29 Jul 1992 20:50
14 lines
1520 bytes
	A potential problem could be that you changed your program while
it was in the Apps directory.  I have noticed that the Workspace Manager caches
the services you provide so it doesn't have to check every time you log in.  So
to provide new or different services I now remove my program from the Apps 
directory, log out, log in, install it again, log out, and log in again.  It 
took me about six hours to figure that one out.
	My problem is with dynamic services.  I create the file in
 ~/.NeXT/services with my program name and same format as the one that I 
compile with, call NXUpdateDynamicServices() and I don't see my new services.
I'm already the servicesDelegate, so that isn't it.  I even noticed that a new
service from Digital Librarian won't appear in Edit's Services menu until you
quit and restart and open a document, but my own still does not show up.  Any
help greatly appreciated. 
Re: Problems implementing services and new problem
#331
Author: Anil_-_Mandava
Date: Wed, 29 Jul 1992 22:24
9 lines
776 bytes
Use the shell command make_services to dynamically update your services menus.

Referring to the original problem, check the 'Send type' in services.txt file.
The type should be a valid pasteboard type.

Hope this helps,
Anil Mandava.

Internet: anil_mandava@cup.portal.com
Re: Problems implementing services
#345
Author: Hans Peter Geiser
Date: Thu, 30 Jul 1992 08:20
12 lines
885 bytes
> 
> 	2.  Why doesn't my program show up in the Services menu?  I tried
> 	rebooting with the program in LocalApps, and it doesn't show up in
> 	the workspace like the services for CopyPath do.
> 

Let me suppose all you've done in your program is correct (-:. Then try the  
following: remove the files .applist and .cache in ~/.NeXT/services and reboot.  
This will force your system to update these files and your new service should  
be available. (Dont't ask me why this sometimes is necessary!)

Hans - Peter Geiser
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