Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ItemAdded-event only fired when add from code (Read 1376 times)
marcmf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Apr 4th, 2010
ItemAdded-event only fired when add from code
Apr 4th, 2010 at 8:25pm
Print Post  
Hello,

Context: I use VB.NET, VS2008, WinXP, Mindfusion FlowChart.NET 3.0 (I think).

I downloaded FCNet today and I am wild about its possibilities Wink. But when I try to capture adding of a DiagramItem, i.e. INTERACTIVE adding of such an item by the user, the Diagram.ItemAdded-event won't fire. Only when adding it from code, then the event fires.
On the contrary the Diagram.ItemRemoved-event fires correctly as well in interactive mode as when removing it from programming.

Then I discovered Diagram.NodeCreated, which does fire also in the interactive case.

--> ItemRemoved fires first, the NodeDeleted
--> ItemAdded doesn't fire, but NodeCreated does

Am I only creating a node interactively and not adding it ? Is that the reason ? But then how would a user ever add a node interactively, maybe never ?

I hope I'm not asking a question which has been answered 10 times already (I searched the forum but couldn't find it), and I appologize for lacking a good knowledge of the FCNET library ....

Thanks for (pointers to) help.
Kind regards
Marc De Valckenaere
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ItemAdded-event only fired when add from code
Reply #1 - Apr 5th, 2010 at 7:22am
Print Post  
Hi Marc,

Handle NodeCreated and LinkCreated to detect items added by the user. The respective objects are not only created but added to the diagram too. Most events are raised only to response to users actions as a norm, but the Deleted events are inconsistent for some reason.

Stoyan
  
Back to top
 
IP Logged
 
marcmf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Apr 4th, 2010
Re: ItemAdded-event only fired when add from code
Reply #2 - Apr 5th, 2010 at 5:52pm
Print Post  
Thank you very much Stoyan,

In the mean time I continued exploring the example projects and I must say I'm really impressed.

Thanks again.
Marc
Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint