Discussion:
Load Mops file in another partition
(too old to reply)
Gnarlodious
2005-01-05 02:01:17 UTC
Permalink
I've made a folder on my user partition for my Mops projects, with an alias
to the file in the Mops folder. The alias allows the
zfloating point library to load without an error, but won't load the actual
file on launch.

So, I end up using the "Load" menu in Mops to load the file. I can't just
doubleclick the file and open it in Quickedit because I'm using Tex-Edit
since it offers styled text and is much more readable (unfortunately my
vision is going to hell).

Normally I could launch the file in Mops with Applescript but alas, Mops is
not scriptable.

I added the HFS path to the other partition's folder to the "Mops.paths"
file but it does not load the file as I expected.

What's the solution to this quandary?

-- Gnarlie
Erik
2005-01-05 16:09:05 UTC
Permalink
Post by Gnarlodious
I've made a folder on my user partition for my Mops projects, with an alias
to the file in the Mops folder. The alias allows the
zfloating point library to load without an error, but won't load the actual
file on launch.
Normally I could launch the file in Mops with Applescript but alas, Mops is
not scriptable.
Is it possible to make it scriptable? By that I mean, introduce words
that can
accept Applescripts and then build a new Mops system that permanently
contains those words (or else a library that can be loaded before you
do
any work).

Erik
Mike Hore
2005-01-06 03:37:00 UTC
Permalink
Post by Gnarlodious
Post by Gnarlodious
I've made a folder on my user partition for my Mops projects, with an
alias
Post by Gnarlodious
to the file in the Mops folder. The alias allows the
zfloating point library to load without an error, but won't load the
actual
Post by Gnarlodious
file on launch.
Normally I could launch the file in Mops with Applescript but alas,
Mops is
Post by Gnarlodious
not scriptable.
Is it possible to make it scriptable? By that I mean, introduce words
that can
accept Applescripts and then build a new Mops system that permanently
contains those words (or else a library that can be loaded before you
do
any work).
Like to volunteer to do this? I'm flat out.


Cheers, Mike.

----------------------------------------------------------------
Mike Hore ***@OVE.invalid.icasolution.com.au
----------------------------------------------------------------
Erik
2005-01-06 07:21:00 UTC
Permalink
It's something I've thought about for a while. I'm not sure how
involved it is, though; I'm a relative newbie to Forth and Mops.
Here's my thoughts, for what it's worth.

1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.

2) Failing that, use either the Carbon or Cocoa APIs to register Mops
as an Applescript-savvy application. Then use an equally savvy editor
to send the text to Mops. After that, Mops has to know how to see the
code as code, not a string and run INTERPRET on it.

Those are my thoughts, anyway. If anyone thinks I'm off base, or has
advice/info that could help, I'd appreciate it.

Best,
Erik
Post by Mike Hore
Post by Erik
Is it possible to make it scriptable? By that I mean, introduce words
that can
accept Applescripts and then build a new Mops system that
permanently
Post by Mike Hore
Post by Erik
contains those words (or else a library that can be loaded before you
do
any work).
Like to volunteer to do this? I'm flat out.
Cheers, Mike.
Mike Hore
2005-01-06 07:47:25 UTC
Permalink
Post by Erik
It's something I've thought about for a while. I'm not sure how
involved it is, though; I'm a relative newbie to Forth and Mops.
Here's my thoughts, for what it's worth.
1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.
The QE -> Mops messaging is with AppleEvents, basically using
an ad-hoc format. I didn't write it -- Doug Hoffman wrote both
ends. Anyway I think for AppleScript a dictionary would need
to be created, and the messaging would need to be in one of the
standard formats. So it's doable, but a bit of work.

But I'm madly trying to get the 5.6 release ready just now, so
don't have time to think about it any further.

Cheers, Mike.


----------------------------------------------------------------
Mike Hore ***@OVE.invalid.icasolution.com.au
----------------------------------------------------------------
Erik
2005-01-06 16:35:33 UTC
Permalink
Mike,

Thanks for your advice! I didn't mean to add to your workload; I was
just trying to figure out how something like this would be done. It
might take a while, but this is probably a good excuse for me to get
acquainted with Carbon or Cocoa or something like that.

