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 
Switch to threaded view of this topic Create a new topic Submit Reply
Throwing objects to Virtual Machine in Unix [message #37635] Wed, 14 January 2004 06:07 Go to next 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
Re: Throwing objects to Virtual Machine in Unix [message #37698 is a reply to message #37635] Fri, 16 January 2004 02:51 Go to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
At just beginning I was hoping some advantages on programming with objects
graphics. Besides, volume visualization, interesting but not that much to
me, I like the fact that I could get any magnification by attributing a
matrix to IDLgrImage It is only necessary to resize the window and not the
matrix, as it is in direct graphics and only magnifies by natural numbers
(1,2,3, ..)



Cheers,



Nuno.







P.S. I suppose that Lockheed Martin doesn't like Ralph Nader. :)

I was curious and I looked for the Lockheed site. There's a picture of
hearth, a target city and inbound missile. selling NMD on the main page. And
of course, the stock price is also on the main page.



"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1a70788b8cb20ef99897a2@news.frii.com...
> Nuno Oliveira writes:
>
>> All my work now has been in direct graphics, I was only trying to work
with
>> object graphics looking for advantages but, at this time the balance
isn't
>> very good.
>
> The balance, unless you are doing something that really does need
> to be done in 3D space, has *never* been any good. At least if you
> count the amount of effort it takes to write object graphics programs.
>
> That's why the innovations in IDL 6.0 make about as much sense
> to me as putting a permanent manned space station on the moon.
> Who, exactly, needs it!?
>
> Cheers,
>
> David
>
> P.S. If I really thought there was a chance in hell that
> we would be going back to the moon in 10 years, I would
> sure be buying Lockheed stock today. I wonder how much
> they are contributing to Mr. Bush's re-election campaign. :-)
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
Re: Throwing objects to Virtual Machine in Unix [message #37707 is a reply to message #37635] Thu, 15 January 2004 09:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> All my work now has been in direct graphics, I was only trying to work with
> object graphics looking for advantages but, at this time the balance isn't
> very good.

The balance, unless you are doing something that really does need
to be done in 3D space, has *never* been any good. At least if you
count the amount of effort it takes to write object graphics programs.

That's why the innovations in IDL 6.0 make about as much sense
to me as putting a permanent manned space station on the moon.
Who, exactly, needs it!?

Cheers,

David

P.S. If I really thought there was a chance in hell that
we would be going back to the moon in 10 years, I would
sure be buying Lockheed stock today. I wonder how much
they are contributing to Mr. Bush's re-election campaign. :-)

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Throwing objects to Virtual Machine in Unix [message #37708 is a reply to message #37635] Thu, 15 January 2004 08:59 Go to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
I suppose that for using 'idlde -vm=file' you need the full installation but
you don't need the license. But it's not the solution, I agree, but would
RSI do something about it?



All my work now has been in direct graphics, I was only trying to work with
object graphics looking for advantages but, at this time the balance isn't
very good.


"Thomas Brueckner" <profxtjb@earthlink.net> wrote in message
news:52e94d00.0401150708.4836e01d@posting.google.com...
> To my mind, the usefulness of the VM is that it enables someone to
> view and use my IDL procedure even if he does not have a license for
> IDL. To use idlde, one needs a license, so
>
> idlde -vm='file.sav'
>
> is not really a solution to the VM problem on unix platforms, in my
> opinion.
>
> Remember, though: direct graphics work fine in the virtual machine.
>
> ==Thomas Brueckner==
Re: Throwing objects to Virtual Machine in Unix [message #37711 is a reply to message #37635] Thu, 15 January 2004 07:08 Go to previous message
profxtjb is currently offline  profxtjb
Messages: 22
Registered: October 2003
Junior Member
"Nuno Oliveira" <nmoliveira@fc.ul.pt> wrote in message news:<bu5tgj$2ima$1@pegasus.fccn.pt>...
> Thanks. I saw your post and already tried that trick you suggest. Indeed it
> works calling idlde -vm=file instead of idl -vm=file

> I don't if you can say one more thing or if you suggest me to also write to
> RSI.

Nuno,

You could write to RSI. The things I posted to c.l.idl-pvwave were
from RSI. Their support staff emailed me that info, so I posted it to
the list for others to see. I am not currently trying to work in the
VM with object graphics, and I have not tried most the solutions they
proposed.

To my mind, the usefulness of the VM is that it enables someone to
view and use my IDL procedure even if he does not have a license for
IDL. To use idlde, one needs a license, so

idlde -vm='file.sav'

is not really a solution to the VM problem on unix platforms, in my
opinion.

Remember, though: direct graphics work fine in the virtual machine.

==Thomas Brueckner==
Re: Throwing objects to Virtual Machine in Unix [message #37714 is a reply to message #37635] Thu, 15 January 2004 03:28 Go to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Thanks. I saw your post and already tried that trick you suggest. Indeed it
works calling idlde -vm=file instead of idl -vm=file



Initially I didn't try that solution because you say in there that it worked
only once.



I don't if you can say one more thing or if you suggest me to also write to
RSI. It is supposed RSI to fix the problem and get a solution for those who
have IDL 6.0 or we are talking of fixing it to version 7.0?



Thanks again,



Nuno.




"Thomas Brueckner" <profxtjb@earthlink.net> wrote in message
news:52e94d00.0401141841.845c19b@posting.google.com...
> "Nuno Oliveira" <nmoliveira@fc.ul.pt> wrote in message
news:<bu3ifa$1tdd$1@pegasus.fccn.pt>...
>
>> 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:
>
>
> Nuno, the RSI have not fixed this problem yet. If you look at the
postings
> from Dec. 18 and 25 you will see that they have a few tricks to get object
> graphics to work in the virtual machine, but nothing robust.
>
> ==Thomas Brueckner==
Re: Throwing objects to Virtual Machine in Unix [message #37718 is a reply to message #37635] Wed, 14 January 2004 18:41 Go to previous message
profxtjb is currently offline  profxtjb
Messages: 22
Registered: October 2003
Junior Member
"Nuno Oliveira" <nmoliveira@fc.ul.pt> wrote in message news:<bu3ifa$1tdd$1@pegasus.fccn.pt>...

> 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:


Nuno, the RSI have not fixed this problem yet. If you look at the postings
from Dec. 18 and 25 you will see that they have a few tricks to get object
graphics to work in the virtual machine, but nothing robust.

==Thomas Brueckner==
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 19:43:00 PDT 2025

Total time taken to generate the page: 0.00744 seconds