[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [femm] Latest FEMM (the LUA bits)



Robin,

It may be messy but it really has the basis of something good, it adds a really useful facility to FEMM without messing up its simplicity so please persevere.

At 08:46 06/08/01 +0100, you wrote:
Dear Keith,
 
Sorry about the typos in the instructions, this should be a priority for me as it must be very frustrating. I will have a check of the lua instructions in the next few days.

It was a bit worrying but it only took me a few minutes to work out what was going on.

 
I can see you difficulty with passing file names. This is a know problem from having two separate lua processes, one in femm and one in femmview. The use of a temp file to hold the name works but it is messy. Passing parameters should be easy enough, I feel the best way to go is that I take all extra parameters passed to femm view (after the data file and the lua script) and place these on lua's stack. Then the first few lines of lua code in femmview could simply retrieve from the lua stack and work with them as normal.

Is this the way that you pass the file and script names then and could you always be sure of what the stack contents will be? I can't remember if you can push stuff on to the stack from a script.

 
The bitmap updating problem is one that I feared but could not cause on my computer. I believe the problem is that when an UpdateAllViews() is called windows marks the display as dirty and when it gets time (ie idling) it sends on OnDraw() which updates the display. I may have to force OnDraw() to make sure the display is OK for saving.

Including a pause in the script seems to make the window update - does that do an OnDraw()?

 
I will also check the file format of the bitmap, it should be a normal windows type bitmap.

It may be me, some of my software is a bit old (I tend not to change stuff that works!) but it is strange that IrfanView can read it but Word 97 and Photoshop 5 can't.

Just as an aside, does it have to be a Windows bitmap or could you use another format?

 
The Lua bit is still rather experimental but I will do my best to clean it up a lot !

I like experimental stuff it's more fun, but then I'm strange like that. Once I'd downloaded the LUA manuals it became plain that this stuff could be very powerful. If you don't mind I will continue to comment and make suggestions. 

Keith.
Keith Gregory
Department of Electronic & Electrical Engineering
Loughborough University
Phone: 01509 227025  Fax: 01509 227014
Department web: http://www.lboro.ac.uk/departments/el/