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

World: r3wp

[View] discuss view related issues

Anton
22-Dec-2008
[8429x2]
To track it down, I patched all functions (and relevant, nested helper 
functions) involved in Sunanda's example code: VIEW REQUEST-LIST 
INFORM SHOW-POPUP HIDE-POPUP and finally WAKE-EVENT. I added 30 print 
statements to all those function bodies (making sure to bind them 
correctly etc), tracking the control flow, then compared the output 
before and after escape was pressed. Eventually I found the difference 
in control flow in wake-event (EITHER POP-FACE ...).
Submitted "wake-event pop-face patch" to RAMBO.
Pekr
22-Dec-2008
[8431]
Anton - what about submitting to DevBase?
Anton
22-Dec-2008
[8432]
Done.
Graham
26-Dec-2008
[8433]
Nice timeline widget in dhtml http://simile.mit.edu/timeline/
Reichart
27-Dec-2008
[8434]
It is cool, and it seems to get posted about once a year...
Graham
27-Dec-2008
[8435]
So, has anyone attempted rewriting it in View?
Reichart
27-Dec-2008
[8436]
Don't know.  
We plan to do a version of it for our Gantt.
Graham
27-Dec-2008
[8437]
timeline is part of MIT's SIMILE project.
Graham
28-Dec-2008
[8438x5]
Took me ages but I finally managed to get a version of timeline running.
but because of the async calls, the Rebol micro-webserver can't serve 
the pages correctly.
Works fine with Cheyenne though.
Here's an xample of timeline using embedded json data http://www.compkarori.com/timeline/timeline.html
All the samples i saw used external data sources.
Nicolas
30-Dec-2008
[8443]
can rebol evaluate two user input events at the same time?
Henrik
30-Dec-2008
[8444]
all input events are queued.
Nicolas
30-Dec-2008
[8445x3]
I'm trying to build an interface similar to the one in Plan 9 OS, 
but I've hit this snag. when the left mouse button is down the system 
doesn't register right mouse button clicks. Can this be worked around 
somehow?
is there any way to handle alt keys?
is there a way to do mouse chording?
btiffin
30-Dec-2008
[8448]
Re; keys.   yes?   Play around with something like
rebol []
set-modes system/ports/input [lines: false]
while [
    code: input
    code <> 13
][
    probe code
]
set-modes system/ports/input [lines: true]
print "--"


But I'll admit to being confused.   Ctrl-A returns 1, Ctrl-B returns 
27, 91, 49, 126, Ctrl-C bails, Ctrl-D prints 4

Alt-A 27 27 97, Alt-B 27 27 98    On my Debian GNU/Linux box 2.7.6
Gabriele
31-Dec-2008
[8449x2]
Brian, I think he's asking about View, not the console.
Nicolas: the mouse buttons problem may be OS related, but I never 
tested this.
BrianH
31-Dec-2008
[8451]
Mouse chording would require the mouse event system to be able to 
express multi-button mouse events. I'm not sure if R2 has such support 
(or R3 either but we can fix that). Windows and Linux's event models 
support chording, though most apps don't use it. Though I don't know, 
I would be surprised if Mac OS X's event system supported chording 
- it barely supports more than one mouse button.
btiffin
31-Dec-2008
[8452]
Yep, I was suggesting that as a method to get at the codes that View 
might return, but yeah you are correct and now I'll ask, is it a 
different keyscan engine?  Core vs View?
Gabriele
2-Jan-2009
[8453]
BT, the codes you see at the console are ANSI escape codes, and that 
has nothing to do with what you get from view, eg. the "home" key 
sends the 'home word in View but an escape sequence on the terminal.
btiffin
2-Jan-2009
[8454]
I stand corrected then.  ;)
james_nak
2-Jan-2009
[8455]
Question, I've been writing an app that shuffles through a lot of 
images but one at a time (same single image in layout) . I notice 
that what appears to be happening is that each time an image is loaded, 
more memory is consumed. I am not using load-image but maybe I should 
with the /clear refinement. Any thoughts?
Steeve
2-Jan-2009
[8456]
should not happen...

