hellaeon
12-02-2009 14:06:34
I reckon you would have had this one before.
Continuing that last stuff I posted
I have loaded a sheet and am trying to add callbacks to the code like so
However it generates a linker error :
Im not sure why, I thought maybe it was the visibility of the functions, but I have them private and tried both public and protected. In the PlayPen code, I see you have a similar set up - the MainForm (for me MainGUI) class loads the sheet and in the same function, runs the callback code - I still have NOT compiled your PlayPen code to see if that works but thats not going to be a compiling issue I dont think - im linking to the correct libraries as I can run it and load the sheet but it only starts crashing with the callback code....
Just in case here is my 'sheet'
Any thoughts? Remember this is all being done during the constructor of my Frame Listener - is it an issue that im setting callbacks before the render loop?
Cheers
Continuing that last stuff I posted

I have loaded a sheet and am trying to add callbacks to the code like so
QuickGUI::Widget* w = NULL;
w = mGUIMgr->getActiveSheet()->findWidget("Host");
if(w != NULL)
w->addWidgetEventHandler(QuickGUI::WIDGET_EVENT_MOUSE_BUTTON_UP,&MainGUI::HostServer,this);
// Connect
w = mGUIMgr->getActiveSheet()->findWidget("Connect");
if(w != NULL)
w->addWidgetEventHandler(QuickGUI::WIDGET_EVENT_MOUSE_BUTTON_UP,&MainGUI::ConnectHost,this);
// Disconnect
w = mGUIMgr->getActiveSheet()->findWidget("Disconnect");
if(w != NULL)
w->addWidgetEventHandler(QuickGUI::WIDGET_EVENT_MOUSE_BUTTON_UP,&MainGUI::DisconnectHost,this);
// Send a message
w = mGUIMgr->getActiveSheet()->findWidget("SendMessage");
if(w != NULL)
w->addWidgetEventHandler(QuickGUI::WIDGET_EVENT_MOUSE_BUTTON_UP,&MainGUI::SendMessage,this);
However it generates a linker error :
1>MainGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall MainGUI::SendMessageW(class QuickGUI::EventArgs const &)" (?SendMessageW@MainGUI@@QAEXABVEventArgs@QuickGUI@@@Z)
1>MainGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall MainGUI::DisconnectHost(class QuickGUI::EventArgs const &)" (?DisconnectHost@MainGUI@@QAEXABVEventArgs@QuickGUI@@@Z)
1>MainGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall MainGUI::ConnectHost(class QuickGUI::EventArgs const &)" (?ConnectHost@MainGUI@@QAEXABVEventArgs@QuickGUI@@@Z)
1>MainGUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall MainGUI::HostServer(class QuickGUI::EventArgs const &)" (?HostServer@MainGUI@@QAEXABVEventArgs@QuickGUI@@@Z)
Im not sure why, I thought maybe it was the visibility of the functions, but I have them private and tried both public and protected. In the PlayPen code, I see you have a similar set up - the MainForm (for me MainGUI) class loads the sheet and in the same function, runs the callback code - I still have NOT compiled your PlayPen code to see if that works but thats not going to be a compiling issue I dont think - im linking to the correct libraries as I can run it and load the sheet but it only starts crashing with the callback code....
Just in case here is my 'sheet'
Sheet DefaultSheet
{
BrushFilterMode BRUSHFILTER_LINEAR
ClipChildrenToDimensions true
ClipComponentsToDimensions true
ConsumeKeyboardEvents false
ContextMenuName
Dimensions 0 0 800 600
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT_RIGHT
HorzBarScrollPercent 0.2
HorzButtonScrollPercent 0.1
HoverTime 3
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
ScrollBarThickness 15
Scrollable true
SkinType default
SupportScrolling false
TransparencyPicking true
VertBarScrollPercent 0.2
VertButtonScrollPercent 0.1
VerticalAnchor ANCHOR_VERTICAL_TOP_BOTTOM
Visible true
XScrollOffset 0
YScrollOffset 0
Child widgets
{
Button Host
{
AllottedWidth 96
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents false
ContextMenuName
Dimensions 10 10 210 20
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_CENTER
HoverTime 3
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TextBrushFilterMode BRUSHFILTER_LINEAR
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
VerticalTextAlignment TEXT_ALIGNMENT_VERTICAL_CENTER
Visible true
Text segments
{
Segment0 micross.12 1 0.1 0.1 0.1 Host
}
}
TextBox IPAddress
{
AllottedWidth 1785
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents true
ContextMenuName
CursorBlinkTime 0.5
DefaultColor 1 1 1 1
DefaultFontName micross.12
Dimensions 10 40 210 20
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_LEFT
HoverTime 3
KeyDownTime 0.6
KeyRepeatTime 0.04
MaskSymbol 42
MaskText false
MaxCharacters 255
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TBHorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_LEFT
TextBrushFilterMode BRUSHFILTER_LINEAR
TextCursorDefaultSkinTypeName default
TextPosition 0 0
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
VerticalTextAlignment TEXT_ALIGNMENT_VERTICAL_CENTER
Visible true
Text segments
{
Segment0 micross.12 1 0.1 0.1 0.1
}
}
Button Connect
{
AllottedWidth 96
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents false
ContextMenuName
Dimensions 10 70 100 20
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_CENTER
HoverTime 3
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TextBrushFilterMode BRUSHFILTER_LINEAR
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
VerticalTextAlignment TEXT_ALIGNMENT_VERTICAL_CENTER
Visible true
Text segments
{
Segment0 micross.12 1 0.1 0.1 0.1 Connect
}
}
Button Disconnect
{
AllottedWidth 96
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents false
ContextMenuName
Dimensions 120 70 100 20
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_CENTER
HoverTime 3
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TextBrushFilterMode BRUSHFILTER_LINEAR
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
VerticalTextAlignment TEXT_ALIGNMENT_VERTICAL_CENTER
Visible true
Text segments
{
Segment0 micross.12 1 0.1 0.1 0.1 Disconnect
}
}
TextArea ChatArea
{
AllottedWidth 190
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents true
ContextMenuName
CursorBlinkTime 0.5
DefaultColor 1 1 1 1
DefaultFontName micross.12
Dimensions 10 100 210 250
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_LEFT
HoverTime 3
KeyDownTime 0.6
KeyRepeatTime 0.04
MaxCharacters 255
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TextBrushFilterMode BRUSHFILTER_LINEAR
TextCursorDefaultSkinTypeName default
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
Visible true
Text segments
{
Segment0 micross.12 0 0 0 0
}
Child widgets
{
}
}
Button SendMessage
{
AllottedWidth 96
BrushFilterMode BRUSHFILTER_LINEAR
ConsumeKeyboardEvents false
ContextMenuName
Dimensions 10 360 210 20
DisabledSkinType
Dragable false
Enabled true
HorizontalAnchor ANCHOR_HORIZONTAL_LEFT
HorizontalTextAlignment TEXT_ALIGNMENT_HORIZONTAL_CENTER
HoverTime 3
MaxSize 0 0
MinSize 0 0
PositionRelativeToParentClientDimensions true
Resizable false
Scrollable true
SkinType default
TextBrushFilterMode BRUSHFILTER_LINEAR
TransparencyPicking true
VerticalAnchor ANCHOR_VERTICAL_TOP
VerticalLineSpacing 2
VerticalTextAlignment TEXT_ALIGNMENT_VERTICAL_CENTER
Visible true
Text segments
{
Segment0 micross.12 1 0.1 0.1 0.1 Send Message
}
}
}
Child Windows
{
}
}
Any thoughts? Remember this is all being done during the constructor of my Frame Listener - is it an issue that im setting callbacks before the render loop?
Cheers