Font Panel

Anyone out there ever worked with the font panel?

I’m trying to select a font from the font panel and then assign the name of the selected font to some variable. I have the following code:

–Assuming the font panel has been opened
on clicked theObject
set newFont to font of font panel
end clicked

This assignment does not work, though. The font panel has a property called “font” with read/write access, with read returning a font. The property does exist, it just doesn’t work! What’s wrong?

There is a similar property for the color panel. For example, I could have the following code:

–Assuming the color panel has been opened
on clicked theObject
set newColor to color of color panel
end clicked

This works, and looks very similar to the font panel code. I’m not sure why this works and the font panel does not…

Thanks