Thanks again,
Erik
Post by Mike Hore
Post by Erik
It's something I've thought about for a while. I'm not sure how
involved it is, though; I'm a relative newbie to Forth and Mops.
Here's my thoughts, for what it's worth.
1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.
The QE -> Mops messaging is with AppleEvents, basically using
an ad-hoc format. I didn't write it -- Doug Hoffman wrote both
ends. Anyway I think for AppleScript a dictionary would need
to be created, and the messaging would need to be in one of the
standard formats. So it's doable, but a bit of work.
But I'm madly trying to get the 5.6 release ready just now, so
don't have time to think about it any further.
Cheers, Mike.
----------------------------------------------------------------
----------------------------------------------------------------
Erik
2005-01-06 16:35:41 UTC
Permalink
Mike,

Thanks for your advice! I didn't mean to add to your workload; I was
just trying to figure out how something like this would be done. It
might take a while, but this is probably a good excuse for me to get
acquainted with Carbon or Cocoa or something like that.

Thanks again,
Erik
Post by Mike Hore
Post by Erik
It's something I've thought about for a while. I'm not sure how
involved it is, though; I'm a relative newbie to Forth and Mops.
Here's my thoughts, for what it's worth.
1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.
The QE -> Mops messaging is with AppleEvents, basically using
an ad-hoc format. I didn't write it -- Doug Hoffman wrote both
ends. Anyway I think for AppleScript a dictionary would need
to be created, and the messaging would need to be in one of the
standard formats. So it's doable, but a bit of work.
But I'm madly trying to get the 5.6 release ready just now, so
don't have time to think about it any further.
Cheers, Mike.
----------------------------------------------------------------
----------------------------------------------------------------
Erik
2005-01-06 16:35:58 UTC
Permalink
Mike,

Thanks for your advice! I didn't mean to add to your workload; I was
just trying to figure out how something like this would be done. It
might take a while, but this is probably a good excuse for me to get
acquainted with Carbon or Cocoa or something like that.

Thanks again,
Erik
Post by Mike Hore
Post by Erik
It's something I've thought about for a while. I'm not sure how
involved it is, though; I'm a relative newbie to Forth and Mops.
Here's my thoughts, for what it's worth.
1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.
The QE -> Mops messaging is with AppleEvents, basically using
an ad-hoc format. I didn't write it -- Doug Hoffman wrote both
ends. Anyway I think for AppleScript a dictionary would need
to be created, and the messaging would need to be in one of the
standard formats. So it's doable, but a bit of work.
But I'm madly trying to get the 5.6 release ready just now, so
don't have time to think about it any further.
Cheers, Mike.
----------------------------------------------------------------
----------------------------------------------------------------
d***@talkamerica.net
2005-01-28 10:09:21 UTC
Permalink
Post by Erik
1) I believe QuickEdit sends code to Mops via Applescript, or
AppleEvents. Now, if that's true, these access points aren't
advertised as I can't get Script Editor to open any dictionary in
PowerMops. If information on how the interaction occurs could be
detailed, then maybe it could be modified to allow any savvy editor to
send code to Mops.
Sorry for not responding sooner. This Usenet group has not been very
active so I don't come here often. Although now that PowerMops 5.6 is
uploaded to the Apple OSX site the activity level may change.

The way to send AppleEvents to Mops is no secret. One can view the
complete source for how to do it simply by looking at the Mops source
file zAppleEvents. This shows how PowerMops sends AEs to QuickEdit
(Carbon MacForth). But the same technique is used in QuickEdit to send
AEs to PowerMops, with the proper AE values changed of course. Look at
the definition of (AEeventfromQE) in the PM file zFrontend to see
*precisely* what PM does with an incoming AE from QE.

Anyone could write an application, in most any language I would think,
to communicate with PowerMops using what is already there. One could
also easily change the PM source file zAppleEvents and recompile
PowerMops if custom outgoing AEs were desired.

Regards,

-Doug

n***@yahoo.co.jp
2005-01-06 11:05:30 UTC
Permalink
Hi Gnarlodious,
Post by Gnarlodious
...
I added the HFS path to the other partition's folder to the
"Mops.paths"
Post by Gnarlodious
file but it does not load the file as I expected.
What's the solution to this quandary?
-- Gnarlie
Well, from my experience, setting "Mops.paths" works also for
a folder in another partition.
Did you delete or move the alias out of Mops search paths
before load?

Sincerely,
Nao Sacrada
Loading...