Question: Original BO and subsequent copies


Author
Message
Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
a) I create a BO in a project and then I build the project. The BO appears on the Toolbox.

b) I then place a copy of the BO from Toolbox and put on my form.

c) I add some events to the original BO.

d) I add some events to the copy of my BO on the form.



Is it the correct understanding that SF will always execute the event's codes on the original BO first and then on any subsequent BO that were placed on the forms?



Thanks!

..ßen
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
The order in which a BO is dropped on a form has nothing to do with it actually...unless you ignore the INitializationPriority property.  You can get more specs on this in the help, but you can set the InitializationPriority property on a BO and actually control which order in which they initialize.
Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Ok, I went ahead and put MessageBox on the main BO in the "BeforeSave" event and also a MessageBox the form's BO "BeforeSave" and I left the InitializationPriority=50.



I run the app and I see the MessageBox in the original BO shows first and then the one the form.



I then changed those value to 1 and 100 and vice versa, and still see the original BO gets executed first.



My question was mainly related to the order that which BO events get fired first (The main BO or subsequent ones) and not how it gets initialized on the form.

Thanks!

..ßen
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ben Hayat - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Ben Hayat - 18 Years Ago
Ben Hayat - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Ben Hayat - 18 Years Ago
StrataFrame Team - 18 Years Ago
                         By the same token, since the OnEvent() methods are protected, you can...
StrataFrame Team - 18 Years Ago
                         [quote][b]Ben Chase (03/16/2007)[/b][hr]Any events that are shared by...
Ben Hayat - 18 Years Ago
                             [quote]I hope I can make it to training class![/quote] I hope you can...
Trent L. Taylor - 18 Years Ago
                                 Off Topic:

Trent, why is it, when I use the quote "{}"...
Ben Hayat - 18 Years Ago
                                     I don't think it's a problem with the way you are quoting things... I...
StrataFrame Team - 18 Years Ago
                                         Ben, while you're looking at the forum configuration, can you also...
Ben Hayat - 18 Years Ago
                                             We fixed the RegEx string that InstantASP was using so the quote and...
Trent L. Taylor - 18 Years Ago
                                                 Thanks for the fix and I do see your point about the "Edit" feature...
Ben Hayat - 18 Years Ago
                                                     [quote]Just got off the phone with an old friend who is also switching...
Trent L. Taylor - 18 Years Ago
                                                 [quote]We fixed the RegEx string that InstantASP was using so the...
Greg McGuffey - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search