Hello my friends,
I am trying to migrate an old AppleScript Studio app to AppleScriptObjC, this my first experience with it.
I can set contents of field, attach actions to buttons, etc… But it seems I did not understand the concept of calling my handlers from within another handler.
Basically this is what I have now:
on clickButton01_(sender)–> this is attached to the button!
try
set Nome to getFilemakerCellContent_(“EmissaoNotasFiscais.fp7”, “EmissaoNota1 regime normal”, “Nome”)
on error errorGetFilemakerCellContent
set Nome to “error”
tell me to log errorGetFilemakerCellContent
end try
display dialog Nome → displays “error”
end clickButton01_
on getFilemakerCellContent_(db, _layout, cellName)
tell application “FileMaker Pro Advanced”
tell document db
tell layout layout
tell current record
set cellContent to get cellValue of cell cellName
end tell
end tell
end tell
end tell
return cellContent
end getFilemakerCellContent
I have no idea what I am doing wrong. Console doesn’t show me any errors…
Please help me.
Thanks,
Bernardo Hoehl
Rio de Janeiro - Brazil