From: Jacobite1607
Subject: Capi Question
Date: 
Message-ID: <1faefa38-7a91-43da-b101-36be9d2ea5c4@p25g2000hsf.googlegroups.com>
I am trying to set the value of an option-pane, yet when I try the
examples in the book, which use numbers instead of a string, it works.
However it does not work when I...
*********************************************************
(setf MyList (list "Ron" "Paul" "John"))

(setf EmployeeFlyout (make-instance 'option-pane
                                      :items MyList
                                      :visible-max-width '(:character
30)
                                      :selection-callback
'SelectedEmployee
                                      :callback-type :data
                                      :title "Employee:"))

(contain EmployeeFlyout)

(capi:apply-in-pane-process EmployeeFlyout #'(setf capi:choice-
selected-item)
 "Paul" EmployeeFlyout)
*********************************************************
I know I'm missing something. What am I doing wrong?

William

From: Geoffrey Summerhayes
Subject: Re: Capi Question
Date: 
Message-ID: <7c963bc8-6d52-43c5-a244-56d549087025@w7g2000hsa.googlegroups.com>
On Jun 12, 2:01 pm, Jacobite1607 <············@gmail.com> wrote:
> I am trying to set the value of an option-pane, yet when I try the
> examples in the book, which use numbers instead of a string, it works.
> However it does not work when I...
> *********************************************************
> (setf MyList (list "Ron" "Paul" "John"))
>
> (setf EmployeeFlyout (make-instance 'option-pane
>                                       :items MyList
>                                       :visible-max-width '(:character
> 30)
>                                       :selection-callback
> 'SelectedEmployee
>                                       :callback-type :data
>                                       :title "Employee:"))
>
> (contain EmployeeFlyout)
>
> (capi:apply-in-pane-process EmployeeFlyout #'(setf capi:choice-
> selected-item)
>  "Paul" EmployeeFlyout)
> *********************************************************
> I know I'm missing something. What am I doing wrong?

From the look of it, I'd say the capi package qualifier
on option-pane and contain.

---
Geoff
From: Simon Katz
Subject: Re: Capi Question
Date: 
Message-ID: <0ht254lt3ijqsu9e28nh72p4jbfl3l22g1@4ax.com>
On Thu, 12 Jun 2008 11:01:53 -0700 (PDT), Jacobite1607
<············@gmail.com> wrote:

>I am trying to set the value of an option-pane, yet when I try the
>examples in the book, which use numbers instead of a string, it works.
>However it does not work when I...
>*********************************************************
>(setf MyList (list "Ron" "Paul" "John"))
>
>(setf EmployeeFlyout (make-instance 'option-pane
>                                      :items MyList
>                                      :visible-max-width '(:character
>30)
>                                      :selection-callback
>'SelectedEmployee
>                                      :callback-type :data
>                                      :title "Employee:"))
>
>(contain EmployeeFlyout)
>
>(capi:apply-in-pane-process EmployeeFlyout #'(setf capi:choice-
>selected-item)
> "Paul" EmployeeFlyout)
>*********************************************************
>I know I'm missing something. What am I doing wrong?
>
>William


You need to add
    :test-function #'equal
to the make-instance call, otherwise EQ or EQL is used (I'm not sure
which) and that doesn't do what you want for strings.

(And as John said, LispWorks-specific questions are best asked on
the LW-specific list.)

___________________
Real email address:
(substitute ··@ #\+ (substitute #\s #\! "u!enet001+nomi!tech.com"))
From: Jacobite1607
Subject: Re: Capi Question
Date: 
Message-ID: <7e16119e-65ba-44ae-92c7-eac939f69d0a@z72g2000hsb.googlegroups.com>
> You need to add
>     :test-function #'equal
> to the make-instance call, otherwise EQ or EQL is used (I'm not sure
> which) and that doesn't do what you want for strings.

Excellent, thank you! That worked like a champ.

>
> (And as John said, LispWorks-specific questions are best asked on
> the LW-specific list.)

I did actually send the question to them, at the same time I posted
here it has yet to appear. I have sent a question to their gmane list
in the past and it went through successfully so who knows why. Even
with all the spam on this group it's still better than gmane.

Thanks,

William
From: Rainer Joswig
Subject: Re: Capi Question
Date: 
Message-ID: <joswig-7AAEAE.22295612062008@news-europe.giganews.com>
In article 
<····································@z72g2000hsb.googlegroups.com>,
 Jacobite1607 <············@gmail.com> wrote:

> > You need to add
> > � � :test-function #'equal
> > to the make-instance call, otherwise EQ or EQL is used (I'm not sure
> > which) and that doesn't do what you want for strings.
> 
> Excellent, thank you! That worked like a champ.
> 
> >
> > (And as John said, LispWorks-specific questions are best asked on
> > the LW-specific list.)
> 
> I did actually send the question to them, at the same time I posted
> here it has yet to appear. I have sent a question to their gmane list
> in the past and it went through successfully so who knows why. Even
> with all the spam on this group it's still better than gmane.
> 
> Thanks,
> 
> William

Gmane is a different system unrelated to LispWorks (the company).
Gmane makes many mailing lists accessible.

But if you want to post, it is best to use the LISP-HUG mailing
list directly. Read here how you can subscribe:
http://www.lispworks.com/support/lisp-hug.html

-- 
http://lispm.dyndns.org/
From: Jacobite1607
Subject: Re: Capi Question
Date: 
Message-ID: <5b132b08-692e-4e23-9701-a3f334492ac5@j22g2000hsf.googlegroups.com>
> But if you want to post, it is best to use the LISP-HUG mailing
> list directly. Read here how you can subscribe:http://www.lispworks.com/support/lisp-hug.html

After my post here I checked and found that I was mistaken about
posting on Lisp-hug in the past. Someone from Lispworks contacted me
and found that my email was being formatted with a line break and
therefore I wasn't properly registered. The problem has been
corrected.

Thanks for everyone's help.

William
From: John Thingstad
Subject: Re: Capi Question
Date: 
Message-ID: <op.ucne5mufut4oq5@pandora.alfanett.no>
P� Thu, 12 Jun 2008 20:01:53 +0200, skrev Jacobite1607  
<············@gmail.com>:

> I am trying to set the value of an option-pane, yet when I try the
> examples in the book, which use numbers instead of a string, it works.
> However it does not work when I...
> *********************************************************
> (setf MyList (list "Ron" "Paul" "John"))
>
> (setf EmployeeFlyout (make-instance 'option-pane
>                                       :items MyList
>                                       :visible-max-width '(:character
> 30)
>                                       :selection-callback
> 'SelectedEmployee
>                                       :callback-type :data
>                                       :title "Employee:"))
>
> (contain EmployeeFlyout)
>
> (capi:apply-in-pane-process EmployeeFlyout #'(setf capi:choice-
> selected-item)
>  "Paul" EmployeeFlyout)
> *********************************************************
> I know I'm missing something. What am I doing wrong?
>
> William

CAPI questions are better directed to ········@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

--------------
John Thingstad