<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Walter,<br>
    <br>
    Utkarsh is using the datastore class so that is what he is doing
    already.<br>
    <br>
    Tony<br>
    <br>
    <div class="moz-cite-prefix">On 05/18/2016 12:06 AM, Walter Bender
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADf7C8tBeN1k7CkBOCXcPY6_eZ_NAjEtY+0ScB8TrU_DBjTGTw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, May 17, 2016 at 4:44 PM,
            Ütkarsh Tiwari <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:iamutkarshtiwari@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a></a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">I need
              to overwrite(delete) the existing object with a new object
              in<br>
              the Journal.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Can you explain your use case a bit more? Why is it not
              adequate to just modify the existing object? What is
              achieved by replacing it? </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <br>
              Thanks,<br>
              Utkarsh Tiwari<br>
              <div class="HOEnZb">
                <div class="h5"><br>
                  On 5/18/16, Sam Parkinson <<a
                    moz-do-not-send="true"
                    href="mailto:sam.parkinson3@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:sam.parkinson3@gmail.com">sam.parkinson3@gmail.com</a></a>>
                  wrote:<br>
                  > If you make an activity, all of the journal
                  interaction is handled by<br>
                  > the Journal.  Maybe that would help you in this
                  instance?<br>
                  ><br>
                  > On Wed, May 18, 2016 at 5:02 AM, Ütkarsh Tiwari<br>
                  > <<a moz-do-not-send="true"
                    href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a>>
                  wrote:<br>
                  >> Hi,<br>
                  >>     How can we overwrite(contents) a specific
                  object in Journal?<br>
                  >><br>
                  >> Thanks,<br>
                  >> Utkarsh<br>
                  >><br>
                  >> On 5/18/16, Ütkarsh Tiwari <<a
                    moz-do-not-send="true"
                    href="mailto:iamutkarshtiwari@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a></a>>
                  wrote:<br>
                  >>>  Hi Tony,<br>
                  >>>               In case if the user chooses
                  to overwrite the<br>
                  >>>  contents(code) of the existing
                  project(already saved in Journal),<br>
                  >>>  would you like to overwrite that Journal
                  object or create a new<br>
                  >>>  object(overwritten- this might create
                  duplicate names)?<br>
                  >>><br>
                  >>>  Thanks,<br>
                  >>>  Utkarsh Tiwari<br>
                  >>><br>
                  >>>  On 5/17/16, Walter Bender <<a
                    moz-do-not-send="true"
                    href="mailto:walter.bender@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:walter.bender@gmail.com">walter.bender@gmail.com</a></a>>
                  wrote:<br>
                  >>>>  I believe it defaults to ~/Documents
                  (outside of sugar-build).<br>
                  >>>><br>
                  >>>>  -walter<br>
                  >>>><br>
                  >>>>  On Tue, May 17, 2016 at 10:48 AM,
                  Ütkarsh Tiwari<br>
                  >>>>  <<a moz-do-not-send="true"
                    href="mailto:iamutkarshtiwari@gmail.com">iamutkarshtiwari@gmail.com</a><br>
                  >>>>>  wrote:<br>
                  >>>><br>
                  >>>>>  Hi,<br>
                  >>>>>      What is the location of the
                  'Journal/Documents' folder inside<br>
                  >>>>>  sugar-build?<br>
                  >>>>><br>
                  >>>>>  Thanks,<br>
                  >>>>>  Utkarsh Tiwari<br>
                  >>>>><br>
                  >>>>>  On 5/15/16, Tony Anderson <<a
                    moz-do-not-send="true"
                    href="mailto:tony_anderson@usa.net"><a class="moz-txt-link-abbreviated" href="mailto:tony_anderson@usa.net">tony_anderson@usa.net</a></a>>
                  wrote:<br>
                  >>>>>  > Hi, Utkarsh<br>
                  >>>>>  ><br>
                  >>>>>  > I gave this version a
                  trial. I think the integration is<br>
                  >>>>> complete. The<br>
                  >>>>>  > next problems are left over
                  from Richa Sehgal's work from last<br>
                  >>>>> year.<br>
                  >>>>>  ><br>
                  >>>>>  > I wasn't able to look at
                  the feature page - I think Bernie<br>
                  >>>>> Innocenti<br>
                  >>>>>  > is<br>
                  >>>>>  > working on the server and
                  it is down for a while.<br>
                  >>>>>  ><br>
                  >>>>>  > What we are trying to do
                  goes beyond the jsfiddle on the<br>
                  >>>>> internet. It<br>
                  >>>>>  > provides a way to enter
                  html or css or javascript and test the<br>
                  >>>>> outcome<br>
                  >>>>>  > when the<br>
                  >>>>>  > code is processed by the
                  browser. What I would like is that the<br>
                  >>>>> user<br>
                  >>>>>  > can<br>
                  >>>>>  > create an html file using
                  an editor and then show that file on<br>
                  >>>>> with<br>
                  >>>>>  > the<br>
                  >>>>>  > fiddler.<br>
                  >>>>>  ><br>
                  >>>>>  > So, if I open the fiddler
                  and enter <h1>Hello World</h1> , then<br>
                  >>>>> 'run'<br>
                  >>>>>  > will display that in the
                  right side panel. (And that works).<br>
                  >>>>> Now I<br>
                  >>>>>  > save<br>
                  >>>>>  > the file giving it  a<br>
                  >>>>>  > project name. e.g.
                  helloworld. This is saved in the Journal.<br>
                  >>>>> When you<br>
                  >>>>>  > look at the Journal, there
                  are two entries. One shows the<br>
                  >>>>> Browse icon<br>
                  >>>>>  > and the other a text page
                  icon. This is normal - one represents<br>
                  >>>>> the<br>
                  >>>>>  > journal object for the
                  browse activity and the other object has<br>
                  >>>>> the<br>
                  >>>>>  > saved html:
                  helloworld.html.<br>
                  >>>>>  ><br>
                  >>>>>  > You can copy the
                  helloworld.html file to the Documents folder<br>
                  >>>>> (hover<br>
                  >>>>>  > over the text icon and
                  select copy to Documents). Using<br>
                  >>>>> Terminal, you<br>
                  >>>>>  > will see the file in the
                  Documents folder is named<br>
                  >>>>>  > helloworld.html.zip.<br>
                  >>>>>  > This is correct (it should
                  be a zip file) but the name should be<br>
                  >>>>>  > helloworld.zip. In the
                  Terminal you will see the expanded file<br>
                  >>>>> is<br>
                  >>>>>  > helloworld.html.<br>
                  >>>>>  ><br>
                  >>>>>  > There are two problems:<br>
                  >>>>>  ><br>
                  >>>>>  >      1. When the file is
                  zipped, it should be in a 'project'<br>
                  >>>>> directory<br>
                  >>>>>  > with the name of the
                  project. So helloworld/helloworld.html.<br>
                  >>>>> When<br>
                  >>>>>  > unzipped, there should be a
                  helloworld directory in Documents<br>
                  >>>>> and in<br>
                  >>>>>  > it<br>
                  >>>>>  > should be the
                  helloworld.html file.<br>
                  >>>>>  >      2. The html file needs
                  a <title>helloworld</title>. Browse<br>
                  >>>>>  > apparently uses the whole
                  file as the title when one is not<br>
                  >>>>> given.<br>
                  >>>>>  > Note:<br>
                  >>>>>  > the title appears as the
                  name of the tab.<br>
                  >>>>>  ><br>
                  >>>>>  > Having saved helloworld
                  with project name helloworld, I was<br>
                  >>>>> able to<br>
                  >>>>>  > open<br>
                  >>>>>  > it (but only when fiddler
                  is enabled - which is probably ok). It<br>
                  >>>>>  > displayed correctly.
                  However, if I show source I get the source<br>
                  >>>>> html<br>
                  >>>>>  > for<br>
                  >>>>>  > Richa Sehgal's fiddler page
                  not the source of the<br>
                  >>>>> helloworld.html.<br>
                  >>>>>  ><br>
                  >>>>>  > Using Terminal, I did a
                  less on the text of helloworld.html. It<br>
                  >>>>> is one<br>
                  >>>>>  > line (normal for html which
                  doesn't recognize newlines). There<br>
                  >>>>> is a<br>
                  >>>>>  > package called
                  BeautifulSoup which is included in the Sugar<br>
                  >>>>> image (it<br>
                  >>>>>  > is<br>
                  >>>>>  > outdated - should be bs4
                  but no problem). Anyway, you can find<br>
                  >>>>> the<br>
                  >>>>>  > BeautifulSoup documentation
                  on line. What you can do is use the<br>
                  >>>>>  > prettyprint feature to save
                  the html file so that it is more<br>
                  >>>>> useful<br>
                  >>>>>  > for<br>
                  >>>>>  > editiing.<br>
                  >>>>>  ><br>
                  >>>>>  > Note: the reason for the
                  zip file is that an html file can<br>
                  >>>>> refer to an<br>
                  >>>>>  > img (<img
                  src='some.png'>Some</img>). This is a
                  relative url and<br>
                  >>>>>  > refers<br>
                  >>>>>  > to a file in the same
                  directory as the html file. By zipping<br>
                  >>>>> the html<br>
                  >>>>>  > and media files together,
                  it will work correctly when uploaded<br>
                  >>>>> to the<br>
                  >>>>>  > school server, for example.
                  This also supports having a main<br>
                  >>>>> page with<br>
                  >>>>>  > links to other html files
                  in the same directory (<a<br>
                  >>>>>  > href='page1.html'>Page
                  1</a>).<br>
                  >>>>>  ><br>
                  >>>>>  > This is great progress and
                  now we have the opportunity to make<br>
                  >>>>> sure<br>
                  >>>>>  > that<br>
                  >>>>>  > the feature works in
                  various use cases.<br>
                  >>>>>  ><br>
                  >>>>>  > Tony<br>
                  >>>>>  ><br>
                  >>>>>  > On 05/14/2016 10:08 PM,
                  Ütkarsh Tiwari wrote:<br>
                  >>>>>  >> Hi,<br>
                  >>>>>  >>      I have fixed the
                  .xo file. Now on clicking the 'Run' will<br>
                  >>>>> open a<br>
                  >>>>>  >> new tab with blank
                  fiddle screen and will insert the user code<br>
                  >>>>> inside<br>
                  >>>>>  >> the blank skeleton in
                  index.html. I have attached the new .xo<br>
                  >>>>> below.<br>
                  >>>>>  >><br>
                  >>>>>  >> Note-
                  "web-console.html" file contains the html code of the<br>
                  >>>>>  >> JS-fiddler<br>
                  >>>>>  >> designed by Ms. Richa
                  Sehgal. We need not touch it. User code<br>
                  >>>>> is<br>
                  >>>>>  >> saved<br>
                  >>>>>  >> in the index.html file.<br>
                  >>>>>  >><br>
                  >>>>>  >> I have also created a
                  feature page -<br>
                  >>>>>  >> <a
                    moz-do-not-send="true"
                    href="https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler"
                    rel="noreferrer" target="_blank"><a class="moz-txt-link-freetext" href="https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler">https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler</a></a><br>
                  >>>>>  >><br>
                  >>>>>  >> Thanks,<br>
                  >>>>>  >> Utkarsh Tiwari<br>
                  >>>>>  ><br>
                  >>>>>  ><br>
                  >>>>> 
                  _______________________________________________<br>
                  >>>>>  Sugar-devel mailing list<br>
                  >>>>>  <a moz-do-not-send="true"
                    href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
                  >>>>>  <a moz-do-not-send="true"
                    href="http://lists.sugarlabs.org/listinfo/sugar-devel"
                    rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
                  >>>>><br>
                  >>>><br>
                  >>>><br>
                  >>>><br>
                  >>>>  --<br>
                  >>>>  Walter Bender<br>
                  >>>>  Sugar Labs<br>
                  >>>>  <a moz-do-not-send="true"
                    href="http://www.sugarlabs.org" rel="noreferrer"
                    target="_blank">http://www.sugarlabs.org</a><br>
                  >>>>  <<a moz-do-not-send="true"
                    href="http://www.sugarlabs.org" rel="noreferrer"
                    target="_blank">http://www.sugarlabs.org</a>><br>
                  >>>><br>
                  >>><br>
                  >>
                  _______________________________________________<br>
                  >> Sugar-devel mailing list<br>
                  >> <a moz-do-not-send="true"
                    href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
                  >> <a moz-do-not-send="true"
                    href="http://lists.sugarlabs.org/listinfo/sugar-devel"
                    rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
                  ><br>
                  _______________________________________________<br>
                  Sugar-devel mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.sugarlabs.org/listinfo/sugar-devel"
                    rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div><font><font>Walter Bender</font></font><br>
                <font><font>Sugar Labs</font></font></div>
              <div><font><a moz-do-not-send="true"
                    href="http://www.sugarlabs.org" target="_blank"><font>http://www.sugarlabs.org</font></a></font><br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Sugar-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>