[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How does WxRuby work ??

Vinh Chuc

4/4/2007 9:52:00 PM

Hi !
I have a question about the WxRuby toolkit, i never used a gui
toolkit before ( mainly coded php apps and maths algorithms with caml so
far ), but i guess it works like that :
_ for a compiled program ( for example C/C++ ), the toolkit library, is
either already installed on the end user computer, either it is
"included" in the source code and compiled with it
_ but for an interpreted language, how does it work ??? do the end user
have to install a specific wxwidgets library ? or does wxruby provide a
file that we have to bundle with the .rb files ????

thanks

--
Posted via http://www.ruby-....

9 Answers

Phillip Gawlowski

4/5/2007 1:20:00 AM

0

Vinh Chuc wrote:
> Hi !
> I have a question about the WxRuby toolkit, i never used a gui
> toolkit before ( mainly coded php apps and maths algorithms with caml so
> far ), but i guess it works like that :
> _ for a compiled program ( for example C/C++ ), the toolkit library, is
> either already installed on the end user computer, either it is
> "included" in the source code and compiled with it
> _ but for an interpreted language, how does it work ??? do the end user
> have to install a specific wxwidgets library ? or does wxruby provide a
> file that we have to bundle with the .rb files ????
>
> thanks
>

Ever used GTK+ applications on Windows (GIMP, for example)?
Although GTK+ apps are usually compiled C code, you have to install the
GTK GUI toolkit.

Ruby works similar: You have to install the GUI toolkit, and have to
'require' it. In distribution, you either have to redistribute it
(including Windows builds, for example), or have it as a gem dependency,
or need to mention it in your INSTALL file.. ;)

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....

Rule of Open-Source Programming #37:

Duplicate effort is inevitable. Live with it.

Wim Vander Schelden

4/5/2007 7:49:00 AM

0

Hi Vinh,

The way ruby interfaces with native libraries (such as wxWidgets) is very similar to a compiled program. You have to write an "extension" (in the case of wxWidgets there already is an extension, wxRuby), which is then linked with the library (wxWidgets). To install such an extension, you probably want to use gems. You can get a binary for Windows, linux or Mac OS X using 'gem install wxruby2-preview'.

You already need to have wxWidgets installed, if I'm not mistaken, preferably in you C:\Windows\system32 directory.

Wim

Vinh Chuc

4/5/2007 12:15:00 PM

0

yeah, i remember that when installing Gimp when i was on Windows XP, i
had to install the gtk toolkit (now i'm on a linux box )

if i understood, the end user has to install the WxWidgets library, on
windows are those libraries included by default ?? if not then the end
user has to install them just as the gtk toolkit
on the WxWidgets site, i can only find .exe for developers

on linuxes, i think they are included is most distros ( i check my
synaptic package manager )


But, as Ruby is an interpreted language, how does the ruby interpreter
"understand" the wxruby lines in the .rb files ??? does the end user
have to install some additional programs ????

--
Posted via http://www.ruby-....

Phillip Gawlowski

4/5/2007 3:26:00 PM

0

Wim Vander Schelden wrote:
> You already need to have wxWidgets installed, if I'm not mistaken, preferably in you C:\Windows\system32 directory.

Yes, but no. Yes, you need to have it installed, but, for heaven's sake,
not in %WINDIR%\system32, or anywhere below %WINDIR%. Libraries, used by
multiple programs (like wxWidgets), should go into %APPDATA%, or their
path should be added to %PATH% (easiest way to do that in Ruby:

system("path %path%;#{mypath}")

You should never, ever copy your files into %windir%, unless you are a
driver vendor. That's a really, really bad habit carrying over from (at
least) Windows 3.x.

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....

Rule of Open-Source Programming #11:

When a developer says he will work on something, he or she means
"maybe".

Roy Sutton

4/5/2007 7:36:00 PM

0

Wim Vander Schelden wrote:
> The way ruby interfaces with native libraries (such as wxWidgets) is very similar to a compiled program. You have to You already need to have wxWidgets installed, if I'm not mistaken, preferably in you C:\Windows\system32 directory.
>
On Windows, at least, wxWidgets does not need to be installed. It is
compiled into the gem. On Linux, you need GTK+ installed. Others will
have to comment on Mac. We do have a mailing list for wxRuby
questions. You'll get good answers here:

http://rubyforge.org/mail/?g...

Roy

noone

5/1/2009 11:12:00 PM

0

mash_ghasem <ghyath_abadi@yahoo.com> wrote in news:f99d5534-e001-45d2-b5c2-
b75178132355@g37g2000yqn.googlegroups.com:

> Greeting from a born again Iran atheist :-) But really I don't
> believe in any religion. You mentioned you were in Iran. How did you
> find our people and culture? I deleted alt**Islam and posted to
> iranian and alt.atheism newsgroups. If you like please post only to
> soc.culture.iranian on this topic. I might have some more questions if
> you don't mind. Thanks.
>
>
>

