Search found 15 matches

by gorf25
Wed Nov 29, 2017 10:00 pm
Forum: General Development
Topic: wx.wxMessageBox with lua question
Replies: 4
Views: 1428

Re: wx.wxMessageBox with lua question

Not sure yet if its working totally correct but I setup an timer event i click a button that calls the function to move the motor Then exit the function and turn on the timer that calls the function to check the distance motor has traveled set timer to 1000 for now Only tried it a couple times so fa...
by gorf25
Wed Nov 29, 2017 1:46 pm
Forum: General Development
Topic: wx.wxMessageBox with lua question
Replies: 4
Views: 1428

Re: wx.wxMessageBox with lua question

Yes it behaves as expected as long as I have the wx.messagebox in the loop in the main thread there is a DRO that displays the distance being traveled while the motor is moving and that works also. If I remove the wx.messagebox from the loop and call the function that reads the distance of current m...
by gorf25
Wed Nov 29, 2017 2:26 am
Forum: General Development
Topic: wx.wxMessageBox with lua question
Replies: 4
Views: 1428

wx.wxMessageBox with lua question

I have a button event that calls a function i have it running a stepper motor, and running though a loop till the motor reaches the distance it was told to travel. The GUI seems to lockup every time in the loop making a call to check the motor position. But the strange thing is if i put a wx.wxMessa...
by gorf25
Wed Nov 15, 2017 1:56 am
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 1513

Re: wx.lua wait

Thanks i think i found away for it to work a button function event using the coroutine and put a while do loop in the button press and then in the loop i call the function that gets the motor position and exit when it has been reached have ran it and so far the code doesn't seem to be messing up the...
by gorf25
Tue Nov 14, 2017 9:15 pm
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 1513

Re: wx.lua wait

you are right the GUI freezes and then i get program stopped so it crashes the problem seems to be any loop or such does the same thing crashes, the only way i have been able to find out if motor has moved the proper distance is then to call a command that returns the value of where the motor is if ...
by gorf25
Tue Nov 14, 2017 5:41 pm
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 1513

Re: wx.lua wait

The reason i need to wait is i am sending out code to run a stepper motor the axis and the distance to travel
but i want to wait till the motor reaches it final distance what ever it may be then move on or return from that function
to get my next input..

make more sense ?

Thanks gary
by gorf25
Tue Nov 14, 2017 1:31 am
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 1513

wx.lua wait

Is there a function or a way to make a wxlua script wait not sleep I have a function call that is running and I want it to keep running. but before it completes I am already into the next function waiting for the next input or button click, I don't want to continue till the call is done.. Thanks gary
by gorf25
Fri Nov 03, 2017 1:00 am
Forum: C++ Development
Topic: wxbutton
Replies: 6
Views: 921

Re: wxbutton

I thought about that approach but been having trouble hiding the buttons doesn't seem to work for me,
I may be going about it wrong not sure tried a few different ways but no luck

Do you have an example to view...

Thanks gary
by gorf25
Wed Nov 01, 2017 12:52 am
Forum: C++ Development
Topic: wxbutton
Replies: 6
Views: 921

Re: wxbutton

it may not be an easy do... I have 2 buttons one with text that has Test for the button the other to exit the program... When Test is clicked when in the function I change the test to calculate button and set a flag so when calculate is pressed it performs a different function, now I change the text...
by gorf25
Tue Oct 31, 2017 7:49 pm
Forum: C++ Development
Topic: wxbutton
Replies: 6
Views: 921

wxbutton

Checking to see is there is a way to change a button state, if the button has been setup for cancel and you clicked a different button to a function can you change the cancel button from cancel to call a new function for example like print button and then when done chance it back to a cancel button ...
by gorf25
Wed Aug 23, 2017 12:56 am
Forum: C++ Development
Topic: problem changing text wxStaticText
Replies: 8
Views: 4754

Re: problem changing text wxStaticText

Thanks for your help i got it working just used m_XpartLabel:SetLabel("Hello button clicked"); --this worked it changed the text in the correct position.. Gary function Setupinputs() --Add all the inputs local val m_XpartLength, mXpartLabel = AddInputControl("Enter Distanct to travel",nil) m_XpartLe...
by gorf25
Tue Aug 22, 2017 10:23 pm
Forum: C++ Development
Topic: problem changing text wxStaticText
Replies: 8
Views: 4754

Re: problem changing text wxStaticText

when i add this it doesn't change the text and one other strange thing, the messagebox just after this code doesn't display any message but the program doesn't crash just no messagebox if i change mXpartLabel: to m_Xpartlength it changes the textbox and the messagebox pops up also but thats not what...
by gorf25
Tue Aug 22, 2017 4:41 pm
Forum: C++ Development
Topic: problem changing text wxStaticText
Replies: 8
Views: 4754

Re: problem changing text wxStaticText

i attached the code

Thanks gary
by gorf25
Mon Aug 21, 2017 8:20 pm
Forum: C++ Development
Topic: problem changing text wxStaticText
Replies: 8
Views: 4754

Re: problem changing text wxStaticText

Thanks for the help i had that working where it changes what was in the text box... I don't think i explained it clear enough my bad... local staticText = wx.wxStaticText( panel, wx.wxID_ANY, name_string) in front of the text box is a string in the panel name_string = "whatever" then after the name_...
by gorf25
Mon Aug 21, 2017 3:21 pm
Forum: C++ Development
Topic: problem changing text wxStaticText
Replies: 8
Views: 4754

problem changing text wxStaticText

i have a panel created with wxStaticText that shows the text, also a input textbox, a couple radio buttons and a couple toggle buttons, everything is working good. The thing i am trying to do is when i hit a toggle button i can change the text in the panel to a new text phase, i want to write over t...