PowerBASIC Peer Support Forums

Go Back   PowerBASIC Peer Support Forums > User to user Discussions > Programming with Objects

Programming with Objects User to user discussions about programming with objects, including COM objects.

Thread Tools Display Modes
Old Mar 20th, 2012, 07:29 AM
Chris Holbrook Chris Holbrook is offline
Join Date: Aug 2005
Location: in Hiding
Posts: 6,713
Events documentation

I don't understand this bit of the documentation about EVENTS:

One or more clients may choose to "subscribe" to events from a server object by executing the EVENTS FROM statement. The subscription is terminated by execution of the EVENTS END statement. When the server executes RAISEEVENT or OBJECT RAISEEVENT, all clients which have unsubscribed to these events are called. PowerBASIC servers support up to 32 concurrent client subscribers per server object.
Reply With Quote
Old Mar 20th, 2012, 12:03 PM
Fred Harris Fred Harris is offline
Join Date: Jan 2000
Location: Shamokin, PA USA
Posts: 1,656
Haven't read it, but can't help but believe its a typo.
Reply With Quote
Old Mar 20th, 2012, 03:36 PM
Larry Charlton Larry Charlton is offline
Join Date: Jan 2011
Location: North Carolina USA
Posts: 1,663
Subscription = EVENTS FROM oMath CALL oStatus
Cancel subscription = EVENTS END oStatus

See Event Source in the Docs.

Edit: Might be useful to look at differently.

One object uses RAISEEVENT to send a notice. Who gets that notice? Everyone that issued an EVENTS FROM ..., at least until they issue an EVENTS END.

Reedit: Also from the docs "32 concurrent client subscribers ". I.e. EVENTS FROM could be issued for up to 32 different objects. If 32 objects had an EVENTS FROM issued for them, when the server issued a raise event, it would send the event to all 32 objects (the subscribers). Think of a newspaper or magazine subscription, very, very similar.
Sometimes life's a dream, sometimes it's a scream

Last edited by Larry Charlton; Mar 20th, 2012 at 03:44 PM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 07:40 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit