r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[SDK]

amacleod
2-Mar-2009
[1229x9]
I'm trying to encap a script but I keep getting error: Cannot load 
file:


THe program runs fine and loading it does not seem to produce any 
errors.

Any suggestions?
using rebface I get a sytax error for the following:


 if s/x > cell_sizes/:c/x [cell_sizes/:c: s cell_matrix/:c: reduce 
 [r c]]

Syntax Error: Invalid word -- :c:
What is another way to write that?
Used poke


if s/x > cell_sizes/:c/x [poke cell_sizes c s poke cell_matrix c 
reduce [r c]]

seems to work...
No errors in rebface
Got it to Encap...

but I just get a console window with the code scrolling through...
I was able to catch the top of the output:

I think there is an error in mysql-protocol.r
MZ has no value....

Anyone else have a problem encaping mysql-protocol.r?
Can't find a refernec to MZ in mysql-protocol or my program
refernec = reference
Chris
2-Mar-2009
[1238]
cell_sizes/(c):

Is a valid set-path...
amacleod
2-Mar-2009
[1239]
Thanks Chris...
amacleod
3-Mar-2009
[1240]
The order of the include files seems to have an effect the error...


I moved the rebol mezz functions to the begining and now I get this 
error:

** Script Error: user-prefs has no value
** Where: vbug
** Near: if not dbg: user-prefs/debug [exit]
Graham
3-Mar-2009
[1241x2]
no
you have to create that object ... it's a long standing sdk bug
amacleod
3-Mar-2009
[1243]
EVery time I move the includes around I get a different error message...
Graham
3-Mar-2009
[1244x2]
so, if encapping anything with view

user-prefs: [ debug: false ]
I think the error only occurs if you use request-download or similar
amacleod
3-Mar-2009
[1246]
I did have an include with request-download but I removed it as I 
thought that might be causing a prob...
But I'm getting other errors related to the includes
Graham
3-Mar-2009
[1247]
what are your include statements?
amacleod
3-Mar-2009
[1248]
#INCLUDE %"/C/Program Files/rebol/rebol-sdk/source/mezz.r"
#INCLUDE %"/C/Program Files/rebol/rebol-sdk/source/prot.r"
#INCLUDE %"/C/Program Files/rebol/rebol-sdk/source/view.r"

#INCLUDE %sqlite.r
#INCLUDE %mysql-protocol.r
;#INCLUDE %updater.r


;#INCLUDE %include.r
;#INCLUDE %window.r

;#INCLUDE %scroll-panel.r
;#INCLUDE %scroll-wheel-handler.r
#INCLUDE-binary %fd_shield.jpg
#INCLUDE-files %data [guest.db demo_template.db]
;#INCLUDE %sqlite3.dll
Graham
3-Mar-2009
[1249]
#INCLUDE-binary %fd_shield.jpg  ???
amacleod
3-Mar-2009
[1250]
How about the dll?
Should that be -binary too?
Graham
3-Mar-2009
[1251]
you can't just include a binary file
amacleod
3-Mar-2009
[1252]
#INCLUDE-binary %fd_shield.jpg  ???

This is according to manual if you want to keep the image compressed 
uuntil used
Graham
3-Mar-2009
[1253x3]
I don't think so.
what do the docs actually say?
I don't think you need mezz.r either
amacleod
3-Mar-2009
[1256]
image: #INCLUDE-binary %fd_shield.jpg
Graham
3-Mar-2009
[1257x2]
that looks better
I have this in mine

arrow.png:  load #include-binary %3flex/assets/arrow.png
amacleod
3-Mar-2009
[1259x2]
It says to build view from enface you need mezz.r
That's not where I'm getting my errors..for now anyway.
Graham
3-Mar-2009
[1261x4]
I think it's included with the others
I'm not including mezz.r .. I have mine commented out
anyway, it doesn't matter
yes, binary too for dll
amacleod
3-Mar-2009
[1265]
** Script Error: edge-size? has no value
** Where: context

** Near: test-window/size: test-window/size + edge-size? test-window
Graham
3-Mar-2009
[1266x2]
Have you built any view apps?
Just build a skeleton view app first
amacleod
3-Mar-2009
[1268]
Just one...a small  one with no includes besides view.r
Graham
3-Mar-2009
[1269]
keep it ..and include all the stuff you need, and see if the simple 
one still works
amacleod
3-Mar-2009
[1270x2]
If I move #INCLUDE %window.r below  #INCLUDE %scroll-panel.r my error 
changes to : 

Script Error: access has no value
** Where: stylize
** Near: access: make access [

    set-scroll-offset: func [{Sets the scroll position (subface/offset) 
    and updates the scroller drag-bars to reflect the new position.}
        face offset [pair!]
        /no-show
        /local scrolldom
    ] [
        face/subface/offset: offset

        scrolldom: max 0x0 (face/subface/size - face/crop-box/size)

        face/hscroll/data: either scrolldom/x > 0 [- face/subface/offset/x 
        / scrolldom/x] [0]

        face/vscroll/data: either scrolldom/y > 0 [- face/subface/offset/y 
        / scrolldom/y] [0]
        if not no-show [show face]
    ]
]
feel:
I guess encap is evaluating each include as it comes along and if 
tehy deopend on each other as these do...and they are in hte wrong 
order...it fails.
Ammon
3-Mar-2009
[1272]
That's correct.  They need to be included in the correct order.
amacleod
3-Mar-2009
[1273x6]
tehy deopend = they depend
I got it running...atleast the first 'main' window.  My buttons look 
funky...btn's have rounded ends and colors are different.
Problem was some test layouts within the window.r include files
Found 'bug' in Anton's scroll-panel-style that was causing teh problem....
Next...I assume I can encap sqlite db's. 
I get an error though:

** Script Error: unless has no value
** Where: CONNECT
** Near: unless find first database %/
it works in script version...

I can read/binary and write/binary the db so its accessable via the 
encapped path...
and sclite.r is sending hte corect path...

Is there a problem with encapping DLL's?