paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] code fix - (was win32 ParaGUI crash on exit)


From: address@hidden
Subject: Re: [paragui-users] code fix - (was win32 ParaGUI crash on exit)
Date: Wed, 07 May 2003 11:32:43 +1000

Alex, (I'm not sure if there's a more appropriate mailing list/place for this)

while still looking for a way around that internal compiler error, I found two things which might be of interest.

(1)
// The line below causes problems on my VC++6 (SP5).
// Looks like visual has some kind of problem related to the static template member function.
PG_Window* tempw = PG_Application::GetWidget<PG_Window>("WindowTwo");

// This works Ok though - using the non-templatised version
PG_Window* tempw = static_cast<PG_Window*>( PG_Application::GetWidgetByName("WindowTwo") );

not sure if you've seen this before. I'll continue to look at it. At least I have a work around for now.


(2)
While not strictly related to the above problem, whilst looking at (1), I noticed a possible error in the pgapplication.h code;

// FILE : pgapplication.h

// The following function definition exists which uses the wrong parameter name. Most likely was copied/pasted from // the above and similar const char * version of the function and not changed to reflect the different parameter.
template<class T>
static T* GetWidget(int id) {
        return static_cast<T*>(GetWidgetById(Name));
}

// should be this ?
template<class T>
static T* GetWidget(int id) {
        return static_cast<T*>(GetWidgetById(id));
}


Not sure if this means I have an old version of the lib or not ( contained in paragui-1.0.3.tar.gz ). Also not sure of the appropriate way of reporting such things or making/suggesting changes.

Cheers,
Chris
PS. The test application works beautifully now. Getting excited about ParaGUI....






reply via email to

[Prev in Thread] Current Thread [Next in Thread]