For an American, Iran is at first quite a culture shock, probably as much
as for an Iranian coming to the USA his first week. The time lag added to
the confusion, of course, but it all smoothed out nicely after a couple of
weeks and most of us shed our Zionist brainwashing from American TV that
everyone ELSE in the Middle East is evil, which is simply not true.
Americans look through a Jewish-controlled media pinhole at the rest of the
world. I'll be attacked for saying the obvious, but it's not the first
time.

In 1979, my parents back in America would see some horrible atrocity
presented on American TV showing an awful bombing or bullet riddled bodies
and panic. They'd call me in the day, their time, and get me out of bed to
answer the phone at 3AM in Tehran to see if I was ok. I never did get them
used to the idea I was on the other side of the planet...(c;]

I was a very unusual American in that most of the Americans I worked for
never actually were "in" Iran. They stayed as isolated as possible from
the Iranian people, hardly venturing out to the local supermarket, and
never really mixing with the people they seemed terrified of. On our days
off, I would disappear for days into the real Iran, getting out of Tehran
or venturing into parts of the city we were warned by the stupid American
Embassy to never venture into. A couple of us were quite adventuresome.

The company hired taxis from Auto Star, actually just private vehicles
driven by their owners, and forbid us from driving anything during our
stay. We made a logo and gave it to the little taxi stand Auto Star had.

"AUTO STAR - THE LEADING NAME IN RENT-A-CAR"

We nearly froze to death in a couple of cars. Their air conditioners were
dead and we had our own vehicle mechanics in our group. My driver had an
Arian with an A/C hanging uselessly under the dash. After our mechanics
fixed them, we rode around Tehran with two strips of FROST blowing across
the front seat!

I was delighted when my driver, Raffick, too me home to meet his parents.
He was what we'd call a street-wise teenager in the USA. I never got over
the load of HOMEWORK his school put upon him. Iran was teaching College-
level courses in high school! I helped him with English, he helped me with
Farsi. My Farsi was always just terrible, for which I took a lot of
kidding. He'd take me to a restaurant where noone spoke English and force
me to order dinner off the menu, a real ordeal, do or die situation. Many
Iranian waiters walked back into the kitchen laughing in tears from my
interpretations. I'm very fortunate they didn't bring me what I actually
ordered. But, they all seemed very pleased I took the time and tried hard
to learn some of your language. Shahanshah's government collapsed and we
left the country before I got more comfortable with it.

Speaking of the time just before the regime change, an amusing story......

The American Embassy warned all of us in mails to our homes and offices NOT
to even talk to the Army troops in the streets. They warned that the
troops would smash our cameras if we took pictures. I didn't understand
because every morning as I got to Doshen-Tappeh AFB early to avoid the
traffic delays coming across town from Park-e-Saie to work, I would eat
breakfast in the Army's mess tent with the conscript privates in their area
behind our hangar. I was the only American who did, by the way. How
stupid my American co-workers were....

