Anybody is able DEBUG pluging under RB 5.1 ?

Ruslan Zasukhin sunshine at public.kherson.ua
Thu May 8 00:28:17 CDT 2003


on 5/7/03 11:39 PM, Brad Hutchings at brad at componentx.com wrote:

Hi Brad,

> My brain aches from even contemplating InitOpenTransport again ;-). But
> in a nutshell... In the old Mac OS, the call would set up application
> globals for OT. Sometimes, you'd have a plugin that needed OT and it
> needed to initialize some globals but not clobber the application
> globals. Well, it all happened magically pre-Carbon. But in Carbon,
> they made us decide whether we wanted an application context or a
> shared library context. Well, your plugin needs an application context,
> but chances are that REALbasic may have initialized it or may
> initialize it later. In fact, with the debugger, my money is on it
> being initialized since they use sockets to talk between IDE and debug
> build. So when you call InitOpenTransport, you have probably hosed OT.

Excellent explanation!!!

Where from you know all this?  :-)
Btw, this should be added to REALs docs of Pluging SDK

> Anyway, a trick that has worked is to instantiate a Socket in your
> plugin main code, then use the default application context for OT calls
> your plugin makes. REALbasic 4.x apparently called InitOpenTransport
> when needed, and the technique seems to work in 5.x, so that probably
> has not changed. If you're really lucky, your OT code will be amenable
> to using the default application context. If not, you're heading down a
> path I once (or maybe twice) went down :-). Check in with us in a week
> and tell us how things are going <grin>.

Brad,

I wonder if you have develop own plugin with OT ?
I do not clear see what you mean with "instantiate a Socket"

    again, please note, I have solve problem for now.
    just want to get more deeply into problem.

In fact, I think may be I can drop GUSI (it is 250KB btw of code.)
If I could to do this, then size of "Valentina client" could go from 450KB
to 200KB only.

I wonder if it is possible to work with OpenTransport, at least close as
easy as with POSIX sockets:

    1) make inet_addres
    2) handle = ::socket()
    3) connect()
    4) send/recv
    5) close( socket )

Is it possible with OpenTransport.
For now reading docs, I see much more complex calls, sometimes I see
events,..I have not see any example which can do this as easy as I describe.
This is only for CLIENT. I can use simply blocking / synch calls.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list