[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lispm programming questions



I am having problems in three different areas of lispm programming and
I would appreciate any clarification.
	The problems involve:
(1) Simple usage of packages
(2) Creating a new font in the FED
(3) Accessing existing window objects.

===========================================================================
==========================================================================

I am trying some very simple usage of packages and I can't get it to work
as expected.   In this example, I am trying to define a function named
jfoo in the package named jtest.


In ZMACS, I create and compile the following buffer:

;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: (JTEST) -*-

(defun jfoo ()
  (format t "~%This symbol is in package jtest"))


Next, in a lisp-listener, I evaluate the following:

*package*
#<Package USER (really COMMON-LISP-USER) 42204076>
;;;fine

(package-use-list (find-package "user"))
(#<Package SYMBOLICS-COMMON-LISP 41305541>)
;;;also fine

(jfoo)
Use the definition of JTEST:JFOO? (Y, N, V, P, or G) Yes.
This symbol is in package jtest
NIL
;;;Why is jfoo external? <*************************

(jtest:jfoo)
This symbol is in package jtest
NIL
;;;Same question, why is jfoo external?

(use-package "jtest")
T
;;;fine

(package-use-list (find-package "user"))
(#<Package SYMBOLICS-COMMON-LISP 41305541>
 #<Package JTEST 60544371>)
;;;also fine

(jfoo)
Use the definition of JTEST:JFOO? (Y, N, V, P, or G) Yes.
This symbol is in package jtest
NIL
;;;I expected to be able to use (jfoo) without a prefix!? <*****************

(export 'jfoo "jtest")
;;;here I got a complaint that the symbol JFOO is not present in package JTEST
;;;this I understand
Back to Dribbling Lisp Listener in Dynamic Lisp Listener 2.

(export 'jtest:jfoo "jtest")
;;;here I got a complaint that exporting the symbol JFOO would cause a name
;;;conflict in USER- this I don't understand <****************************
Back to Dribbling Lisp Listener in Dynamic Lisp Listener 2.

;;;Finally, I tried importing JTEST:JFOO into USER but it complained that
;;;"this would cause a name conflict with JFOO which is already present"
;;;This I dont understand <***********************************
	
The description of this stuff in CLtL and the Symbolics docs doesn't seem
all that complicated.   What obvious point(s) am I overlooking?



==============================================================================
==============================================================================

The documentation for the FED says that one can create a new font by
attempting to edit a font that is not known to the system. When I try to
do this, (by clicking on edit font then entering a fake name) the FED
complains that the directory >rel-7-2>fonts>lgp1> doesn't exist.  It
gives me a variety of proceed options, none of which allow me to create
the new font!


===============================================================================
===============================================================================

I want to be able to access any EXISTING window objects.
(for example, so I can send it various messages etc.)  The question is, how
can I get the window object?
If I'm making a NEW window I can use (setq x (tv:make-window .... etc.
and then refer to the value of x.
By poking around in the source for SYS:FIND-WINDOW-OF-FLAVOR 
 I found that the function call:
(SYS:CONSOLE-PREVIOUSLY-SELECTED-WINDOWS  SYS:*SLB-MAIN-CONSOLE*)
returns an array whose members are PREVIOUSLY-SELECTED windows, which is pretty
close to what I want.  Incidently, the source for SYS:FIND-WINDOW-OF-FLAVOR has
the intriqueing (sp?) comment:   "Only looks at PREVIOUSLY-SELECTED-WINDOWS, 
but that should have all the ones of any interest." indeed!


Regards,
Joe Karnicky
<KARNICKY@CRVAX.SRI.COM>