At the end of our street, the Army parked a Russian-made T-72 tank operated
by a full compliment of tank troops, just for show I supposed. I stopped
to talk to the tank commander, a lieutenant who spoke very good English,
educated in the US. I showed them my Iranian Air Force ID card and got the
grand tour of the tank. Early one morning, after bringing "the boys" some
cool drinks in the heat, they decided I should be allowed to DRIVE this
beast down the street and back! If you get the chance to drive a Russian
tank, you don't pass it up....I didn't crush any parked cars or Orange Cabs
and spun it back around to its parking spaces to the delight of the crew.

I asked the commander if I could take some pictures to take back to the
States with me as this was one of the neatest things I ever did in Iran.
He politely refused. "No pictures, today." OK, his guys have guns. "You
come back tomorrow!", he continued....no explanation. I came back the next
day and found out why. They had completely cleaned the tank from the tip
of the gun to the diesel exhaust and the whole team was in full dress
uniforms for the picture taking! The officer was in his beautiful uniform
complete with his medals and decorations and his military sword. I went
through 4 rolls of 35mm film, delighted.

I took the film to a photoshop and had prints made and put into photo books
whos main cover was the team lined up at attention in front of their tank,
the officer with his sword in full salute. I had a copy made for each man
in the tank, one for the American Ambassador and his assistant I'd met,
sent one home to my family in the States and kept 2 for myself....much to
the American Embassy's dismay. The looks on their faces was PRICELESS. I
should have sent one to the White House!

===================================================================

I keep a close eye on Iran from Google Earth every time they change or
improve the satellite pictures. I can see my apartment building is still
there, but Park-e-Saie is more beautiful than it looked when I lived there.
What bothers me most is the military bases like Doshen-Tappeh and the
industrial centers I flew over in C-130 planes with the Air Force.

Zionist American TV makes big noise about attacking Iran, Iranian nuclear
dangers, etc., etc., but Iran must have become real MASTERS of deception
since I lived there. The air base in NE Tehran is DESERTED! There are no
planes, there are no cars, there are no trucks, there are no gadgets to
service the planes parked on the runway.....It's nearly EMPTY! Other bases
that were bustling when we landed there in many other Iranian cities in the
late 70's, look similarly abandoned. The planes I do see look like pieces
of planes someone tore apart to get parts to fix other planes. Few
complete-looking aircraft can be seen, anywhere! There must be some vast
underground bunkers where this vast air force and army is just waiting for
the attack! Look for yourselves.

Most disturbing is Abadan on the waterway. We landed there with engine
trouble in this busy city....full of tank after tank of oil, its waterfront
full of ships coming and going....a very busy place. Today, from the
satellites, it looks like most everyone abandoned it! There are circular
pits where all those tanks the Iraqis probably burned in the war used to
sit. The airport was empty. Khorramshahr, too, looked in trouble.

I've been watching the photos from Bandar-e-Khomeyni, the island port at
the NW end of the Gulf. Take Google Earth to it. Where is everyone??
Where are the SHIPS at the docks? Where are the streams of VEHICLES in and
out? There's a nice picture of "Mahshahr Petrochemical Special Zone 2"
taken by Ali Farnam posted there. Who left all the lights on? Now, zoom
Google Earth's satellite photos in on the petrochemical plants. Look
really close at the 1000 ft level. See any cars, trucks, people? See any
traffic on the roads? This is a huge facility! It should have thousands
of workers, staff, managers, tank trucks full of some really awful-smelling
stuff moving around. WHERE IS EVERYONE? Did they tell them "Hey,
everybody hide! Google Earth is going to take our picture from space!"

I flew over this port when I lived in Iran. You couldn't fit a 2 meter
rowboat between the ships docked on all those piers. Trucks were lined up
waiting to load and unload. Today, it might as well be on the MOON.

Someone isn't telling us the TRUTH. Can you guys help me understand what
real Iranians are going through, today? Some must really be suffering as
this island is repeated across the country. What happened to it...them?

It's hard to tell who to believe any more, we've all been lied to so much.


mash_ghasem

5/2/2009 1:15:00 AM

0



