AG Wiki   SharedAppGotchas UserPreferences
 
HelpContents FindPage Diffs Info Edit Subscribe XML Print View

Having strange problems with your Shared App?

Maybe you're running into one of these problems:

Errors being mysteriously silenced somewhere, making debugging difficult:

First make sure your debug mode on the shared app is set to 1, then chack the log files, which can be found in: C:\Documents and Settings\USER_NAME\Application Data\AccessGrid\SharedApplications\SHARED_APP_NAME
If that doesn't show your error, try running your shared app from the command line.

To do this: Add this code to the beginning of your application:

   from AccessGrid.Toolkit import CmdlineApplication 
    app = CmdlineApplication.instance()
    app.Initialize("Your App Name")

Also, hardcode the url that the application will connect to by using the URL from the properties window of an application instance in the venue client.

Just run your code from the console, and errors should be output to the screen.



wxPython widgets not showing up/locking up:

If you are calling code to create a wxPython widget from within a shared application event callback, you will run into a hard to trace threading problem.
To fix this, instead of calling the code to create the widget directly from within the callback, you must run it using wxCallAfter.
For example if you have a function: makeStuff(), then you would call it like wxCallAfter(makeStuff).

PythonPowered