publisher/subscriber pattern


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Have you considered implementing a publisher/subscriber pattern in the framework? For example, in your sample application I would like the Order Entry form to be able to subscribe to a customer change on the Customer Maintenance form that would allow the Order Entry form to update itself to reflect that change.
Replies
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

I’m missing something when it comes to the handling of objects within the framework.  I’m using VB .Net and the sample Windows application that came with the framework.

 

As suggested in the previous post for simulating a publisher/subscriber pattern, I attached the Order Entry form to the After Save event in the CustomerMaintenance form. When I start the application I open the Order Entry form and start to add a new order, stopping after I select a customer. At that point the OrderEntry.Customers is set to the selected customer. Next I open the Customer Maintenance form and select the customer record that was selected in the Order Entry form, edit it and save it. At that point the After Save event on the Customer Maintenance form transfers control to the event handler sub that I added to the Order Entry form. So far so good. But when I set a break in the event handler OrderEntry,Customers is not set to a reference of an object. This is where I’m getting lost.

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Sorry for the delay in response, Larry, I was at a wedding in New Mexico, and just got back in. Are you using an AddHandler call, or are you using the implicit call to AddHandler using the Handles keyword after the sub? I'm trying to figure out where the event handler is getting attached, and what instances of the forms and business objects are being used. You might also post any relevant code snippets from what you added...
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search