POV-Ray : Newsgroups : povray.off-topic : The other OS : Re: The other OS Server Time
30 Jul 2024 08:17:42 EDT (-0400)
  Re: The other OS  
From: Orchid XP v8
Date: 8 Aug 2011 07:29:22
Message: <4e3fc892$1@news.povray.org>
On 05/08/2011 09:01 PM, Darren New wrote:
> On 8/5/2011 5:42, Orchid XP v8 wrote:
>> I was asking, more basically, "how do you do useful stuff with
>> COM?"
>
> Oh. You find a COM object that does what you want it to do, and you use it.

I can see how an application might expose a COM object such that 
invoking a certain method is like clicking on a particular button. What 
I can't figure out is how COM lets you do stuff like link a chart to a 
database such that every time the database changes, the chart updates. 
I'm not sure how you invoke methods to make that happen.

>> As best as I can tell, COM lets you create "objects" and invoke
>> "methods" on them... that's as far as I was able to figure out.
>
> Yes, that's what COM is for. The "methods" are usually implemented in
> either system libraries or in applications. So an "object" might be an
> excel spreadsheet, and the "methods" would manipulate the cells, set up
> a graph, and then copy the image of the graph to the clipboard for you
> to use.

Would Excel be a single COM object? Or would you have like seperate 
objects for each workbook, worksheet, cell, etc?

>> I also figured that the only reason that you can (say) embed an Excel
>> spreadsheet in a Word document is because both products are produced
>> by the same company.
>
> No no no. That's the whole *point* of COM. That's why there's a standard
> interface definition language and such.

See, I've always assumed that the glitering world of native Windows 
GUIs, IPC, DLLs, COM, etc. are all behind closed doors, accessible only 
to people who know how to write really low-level Windows code. And I've 
always assumed that the really /good/ stuff (like embedding one 
application inside another) is accessible only to Microsoft themselves. 
(Or anybody who pays really vast sums of money. People like Symantec.)

>> I've yet to see a language that can invoke DLLs either...
>
> Maybe you should learn a normal language, then. :-)

So... you mean basically C or C++ then?

>> I'd be perfectly happy doing COM from, say, JavaScript. It's not that
>> Haskell is the problem, it's that I can't see *anything* that speaks COM.
>
> Tcl, VBScript, WScript, VBA, and C# all have trivial interfaces to COM.

Oh dears.

> Didn't you tell me you had written a VBA macro or two?

Yeah. It took me several hours to finally construct a 25-line VBA macro 
which performs the utterly trivial task of setting the value of a 
certain cell to today's date. This was an exercise in extreme 
frustration, as the help files utterly failed to be remotely helpful in 
any way. I've been bitter ever since. :-P

>> I get the feeling that the only way to solve this is to use some
>> horrifically awful language like VB...
>
> No, you just have to learn something vaguely normal, and then not give
> up when the first thing you try doesn't work.

Yeah, maybe that's what it comes down to. I tend to avoid all the 
MS-designed languages, which is maybe why I can't do COM.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.