This seems to work (though I don't have the "tFlags" part of your code)
Code:
local function myWatchFrame_Collapse(self)
print("In my Collapse Function");
if ( WatchFrameScrollFrame and not tFlags.nUI_InfoPanel ) then
WatchFrameScrollFrame:SetHeight( WatchFrame:GetHeight() );
end
end
local function myWatchFrame_Expand(self)
print("In my Expand Function");
if ( WatchFrameScrollFrame and not tFlags.nUI_InfoPanel ) then
WatchFrameScrollFrame:SetHeight( tValues.height );
end
end
hooksecurefunc( "WatchFrame_Collapse", myWatchFrame_Collapse );
hooksecurefunc( "WatchFrame_Expand", myWatchFrame_Expand );
EDIT: Note... you don't have to make the call to WatchFrame_Collapse() or WatchFrame_Expand() because your function doesn't get called until AFTER the "hooked" function has been executed... it does not replace the function, it just causes your function to be called after the hooked function is executed.