Event selection in VP8 [SOLVED]

Rosebud wrote on 9/14/2007, 8:40 AM
I want to invert an event selection.
In V7 I use: tempEvent.Selected = !tempEvent.Selected;
But it doesn’t seem to work in V8.
Is there any change ?

TIA

I get the following error:
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x8000FFFF): Défaillance irrémédiable (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at Sony.Vegas.IEventCOM.SetSelected(UInt32 trackID, Int64 eventID, Boolean value)
at Sony.Vegas.TrackEvent.set_Selected(Boolean value)
at Goto_Event.FormName.videoListView1_MouseClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseClick(MouseEventArgs e)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Comments

Rosebud wrote on 9/14/2007, 12:03 PM
It seems I have this problem with precompiled script only.
Can it be because I’m working with Visual C# 2005 Express ?
Teetow wrote on 9/14/2007, 12:10 PM
You sure you referenced the Vegas 8 DLL file and not the Vegas 7 one? (Sony.Vegas.dll).
Rosebud wrote on 9/14/2007, 12:20 PM
Yes I do.
It is strange because at this time I have problem with “Selected” properties only.
Visual C# Express work with the .NET 2 SDK, but VP8 needs .NET 3... can it be my problem ?
jetdv wrote on 9/14/2007, 12:53 PM
I'm using "Selected" fine in VS2005. However, scripts compiled for Vegas 6/7 will NOT work with Vegas Pro 8.
Rosebud wrote on 9/14/2007, 1:34 PM
Thx Edward.
It seems I have this error because I’m working with a non-modal window (tricks version).
With modal window, all work fine.
I will have a look to the new non-modal windows VP8 feature.
jetdv wrote on 9/14/2007, 2:38 PM
I know what your problem is:

You're NOT putting it in an UNDO block. That's the exact error I got when I forgot the UNDO block.