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

World: r3wp

[SDK]

Graham
3-Mar-2009
[1258]
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
[1273x7]
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?
Maybe I'm wrong...

When I move the encapped exe to another directory it can no long 
see the include files....

ie: It can not find sqlite3.dll anymore.???

I'm including it...
#INCLUDE-binary %sqlite3.dll
But it only works if the dll is located in the same directory.

Does it run it from the Encapped biary or do I have to install these 
files (write to disk) to access them?
Anton
3-Mar-2009
[1280]
amacleod, what is the 'bug' in scroll-panel?
amacleod
3-Mar-2009
[1281]
I changed the line below to - 
	access: make object [


Probably not a bug but I could not find its dependancy and it works 
for me now...

** 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:
Anton
3-Mar-2009
[1282x6]
Thanks, that means the panel style doesn't have an access object, 
as my code here expects.
I don't advise just hacking my file. Better to get to the root of 
the problem.

You can test to see if the panel style has an access object, just 
before including my file:

	probe type? svv/vid-styles/panel/access
It should return

	== object!
I suspect it is a problem of including files in the wrong order again. 
All the fundamental view / vid includes should go before including 
my scroll-panel. But it seems strange that panel is there but its 
access object isn't. I think that must be defined in a separate file. 
Historically, access objects were added fairly late to VID, so I 
think that's probable.
If you include view-feel.r, it should be included before view-styles.r.
(I don't use encap, so I'm just guessing what's going on.)
amacleod
3-Mar-2009
[1288]
As far as I know Including view.r incorporates all the view funtions 
including vid...which I'm doing.
Anton
3-Mar-2009
[1289x2]
And you're including view.r first, scroll-panel.r after ?
(You're right about view.r.)
amacleod
3-Mar-2009
[1291x2]
When I insert  - probe type? svv/vid-styles/panel/access

into the script I get Object!

but after I encap I get -
** Script Error: svv has no value
** Near: probe type? svv/vid-styles/panel/access
dump-obj: func
Yes, all rebol functions included first..
Anton
3-Mar-2009
[1293]
Weird, try replace svv with system/view/vid ...
amacleod
3-Mar-2009
[1294x6]
For script - ==Object!
For enface: 
** Script Error: Cannot use path on none! value
** Near: probe type? system/view/vid/vid-styles/panel/access
dump-obj: func
Sorry Anton...I'm probing before any of the includes..
try again
** Script Error: Invalid path value: access
** Near: probe type? svv/vid-styles/panel/access
SQLite: make

After Rebol (View) Includes but before your panel include..
** Script Error: Invalid path value: access
** Near: probe type? system/view/vid/vid-styles/panel/access
SQLite: make
Anton
3-Mar-2009
[1300]
Bizarre. What version of encap are you using? I'm looking at  sdk-2.7.5.4.2
amacleod
3-Mar-2009
[1301]
REBOL/Encap 1.2.0.3.1
Anton
3-Mar-2009
[1302]
Oh, that's so old !!!
amacleod
3-Mar-2009
[1303x3]
REBOL/Encap 2.7.6.3.1 (14-Mar-2008
I have that one I guess I'll try that...
I thought I was using the newer one...
Anton
3-Mar-2009
[1306x2]
Yeah, the access functions were added to VID some time after 1.2.1, 
if I remember correctly.
Unless you need compatibility with older versions for some reason, 
I'd definitely recommend using the latest encap version.