Hi!
Just in case anyone cares, source is now at https://hg.sr.ht/~oofoe/wb (because BitBucket stopped supporting Mercurial). Hope this is helpful!
I have some other NewLisp stuff there as well if you're interested.
Cheers!
Search found 61 matches
- Sat May 06, 2023 2:58 am
- Forum: newLISP in the real world
- Topic: ANNOUNCE: wb, an Aviation Weight/Balance Calculator
- Replies: 4
- Views: 14794
- Sat Mar 18, 2017 2:43 pm
- Forum: newLISP Graphics & Sound
- Topic: How to change the font of Panel Title?
- Replies: 3
- Views: 7736
Re: How to change the font of Panel Title?
OK, see that you're using gs:set-titled-border -- I haven't used that one myself. Does seem that gs:-set-font won't work for that through the GUIServer. However, the SWT (successor to AWT which is used by GUIServer, I think) will allow to set a font with the .setFont() method. Perhaps AWT has the sa...
- Sat Mar 18, 2017 2:33 pm
- Forum: newLISP Graphics & Sound
- Topic: How to change the font of Panel Title?
- Replies: 3
- Views: 7736
Re: How to change the font of Panel Title?
Can you post source for this GUI display? Not even sure how you're displaying it since NewLisp GUIServer doesn't seem to support the AWT Group widget.
If you're just dropping text over a hand drawn group, you can do it using the gs:set-font function.
If you're just dropping text over a hand drawn group, you can do it using the gs:set-font function.
- Mon Sep 19, 2016 1:28 pm
- Forum: newLISP newS
- Topic: Documentation example error for import...
- Replies: 3
- Views: 10712
Re: Documentation example error for import...
Hi! Thanks very much for fixing that. It's a small thing, but it can really trip someone up when they're trying to make something like that work for the first time. Any possibility of getting the "(import LIBRARY)" syntax in Windows too? With maybe some way to list the symbols in the library? Thanks!
- Sat Sep 17, 2016 4:12 pm
- Forum: newLISP in the real world
- Topic: ANNOUNCE: A Simple Genetic Algorithm in NewLisp...
- Replies: 2
- Views: 4699
Re: ANNOUNCE: A Simple Genetic Algorithm in NewLisp...
Incidentally, here's how to determine if a file is a png image using the standard libpng library: ;; C library functions. (import "msvcrt.dll" "fopen") (import "msvcrt.dll" "fread") ;; PNG library functions. (import "libpng16-16.dll" "png_sig_cmp") (define (pngfile? path) "( path -- f) Determines if...
- Sat Sep 17, 2016 2:38 pm
- Forum: newLISP in the real world
- Topic: ANNOUNCE: A Simple Genetic Algorithm in NewLisp...
- Replies: 2
- Views: 4699
ANNOUNCE: A Simple Genetic Algorithm in NewLisp...
Hi! In my quest to construct a program to derive the question to the answer of Life, the Universe and Everything (which is, as any schoolchild knows, 42), I wrote a very simple genetic algorithm solver. I don't mean simple as in "simple to use", I mean absolute braindead simple. By some definitions,...
- Sat Sep 17, 2016 2:28 pm
- Forum: newLISP newS
- Topic: Documentation example error for import...
- Replies: 3
- Views: 10712
Documentation example error for import...
Hi! Hope this is the best place to post this... The first example for import at http://www.newlisp.org/downloads/newlisp_manual.html#import is incorrect. It should have the following marked line added: (define LIBC (lookup ostype '( ("Windows" "msvcrt.dll") ("OSX" "libc.dylib") (import LIBC "printf"...
- Fri Jul 15, 2016 6:29 pm
- Forum: newLISP Graphics & Sound
- Topic: Setting a checkbox programatically?
- Replies: 1
- Views: 7873
Setting a checkbox programatically?
Hi! I have something like this: (gs:panel 'Panel) (gs:check-box 'Visible 'checkboxing "visible) (gs:add-to 'Panel 'Visible) And it's very nice. I get events when the user changes the value to my checkboxing function and so forth. However, what if I want to set the value from the program? (gs:set-val...
- Mon Jul 11, 2016 4:49 am
- Forum: newLISP and the O.S.
- Topic: Cross platform web browser launch?
- Replies: 0
- Views: 8855
Cross platform web browser launch?
Hi!
Is there anything like the Python webbrowser library to launch a file in the system specific web browser?
I'm currently using
where pfile is something like "c:\\temp\\card-preview.html", but this is very specifically Windows...
Thanks!
Is there anything like the Python webbrowser library to launch a file in the system specific web browser?
I'm currently using
Code: Select all
(! (string "explorer.exe " pfile) 0)
Thanks!
- Mon Jul 11, 2016 4:46 am
- Forum: newLISP Graphics & Sound
- Topic: Macros and guiserver?
- Replies: 4
- Views: 8909
Re: Macros and guiserver?
Thanks for taking a look! Macros are supposed to be useful for "writing the code that you would have written if you had the patience". Since guiserver uses symbols, I figured that they would be perfect for button assembly boilerplate. However, I had to cheat with sending strings to guiserver because...
- Thu Jul 07, 2016 3:50 am
- Forum: newLISP Graphics & Sound
- Topic: Macros and guiserver?
- Replies: 4
- Views: 8909
Re: Macros and guiserver?
OK, think I've got it. Here's the revised macro: (define-macro (button3 _parent _name _buttons) (letn ((panel (sym (string (eval _parent) "-" (eval _name)))) (slots '("west" "center" "east")) (bname nil) (i nil)) (gs:panel panel) (gs:set-border-layout panel) (dotimes (i (length (eval _buttons))) (se...
- Mon Jul 04, 2016 12:16 pm
- Forum: newLISP Graphics & Sound
- Topic: Macros and guiserver?
- Replies: 4
- Views: 8909
Macros and guiserver?
Hi! I am experimenting with macros to do more "declarative" setups in guiserver. Here is a macro that I have created to make a three button setup: (define-macro (button3 _parent _name _buttons) (letn ((panel (sym (string (eval _parent) "-" (eval _name)))) (slots '("west" "center" "east")) (bname nil...
- Wed Feb 17, 2016 8:15 pm
- Forum: newLISP Graphics & Sound
- Topic: Inspector v.0.4: Remote Inspector
- Replies: 1
- Views: 6887
Re: Inspector v.0.4: Remote Inspector
This looks quite interesting! I'll give it a try when I update to the new release.
Thanks for releasing it!
Thanks for releasing it!
- Sat Jan 09, 2016 1:17 pm
- Forum: newLISP in the real world
- Topic: Using xmlrpc-client.lsp...
- Replies: 2
- Views: 8572
Using xmlrpc-client.lsp...
Hi! I ran into a little problem when using %xmlrpc-client.lsp with our python/django XMLRPC server at work. It has a very strict interpretation of how many arguments it will accept for certain functions, like system.listMethods, so the default request with the single dummy argument won't work. I wou...
- Sat Dec 12, 2015 4:02 am
- Forum: newLISP Graphics & Sound
- Topic: GUIServer Bug: Scrolled canvas isn't repainted.
- Replies: 2
- Views: 9830
Re: GUIServer Bug: Scrolled canvas isn't repainted.
Christmas is early -- this works great!
The canvas-unclick function was just to show that I had tried to do a gs:update and it hadn't worked either. I wanted to give you a good example to test with.
Thanks very much!
The canvas-unclick function was just to show that I had tried to do a gs:update and it hadn't worked either. I wanted to give you a good example to test with.
Thanks very much!
- Wed Dec 09, 2015 5:05 am
- Forum: newLISP Graphics & Sound
- Topic: Problems Getting Keyboard Event From text-area
- Replies: 2
- Views: 7594
Re: Problems Getting Keyboard Event From text-area
Hi! Thanks for the hint! I am working on repurposing the newlisp-edit.lsp code now. Periodically, you call a function (set-buffer-dirty). I can't seem to find this defined in either newlisp-edit.lsp or guiserver.lsp. Is it something that I need to have? EDIT: Actually it seems that the function was ...
- Mon Dec 07, 2015 11:41 pm
- Forum: newLISP Graphics & Sound
- Topic: Problems Getting Keyboard Event From text-area
- Replies: 2
- Views: 7594
Problems Getting Keyboard Event From text-area
Hi! I'm trying to wire up a text-area with a keyboard event so I can detect if the user presses the escape key while typing. It works fine for text-field Title (see below), but the handler never gets called for keypresses in Body. I have wired the standard handler into gs:no-action because it either...
- Mon Dec 07, 2015 6:28 pm
- Forum: newLISP Graphics & Sound
- Topic: GUIServer Bug: Scrolled canvas isn't repainted.
- Replies: 2
- Views: 9830
GUIServer Bug: Scrolled canvas isn't repainted.
Hi! I'd like to report a bug with canvases when used with scroll bars. If you run the following code, it creates a 2048x2048 canvas, then places it into a scrolled pane. You can scroll the canvas, but it will not repaint when you stop scrolling. Even forcing a gs:update (click on canvas) will not re...
- Wed Nov 25, 2015 6:05 pm
- Forum: newLISP and the O.S.
- Topic: How to declare Linux variables by using newLisp
- Replies: 2
- Views: 8077
Re: How to declare Linux variables by using newLisp
Hi! The "!" is a shell command -- it has its own environment every time it's run, which is not saved between invocations. So, this: (! "set final_answer=42") is probably working, but when you run this: (! "echo $final_answer") the previous environment is destroyed in favour of the new one. You can u...
- Mon Nov 02, 2015 12:51 pm
- Forum: newLISP in the real world
- Topic: ANNOUNCE: wb, an Aviation Weight/Balance Calculator
- Replies: 4
- Views: 14794
ANNOUNCE: wb, an Aviation Weight/Balance Calculator
Hi! Don't know if this is the best place to post this, but I did use this "in the real world" to compute my weight and balance for my flight yesterday... This program makes it easy to do your weight and balance calculations so you can determine your position in the performance envelope before you ta...
- Wed Oct 14, 2015 7:18 am
- Forum: newLISP Graphics & Sound
- Topic: GUI server draw-image JPEG load problem...
- Replies: 1
- Views: 8129
Re: GUI server draw-image JPEG load problem...
OK, after some head scratching, I figured I must be experiencing some sort of redraw problem. I changed the code to this: (gs:delete-tag 'I false) (gs:draw-image 'I path 0 0 (psize 1) (psize 0)) (gs:draw-text 'I path 21 25 '(0 0 0)) (gs:draw-text 'I path 20 24 '(1 1 0)) (gs:show-tag 'I) Note the add...
- Mon Oct 12, 2015 9:08 pm
- Forum: newLISP Graphics & Sound
- Topic: GUI server draw-image JPEG load problem...
- Replies: 1
- Views: 8129
GUI server draw-image JPEG load problem...
Hi! I'm doing a simple picture viewer using the GUI server. However, I am having an odd problem where sometimes the image loads and sometimes it doesn't. If I advance to the next image then come back to one that didn't load, it will often load then. I am using this to clear the previous image, then ...
- Sat Apr 26, 2014 1:28 pm
- Forum: newLISP in the real world
- Topic: How to deal with lists of objects?
- Replies: 4
- Views: 4572
Re: How to deal with lists of objects?
OK, that's basically what I was suggesting in the last para, except that my modification looked like this: (define (Plane:firewall) (setf (self 1) 2700) (self)) It doesn't seem very efficient to have to replace the entire data structure each time I want to do an update. OOP may not be a good fit for...
- Sat Apr 26, 2014 7:14 am
- Forum: newLISP in the real world
- Topic: How to deal with lists of objects?
- Replies: 4
- Views: 4572
How to deal with lists of objects?
Hello! I am trying to set up a little simulation project, but I am running into some problems with FOOPS and pass by value... I have a Plane class, which considers the engine RPM and the altitude of the airplane: (new Class 'Plane) (define (Plane:Plane rpm alt) (list 'Plane rpm alt)) Now, I might ha...
- Thu Apr 04, 2013 12:03 pm
- Forum: Whither newLISP?
- Topic: Closure?
- Replies: 3
- Views: 8638
Closure?
Hi! I'm working through the early examples of the "Stratified Design" paper[1] and I've run (almost immediately!) into something that doesn't seem to work. They describe an average-damp function that given a function, returns a new function that averages the value with the result of the function: (d...