No, not yet, although I was thinking about it. But
tell me what
#goto: does and how full URL objects would help?
The current implementation (the fixed version after the bug-report)
looks like:
WAAnchorTag>>goto: aContext
"Initialize the receiver to properly activate aContext when being
clicked. This includes a callback and a human-readable and
bookmarkable url."
| path |
path := canvas painter session application baseUrl.
aContext structure parents allButFirst
do: [ :each | path addToPath: each title ].
path addParameter: 'command' value: aContext command class name.
aContext command isView
ifTrue: [ path addParameter: 'view' value: aContext command
viewComponentClass name ].
path addParameter: (canvas callbacks
registerActionCallback: [ PRCurrentContext value: aContext ]).
self url: path displayString.
I would prefer to write:
WAAnchorTag>>goto: aContext
self callback: [ PRCurrentContext value: aContext ].
aContext structure parents allButFirst
do: [ :each | self url addToPath: each title ].
self url addParameter: 'command' value: aContext command class name.
aContext command isView
ifTrue: [ self url addParameter: 'view' value: aContext command
viewComponentClass name ].
I think it is important to have URL-objects and not strings whenever
we deal with URLs, such as in anchors. I don't like to call low-level
functions such as #registerActionCallback: and to receive greetings
from demeter in 'canvas painter session application baseUrl' ;-)
Basically all generated links in Pier have annotations of the current
context, to be able to bookmark pages and different views. If an
anchor would know its URL the code would become much simpler.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch