Forum: wxRuby linkage confusion

755ce658078632d051cc60c811613066?d=identicon&s=25 Ann Maybury (Guest)
on 2011-05-10 22:46
(Received via mailing list)
In the printinglrb sample a code line says dc= get_dc;

I have searched my ruby installation for a get_dc method and found it
nowhere except in printing.rb.
I do find a getdc in Petazold.

After the dc =get_dc line in ruby there are a lot of dc references.
like

    dc.set_background(Wx::WHITE_BRUSH)
    dc.clear()
    dc.set_font(Wx::get_app.test_font)

    dc.set_background_mode(Wx::TRANSPARENT)

If I understood the ruby definition of the dc object I might understand
the
rest of this code.  For your information, I have coded thousands of
lines
using the Microsoft interface.  I have created many windows and many
text
and graphic files which I sent to the printer.   My confusion is with
the
ruby implementation, not with the process itself.


Since I cannot find a ruby or wxruby reference, is there some magic
linkage
to some windowd dlls or some ther
mechanism that I do not understand?



>From what I get from reading the code, ruby is presenting me with a cleaner
way to process printing, windows, and dialogs.   I just need to be able
to
sync into it better.

I had expected this routine to be defined in Wx::DC.I downloaded the
wxruby
source and looked in dc.rb.  I did not find get_dc or the dc.xxx
refernced
above.  I I also did not find it in any on-line documentation that I
looked
at.


Help.  I don't understand something.
This topic is locked and can not be replied to.