| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| På Thu, 12 Jun 2008 20:01:53 +0200, skrev Jacobite1607 <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 lisp_hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html -------------- John Thingstad |
|
#3
| |||
| |||
| On Jun 12, 2:01*pm, Jacobite1607 <Jacobite1...@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 |
|
#4
| |||
| |||
| On Thu, 12 Jun 2008 11:01:53 -0700 (PDT), Jacobite1607 <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")) |
|
#5
| |||
| |||
| > 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 |
|
#6
| |||
| |||
| In article <7e16119e-65ba-44ae-92c7-eac939f69d0a@z72g2000hsb.googlegroups.com>, Jacobite1607 <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/ |
|
#7
| |||
| |||
| > 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.