That was a one hell of a story! You did ask some questions and since
I live in US, don't have any answers for you. I will ask and let you
know. You did talk about abandoned air fields. After what happened in
Iran Iraq war and US attack on Iraq, mullahs aren't that stupid to
bring and line up airplanes on any air field for easy pick'n. Abadan
was blown to smithereens by Iraqis and was never been rebuilt. I hope
there is no attack from US to Iran. The vast air force and army in
bunkers you mentioned is no match to US technology and Iranian people
are going to suffer. What Brits and US did to Shah by bring IRI to
power has send Iranian back 200 years with alot of missed opportunity.
BTW, didn't Iran have enough pilots during Shah's time? I thought Shah
used to send Iranian pilots for training to US?
Also what was you favorite Iranian food? Do you get it in US?






On May 1, 7:12 pm, Larry <no...@home.com> wrote:
> mash_ghasem <ghyath_ab...@yahoo.com> wrote in news:f99d5534-e001-45d2-b5c2-
> b75178132...@g37g2000yqn.googlegroups.com:
>
> >  Greeting  from a born again Iran atheist :-) But really I don't
> > believe in any religion.  You mentioned you were in Iran. How did you
> > find our people and culture?  I deleted alt**Islam and posted to
> > iranian and alt.atheism newsgroups. If you like please post only to
> > soc.culture.iranian on this topic. I might have some more questions if
> > you don't mind. Thanks.
>
> For an American, Iran is at first quite a culture shock, probably as much
> as for an Iranian coming to the USA his first week.  The time lag added to
> the confusion, of course, but it all smoothed out nicely after a couple of
> weeks and most of us shed our Zionist brainwashing from American TV that
> everyone ELSE in the Middle East is evil, which is simply not true.  
> Americans look through a Jewish-controlled media pinhole at the rest of the
> world.  I'll be attacked for saying the obvious, but it's not the first
> time.
>
> In 1979, my parents back in America would see some horrible atrocity
> presented on American TV showing an awful bombing or bullet riddled bodies
> and panic.  They'd call me in the day, their time, and get me out of bed to
> answer the phone at 3AM in Tehran to see if I was ok.  I never did get them
> used to the idea I was on the other side of the planet...(c;]
>
> I was a very unusual American in that most of the Americans I worked for
> never actually were "in" Iran.  They stayed as isolated as possible from
> the Iranian people, hardly venturing out to the local supermarket, and
> never really mixing with the people they seemed terrified of.  On our days
> off, I would disappear for days into the real Iran, getting out of Tehran
> or venturing into parts of the city we were warned by the stupid American
> Embassy to never venture into.  A couple of us were quite adventuresome.
>
> The company hired taxis from Auto Star, actually just private vehicles
> driven by their owners, and forbid us from driving anything during our
> stay.  We made a logo and gave it to the little taxi stand Auto Star had.
>
> "AUTO STAR - THE LEADING NAME IN RENT-A-CAR"
>
> We nearly froze to death in a couple of cars.  Their air conditioners were
> dead and we had our own vehicle mechanics in our group.  My driver had an
> Arian with an A/C hanging uselessly under the dash.  After our mechanics
> fixed them, we rode around Tehran with two strips of FROST blowing across
> the front seat!
>
> I was delighted when my driver, Raffick, too me home to meet his parents.  
> He was what we'd call a street-wise teenager in the USA.  I never got over
> the load of HOMEWORK his school put upon him.  Iran was teaching College-
> level courses in high school!  I helped him with English, he helped me with
> Farsi.  My Farsi was always just terrible, for which I took a lot of
> kidding.  He'd take me to a restaurant where noone spoke English and force
> me to order dinner off the menu, a real ordeal, do or die situation.  Many
> Iranian waiters walked back into the kitchen laughing in tears from my
> interpretations.  I'm very fortunate they didn't bring me what I actually
> ordered.  But, they all seemed very pleased I took the time and tried hard
> to learn some of your language.  Shahanshah's government collapsed and we
> left the country before I got more comfortable with it.
>
> Speaking of the time just before the regime change, an amusing story......
>
> The American Embassy warned all of us in mails to our homes and offices NOT
> to even talk to the Army troops in the streets.  They warned that the
> troops would smash our cameras if we took pictures.  I didn't understand
> because every morning as I got to Doshen-Tappeh AFB early to avoid the
> traffic delays coming across town from Park-e-Saie to work, I would eat
> breakfast in the Army's mess tent with the conscript privates in their area
> behind our hangar.  I was the only American who did, by the way.  How
> stupid my American co-workers were....
>
> At the end of our street, the Army parked a Russian-made T-72 tank operated
> by a full compliment of tank troops, just for show I supposed.  I stopped
> to talk to the tank commander, a lieutenant who spoke very good English,
> educated in the US.  I showed them my Iranian Air Force ID card and got the
> grand tour of the tank.  Early one morning, after bringing "the boys" some
> cool drinks in the heat, they decided I should be allowed to DRIVE this
> beast down the street and back!  If you get the chance to drive a Russian
> tank, you don't pass it up....I didn't crush any parked cars or Orange Cabs
> and spun it back around to its parking spaces to the delight of the crew.
>
> I asked the commander if I could take some pictures to take back to the
> States with me as this was one of the neatest things I ever did in Iran.  
> He politely refused.  "No pictures, today."  OK, his guys have guns.  "You
> come back tomorrow!", he continued....no explanation.  I came back the next
> day and found out why.  They had completely cleaned the tank from the tip
> of the gun to the diesel exhaust and the whole team was in full dress
> uniforms for the picture taking!  The officer was in his beautiful uniform
> complete with his medals and decorations and his military sword.  I went
> through 4 rolls of 35mm film, delighted.
>
> I took the film to a photoshop and had prints made and put into photo books
> whos main cover was the team lined up at attention in front of their tank,
> the officer with his sword in full salute.  I had a copy made for each man
> in the tank, one for the American Ambassador and his assistant I'd met,
> sent one home to my family in the States and kept 2 for myself....much to
> the American Embassy's dismay.  The looks on their faces was PRICELESS.  I
> should have sent one to the White House!
>
> ===================================================================
>
> I keep a close eye on Iran from Google Earth every time they change or
> improve the satellite pictures.  I can see my apartment building is still
> there, but Park-e-Saie is more beautiful than it looked when I lived there.  
> What bothers me most is the military bases like Doshen-Tappeh and the
> industrial centers I flew over in C-130 planes with the Air Force.
>
> Zionist American TV makes big noise about attacking Iran, Iranian nuclear
> dangers, etc., etc., but Iran must have become real MASTERS of deception
> since I lived there.  The air base in NE Tehran is DESERTED!  There are no
> planes, there are no cars, there are no trucks, there are no gadgets to
> service the planes parked on the runway.....It's nearly EMPTY!  Other bases
> that were bustling when we landed there in many other Iranian cities in the
> late 70's, look similarly abandoned.  The planes I do see look like pieces
> of planes someone tore apart to get parts to fix other planes.  Few
> complete-looking aircraft can be seen, anywhere!  There must be some vast
> underground bunkers where this vast air force and army is just waiting for
> the attack!  Look for yourselves.
>
> Most disturbing is Abadan on the waterway.  We landed there with engine
> trouble in this busy city....full of tank after tank of oil, its waterfront
> full of ships coming and going....a very busy place.  Today, from the
> satellites, it looks like most everyone abandoned it!  There are circular
> pits where all those tanks the Iraqis probably burned in the war used to
> sit.  The airport was empty.  Khorramshahr, too, looked in trouble.
>
> I've been watching the photos from Bandar-e-Khomeyni, the island port at
> the NW end of the Gulf.  Take Google Earth to it.  Where is everyone??  
> Where are the SHIPS at the docks?  Where are the streams of VEHICLES in and
> out?  There's a nice picture of "Mahshahr Petrochemical Special Zone 2"
> taken by Ali Farnam posted there.  Who left all the lights on?  Now, zoom
> Google Earth's satellite photos in on the petrochemical plants.  Look
> really close at the 1000 ft level.  See any cars, trucks, people?  See any
> traffic on the roads?  This is a huge facility!  It should have thousands
> of workers, staff, managers, tank trucks full of some really awful-smelling
> stuff moving around.  WHERE IS EVERYONE?  Did they tell them "Hey,
> everybody hide!  Google Earth is going to take our picture from space!"
>
> I flew over this port when I lived in Iran.  You couldn't fit a 2 meter
> rowboat between the ships docked on all those piers.  Trucks were lined up
> waiting to load and unload.  Today, it might as well be on the MOON.
>
> Someone isn't telling us the TRUTH.  Can you guys help me understand what
> real Iranians are going through, today?  Some must really be suffering as
> this island is repeated across the country.  What happened to it...them?
>
> It's hard to tell who to believe any more, we've all been lied to so much.

