SDK newbie dumb question
[1/4] from: swhite::ci::bloomington::mn::us at: 2-Jun-2006 11:27
I just purchased the SDK and have found a work-related use for it, so am eager to show
it off. I have run into a little problem which I have encapsulated into this test script
(at the end of this message).
If I bring up the REBOL interpreter and "do" this script, it works.
If I try to encap the script by dragging it onto enface or enpro, or by running enface
or enpro and entering the script name interactively, the resulting .exe file does NOT
run, and gives the following message:
** Script Error: layout has no value
** Near: MAIN-WINDOW: layout [
title "Main Window"
]
view MAIN-WINDOW
** Press enter to quit...
This has got to be something dumb, but what? Yes, I did read the manual.
Thank you. (If the solution is in the manual in plain sight, feel free to point that
out.)
Test script follows:
REBOL [
]
MAIN-WINDOW: layout [
title "Main Window"
]
view MAIN-WINDOW
Steven White
City of Bloomington
1800 W Old Shakopee Rd
Bloomington MN 55431-3096
USA
952-563-4882 (voice)
952-563-4672 (fax)
steven.white-ci.bloomington.mn.us
[2/4] from: anton:wilddsl:au at: 3-Jun-2006 3:09
Um.. I haven't got SDK, but I think you just have to
#include the view mezzanine code.
There might be a few include files that the View system
needs included.
Anton.
[3/4] from: swhite::ci::bloomington::mn::us at: 2-Jun-2006 12:19
Hey, thanks. I found an example in the examples.
Actually, I had seen that before and tried it before, but I think there was an error
that I didn't see--a file in use or not saved or something. Anyway, it works now.
>>> anton-wilddsl.net.au 6/2/2006 12:09 PM >>>
Um.. I haven't got SDK, but I think you just have to
#include the view mezzanine code.
There might be a few include files that the View system
needs included.
Anton.
[4/4] from: karim:elfounas:easybraine at: 2-Jun-2006 19:20
Steven White a =E9crit :
> I just purchased the SDK and have found a work-related use for it, so am
> eager to show it off. I have run into a little problem which I have
<<quoted lines omitted: 27>>
> 952-563-4672 (fax)
> steven.white-ci.bloomington.mn.us
Hello Steven,
When you "encap" a script, it's not executed by the normal rebol/view
but by rebol/face wich is rebol/view without many mezzanine functions.
You have to include them with your script with the #include command
(which is preprocessed before the encapping process).
Simply add this line at top of your script and the encapped version will
work.
#include %../source/view.r
(in your case, path will certainly differs and must point to the source
directory supplied with your SDK)
But usually you have to include more mezzanine functions. More
informations about this in the documentation here :
http://www.rebol.com/docs/sdk/kernels.html
I Hope it will help.
--
Karim EL FOUNAS
EasyBraine SA
Campagne des Rites, 8 - 1421 Ophain Bois-Seigneur-Isaac
T=E9l : +32 2 387 32 34
Mobile : +32 495 57 32 34
Email : karim.elfounas-easybraine.com
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted