I made the change I suggested below and updated the fxp file at [1].  See
if it makes things better for you.  I think there is always the
probability that at the moment the editor tries to save the file that the
watcher will have the file locked to check its modification date, but that
shouldn't lock the file forever.  Hitting save again should save the file.

It would be much more robust if an IDE/editor integrated the agent code so
it didn't require polling.  It might also be possible to write an ANE that
watches for changes in a way that doesn't lock the file.

-Alex

[1] http://home.apache.org/~aharui/MXMLLiveEditing/MXMLLiveEditAgent.fxp

On 1/15/16, 11:46 PM, "Alex Harui" <aha...@adobe.com> wrote:

>Worked for me on Windows 7.  Maybe try slowing down the watch interval?
>
>If you want to dig into it more, the mxmlFile object is kept around
>between timer events.  Maybe it needs to be created in each interval so it
>doesn't leave a lock on the file.
>
>Thanks,
>-Alex
>
>On 1/15/16, 5:56 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala"
><omup...@gmail.com on behalf of bigosma...@gmail.com> wrote:
>
>>Hmm, I followed all the steps.  But when I changed the width of the label
>>in MyInitialView.mxml and try to save the file, I am getting this error:
>>
>>Could not write file:
>>C:\p\flexroot\workspace\DataBindingTest\src\MyInitialView.mxml.
>>C:\p\flexroot\workspace\DataBindingTest\src\MyInitialView.mxml (The
>>process
>>cannot access the file because it is being used by another process)
>>
>>Looks like the watch is causing this issue.  When I close that AIR app, I
>>am able to save the file fine.
>>
>>This is on Windows, btw.
>>
>>Thanks,
>>Om
>>
>>
>>
>>
>>On Fri, Jan 15, 2016 at 12:27 PM, OK <okrue...@edscha.com> wrote:
>>
>>> Alex Harui wrote
>>> > Anyway, let me know what you think.  I'm off to work on other things.
>>>
>>> Hey Alex,
>>> I've just followed your instructions and tested your POC by using
>>>FlexJS
>>> 0.6.0.... and it just works!
>>> Awesome, very impressive!
>>> IMO a live editing feature would be a big plus. In competition to other
>>> transpiling JS frameworks this could be a key feature.
>>>
>>> Thanks,
>>> Olaf
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> 
>>>http://apache-flex-development.2333347.n4.nabble.com/FLEXJS-POC-MXML-Liv
>>>e
>>>-Editing-tp51278p51291.html
>>> Sent from the Apache Flex Development mailing list archive at
>>>Nabble.com.
>>>
>

Reply via email to