noone

5/2/2009 1:44:00 AM

0

mash_ghasem <ghyath_abadi@yahoo.com> wrote in news:57addcc0-61c8-4cec-
985d-c0aebfac700c@g19g2000vbi.googlegroups.com:

> BTW, didn't Iran have enough pilots during Shah's time? I thought Shah
> used to send Iranian pilots for training to US?
> Also what was you favorite Iranian food? Do you get it in US?
>
>

Yes, all the pilots I flew with were trained in the US.

Lots of the planes flew away out of Iran with Iranian pilots at the
controls terrified they would be tortured and hung by the new regime and
with good reason. The general and colonels in our area of IAF were
killed, too, lots of mass executions of shah's upper military leaving
the country virtually decapitated. Saddam would have never had the
audacity to attack the Shah, backed by the USA. They didn't even dare
shoot at us in the C-130s.

Well, as you live here, you know it's not the American People who want
to attack Iran, it's the Zionists who just committed mass murder in
Gaza. I also watch Press TV but who knows about its accuracy:
http://www.p...
They certainly don't beat the anti-American drums on it. They are
skilled propagandists. I do watch a lot of Aljazeera in English to
bypass the Zionists on our media.

Our common enemy is the New World Order, the men behind the curtain
pulling the money strings for Zionism. We have no control of them, at
all. Everything else is just conjecture.

