I’m starting a new project so there’s nothing complex at this stage.
Trying to show a WebDialog with the code below, I’m getting a runtime exception: “Control could not be created because there is currently no Session. Create a WebSessionContext object.”.
The method executing this code is from another window, so there has to be an existing session…
This is the relevant code, called from a WebListbox’s SelectionChanged event:
…[define p as picture earlier]…
if p<>nil then dim wp As new WDPreview wp.ShowPicture p,False,Nil 'Custom method Return end if
The exception happens at the “dim wp As new WDPreview” line (if split, at the “New WDPreview” statement).
Looked in Xojo documentation or with a search engine, absolutely no result found.