function cbInfo = callbackinfocreatefcn(uiObject, arg)
%CALLBACKINFOCREATEFCN - Create a callbackinfo object

    cbInfo = DAStudio.CallbackInfo;

    if nargin>0
        if isa(uiObject,'double')
            % Convert to UDI
            if (floor(uiObject)==uiObject)
                rt = sfroot;
                uiObject = rt.idToHandle(uiObject);
            else
                cbInfo.model = get_param(bdroot(uiObject),'Object');
                uiObject = get_param(uiObject,'Object');
            end            
        end
        cbInfo.uiObject = uiObject;    
    end
    
    if nargin>1
        cbInfo.arg = arg;
    end            
    
    
    