Help in refactoring code
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Help in refactoring code
Hi all
I have a complex set of handlers calling each other. I want to refactor the code and make it simpler for me and others. I am having a hard time getting a picture of what is going on as I did not write in the most efficient way. Is there any way of visualising, say with a diagram, which handler is handling which, to help me unravel the structure?
Regards
Kaveh
I have a complex set of handlers calling each other. I want to refactor the code and make it simpler for me and others. I am having a hard time getting a picture of what is going on as I did not write in the most efficient way. Is there any way of visualising, say with a diagram, which handler is handling which, to help me unravel the structure?
Regards
Kaveh
Kaveh
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Help in refactoring code
Why not be old-fashioned and draw a big flowchart on a large piece of paper:
has helped me several times.
has helped me several times.
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Help in refactoring code
Primarily because I am lazy!!!
Yes, probably will do that. But I was wondering if there might be a script to reverse engineer the code I have and draw some kind of chart for me! That should be possible I would have thought.
Yes, probably will do that. But I was wondering if there might be a script to reverse engineer the code I have and draw some kind of chart for me! That should be possible I would have thought.
Kaveh
Re: Help in refactoring code
Hi,
Check for Mark Wieder last astonishing work !
He made a refactoring library not too long ago.
HTH,
Thierry
Check for Mark Wieder last astonishing work !
He made a refactoring library not too long ago.
HTH,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: Help in refactoring code
Hi Thierry
I am indeed using Mark's generous gift to the community to rename clean up, move handlers, etc.
But it is not doing what I am asking for. Perhaps Mark has a suggestion?
Regards
Kaveh
I am indeed using Mark's generous gift to the community to rename clean up, move handlers, etc.
But it is not doing what I am asking for. Perhaps Mark has a suggestion?
Regards
Kaveh
Kaveh
Re: Help in refactoring code
Therefore, I kindly suggest to get in touch with Markkaveh1000 wrote: I am indeed using Mark's generous gift to the community to rename clean up, move handlers, etc.
But it is not doing what I am asking for. Perhaps Mark has a suggestion?
who, if my memory is fine, is more active on the user's list.
and show him part of your code;
always more chance to have an answer this way
Best,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!