Comments

jetdv wrote on 9/19/2007, 2:19 PM
I see the same thing. If I move or resize an event, no update is made. If I then click anywhere on any track, it's updated.
Rosebud wrote on 9/19/2007, 3:21 PM
Thx Edward,
I made another test and for me, it occurs when resizing event.

To Sony Team:
Please, can you confirm if it’s a bug.
If it’s not a bug, it would be nice to add "event moving " to the handler.
ForumAdmin wrote on 9/20/2007, 9:39 AM
Not really a bug... just an omission. There will be a new event in 8.0a:

Vegas::TrackEventTimeChanged

Hopefully that will help. Keep the feedback coming!
Rosebud wrote on 9/20/2007, 10:41 AM
Excellent news !
Many thx.
Rosebud wrote on 9/30/2007, 2:05 PM
I noticed a strange behaviour.
Sometimes EventHandler occurs, sometimes it don’t occurs at all (I could not really determine why but it seems related to the media type : generated media or AV media ).
Another strange thing when it occurs
-if “ignore event grouping” is enable, it occurs all the time.
-if “ignore event grouping” is disable, it occurs only when selecting event.

Does someone else noticed the same behaviour ?

Edit : ok , I think I tracked the "bug" : EventHandler work fine when loading Custom command for the first time, but it don’t occurs at all when I close the custom command and load it again.
Please, can you confirm ?
ForumAdmin wrote on 10/1/2007, 10:49 AM
I have not been able to reproduce this bug. Can you provide sample code that demonstrates this bug?
Rosebud wrote on 10/1/2007, 11:36 AM
You can download a VS C# Express sample project HERE. Add at least one event on timeline to test it.
When I load the Custom Command for the first time, the listview is updated every time I move the event (“ignore event grouping” must be enable).
If I close the Custom Command and load it again, it don’t work.

TIA
ForumAdmin wrote on 10/1/2007, 1:23 PM
I think this problem will be primarily solved by the new TrackEventTimeChanged event which will be in 8.0a. If you are trying to track event start times, use the new event.

The other issue you are having is that you are not removing your handler from Vegas' TrackEventStateChanged event when your DockableControl is closed.
This impacts performance and prevents the event from propagating to new event handlers. The orphaned handlers are probably throwing exceptions before the valid ones have a chance to be called. Use the DockableControl::Closed event or override the OnClosed method of the DockableControl like this:


protected override void OnClosed(EventArgs args)
{
myVegas.TrackEventStateChanged -= myHandler;
base.OnClosed(args);
}


You will probably need to reorganize your code a bit to add and remove event handlers when the DockableControl is created and closed... you can probably do these things in your command module class.
Rosebud wrote on 10/2/2007, 2:57 AM
Many thx.
I tried your method, unfortunately with no success.

I added the eventhandler to the “void HandleInvoked(Object sender, EventArgs args)”:

dockView.Closed +=new EventHandler(dockView_Closed);


I added the dockView_Closed to SampleModule class:

void dockView_Closed(Object sender, EventArgs args)
{
}


At this point all work fine, event occurs when DockableControl is closed.
BUT, I get a compilation error when I try to remove the “TrackEventStateChanged” handler from Vegas:

void dockView_Closed(Object sender, EventArgs args)
{
myVegas.TrackEventStateChanged -= HandleTestChanges;
}

I get this error : The name 'HandleTestChanges' does not exist in the current context.
This is certainly a noob error :(((

TIA for your help.
ForumAdmin wrote on 10/2/2007, 6:38 AM
You need to remove the handler that was added. In your code, the handler you add belongs to your UserControl so you need like this:


void dockView_Closed(Object sender, EventArgs args)
{
myVegas.TrackEventStateChanged -= essaiForm.HandleTestChanges;
}


You'll also need to declare essaiForm as an instance variable of the
SampleModule class. For the sake of symmetry, you should probably
move the code that adds the TrackEventStateChanged handler to the
HandleInvoked method. Here's what I ended up with:


Extension_Vegas1.UserControl1 essaiForm;

void HandleInvoked(Object sender, EventArgs args)
{
if (!myVegas.ActivateDockView("Essai Custom Command"))
{
DockableControl dockView = new DockableControl("Essai Custom Command");
dockView.DefaultFloatingSize = new Size (640,480);
dockView.DefaultDockWindowStyle = DockWindowStyle.Docked;
dockView.Closed += this.dockView_Closed;
essaiForm = new Extension_Vegas1.UserControl1(myVegas);
essaiForm.Dock = DockStyle.Fill;
dockView.Controls.Add(essaiForm);
myVegas.LoadDockView(dockView);
myVegas.TrackEventStateChanged += essaiForm.HandleTestChanges;
}

}

Rosebud wrote on 10/2/2007, 7:07 AM
The code works perfectly now.
Many thx for your patience :)))