PDA

View Full Version : COFFEE | Dialog differs in Script/Plug/CoffeTag?


tcastudios
06-29-2006, 07:44 PM
I use a regular COFFEE tag or the ScriptManager to debug snippets of code.
When using the very same code for opening a OK dialog it works inconsistent...

This code works fine in ScriptManager and in a COFFE expression plugintag.
The dialog opens.
But -not- in a regular COFFEE tag. The dialoge doesn't open.
I can't find out why!

It is as simple as possible. If op is selected, open dialog and deselect op.

Cheers
Lennart


// ////test dialog
var opselected = doc->GetActiveObject(); // Get a active object
if (op != opselected) return; // if it is not op return

if (op == opselected) //else run
{
var result = TextDialog("Hey", DLG_OK);
if (result == DLG_R_OK) // when confirming clicking OK
{
op->DelBit(BIT_AOBJ); // deselect op
return;
}
}

// ////test dialog end

CGTalk Moderation
06-29-2006, 07:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.