Permalink
Browse files

Merge branch 'master' of https://github.com/Metaxal/MrEd-Designer

  • Loading branch information...
2 parents 75c44e7 + 6149d9e commit 2b3dcb5f6fe3e929d4e30c3ec70b71f49efad5a0 @khardy khardy committed Aug 24, 2012
Showing with 349 additions and 313 deletions.
  1. +7 −1 Changelog
  2. +1 −1 code-generation.ss
  3. +32 −7 controller.ss
  4. +1 −1 main.ss
  5. +1 −1 mreddesigner-misc.ss
  6. +307 −302 toolbox-frame.ss
View
@@ -1,3 +1,10 @@
+Version 3.9
+ Laurent Orseau, Kieron Hardy, 2012-??-??
+- added: editor-canvas widget (Kieron Hardy)
+- changed: Scheme->racket
+- changed: output to frame instead of to console
+- fix: tab-panel crash and removed need for single-panel
+
Version 3.8
Laurent Orseau, 2012-02-04
- added: can now take projects as command line arguments
@@ -8,7 +15,6 @@ Version 3.8
- fixed: tooltip.ss was not always removing tooltip on windows
- fixed: mreddesigner.bat : small DOS issues
-
Version 3.7
Laurent Orseau, 2010-07-26
- changed: images (files) are *always* relative to project base directory,
View
@@ -59,7 +59,7 @@
(define (module-header)
(string-append "\
-#lang scheme/gui
+#lang racket/gui
;;==========================================================================
;;=== Code generated with MrEd Designer " application-version
View
@@ -357,10 +357,9 @@
parent-frame
base-path
dft-name
- "*.ss"
+ "*.rkt"
'()
- '(("Scheme (.ss)" "*.ss")
- ("Scheme (.scm)" "*.scm")
+ '(("Racket (.rkt)" "*.rkt")
("Any" "*.*")))])
(and file
(path->string file)
@@ -378,18 +377,44 @@
; (path->string file))
)))
-(define/provide (controller-generate-code-to-console [mid (get-current-mred-id)])
+;; Like frame:text% but without exiting the app when closing the window
+(define no-exit-frame:text%
+ (class frame:text%
+ (super-new)
+ (define/override (on-exit)
+ ;(printf "on-exit\n")
+ (void))
+ (define/override (can-exit?)
+ ;(printf "can-exit?\n")
+ #f)
+ (define/augment (on-close)
+ ;(printf "on-close\n")
+ (void))
+ (define/augment (can-close?)
+ ;(printf "can-close?\n")
+ (send this show #f)
+ #f)
+ ))
+
+(define/provide (controller-generate-code-to-frame [mid (get-current-mred-id)])
(when mid
- (let ([project-mid (send mid get-top-mred-parent)])
- (generate-module project-mid))))
+ (define project-mid (send mid get-top-mred-parent))
+ (define f (new no-exit-frame:text%
+ [min-height 500]))
+ (send f set-label (->string (send project-mid get-id)))
+ (define txt (send f get-editor))
+ (send txt insert
+ (with-output-to-string (λ _ (generate-module project-mid))))
+ (send f show #t)
+ ))
(define/provide (controller-generate-code [mid (get-current-mred-id)]
#:ask [ask-user? #t])
(when mid
(let* ([project-mid (send mid get-top-mred-parent)]
;[proj-file (send project-mid get-property-value 'file)]
[base-dir (send project-mid get-project-dir)]; (and proj-file (path-only (string->path proj-file)))]
- [dft-file (string-append (->string (send project-mid get-id)) ".ss")]
+ [dft-file (string-append (->string (send project-mid get-id)) ".rkt")]
[file (if ask-user?
(choose-code-file dft-file base-dir toolbox-frame)
dft-file)]
View
@@ -95,7 +95,7 @@
#:exit-application-callback controller-exit-application
#:plugin-button-callback controller-create-mred-id
#:generate-code-callback controller-generate-code
- #:generate-code-to-console-callback controller-generate-code-to-console
+ #:generate-code-to-console-callback controller-generate-code-to-frame
#:new-project-callback controller-new-project
#:load-project-callback controller-load-project
#:save-project-callback controller-save-project
View
@@ -43,7 +43,7 @@
;; Current version of MrEd Designer
(define/provide application-version-maj 3)
-(define/provide application-version-min 8)
+(define/provide application-version-min 9)
(define/provide application-version (format "~a.~a" application-version-maj application-version-min))
(define/provide application-name "MrEd Designer")
(define/provide application-name-version
Oops, something went wrong.

0 comments on commit 2b3dcb5

Please sign in to comment.