2

Well, it's a little ridiculous; and probably unbelievable, but when I have more than five hundred lines of actionscript in tags in my MXML FLEX Main.mxml, all syntax highlighting, error and syntax verification, error reporting, "Problems" pane, and even sometimes compilation fail. Upon removing any chunk of code, it works again.

I don't see why Adobe could release a product such as Flash Builder 4.5 Premium, have this big of a problem; and nobody notice. Therefore I believe the problem has to do with my computer, or my project; as there's now ay more people have had this happen if I can't even find it on Google.

Additionally, many objects that have been defined in the MXML properties above the code, even those in All States, are now showing as warning: Access of undefined property down the side of my document. However, these warnings are not showing up in the "Problems pane", and aren't even yellow squigly underlining the right sections of code to pertain to the message.

Steps I have taken to TRY and fix this: I have tried restarting, as well as re-installing the IDE (Adobe Flash Builder 4.5). I have tried creating a new project. I have tried splitting my code into smaller .as files and including them. I have tried compiling my application.

Nothing has worked, PLEASE HELP.

--

Edit 1: In response to the first answer, I have already tried increasing the memory allotted to Adobe Flash Builder 4.5 by editing the flashbuilder.ini and flashbuilderC.ini files in the main installation folder, it did not help; as my heap (heap display in bottom right) never uses more than 128MB anyways (even during compile) this did not fix anything.

Brian Genisio
  • 47,787
  • 16
  • 124
  • 167
cbroughton
  • 1,726
  • 1
  • 12
  • 19

1 Answers1

5

You can try the following steps:

  1. You can try to allocate additional memory for your Eclipse/Flash Builder by editing of eclipse.ini.
  2. You can try to compile your project from the command line using mxmlc compiler and compare result.
  3. You can try to split your code but not using just code including (which you should avoid forever) but extraction subcomponents (keywords are refactoring, OOP, composition etc.).

And of course you can use all of these advices together :)

Anyway you should avoid large code listings in a Script block of a single MXML file. The main purpose of Script block of MXML is to have simple and clear code with event handlers and required fields declarations.

Constantiner
  • 14,231
  • 4
  • 27
  • 34
  • My code is a chat client, so almost every state, button, text-field, etc has one or more event handlers with it. Can I out-source my event handlers using the syntax as long as I mark them public? And what about the default "protected", will that allow them to be in other files? Also, please see the first post as I have appended additional information. – cbroughton May 11 '11 at 00:48
  • 2
    Using `source` within `Script` tag is nothing more than just an illusion of externalizing and modularization of code. Compiler just included it in process of compilation as it is a `Script` body. The same is about `include` directive. I suggest you to extract some logical subcomponents, create custom events for them on and make the main app smaller and more readable. – Constantiner May 11 '11 at 08:32
  • Hmm, thanks. It's seemed to help a lot. The "Problems pane" still doesn't update, only if I try and compile the application and it fails. Only then does it check for problems and update the problems pane, so I find myself opening every file and scanning the right margin for yellow and red marks :/. – cbroughton May 11 '11 at 09:58