diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index a64a03c..270a95b 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -215,7 +215,6 @@ GrafoscopioBrowser class >> startDockingBar [ launchMenu add: 'Documento interactivo nuevo' target: GrafoscopioBrowser selector: #open; add: 'Documento interactivo desde archivo' target: (GrafoscopioBrowser new) selector: #openFromFileSelector; - add: 'Documento interactivo desde archivo' target: (GrafoscopioBrowser new) selector: #openFromUrl; add: 'Documentos interactivos recientes' target: GrafoscopioBrowser selector: #openFromRecentlyUsed; add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser selector: #messageNotImplementedYet; add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowser new) selector: #open; @@ -950,7 +949,7 @@ GrafoscopioBrowser >> openFromFileSelector [ self buildBrowserNamed: workingFile basenameWithIndicator. recentTrees isNil ifTrue:[recentTrees := OrderedCollection new]. - recentTrees detect: workingFile ifFound: [recentTrees add: workingFile]. + recentTrees add: workingFile. mainTree := GrafoscopioNode new header: 'Arbol principal'; level: 0. @@ -958,6 +957,19 @@ GrafoscopioBrowser >> openFromFileSelector [ browser openOn: mainTree children. ] +{ #category : #'as yet unclassified' } +GrafoscopioBrowser >> openFromURLUi [ + "This method generates the UI for the openFromUrl: method, it asks for a URL from the user" + + | fileUrl | + GrafoscopioBrowser configureSettings. + fileUrl := UIManager default + textEntry: 'Ingrese la URL' + title: 'Nuevo documento desde URL'. + fileUrl isNil ifTrue: [ ^nil ]. + GrafoscopioBrowser new openFromUrl: fileUrl +] + { #category : #persistence } GrafoscopioBrowser >> openFromUrl: anUrl [ "Opens a tree from a file named aFileName"