perhaps are missing some recycles in you script...or maybe you forgot 
to unset some faces in your layout.
amacleod
3-Jan-2009
[8457]
I'm going to be converting a bunch of images to binary for storage 
in a db (sqlite). What is with the base 64 option? Is there an advantage 
or need in my case? I'll be compressing them also...
Sunanda
3-Jan-2009
[8458]
Base 64 in REBOL is, basically, a type of ASCII represention. It 
can stand a certain amount of damage (like whitespace being inserted 
-- imagine it is sent as an email) and can still be reconstructed:
    str: "abcdefabcdef"      ;; a string
    s64: enbase str    ;; enbased to base-64 by default

    replace/case/all s64 "W" "  W  "   ;; whitespace polluted in transit
    str = to-string debase s64    ;; do we get it back intact?
Geomol
3-Jan-2009
[8459]
amacleod, I don't think, there's much of a idea in using base 64 
to store images locally, as they will grow in size. The format is 
good for sending binary data over the internet.
amacleod
3-Jan-2009
[8460]
I'll also be storing on a server using mySQL.
Gregg
3-Jan-2009
[8461]
The size increase can be significant if you're storing a lot of big 
images. Why not just store the binary data raw?
amacleod
3-Jan-2009
[8462]
Makes sense...
when I upload an image to the db how do I go about it?
Do I load it into a variable first?
Gregg
3-Jan-2009
[8463]
Depends on the interface to the DB. I haven't use sqlite. If it's 
just in a file, you'll need to read it first (unless the DB layer 
does that, kind of like VID does). Of course, storing files in the 
files system and just putting the name in the DB is another option. 
If you have a lot of big images, the DB can grow very quickly, and 
many DBs aren't particularly designed for BLOB storage.
Chris
3-Jan-2009
[8464]
I don't know how it is stored in the DB, but it is bound to the DB 
as hex (base16) and stored as a 'Blob'.  As far as I'm aware, Ashley's 
driver will do this for you:

	sql ["INSERT INTO mytable VALUES (?)" #{ABCD}]
btiffin
3-Jan-2009
[8465]
Careful with SQLite and big blobs.   A blob can be SQLITE_MAX_LENGTH 
(usually a billion) but SQLITE_MAX_SQL_LENGTH defaults to a million. 
 A single line of SQLite may limit the size of blobs to under 1 million.
See http://www.sqlite.org/limits.htmlfor deets.
Nicolas
7-Jan-2009
[8466]
I want to be able to catch alt-key down and caps lock down and caps 
lock up and things like that. Can I use external libraries to do 
these things?
Maarten
7-Jan-2009
[8467]
I think you want to use the system port for that - assuming you use 
windows. Cross-platform... I don't know.
Nicolas
7-Jan-2009
[8468]
Where can I learn about windows/unix keyboard events and how to access 
them with rebol ports?
Cyphre
8-Jan-2009
[8469x2]
Nicolas, the problem with catching key events using system port is 
that it works only when Rebol console window is opened. (at least 
under Windows)
I hope I (or someone else) convince Carl to fix that for the next 
release of R2 as I know the system port could be useful for other 
things that key events in Rebol/View.
Maxim
8-Jan-2009
[8471x2]
YESSSS please.
its for advanced users, only they will use it anyways... so its not 
going to impede the basic simplicity of rebol
Nicolas
13-Jan-2009
[8473x2]
does update write the whole file or does it just alter the file?
I'm trying to make an interface that updates a file on every keystroke
BenBran
14-Jan-2009
[8475]
In this snippit of code how to I change the text color to white?
...
make btn-face [
            offset: 80x10
            size: 130x38
            effect: [fit]
	text: "fit"
        ]
...
Steeve
14-Jan-2009
[8476]
what is in btn-face ?

anyway... if the text is not inserted in a draw block, this should 
work:

font: make font [color: white]
BenBran
15-Jan-2009
[8477]
Thank you Steeve, that worked just fine.
BenBran
26-Jan-2009
[8478]
I'm working on taking the output of a console program to a view. 
 Its formatted nice for the console but I can't seem to get the text 
spaced correctly for the text-list box such as teletype or monotype.... 
any suggestions?  

myData: read %./
lo: [text-list 640x480 data to-block myData]

view/options/title layout lo [resize] "Files"          ;; characters 
do not line up vertically but look fine in console

thanks in advance.