Is there a way to split a .spin file into multiple .spin files?
Mahonroy
Posts: 175
Hey guys,
So I have a rather large .spin file that contains all of my project functions. I know you can create separate object .spin files, and reference these objects within a .spin file. For some of my functionality it does not make sense to do this, so I am left with a large single file, and it makes navigating to different functions difficult. Is there a way that I can split some of this functionality up into multiple spin files, but still have the scope as if they are in a single file? Thanks and any help is greatly appreciated!
So I have a rather large .spin file that contains all of my project functions. I know you can create separate object .spin files, and reference these objects within a .spin file. For some of my functionality it does not make sense to do this, so I am left with a large single file, and it makes navigating to different functions difficult. Is there a way that I can split some of this functionality up into multiple spin files, but still have the scope as if they are in a single file? Thanks and any help is greatly appreciated!
Comments
Are your really sure that your project does not have logical "islands" of functionality that can be split off into separate independent objects?
Generally you can split any huge mass of code into functions. And the move those functions into separate objects. Except then you may have a problem with all the global variables they are trying to use.
These blocks show up easier against the sea of "PUB" and "PRI" blocks.
If you add a comment to the same line as the block's label, you can see the comments when in "Summary" view.
While it's nice to break code into objects when possible, sometimes it's a lot easier to keep methods together in one massive object.
The Propeller Tool also has "bookmarks" to make it easier to find sections of code. If you add a bookmark to the same line declaring the block type, the bookmark stays visible while in "Summary" view.
I have my own SPIN editor, it has 2 panes, left and right that are identical so you can do things like compare versions of code quickly to merge and update etc. I put all methods on buttons, there are 25 buttons per view, but you can click rapidly through the next 25 with up down nav. It is easy to GO TO a method by name or number. You also have color coded sections for CON, VAR, etc.
Do you have any plans to release it?
-Phil
I hate to admit it but I haven't tried PropellerIDE yet. I think it's time I give it a try.
I am using "PropellerTool", is this not what I should be writing code in? I have not heard of a "PropellerIDE"...
-Phil
Glad you like it. Thanks.