From 1d2a98e0fdc48a266a3b6e3efe77e8319f12caf0 Mon Sep 17 00:00:00 2001 From: Ivan Pulido Date: Tue, 23 Jun 2015 19:16:02 +0000 Subject: [PATCH] =?UTF-8?q?Agrego=20nuevo=20m=C3=A9todo=20que=20genera=20u?= =?UTF-8?q?na=20UI=20para=20abrir=20desde=20URL=20que=20da=20especifica=20?= =?UTF-8?q?el=20usuario.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Grafoscopio/GrafoscopioBrowser.class.st | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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"