Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
WebDwarf, SiteSpinner, SiteSpinner Pro 'How do I...'
Object size|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Honorary 'Aussie' Mechanic |
Bruce, while you are on line (or anybody else that can supply the answer), I have seen many posts where you have supplied the size (in KB) of an object for other users.
How do you determine that? The reason I ask is that I am in the process of writing a very large piece of code, and have fears that I may go over the limit as far as KB size is concerned. This is mainly due to quite a few validation checks, switch statements, and changing variable values as a result. Although the variables are set as global, I would like to keep them all in the same function. If I am getting close to the maximum, I may have to try and split the code into different code objects. But I don’t find that as easy to manage. The variables are required so as to pass on to other pages. Terry |
||
|
|
Guru 'Geezer' Mechanic |
Using normal Windows coding methods, most text blocks have a limit of 64KB. However, there are other language object types that can handle text up to 2MB, but I suspect the VM code uses the 64KB type.
As a programmer, I find coding anything larger than 20KB is a extremely large piece of code and should be avoided simply because trying to maintain something that large is difficult. I have always found it easier to write and maintain code that is no more than a few hundred lines long. You should be using an external editor instead of trying to use the SS code editor. You will find an external tool much easier to use, especially if it has syntax highlighting and a lint tool (syntax checker). Once you have written your code, it can be included into your project using a <script src="..."> statement. I think you will find this an easy method to develop and test your code. |
|||
|
|
Honorary 'Aussie' Mechanic |
Thanks for your reply Larry.
I was rather tired yesterday and had an early night. When I got up this morning, I still had this post open, and your smiling face greeted me into the new day. Yes, I do have external editors for HTML, Javascript and PHP. I normally write and check the code in those, then copy and paste into an SS code object. I will give your suggestion a try. Terry |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