I have several Iranian friends here in town. Perfect stereotypes, they
work at Radio Shack in the malls...(c;] Whenever I go in the store, I
switch on Googoosh stored in the memory card of my cellular phone's MP3
player. Their heads swivel around automatically when they hear her.
She STILL has that effect on Iranian men all these years later.

When we'd get in a strange taxi in Tehran, the drivers would reach in
their gloveboxes for their "American Tape" full of American rock they
must have hated. I'd always make a new friend by saying, "No, no!
Don't you have Googoosh?!" I'll never forget that broad smile that
swept out from under those moustaches just because I even HEARD of
Googoosh they all loved....

Ahhh....I can still hear her singing as we tore through the traffic at
130 km dodging cars and people alike....

-----
Larry
You can tell there's very intelligent life in the Universe
because none of them have ever tried to contact us.....

erikc

5/8/2009 2:55:00 PM

0

On Fri, 1 May 2009 12:02:42 -0700 (PDT), mash_ghasem <ghyath_abadi@yahoo.com>
wrote:


> Greeting from a born again Iran atheist :-) But really I don't
>believe in any religion. You mentioned you were in Iran. How did you
>find our people and culture? I deleted alt**Islam and posted to
>iranian and alt.atheism newsgroups. If you like please post only to
>soc.culture.iranian on this topic. I might have some more questions if
>you don't mind. Thanks.

Hey, welcome aboard. Maybe you can help us spray this group for muslims. :D

Some questions:

[1] Are people in Iran leaving islam?
[2] If so, what for?
[3] Is the ruling elite aware of this?
[4] If so, how are they responding?

Erikc (alt.atheist #002) | "An Fhirinne in aghaidh an tSaoil."
BAAWA Knight (retired) | "The Truth against the World."