I had only tested it on jconsole, I think it is better to check for event
using SDL_WaitEvent

On Fri, Dec 4, 2020, 2:16 AM Thomas McGuire <tmcguir...@gmail.com> wrote:

> Thanks Bill it worked like a charm I changed
> SDL_CreateWindow =: (SDLDLL, ' SDL_CreateWindow * &c i i i i i')&cd
>
> To:
> SDL_CreateWindow =: (SDLDLL, ' SDL_CreateWindow * *c i i i i i')&cd
>
> And the garbage in the SDL2 created window title is gone. I don’t know why
> I put the ‘&' in there, as most of the calls in the DLL wrapper use regular
> pointers.
>
> ———————
>
> Michael Day wrote:
> " think you've already said you can't close the graphic yet”
>
> That latest script I sent with the timer routine picks up the
> SDL_QuitEvent at least under MacOS. The window will disappear. The problem
> now is I have to close and reopen the entire J session to make it work
> again. If I call the function to display the window, the birdie appears but
> no events get picked up and the window will stay open. Kill J and restart,
> the window appears and will disappear when you press the built in quit
> button on the window header.
>
> Tom McGuire
>
>
> > On Dec 3, 2020, at 11:43 AM, bill lam <bbill....@gmail.com> wrote:
> >
> > Garbage because the string is not null terminated. Use *c instead &c
> unless
> > you know what you are doing.
> >
> > On Thu, Dec 3, 2020 at 8:53 PM 'Michael Day' via Programming <
> > programm...@jsoftware.com> wrote:
> >
> >> Thanks - I've been trying to get this to work in J902 under Windows.
> >> Partial success
> >> at last today with these latest text-files.
> >>
> >> Please note that each text script has two gratuitous extra lines, those
> in
> >> the J-forum message footer:
> >> <<----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >>
> >> I needed to change these OS- or installation-dependent definitions:
> >>
> >> NB. in your sdl2.txt,  renamed to ...ijs ...
> >> NB. SDLDLL =: '/usr/local/lib/libSDL2.dylib'
> >> SDLDLL =: 'c:/sdl2/sdl2.dll'
> >>
> >> NB. and in your sdlbmpevtex.txt renamed to ...ijs ...
> >> NB.  WAS :-  load '~/j902-user/temp/sdl2.ijs'
> >> load '~user/sdl2.ijs'
> >> ....
> >> NB.  WAS:-   bmpsurf=: {. SDL_LoadBMP
> >> <'/Applications/j902/addons/graphics/bmp/toucan.bmp'
> >>    bmpfile=. fullname_j_'~addons/graphics/bmp/toucan.bmp'
> >>    bmpsurf=: {. SDL_LoadBMP < bmpfile
> >>
> >> I eventually saw the birdie once I'd got that last path correct after
> >> some earlier mistakes.
> >>
> >> I think you've already said you can't close the graphic yet.  I don't
> >> know about linux or unix,  but
> >> in this Windows OS,  the only way to close it appears to use "End Task"
> >> in Windows Task Manager;
> >> Task Manager shows the graphic/s as subtask/s - closing this/one of
> >> these closes the whole J session.
> >>
> >> My latest Toucan has garbage in its title:  "SDL2 from J�����⎕  {club}∨"
> >> (approximately)
> >> suggesting there might be some problem with the &c argument to
> >> SDL_CreateWindow.    The added
> >> characters seem to be arbitrary, as might be expected if the length is
> >> wrong.
> >>
> >> But the Toucan appeared!  I'm old enough to remember the Guinness (I
> >> think) ad's slogan, along the
> >> lines of   "Toucan do what toucan do."
> >>
> >> Cheers,
> >>
> >> Mike
> >>
> >>
> >> On 03/12/2020 01:04, Thomas McGuire wrote:
> >>
> >>
> >> --
> >> This email has been checked for viruses by Avast antivirus software.
> >> https://www.avast.com/antivirus
> >>
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to