Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Open Reality / How to use interface callback's HISender pSender?
  RSS 2.0 ATOM  

How to use interface callback's HISender pSender?
Rate this thread
 
44735
 
Permlink of this thread   Subscribe to this thread
avatar
  • Jakobud
  • Posted: 27 June 2010 02:35 PM
  • Total Posts: 11
  • Joined: 18 January 2007 02:11 PM

In all the interface examples, callback methods are defined like this:

void myCallbackFunction (HISender pSenderHKEventpEvent)
{
...
}

How do you use HISender’s in the method? In normal programming languages, the sender in a callback is telling the method what interface widget/button/whatever triggered the callback.

So if I press a button in an interface to do something, and it triggers the callback, I assume I’m supposed to use pSender to determine what button was pressed. But I can’t seem to do anything with pSender in the method. And I don’t see any documentation at all (no surprise there) on how to use pSender. Like is pSender refering to the object? Or do the name of the button? What is it?

So does anyone know or have any clue at all about HISenders?



Replies: 0
avatar

I’m messing around with this too right now. I think this is the way to get a Component out of the pSender.

FBComponentlComp FBGetFBComponent( (HIObjectpSender ); 

if (
lComp && lComp->Is(FBButton::TypeInfo))
{
 
// Do stuff
}


Replies: 0
avatar
  • Jakobud
  • Posted: 28 June 2010 05:13 AM

Ya, you are right. That is exactly the way to do it. Someone else I know showed me similar code.



Replies: 0




   
  Settings Choose Theme color: