[futurebasic] too many arguments

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2011 : Group Archive : Group : All Groups

From: Steve <mactech@...>
Date: Tue, 26 Jul 2011 07:23:15 -0400
I am getting an error when trying to use this call.  It states it expects 6 arguments but there are 7.

Error: clang:
too many arguments to function call, expected 6, have 7 [line 377:59 of _27_eventhandler.incl,palette.incl.m]


toolbox fn RegisterEventHotKey( UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, OSType signature, UInt32 id, EventTargetRef inTarget, UInt32 inOptions, EventHotKeyRef *outRef ) = OSStatus


local mode
local fn RegisterHotKeys
 
dim as EventTargetRef    target
dim as EventHotKeyRef  @ hotKeyref
dim as OSStatus          ignore
 
target = fn GetApplicationEventTarget()

// the magic hex numbers here are the relevant virtual key codes
ignore = fn RegisterEventHotKey( 0x78, 0, 0, 2, target, 0, @hotKeyref ) // F2
ignore = fn SetMenuItemProperty( fn GetMenuHandle( _mEdit ), _iCut, 0, _hotProperty, sizeof( EventHotKeyRef ), @hotKeyref )

ignore = fn RegisterEventHotKey( 0x63, 0, 0, 3, target, 0, @hotKeyref ) // F3
ignore = fn SetMenuItemProperty( fn GetMenuHandle( _mEdit ), _iCopy, 0, _hotProperty, sizeof( EventHotKeyRef ), @hotKeyref )

ignore = fn RegisterEventHotKey( 0x76, 0, 0, 4, target, 0, @hotKeyref ) // F4
ignore = fn SetMenuItemProperty( fn GetMenuHandle( _mEdit ), _iPaste, 0, _hotProperty, sizeof( EventHotKeyRef ), @hotKeyref )
end fn


thanks

Steve