Hello Guest it is April 29, 2024, 07:44:10 AM

Show Posts

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.


Messages - django013

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 »
101
Mach4 General Discussion / Re: slider display issue
« on: May 01, 2017, 03:39:39 AM »
It's solved with 3376 - thank you very much!

102
Mach4 General Discussion / more lua (?) questions
« on: May 01, 2017, 03:27:33 AM »
Hello,

with my first steps in lua I created a faked table control for the tool table. Awful how fast lua is - even in a VM!
With the '+' and '-' buttons I can scroll through the tools table.
Now I'd like to add the slider as scrollbar. The '+' and '-' buttons already use the slider value to read the tools, but there's no link to moving the slider. The slider has no 'on-update' script, so how can I create something similar?

And next question:
Tabbing through the entryfields works fine, but after the last field, the tab disappears in deep space ...
Is it possible to create a tab-group, so that the tab jumps to the first entryfield after leaving the last one?

103
Mach4 General Discussion / Re: accessibility of lua functions?
« on: May 01, 2017, 03:18:59 AM »
Thanks! That was the key.

As the manual didn't mention function declarations at all, I asked Mr.Google and he gave me a helping hand :D
Function declaration is just asigning a value to a variable =:O

Works pretty well and it is completely awfull, how fast lua is :)

104
Mach4 General Discussion / accessibility of lua functions?
« on: April 30, 2017, 11:41:28 AM »
Hello,

I added a script to a tab-page onEnter, which contains a function and works so far.

Now I want to reuse that function from a buttons leftup script - and that fails. Where do I have to put functions right, so that both scripts can use it?

105
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 30, 2017, 03:36:55 AM »
The macro-editor (mcLua) uses different codepage than mach4.
Any non-ascii-character gets displayed weired.

106
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 30, 2017, 03:19:48 AM »
Oups - I have to say sorry to lua.

The problem is not lua, but the format-string. The dot counts, so the right format string should be "%05.2f"
... with that format-string, it works from lua ;)

107
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 30, 2017, 02:45:50 AM »
I looked at the keyboard-Panel - I don't see any suspicious things related to "o".
But to make things clear: I run mach4 from a virtualbox-VM no real windows pc

and I checked SecondsToTime:
When I saw the format-string "%04f" I knew that something went wrong. So I added an error-log which leads to
Code: [Select]
function SecondsToTime(seconds)
if seconds == 0 then
return "00:00:00.00"
else
local hours = string.format("%02.f", math.floor(seconds/3600))
local mins = string.format("%02.f", math.floor((seconds/60) - (hours*60)))
local secs = string.format("%04.2f",(seconds - (hours*3600) - (mins*60)))
                mc.mcCntlSetLastError(inst, "secs " .. secs)
return hours .. ":" .. mins .. ":" .. secs
end
end
you can see the result in the errorline of the attached screenshot.
I tested the same with lua outside of mach4 with the result, that lua does not support leading '0' on float formats.
A SecondsToTime function, that works as expected is a bit ugly:
Code: [Select]
function SecondsToTime(seconds)
   if seconds == 0 then
      return "00:00:00.00"
   else
      local hours = math.floor(seconds/3600)
      local mins = math.floor((seconds/60) - (hours*60))
      local tmp = seconds - (hours*3600) - (mins*60)
      local secs = math.floor(tmp)
      local rest = math.floor((tmp - secs) * 100)
      return string.format('%02d:%02d:%02d.%02d', hours, mins, secs, rest)
   end
end

108
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 30, 2017, 01:25:06 AM »
Hi Steve,

Quote
So please do not blame us.
Please take for granted, that I don't want to blame you. I'm far away from that point and if anything I write sounds like that, than its sourced by the lack of my english and not by the spirit to blame you.

I run several pcs and not one runs windows. So if I write here, you can take for sure, that I have to blame linuxcnc and mesa - but not mach.
You're doing a great job and when I write about issues, its to help you improve mach and not to blame you.

Quote
And part of keeping it affordable is not having it pirated.
100% agreed!

But I compare mach with eagle. Don't know, whether you heard about it (pcb designer). eagle had a very hobbyfriendly licensing policy and for so, it became a standard in open source community. Sure it get hacked and several guys spent lot of time, abusing the license.
But I think, the hackers helped eagle to become famous - so I see both sides: the creators of eagle lost money with the hacks, but they probably earned money from others, cause of the increased rumors.
Now that autocad bought eagle and changed license - eagle is dead.

So from my point of view: I'm willing to pay for mach, cause you support hobbyists in doing what they want and don't force them to do what you want.
You are on the right way and I hope, that my feedback is treaten right: I want to help you improve mach.
Nothing more.

beside that, I'm learning mach and I know, that I don't know anything.

109
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 30, 2017, 12:02:49 AM »
Quote
The LUA function SecondsToClock() does the format.  This function is defined in the screen load script and is thus available to all screen scripts.
Ok, found a menuentry to view the script, but no way to edit it.
So I'm trapped again :(

110
Mach4 General Discussion / Re: Problem in front or behind the screen?
« on: April 29, 2017, 11:32:14 PM »
Hi,

thank you for your attention!

Quote
Mach 4 is not Mach 3.
I already read and understood that. I read the threads about feature requests and bug reports ...
I guess, mach3 was coded by using win32 calls, whereas mach4 uses wxwindows.

My thinking does not depend on mach3. I don't know much of it. My thinking comes from other applications / gui systems like java swing or ibm c++ class library ...
I don't know wxwindows, so I don't know, what's possible. Therefore I wrote about what I miss in mach3 and in mach4.

Quote
I would suggest reading the API documentation
Yes sir, I already did.
But with the reading, I thought, that the api documentation looks like c++ documentation - and therefor I thought, api docs might be intended for plugin/c++ developers.
No api from c++ level is accessible through lua if you don't create an intermediate function call.
I found the file "LuaCalls", which might be the api-specs for scripting, but looking at the samples, I have no feeling about what needs to be done and what is optional.
Many samples use dialogs. I don't want dialogs. I want most functionality happen in the screen, so that all functions are accessible without mouse interaction.

Thank you very much for the samples in your post. I will go for that.

Respect to what I'm missing in gui: is it possible to add lua-gui-elements to existing panels like notebooktabs or groupboxes?
Then of cause I will have to learn lua and wxwindows.

by the way: when I read about mach4 and lua and wxwindows, my heart started jumping and I thought, so may be the day comes, where machLinux will be available ;)
I'm quite sure, I'm not the only linux guy willing to pay for machLinux.

Quote
The reason is that lets the hackers know what to look for to try and disable the timeout!
Hehe - in germany there's a phone company called "O2" - which spends more menpower in disabling functionality than in supporting paying users. Hope you don't follow that direction :)

P.S.: are you interested in po-file fixes (diffs?)

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 »