6 Replies Latest reply on Jan 20, 2010 11:37 PM by narkyvcxz

    Can't Edit from Code View?


      For some reason one of my components seems to have an empty "array" as it's called describing a *filter* that doesn't exist.  In other words:





      This is causing me to get on error when I try to compile.  I can take it into flex, make the change, and then compile... but after I do that FC won't accept my exported fxp.  Sooo...... I would love to just delete those two pointless lines of code... but for some reasons it's locked or... won't let me delete it.


      Not sure why.  :-/

        • 1. Re: Can't Edit from Code View?
          acath Level 4

          Hi Rems,


          For the current version of Catalyst, the code-view is read only. Unfortunately, allowing the code to be edited introduces a huge amount of additional complexity to the workflow, so we decided to disable it for the first version. The intention is for users to start projects in Catalyst, then take them into Flash Builder to finish them (including editing code).


          However, that means that Catalyst should never generate code that doesn't compile (since you can't fix it). You've hit a bug in Catalyst. Can you describe the exact steps that led to this compile error? And can you post the exact text of the compile error?



          • 2. Re: Can't Edit from Code View?
            RemsX Level 1

            To be honest it could be a number of things.  I've probably been making this too hard on myself, but I started with a swf, in Flash.  Its primary purpose was to play an introduction upon entering the site.  You can see this at garrettremes.com


            I've since made changes in Catalyst but can no longer compile/export.  I had started a project in catalyst before, but had to retrace my steps again and again which was very tedious, because I was playing with different options and bg swfs among other things.  I decided to put that part on hold and work in Flash for a while.


            What happened probably started with me importing the library from my other Catalyst project and that had god knows what in it, I lost track after a while since it renames things all the time it got to be confusing.  After importing that library to my new Catalyst project I located the custom components I needed and tried to recreate some of the work I had done before.


            The next step involves adding coverflow, and I remember seeing this done in Flex quite some time ago, so I figured it would be best to import into Flash Builder 4, and make the changes, and then go back to Catalyst to designate the navigation a bit better.  Catalyst makes this part very easy, and I love it, but the whole process is not very streamline at all.  Of course this is partially my fault, because I don't know any better way to do this.  I don't know enough AS3 to do all Flash -- Catalyst seems to limit my options, and I only know enough with Flex Builder to follow tutorials and primarily work in the "Design" workspace.


            Anyway -- as for the error, the first compile error I got was something to the effect of "duplicate symbol name."  I don't know how to edit this property.  I see there's a user designated id, and the id in the library, and apparently another id used by the program.  Apparently there was a conflict.  I was able to solve this by figuring out where 'rect0' was and deleting it and recreating it.


            I suppose in my deleting it I caused the empty array.  I compiled in Flex and it's as simple as deleting that line of code, but I don't know where the debug code is stored on my hard drive and I can't delete it in Catalyst so I'm at sort of an impasse.  Not sure what to do.


            I'm attaching whatever I can find that might be useful.



            Flash Catalyst cannot run this project because of an error in the code.

            To find the error, switch to the Code workspace and look in the Problems panel.


            I did that and found that there was an empty tag in one of my components.  Perhaps I should just delete that component and remake it?  That would probably work....







            I know it's not ideal, but I solved this problem by just applying some filter so there wouldn't be an empty array, and then compiled... then I "un-applied" it and it seems that it properly removed it from code.  I'm really not sure how this might have happened...

            • 3. Re: Can't Edit from Code View?

              hmmm.. same problem here and now my file is corrupted because i saved it with the code error.


              mine was caused by deleting a page and having redundant code remaining


              <s:ToggleButton click="toggleButton_clickHandler_2()" enabled.Basics="false" enabled.MyProfile="false" selected.Basics="true" selected.Chat="false" selected.Info="false" selected.Map="false" selected.MyProfile="true" selected.Items="false"  selected.Items="false" selected.Save="false" skinClass="components.ToggleButton2" toolTip.Chat="Options" x="368" y="47"/>


              for example. is there anyway to get my file working again?

              • 4. Re: Can't Edit from Code View?
                narkyvcxz Level 1

                how come when i fix it in flex it doesn't let me import it again? I only fixed the error and didn't change anything else.

                • 5. Re: Can't Edit from Code View?
                  RemsX Level 1

                  As they told me, this issue will be fixed when it's out of beta I think.  In the meantime, see if you can recreate the circumstances that pertain to the null array.  For example, mine was in reference to a filter.  I added a filter to the file in question, and of course the array now had properties.  It saved just fine... and when I removed the filter, this time it make the proper code change.  And I was able to save.  Not sure why it was different the second time around, but I'd encourage you to try that and see if it works.


                  Good luck!

                  • 6. Re: Can't Edit from Code View?
                    narkyvcxz Level 1

                    Thanks for your help


                    I was trying that... and saved out a copy... but both my files would no longer open so experimentation is over.


                    I also tried unziping it.. editing the file in a text editor and then reziping it but it still doesn't want to open. Not really keen on starting again from scratch.


                    But I had a few code errors during my play and fixed them using similar methods to what you used.


                    Some other things I experienced.


                    Outer glow doesn't import properly from illustrator... so there is lot's of rejigging of art to do when you get your art in. Gradients seem fairly good however. Pasting from illustrator, even simple vectors can be very slow however.


                    It's a product with a lot of promise when it is stable. With 9 slice, importing optimisations and some tweaks on the importing it should speed up workflow for UI dev. You can put something together quick to test the usability of your idea before locking in your decisions further with code.


                    Cheers and thanks for your help,