Creating a GUI

More
01 Sep 2012 14:44 #23830 by cmorley
Replied by cmorley on topic Re:Creating a GUI
I sent a message about this on the mail list.
This is great work John! I think a lot of people will find this useful and will break down another guru barrier.
Thanks for sharing.

Chris M

Please Log in or Create an account to join the conversation.

More
01 Sep 2012 14:53 #23832 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Chris,

Thanks for the explanation on the mailing list. It is clearer to me now.

John

Please Log in or Create an account to join the conversation.

More
01 Sep 2012 17:19 #23834 by Rick G
Replied by Rick G on topic Re:Creating a GUI
Hi John,

Looking good, let me know when gui 6 is ready!

Rick G

Please Log in or Create an account to join the conversation.

More
01 Sep 2012 19:44 #23835 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Ready for?

I'm working on the gui 6 tutorial now and upload as I go if you want to take a look. It starts totally from scratch so it does not depend on prior tutorials.

John

Please Log in or Create an account to join the conversation.

More
02 Sep 2012 08:45 #23840 by Rick G
Replied by Rick G on topic Re:Creating a GUI
Did not know you were uploading as you go, will have to take a look.

Rick G

Please Log in or Create an account to join the conversation.

More
04 Sep 2012 17:28 #23888 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
So I've been thinking organizational thoughts after successfully adding a library to the installed version of gui6. What makes sense to be in a library? I see touchy has several libraries, from a running standpoint does it make any difference what is in the libraries? Sorry if this too general a question...

John

Please Log in or Create an account to join the conversation.

More
05 Sep 2012 06:59 #23903 by ArcEye
Replied by ArcEye on topic Re:Creating a GUI
Hi John

Generally libraries do these sort of things.

They can provide a wrapper around various low-level functions to make the process higher level, more productive and more usable.
All API's do this sort of thing.

They also allow re-usable code without repeating it, reducing code size and increasing convenience.
A function or class can do this in one project, but a library can be re-used in all your projects.

The criteria will probably be, are you using the same code to do something in several places in your program?
If so abstract it into a function or class and then call that each time you do the task.

Do you foresee this same task arising in other programs?
If so put it into a library and then you save yourself cutting and pasting, not to mention re-reading the code to try and figure out what it does 2 yrs later, for life

regards

Please Log in or Create an account to join the conversation.

More
05 Sep 2012 11:40 #23909 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Thanks, that gives me something to think about for a while.

Just off the top of my head say I had a manual class with a jog method I could call that method with the axis and the type of jog and the rest of the parameters needed... things that make you say hmmm.

John

Please Log in or Create an account to join the conversation.

More
05 Sep 2012 13:30 #23917 by ArcEye
Replied by ArcEye on topic Re:Creating a GUI
Yeah precisely that.

For instance, instead of lots of different calls to set the feedrate, toggle incremental / constant etc. for each axis, you could use
jogAxis(int axis, double speed, bool positive = true, bool constant_feed = true)

(The last 2 args default to true, so you only need 2 args a lot of the time)

You then write a function jogAxis() which takes those arguments and does the jog required for the required axis.

Before you know it you will be building up a library of useful routines that save you having to go back to the docs every time you want to do something.

(obviously the example is C specific, anaconda will be slightly different but same basis)

regards
The following user(s) said Thank You: meduag

Please Log in or Create an account to join the conversation.

More
05 Sep 2012 14:08 #23918 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
I'm glad it is not an Osage Copperhead!

Thanks for the help
John
The following user(s) said Thank You: meduag

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Powered by Kunena Forum