MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: truncated File -> Save As -> HTML conversion problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79375] Re: [mg79361] Re: truncated File -> Save As -> HTML conversion problem
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 25 Jul 2007 05:26:30 -0400 (EDT)
  • Reply-to: jfultz at wolfram.com

The problem is that Save As HTML operation is inappropriately getting 
TimeConstrained wrapped around it because the internal method by which it works 
shares an implementation with how Dynamics are evaluated (which quite 
appropriately are TimeConstrained).  So if the Export operation initiated by the FE is being halted mid-stream by TimeConstrained[].

So another way to work around this is to set the value of the 
DynamicEvaluationTimeout option to be large enough to allow enough time to save 
the HTML file.  The downside to doing this is that increasing the value of this 
option also increases the timeout for every Dynamic evaluation which may be in a hung state.

The problem is fixed for future incremental and major releases.

Sincerely,
 
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Wed, 25 Jul 2007 02:15:58 -0400 (EDT), Chris  Chiasson wrote:
> On Jul 24, 5:12 am, David Reiss <dbre... at gmail.com> wrote:
>
>> (M 6) In[26]:= $Version
>>
>> (M 6) Out[26]= "6.0 for Mac OS X x86 (32-bit) (June 19, 2007)"
>>
>> I find the following:
>>
>> If I execute
>>
>> Export[
>> "/Users/dreiss/Desktop/chris/test.html",
>> CreateWindow@
>> DocumentNotebook[
>> Table[TextCell[ToString@i, "Text"], {i, 1, 1000}]],
>> "HTML"]
>>
>> then the exported html file is complete.
>>
>> However, if I create the notebook
>>
>> CreateWindow@
>> DocumentNotebook[Table[TextCell[ToString@i, "Text"], {i, 1, 1000}]]
>>
>> and then use the File>Save As menu command, and save as html, the
>> resulting html file is incomplete.  The number of cells that it
>> achieves converting to html varies each time I try it, but is around
>> 600.
>>
>> Some other comments.  If I use the SaveAs html menu item, and then
>> attempt to save the notebook again as html over the original file,
>> mathematica tells me that Export (which, of course is behind the Save
>> As command) cannot open the html file that I am trying to save to.
>>
>> If one goes to that file, deletes it (ie throws it into the trash) and
>> then tries to empty the trash, the OS tells one that the file is stil
>> in use.
>>
>> Aparently Mathematica still has the file open and so, the OS lets us
>> know that it is still in use.
>>
>> This is an old old bug that I think(but am not sure) that I reported
>> somewhere in prehistory.  The File>Save AS>html approach to html
>> conversion appears to not properly dispose of its connection to the
>> file that it is exporting to.
>>
>> So, perhaps these multiple issues are connected in some way.
>>
>> Since WRI reads these postings very diligently, I will assume that
>> this is a bug report and not submit it through ohter venues.
>>
>> I think that the lesson here is that for real production work, one
>> should use Export directly rather than the less versatile menu command
>> approach.
>>
>> --David
>> A WorkLife FrameWork
>> The first Mathematica-6 compatible add
>> onhttp://scientificarts.com/worklife
>>
> Bruce Miller from WRI Technical Support gave the same workaround. I
> have also experienced the problem with the file not being "released"
> or closed by Mathematica. I will probably file another report about it
> with technical support just to make sure they know about it.




  • Prev by Date: Re: RE: Mathematica to .NET compiler
  • Next by Date: Re: how to make Sum[n,{n,1,5}] to print 1+2+3+4+5? HoldForm?
  • Previous by thread: Re: truncated File -> Save As -> HTML conversion problem
  • Next by thread: Mathematica 6 Cell Grouping