[comp.sys.mac.programmer] INIT wants to access text in other's window

ifab623@walt.cc.utexas.edu (moon) (12/15/89)

HI!

I am trying to access the TEHandle in another application's window.
How does a INIT access TEHandle in a Word or MacWrite text window?
There is no TEHandle entry in WindowRecord.
It seems to me I have to patch something.
Could you tell me how to find the Handle to the text?
Welcome any advice.  thanks.   s j moon

amanda@mermaid.intercon.com (Amanda Walker) (12/15/89)

In article <22362@ut-emx.UUCP>, ifab623@walt.cc.utexas.edu (moon) writes:
> HI!
> 
> I am trying to access the TEHandle in another application's window.
> How does a INIT access TEHandle in a Word or MacWrite text window?
> There is no TEHandle entry in WindowRecord.
> It seems to me I have to patch something.
> Could you tell me how to find the Handle to the text?
> Welcome any advice.  thanks.   s j moon

There's no way to do it, mainly because applications like Word & MacWrite
don't use TextEdit at all.  They use their own text editing routines.

Until IAC (Inter-Application Communication) comes around, there will
be no reasonable way to do this sort of thing.

Amanda Walker
InterCon Systems Corporation
--

6600pete@hub.UUCP (12/15/89)

From article <22362@ut-emx.UUCP>, by ifab623@walt.cc.utexas.edu (moon):
> How does a INIT access TEHandle in a Word or MacWrite text window?

Ugly news: MacWrite and Word don't use TextEdit. They use their own
internal format. They use QuickDraw to put that format on the screen.
I'm willing to bet Microsoft will be very quiet about what their memory
format is for any given version of Word. Apple might be a little more
sympathetic about a particularly old version of MacWrite, but that
sympathy would not remove the barrier of difficulty. (Y'see, these programs
aren't written with INIT twiddling in mind -- they could be, but they
aren't.) Claris would probably act the same as Microsoft about newer
MacWrites.
-------------------------------------------------------------------------------
Pete Gontier   | InterNet: 6600pete@ucsbuxa.ucsb.edu, BitNet: 6600pete@ucsbuxa
Editor, Macker | Online Macintosh Programming Journal; mail for subscription
Hire this kid  | Mac, DOS, C, Pascal, asm, excellent communication skills

earleh@eleazar.dartmouth.edu (Earle R. Horton) (12/15/89)

In article <22362@ut-emx.UUCP> ifab623@walt.cc.utexas.edu (moon) writes:
>HI!
>
>I am trying to access the TEHandle in another application's window.
>How does a INIT access TEHandle in a Word or MacWrite text window?

Neither program stores this information in a TEHandle, since they both
use application code instead of TextEdit to manipulate the contents of
text windows.  This is both for performance and so documents can exceed
32k in size.  I presume the text is kept in an application-specific
data structure, about which you may be able to obtain information from
the software manufacturer.

Earle R. Horton

tim@hoptoad.uucp (Tim Maroney) (12/16/89)

In article <22362@ut-emx.UUCP> ifab623@walt.cc.utexas.edu (moon) writes:
>I am trying to access the TEHandle in another application's window.
>How does a INIT access TEHandle in a Word or MacWrite text window?

You don't; there isn't one.  Word processing programns don't use TextEdit;
they handle their own text data structures and drawing.
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Gangsters would kidnap my math teacher, Miss Albertine, and I'd track them
 down and kill them one by one until she was free, and then she'd break off
 her engagement with my sarcastic English teacher, Mr. Richardson, because
 she'd fallen hopelessly in love with her grim-faced and silent
 fourteen-year-old savior." -- Nite Owl, in WATCHMEN by Alan Moore