comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Throwing objects to Virtual Machine in Unix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Throwing objects to Virtual Machine in Unix [message #37635] Wed, 14 January 2004 06:07 Go to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Hi.



Maybe you can give some help here.



I'm starting to work with objects. And already have a problem. and I don't
where is my mistake.

This is a simple program where I do a matrix with a circle on the centre.
And I want to view it as an object using IDLgrImage, so I build the
hierarchy for that and the widgets needed. The event is only for managing
the resize of the window.



Here is the problem: If I run it in Unix with IDLde opened everything is
okay. It is okay also if I try to run on VM in windows. But if I try to run
it on Unix with VM is gives me an error:

% Restored file: IDLVMMAIN.

% X windows protocol error: BadMatch (invalid parameter attributes).

Xlib: sequence lost (0x10221 > 0x22e) in reply type 0x13!



Someone has the idea of what's wrong? It is something specifically for VM on
Unix? How can I fix it?



The complete code of the program I'm trying to run is on the end.



Cheers,



Nuno.





PRO testExit, ev
WIDGET_CONTROL, ev.top, /DESTROY
END



PRO test_event, ev
WIDGET_CONTROL, ev.top, GET_UVALUE=info

eventType = TAG_NAMES(ev, /STRUCT)
CASE eventType OF

'WIDGET_BASE': WIDGET_CONTROL, info.draw, DRAW_XSIZE=ev.x,
DRAW_YSIZE=ev.y

ELSE:

ENDCASE

info.mywindow->draw, info.myview
END



PRO test, IMAGE=image
DEVICE, DECOMPOSED=0
IF NOT KEYWORD_SET(image) THEN BEGIN

circ=INTARR(100,100)
c_x=50
c_y=50
radius=25
FOR i=0, 99 DO $
FOR j=0, 99 DO $
IF (((i-c_x)^2+(j-c_y)^2) LT radius^2) THEN circ(i,j)=200
image=circ

ENDIF



base=WIDGET_BASE(MBAR=Menus, /COLUMN, /TLB_SIZE_EVENTS, TITLE='Resize the
window')

xdraw=N_ELEMENTS(image(*,0))
ydraw=N_ELEMENTS(image(0,*))

draw=WIDGET_DRAW(base, XSIZE=xdraw, YSIZE=ydraw, /BUTTON ,RETAIN=2,
GRAPHICS_LEVEL=2)
Options=WIDGET_BUTTON(Menus, VALUE='Options')
done= WIDGET_BUTTON(Options, VALUE='Close', EVENT_PRO='testExit')



WIDGET_CONTROL, base, /REALIZE
WIDGET_CONTROL, draw, GET_VALUE=mywindow



myview= OBJ_NEW('IDLgrView', VIEW=[0,0,100,100])
mymodel= OBJ_NEW('IDLgrModel')
myImage= OBJ_NEW('IDLgrImage', image, INTERLEAVE=0)



mymodel->add, myimage
myview->add, mymodel
mywindow->draw, myview



info= { draw: draw, xdraw: xdraw, ydraw: ydraw, $
mywindow: mywindow, myview: myview }


WIDGET_CONTROL, base, SET_UVALUE=info
XMANAGER, 'test', base
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unique combinations from a 1d array
Next Topic: determining size of window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:42:43 PDT 2025

Total time taken to generate the page: 0.23624 seconds