Agrego nuevo método que genera una UI para abrir desde URL que da especifica el usuario.
This commit is contained in:
parent
f38924015d
commit
1d2a98e0fd
@ -215,7 +215,6 @@ GrafoscopioBrowser class >> startDockingBar [
|
|||||||
launchMenu
|
launchMenu
|
||||||
add: 'Documento interactivo nuevo' target: GrafoscopioBrowser selector: #open;
|
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: #openFromFileSelector;
|
||||||
add: 'Documento interactivo desde archivo' target: (GrafoscopioBrowser new) selector: #openFromUrl;
|
|
||||||
add: 'Documentos interactivos recientes' target: GrafoscopioBrowser selector: #openFromRecentlyUsed;
|
add: 'Documentos interactivos recientes' target: GrafoscopioBrowser selector: #openFromRecentlyUsed;
|
||||||
add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||||
add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowser new) selector: #open;
|
add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowser new) selector: #open;
|
||||||
@ -950,7 +949,7 @@ GrafoscopioBrowser >> openFromFileSelector [
|
|||||||
self buildBrowserNamed: workingFile basenameWithIndicator.
|
self buildBrowserNamed: workingFile basenameWithIndicator.
|
||||||
recentTrees isNil
|
recentTrees isNil
|
||||||
ifTrue:[recentTrees := OrderedCollection new].
|
ifTrue:[recentTrees := OrderedCollection new].
|
||||||
recentTrees detect: workingFile ifFound: [recentTrees add: workingFile].
|
recentTrees add: workingFile.
|
||||||
mainTree := GrafoscopioNode new
|
mainTree := GrafoscopioNode new
|
||||||
header: 'Arbol principal';
|
header: 'Arbol principal';
|
||||||
level: 0.
|
level: 0.
|
||||||
@ -958,6 +957,19 @@ GrafoscopioBrowser >> openFromFileSelector [
|
|||||||
browser openOn: mainTree children.
|
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 }
|
{ #category : #persistence }
|
||||||
GrafoscopioBrowser >> openFromUrl: anUrl [
|
GrafoscopioBrowser >> openFromUrl: anUrl [
|
||||||
"Opens a tree from a file named aFileName"
|
"Opens a tree from a file named aFileName"
|
||||||
|
Loading…
Reference in New Issue
Block a user