jessegrosjean / foldingtext-for-atom

Outline editor with productivity features (No longer in development)
Other
40 stars 10 forks source link

Uncaught TypeError: Cannot read property 'outline' of undefined #67

Closed alexmccoFS2 closed 9 years ago

alexmccoFS2 commented 9 years ago

[Enter steps to reproduce below:]

  1. Create an empty FoldingText for Atom doc
  2. Save document, enter a file type, and hit Save.

Atom Version: 1.0.0 System: Mac OS X 10.10.4 Thrown From: foldingtext-for-atom package, v0.7.1

Stack Trace

Uncaught TypeError: Cannot read property 'outline' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:762

TypeError: Cannot read property 'outline' of undefined
  at Object.serializeItems (/Users/alex.mccollister/.atom/packages/foldingtext-for-atom/lib/core/serializations/ftml.coffee:6:3)
  at Object.registerSerialization.serializeItems (/Users/alex.mccollister/.atom/packages/foldingtext-for-atom/lib/core/item-serializer.coffee:70:38)
  at Object.serializeItems (/Users/alex.mccollister/.atom/packages/foldingtext-for-atom/lib/core/item-serializer.coffee:29:45)
  at Outline.saveAs (/Users/alex.mccollister/.atom/packages/foldingtext-for-atom/lib/core/outline.coffee:750:27)
  at OutlineEditor.module.exports.OutlineEditor.saveAs (/Users/alex.mccollister/.atom/packages/foldingtext-for-atom/lib/editor/outline-editor.coffee:1947:14)
  at Pane.module.exports.Pane.saveItemAs (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:547:16)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:531:21)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:506:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:592:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:311:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:70:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

     -1:30.6.0 fuzzy-finder:toggle-file-finder (span.ft-body-text)
     -1:29.5.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:29.5.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:29.2.0 application:new-file (span.ft-body-text)
     -1:27.8.0 core:close (atom-text-editor.editor.is-focused)
     -1:20.9.0 core:backspace (span.ft-body-text)
     -1:19.6.0 editor:newline (span.ft-body-text)
     -1:18.6.0 outline-editor:new-outline (span.ft-body-text)
     -1:16.1.0 core:undo (span.ft-body-text)
     -1:03.0 editor:newline (span.ft-body-text)
     -1:01.3.0 outline-editor:new-outline (span.ft-body-text)
     -1:00.0 core:select-all (span.ft-body-text)
  3x -0:57.3.0 core:backspace (input.)
  2x -0:55.3.0 core:save (input.)

Config

{
  "core": {}
}

Installed Packages

# User
foldingtext-for-atom, v0.7.1

# Dev
No dev packages
RobTrew commented 9 years ago

Just trying to reproduce that here – haven't managed yet – could you unpack your step 2 a bit ?

  1. Save document (this seems to be before 'hit Save' – is it just a File > Save menu choice ?)
  2. enter a file type 'i.e' enter a full file name including some extension ? What extn are you using ?
  3. hit Save
alexmccoFS2 commented 9 years ago

Yes it was using the File > Save menu choice.

It was saved with the .fthml extension in the file name.

I haven't been able to reproduce this on my end either, now.

On Tue, Jul 7, 2015 at 3:59 PM, RobTrew notifications@github.com wrote:

Just trying to reproduce that here – haven't manage yet – could you unpack your step 2 a bit ?

  1. Save document (this seems to be before 'hit Save' – is it just a File > Save menu choice ?)
  2. enter a file type 'i.e' enter a full file name including some extension ? What extn are you using ?
  3. hit Save

— Reply to this email directly or view it on GitHub https://github.com/FoldingText/foldingtext-for-atom/issues/67#issuecomment-119338306 .

Alex McCollister IT Technician

402.437.0136 direct

Firespring http://firespring.com A force for good.

jessegrosjean commented 9 years ago

I think I found how to reproduce this... you need to first delete all items from your outline. I'll track this in #68 now.