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

World: r3wp

[SDK]

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
[1306x4]
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.
2.7.6 should be fine.
I think this step will save you a lot of confusion ! :)
amacleod
3-Mar-2009
[1310x2]
** Script Error: Cannot use path on none! value
** Where: insert-event-func
** Near: insert system/view/screen-face/feel/event-funcs :funct
:funct
** Press enter to quit...
ignore..I used enbase by mistake..
Anton
3-Mar-2009
[1312]
gotta sleep - good luck...
amacleod
3-Mar-2009
[1313x5]
works...!!!!
Thanks Anton...
Lots of misplaced Items though...got to clean it up I guessss
I'm such a dope using the older version....

I think that's rebol inc's fault..I think I got it from them when 
I bought the SDK.
Funny thing is I had version 2.7.6 since it was released...

Version porblem was in the back of my head but I did not realize 
how old a version tehy supplied with the SDK purchase
Back to DLL Problem...
** Access Error: Cannot open sqlite3.dll as library
** Near: *lib: load/library switch/default fourth system/version


Do I need to write the DLL to disk to use it? Or can it run from 
inside encap
The way images are used..
Oldes
3-Mar-2009
[1318]
I think you must save it.
amacleod
3-Mar-2009
[1319]
Having the same problem with scripts...mysql-protocol.r

** Access Error: Cannot open /C/Documents and Settings/Alan/Desktop/mysql-protocol.r
** Near: do %mysql-protocol.r
db_IP: mysql://Alan:[Stynki4-:-onfire-:-selfip-:-com]:3306/onfire
do