Sorry for the late response in this thread.  Here is the way I set up my
environment for working with the flex sdk.

*Part 1: Set up the Flex SDK projects*

1.  Check out the Flex SDK to ex. c:/flex/git/flex-sdk and TLF to
c:/flex/git/flex-tlf
2.  Open Flash Builder, create a new workspace
3.  In the Package Explorer, right-click and select 'Import'
4.  In the 'Choose import source' dialog, select General > Existing
Projects into Workspace
5.  In the 'Select root directory' input, select the path to the 'projects
folder under the flex sdk, for example:
 c:/flex/git/flex-sdk/frameworks/projects
6.  Flash Builder will show a list of all the projects that can be imported
(airframework, airspark, etc.)
7.  Unselect the authoringsupport project
8.  Click 'Finish' to import all the projects
9.
    a. For the 'textLayout' project, add a source path to
c:/flex/git/flex-tlf/textLayout/src
    b.  Change 'Main source folder to "[source path] src"

Now you have the projects for all the swcs that go into a compiled Flex
SDK.  At this point, all the frameworks projects should compile from Flash
Builder nicely.

*Part 2: Set up the app for debugging *

1.  In the same workspace, create a Flex project, ex. FixBugFLEX-32326
2.  Depending on which component you are trying to fix a bug for, add a
project dependency to that project.
3.  For example, if you are working on a bug in the Spark Datagrid
component, you can see that the component is in the spark project.
4.  Right click the FixBugFLEX-32326 project, select Properties, then
select 'Flex Build Path'.
5.  On the right side, click on the 'Add Project...' button
6.  From the list of projects, select the 'spark' project.
7.  Hit OK twice
8.  When the FixBugFLEX-32326 project is recompiled, it will now look at
the spark project for the dependency on the spark.swc library instead of
the default installed SDK location.

Now, you have a test app that is running the SDK code from the git repo.
Any changes you make in the spark project, example
spark/src/spark/components/DataGrid.as will actually be made on the file at
c:/flex/git/flex-sdk/framework/projects/spark/src/spark/components/DataGrid.as

With this set up, you will be able to use code completion, use the
FlashBuilder debugger, profiler etc. just as you would with a regular Flex
project.  No need to build anything from the commandline or create a source
path tree in your project.  A ctrl-s will trigger a recompile of the swc
project and will be ready to test in your debugging app immediately.

Once you are done fixing the bug or adding the feature, you can commit/push
the changes and or generate a patch.

Hope that helps.  Please let me know if there are any questions.

Thanks,
Om


On Thu, Mar 5, 2015 at 2:29 PM, jude <flexcapaci...@gmail.com> wrote:

> If FB finds a file of the same name and in the same package (folder
> structure) as an existing class it will use the local file.
>
> So if you want to create or modify your own mx.controls.Alert class you
> would create a folder in your project's src path of "mx/controls/" and then
> create or copy in the Alert.as class. The full path would be,
> "$your_project/src/mx/controls/Alert.as". When you compile your project the
> local Alert.as will be compiled in instead of the ones in the SDK or a
> linked library. There's a few articles on Google when you search "monkey
> patching Flex". However, I don't know how you would make a patch file from
> your changes.
>
> On Thu, Mar 5, 2015 at 5:33 AM, kevin.godell <kevin.god...@gmail.com>
> wrote:
>
> > I guess FB needs to know the location of the file so that it can override
> > the corresponding class in the compiled swc? I am not 100%, but it works.
> >
> > On Thursday, March 5, 2015, Dany Dhondt [via Apache Flex Development] <
> > ml-node+s2333347n45413...@n4.nabble.com> wrote:
> >
> > > Thanks Kevin for this excellent tip. Why do you have to copy the
> > directory
> > > structure? Is it to preserve the package line in the class file?
> > >
> > > I'll start experimenting with these tips as soon as I feel comfortable
> > > enough with the repo :)
> > > Dany
> > >
> > > Op 5 mar 2015 om 02:09 uur uur schreef "kevin.godell" <[hidden email]
> > > <http:///user/SendEmail.jtp?type=node&node=45413&i=0>>:
> > >
> > > @Dany
> > >
> > > I wanted to elaborate further on what Alex mentioned about adding a
> > source
> > > path for working on patches.
> > >
> > > For example, I just found a problem and wanted to make some quick edits
> > to
> > > see if I could fix ArrayList.as. So, I found the file in the sdk,
> making
> > > note of the directory structure. I copied the file and created a
> > duplicate
> > > directory and put that in a folder called "monkey-patch" that I have on
> > my
> > > desktop. The file and directory that I created was
> > > C:\Users\familyRoom\Desktop\monkey-patch\org\apache\flex\collections\
> > > containing a copy of ArrayList.as. The directory and main folder name
> can
> > > be
> > > whatever you like, but I used the desktop just for the sake of being
> easy
> > > to
> > > find. I named the main folder "monkey-patch" because I think that I may
> > > seen
> > > it called monkey patching on some forum. In FB, I went to project ->
> > > properties -> flex build path -> source path and added the monkey-patch
> > > folder via the "add folder" button. Now, the file can be seen in the
> > > package
> > > explorer, which allows me to make quick edits for debugging and
> testing,
> > > instead of compiling after each edit. There are some limitations, such
> as
> > > if
> > > a file you are tweaking has some "include" calls to other files, you
> will
> > > have to include additional directories and files to make FB happy.
> > >
> > > It took me longer to write this post than it did to setup the
> > monkey-patch
> > > and fix the file.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://apache-flex-development.2333347.n4.nabble.com/Setup-for-patching-tp45348p45402.html
> > > Sent from the Apache Flex Development mailing list archive at
> Nabble.com.
> > >
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://apache-flex-development.2333347.n4.nabble.com/Setup-for-patching-tp45348p45413.html
> > >  To start a new topic under Apache Flex Development, email
> > > ml-node+s2333347n1...@n4.nabble.com
> > > <javascript:_e(%7B%7D,'cvml','ml-node%2bs2333347n1...@n4.nabble.com
> ');>
> > > To unsubscribe from Setup for patching, click here
> > > <
> >
> http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=45348&code=a2V2aW4uZ29kZWxsQGdtYWlsLmNvbXw0NTM0OHwyNTAxOTQ4MDU=
> > >
> > > .
> > > NAML
> > > <
> >
> http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-flex-development.2333347.n4.nabble.com/Setup-for-patching-tp45348p45415.html
> > Sent from the Apache Flex Development mailing list archive at Nabble.com.
> >
>

Reply via email to