next alias

Tags ( )

In HBN there was entries had a "next alias" property that could be accessed through AS. I couldn't find anything similar in Mori. Is there anyway to find the aliases of an entry?

Thanks

I took this out because I

I took this out because I didn't realize anyone would use it. I'm adding back 'next alias' and 'previous alias' keys for the next release. In the meantime I think you can call method to do what you want. Try

set myNextAlias to call method "nextAlias" of myEntryData

Thanks Jesse, that seems to

Thanks Jesse, that seems to work fine as a replacement.

First thing to note (that I

First thing to note (that I found through trial and error) is that the above call has to be inside a "tell application "Mori"" block and not a "using terms from application "Mori"" block.

Any idea as to why this:

try

set nextAlias to (call method "nextAlias" of currentEntry)
log "the next alias is " & nextAlias

on error
log "error"
set nextAlias to null
end try

results in:

call method "nextAlias" of entry id "p3" of document "testNotebook.midoc"
entry id "p19" of document "testNotebook.midoc"
get entry id "p19" of document "testNotebook.midoc"
entry id "p19" of document "testNotebook.midoc"
(*error*)

p19 is indeed the alias of p3, but as soon as I try to set the value of a varible to it, I get the error.

Thanks,
Jeff

I think the problem is this

I think the problem is this line:

log "the next alias is " & nextAlias

it's trying to coerce nextAlias (which is an entry) into a string, and that's what is causing the error. This works OK for me:

tell application "Mori"
set nextAlias to call method "nextAlias" of current entry
log "the next alias is " & name of nextAlias
end tell

Yes, that appears to be the

Yes, that appears to be the problem. It's working now, Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.