Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from HTML, local import #39

Open
justingeeslin opened this issue Jul 5, 2020 · 1 comment
Open

Import from HTML, local import #39

justingeeslin opened this issue Jul 5, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@justingeeslin
Copy link
Member

justingeeslin commented Jul 5, 2020

How can you import designs from HTML files on your computer? I found File -> Import Design from HTML… but this only seems to have options for importing from a remote URL.

Screen Shot 2020-07-04 at 10 01 06 PM

The User Guide suggests local HTML import is possible.

You can also create a design by importing it from HTML, either on your computer or from the Web. This is useful if your design process already includes interactive proto- types expressed in HTML or if you want to analyze existing web sites. This feature is discussed in Section 4.6.

I'm not finding this information in the User Guide nor in its Section 4.6

@justingeeslin justingeeslin added the question Further information is requested label Jul 5, 2020
@justingeeslin
Copy link
Member Author

justingeeslin commented Jul 5, 2020

After reading 4.6 a second time, I found where the User Guide says you can use file:// URLs.

Enter a URL to crawl, either on the web (starting with the default http://) or from your machine (replace the http:// with the path to the starting file on your machine)

I tried a local URL of file:///Users/Skyward/test.html

The local file contained the following valid HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Testing cogTool</title>
</head>
<body>
<form>
<p>
<label>Name:</label>
<input type="text">
</p>
<p>
<input type="submit">
</p>
</form>
</body>
</html>

An attempt to import the HTML as a design generated the following error message:

CogTool has encountered a set of unexpected exceptions.  See below for additional details:

Version: 1.3trunk (${revision}) 06/10/2020-10:23
Mac OS X, version 10.15.5, JVM 1.8.0_201 (Oracle Corporation)
Memory usage: 21.17% of 257.43;  356.52
edu.cmu.cs.hcii.cogtool.util.AggregateException: CogTool has encountered a set of unexpected exceptions.  See below for additional details:
edu.cmu.cs.hcii.cogtool.util.AggregateException: CogTool has encountered a set of unexpected exceptions.  See below for additional details:
java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.util.ErrorDialog.getStackTraceAsString(ErrorDialog.java:272)
	at edu.cmu.cs.hcii.cogtool.util.ErrorDialog.buildDialog(ErrorDialog.java:231)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil$SimpleDialog.open(WindowUtil.java:1280)
	at edu.cmu.cs.hcii.cogtool.ui.DefaultInteraction.reportException(DefaultInteraction.java:1177)
	at edu.cmu.cs.hcii.cogtool.ui.RcvrExceptionHandler.recover(RcvrExceptionHandler.java:342)
	at edu.cmu.cs.hcii.cogtool.ui.RcvrExceptionHandler.recoverWorkThread(RcvrExceptionHandler.java:361)
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebCrawlThread.doneCallback(ImportWebCrawlThread.java:347)
	at edu.cmu.cs.hcii.cogtool.CogToolWorkThread.run(CogToolWorkThread.java:271)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4126)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3793)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:540)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:570)
	at edu.cmu.cs.hcii.cogtool.CogTool.main(CogTool.java:382)
Caused by: edu.cmu.cs.hcii.cogtool.util.AggregateException: CogTool has encountered a set of unexpected exceptions.  See below for additional details:
java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebURL.<init>(ImportWebURL.java:188)
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebCrawlThread.<init>(ImportWebCrawlThread.java:251)
	at edu.cmu.cs.hcii.cogtool.controller.ProjectController$53.performAction(ProjectController.java:5977)
	at edu.cmu.cs.hcii.cogtool.util.ListenerIdentifierMap.performAction(ListenerIdentifierMap.java:216)
	at edu.cmu.cs.hcii.cogtool.util.ListenerIdentifierMap.performAction(ListenerIdentifierMap.java:267)
	at edu.cmu.cs.hcii.cogtool.ui.UI.performAction(UI.java:582)
	at edu.cmu.cs.hcii.cogtool.ui.UI.performAction(UI.java:552)
	at edu.cmu.cs.hcii.cogtool.ui.DefaultUI.performAction(DefaultUI.java:500)
	at edu.cmu.cs.hcii.cogtool.view.View.performAction(View.java:625)
	at edu.cmu.cs.hcii.cogtool.view.View$2.handleEvent(View.java:482)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4174)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3791)
	... 3 more
Caused by: java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebURL$1.completed(ImportWebURL.java:521)
	at org.eclipse.swt.browser.WebKit.webView_didFinishLoadForFrame(WebKit.java:816)
	at org.eclipse.swt.browser.WebKit.browserProc(WebKit.java:322)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5265)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5673)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:92)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3785)
	... 3 more
---- Sub Exception Details ----
edu.cmu.cs.hcii.cogtool.util.AggregateException: CogTool has encountered a set of unexpected exceptions.  See below for additional details:
java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebURL.<init>(ImportWebURL.java:188)
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebCrawlThread.<init>(ImportWebCrawlThread.java:251)
	at edu.cmu.cs.hcii.cogtool.controller.ProjectController$53.performAction(ProjectController.java:5977)
	at edu.cmu.cs.hcii.cogtool.util.ListenerIdentifierMap.performAction(ListenerIdentifierMap.java:216)
	at edu.cmu.cs.hcii.cogtool.util.ListenerIdentifierMap.performAction(ListenerIdentifierMap.java:267)
	at edu.cmu.cs.hcii.cogtool.ui.UI.performAction(UI.java:582)
	at edu.cmu.cs.hcii.cogtool.ui.UI.performAction(UI.java:552)
	at edu.cmu.cs.hcii.cogtool.ui.DefaultUI.performAction(DefaultUI.java:500)
	at edu.cmu.cs.hcii.cogtool.view.View.performAction(View.java:625)
	at edu.cmu.cs.hcii.cogtool.view.View$2.handleEvent(View.java:482)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4174)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3791)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:540)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:570)
	at edu.cmu.cs.hcii.cogtool.CogTool.main(CogTool.java:382)
Caused by: java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebURL$1.completed(ImportWebURL.java:521)
	at org.eclipse.swt.browser.WebKit.webView_didFinishLoadForFrame(WebKit.java:816)
	at org.eclipse.swt.browser.WebKit.browserProc(WebKit.java:322)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5265)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5673)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:92)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3785)
	... 3 more
---- Sub Exception Details ----
java.lang.NullPointerException
	at edu.cmu.cs.hcii.cogtool.controller.ImportWebURL$1.completed(ImportWebURL.java:521)
	at org.eclipse.swt.browser.WebKit.webView_didFinishLoadForFrame(WebKit.java:816)
	at org.eclipse.swt.browser.WebKit.browserProc(WebKit.java:322)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5265)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5673)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:92)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3785)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:540)
	at edu.cmu.cs.hcii.cogtool.util.WindowUtil.interact(WindowUtil.java:570)
	at edu.cmu.cs.hcii.cogtool.CogTool.main(CogTool.java:382)

This error was generated using develop branch on macOS Catalina 10.15.5

@justingeeslin justingeeslin added bug Something isn't working and removed question Further information is requested labels Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant