Help for a newbie Filemaker read cellValue handler

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!
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.


Bernardo Hoehl
Rio de Janeiro - Brazil

I put log statements at the top of your getFilemakerCellContent_ method to log db, _layout, cellName, and that worked fine – the method is being called, so that’s not the problem. I don’t have FileMaker Pro Advanced so I can’t test the rest.


This is what I was doing wrong:

I was placing the handlers after the line “end script”.

This is really new to me…

In AS Studio one could place the handlers anywhere, and documentation is very, very poor…

Thanks my friend.

I disagree. There is a 10-fold improvement on the quantity vs applescript studio. It’s just that you need to convert it from Cocoa to AppleScriptObjC on your own. and that takes time to get used to. But once you do, the documentation is enormous and almost endless vs what we had before…