Interface update
Hi,
I have a little question. I've got an interface object defined by the
following class:
(capi:define-interface main-interface ()
((browser :accessor browser :initarg :browser)
(library-structure :accessor library-structure :initarg
:library-structure))
(:panes ...blablabla....)
(:layouts
(main-tab-layout
capi:tab-layout
'(tree-pane-1)
:items (list (list "Browser" browser) (list "Library's Structure"
library-structure))
:visible-child-function 'second
:print-function 'car
:selection 0))
(etc etc etc...)) ---> end of interface
I create a new interface by assigning 2 objects to the browser and
library-structure slots...like this:
(setf aa (make-instance
'capi:output-pane
:background :red))
(setf bb (make-instance
'capi:output-pane
:background :blue))
(setf it (make-instance 'main-interface
:browser aa
:library-structure bb))
(capi:contain it)
Now, the problem I've got is that I do the following somewhere else in
the application:
(defun import-callback (data interface)
(let ((path-name
(capi:prompt-for-file "Choose a structure file:"
:filter "*.st"
:filters '("All Files" "*.*")))
(test-instance (make-tester)))
(if (not (null path-name))
(let ((sr (test-1 test-instance (namestring path-name))))
(setf (library-structure interface) (tree-generator
(dimensions sr))) ********** HERE
(capi:redisplay-interface
interface)) **********
HERE
nil)))
this import-callback function is invoked by selecting "import" in the
menu of the interface defined above (it doesn't appear in this mail
because it's too long). The problem is that I try to assign to the slot
library-structure of the interface a new value (I can do it), but the
problem is that it doesn't update the interface. The function
"tree-generator generates a tree-view with the results.
I know that the function and the results work, because if I add a
capi:contain in the same tree-generator function I get a new window with
the tree I calculated.
Does anyone know how to update the interface with the new value of the
library-structure slot of the interface?
thanks in advance for your time,
regards,
Miro Casanova