Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Working with COM objects

by MadraghRua (Vicar)
on May 22, 2009 at 19:07 UTC ( #765728=note: print w/ replies, xml ) Need Help??


in reply to Working with COM objects

Alright, I had a deeper look into Win32::OLE and came across the following

$tool->LetProperty('Molecule',$data); $tool->setProperty('Molecule, $data);
So it turns out that the LetProperty method loads the $data instance into the Molecule attribute of the $tool instance. I'll be looking more closely at this to understand why this worked over the previous syntactic sugars that i was using.

I hope this node helps someone else in the future

MadraghRua
yet another biologist hacking perl....


Comment on Re: Working with COM objects
Download Code
Re^2: Working with COM objects
by Anonymous Monk on May 23, 2009 at 07:21 UTC

    In Win32::OLE property assignment using the hash syntax is equivalent to the Visual Basic Set syntax (by reference assignment):

            $Object->{Property} = $OtherObject;

    corresponds to this Visual Basic statement:

            Set Object.Property = OtherObject

    To get the by value treatment of the Visual Basic Let statement

            Object.Property = OtherObject

    you have to use the LetProperty() object method in Perl:

            $Object->LetProperty($Property, $OtherObject);

    LetProperty() also supports optional arguments for the property assignment. See OBJECT->SetProperty(NAME,ARGS,VALUE) for details.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://765728]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-07-04 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls