Guy's I am attempting to use the Carbon Event Queuea Plugin back to RB.

I am sending the Events no problem, its sitting in a Carbon Timer just for
testing


pascal void TimerAction (EventLoopTimerRef theTimer,void* userData)
{
        printf("Timer Event\n");
        EventRef event;
        OSStatus err;

        (void) CreateEvent( NULL,'iqo ',1, 0, kEventAttributeNone, &event );

        for (int nx=0;nx<1001;nx++){
          err = PostEventToQueue( GetMainEventQueue(), event,
kEventPriorityStandard );
                printf("Posted Event\n");
        }

        (void) ReleaseEvent( event );

}



I have used the iDeclare VolumeEvent Example with some Mods but the events
do not get fired to my app


  #If targetMacOS
    Soft Declare Function GetMainEventQueue Lib CarbonLib () as Ptr
    Soft Declare Function GetApplicationEventTarget Lib CarbonLib () as Ptr
    Soft Declare Function NewEventHandlerUPP Lib CarbonLib (userRoutine as
Ptr) as Ptr
    Soft Declare Function InstallEventHandler Lib CarbonLib (inTarget as
Ptr, inHandler as Ptr, inNumTypes as Integer, inList as Ptr, inUserData as
Ptr, handlerRef as Ptr) as Integer

    Dim eventTarget as Ptr = GetMainEventQueue
    If eventTarget = nil then
      return
    End if

    Dim theUPP as Ptr = NewEventHandlerUPP(AddressOf HandleEvent)

    If (theUPP = nil) then
      return
    End if

    Dim eventList(0) as EventTypeSpec
    eventList(0).eventClass = kEventClassVolume
    eventList(0).eventKind = kEventSigLevel


    Dim OSError As Integer = InstallEventHandler(eventTarget, theUPP, 1 +
UBound(eventList), MakeCArray(eventList), nil, nil)

    If (OSError <> 0) then
      //log error
    End if

  #endif


The event handler is a delegate that gets called ok when I define the event
handler for a EventClass of 'vol ' but for 'iqo ' they do not fire
have I done something daft..



Mark





______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to