wxmax - problem with app clones?

BlitzMax Modules Forums/Brucey's Modules/wxmax - problem with app clones?

When I run 2 of the same app, one overrides the other completely. Whatever renders on the second, renders on the first. If I close the second, the first one closes, etc. It seems all events are just transferred.

What causes this, and is there a simple workaround?

Edit: it seems to be something related to wxGLCanvas??

What OS are you using? I'm not seeing this behaviour with wxGLCanvas on XP?

Random guess: Is it possible you are using ConnectAny instead of Connecting to the ID of the canvas?

Yes I was, and I thought that would be the case, so I changed it to connect, and used id's based on the millisecs() from when the app is started, however once I open the second, and got into the canvased window, ALL the events from the first app are carried from the second.

It's weird as hell. This is on a really screwy winXP machine. One of those 'only happens to me' problems lol.


and used id's based on the millisecs()



Well you shouldn't need to be doing anything as fancy as that! I use the following type, but I think I've seen Brucey do something even simpler I just can't recall what it was.
SuperStrict

Import wx.wxApp

Rem
	bbdoc:  All non-stock wx Gadgets should call me for their id codes
	about:   wxMax Wrapper
End Rem	
Type TId 		
	
	Global CurrentId:Int = wxID_HIGHEST

	' ----------------------------------------------------------------
	Rem
		bbdoc:   
		about:    
	End Rem
	Function GetCurrentId:Int()
	
		Return CurrentId
	
	End Function

	
	' ----------------------------------------------------------------
	Rem
		bbdoc:   
		about:    
	End Rem
	Function GetNextId:Int()
	
		CurrentId :+ 1
	
		Return CurrentId
	
	End Function
	
		
End Type