This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuYou may also want to look into the gs:tabbed-pane control. There is a demo about this in tabs-demo.lsp. These are nice when you need to switch beck and forth between different forms.Quote
;;; run
(define (run)
(begin
(gs:init)
(gs:frame 'Main 200 200 320 480 "Main")
(setq p1 (pane1 'app:got-event))
(setq p2 (pane2 'app:got-event))
(gs:add-to 'Main 'p1)
(gs:set-visible 'Main true)
(gs:listen)))
;; go
(run)
(define (pane1:pane1 cbak)
(begin
(gs:panel 'pane1)
(gs:button 'Btn1 cbak "OK 1")
(gs:add-to 'pane1 'Btn1)))
add-to app:Main app:p1 : Could not invoke method add-to with app:Main
ERR: symbol is protected in function setq : callback
called from user defined function form1
called from user defined function app:run
#!/usr/bin/env newlisp
; app.lsp
;
;; load modules
(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
(load "form1.lsp")
(load "form2.lsp")
;; definitions
(context 'app)
;;; handlers
(define (app:got-event id value)
(begin
()))
;;; run
(define (run)
(begin
(setq f1 (form1 'app:got-event))
(setq f2 (form2 'app:got-event))
(gs:set-visible 'f1 true)
(gs:listen)))
;; go
(run)
#!/usr/bin/env newlisp
; form1.lsp
;
;; load modules
(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
;; definitions
(context 'form1)
(define (form1:form1 callback)
(begin
(gs:init)
(gs:frame 'Form1 200 200 320 480 "Form 1")
(gs:button 'Btn1 callback "OK 1")
(gs:add-to 'Form1 'Btn1)))