Hello Guest it is April 19, 2024, 03:16:49 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 - kane17752

Pages: 1 2 »
1
This does not seem to be working in ver 3390.  My path is Mach4Hobby3390\Modules.  This errors out on the require - version mismatch in precompiled chunck.
Code: [Select]
local inst = mc.mcGetInstance()
local profile = mc.mcProfileGetName(inst)
local path = mc.mcCntlGetMachDir(inst)
package.path = path .. "\\Profiles\\" .. profile .. "\\Modules\\?.lua;" .. path .. "\\Modules\\?.lua;" .. path .. "\\Modules\\?.mcc;"


--CustFunc Module
package.loaded.mcTouchOff = nil
package.loaded.FileFuncModule = nil
ff = require "FileFuncModule"

2
The Show resolved the error

3
Mach4 General Discussion / Lua ListBox
« on: June 11, 2017, 09:52:41 PM »
How do your code add items to a ListBox?  Where do you find documentation as to these types of questions?


4
solved my problem.   I made a rookie mistake. Forgot 1 line of code!!

UI.frameMain:Show(true)

Never called Show

5
This video was very useful I followed along and everything worked great.  So now I added a basic screen, using wxFormBuilder and the screen will not show.  In fact when I step through and on the return of the UI I get an error, per attachment. 

Code for the button event is as follows:

Code: [Select]
local inst = mc.mcGetInstance()
local profile = mc.mcProfileGetName(inst)
local path = mc.mcCntlGetMachDir(inst)
package.path = path .. "\\Profiles\\" .. profile .. "\\Modules\\?.lua;" .. path .. "\\Modules\\?.lua;"

--CustFunc Module
package.loaded.mcTouchOff = nil


cf = require "mcTouchOff"
   
    Tframe = cf.Dialog()

Code for the custom function is as follows:

Code: [Select]
local mcTouchOff = {}   -- start of module   Declare Module table
local inst = mc.mcGetInstance()
--require("wx")

--[[function mcTouchOff.GetSigState(sig)   -- adds  function to table
    local hSig = mc.mcSignalGetHandle(inst,sig)
    local state = mc.mcSignalGetState(hSig)  -- get handle
    return hSig

end


function mcTouchOff.SetSigState (sig, state) 

    local hSig = mc.mcSignalGetHandle(inst,sig)
    mc.mcSignalSetState(hSig,state)
end]]


function mcTouchOff.Dialog()


UI = {}

    UI.frameMain = wx.wxFrame (wx.NULL, wx.wxID_ANY, "TouchOff UI", wx.wxDefaultPosition, wx.wxSize( 900,530 ), wx.wxCAPTION + wx.wxCLOSE_BOX + wx.wxRESIZE_BORDER )
UI.frameMain:SetSizeHints( wx.wxSize( 900,530 ), wx.wxDefaultSize )
UI.frameMain :SetBackgroundColour( wx.wxColour( 255, 255, 255 ) )

return (UI.frameMain)
end

return mcTouchOff   -- end of module

Your guidance would be appreciated. 
Warm Regards,

6
I created a simple screen in wxformBuilder and just trying to get it to open with a new button press I created in Mach4.  I modified the code in the touch button script as follows:


   
Code: [Select]


inst = mc.mcGetInstance()
local profile = mc.mcProfileGetName(inst)
    local path = mc.mcCntlGetMachDir(inst)
   
    package.path = path .. "\\Profiles\\" .. profile .. "\\Modules\\?.lua;" .. path .. "\\Modules\\?.lua;"

 
    package.loaded.yyy = nil
    tou = require "yyy"
    Tframe = tou.Dialog()
end

I have attached the wxFormbuilder lua code file.  Just cannot figure out what I am doing wrong.  the yyy.lua file is in the modules folder.  Do I need the compiled file there also?

Any assistance would be appreciated.   

7
Mach4 General Discussion / Re: Modify Touch Screen
« on: June 04, 2017, 05:18:44 PM »
I would love to get the formbuilder file.  I assume I get the formbuilder tool online someplace.  I have done a bit of programming in my past life, so I should be fine with the coding.  I am willing to share my efforts with the Mach community. 

8
Mach4 General Discussion / Re: Modify Touch Screen
« on: June 04, 2017, 12:46:20 PM »
please see the attached document. 

9
Mach4 General Discussion / Modify Touch Screen
« on: June 03, 2017, 09:14:04 PM »
I have a desire to modify the existing touch screen for 2 more text inputs and then modify the existing script to utilize the new information.

Not getting into details of what I want to do, but how to I edit the Touch Screen, much like the Main screen?


10
Mach4 General Discussion / Re: Help porting Mach3 script to Mach4
« on: May 20, 2017, 12:09:55 PM »
I have watched this.  Where can I get the touch module document that is referred too?  I have looked for it and can not find it.  The help menu item prints up a placeholder down no details.


Pages: 1 2 »