REBOL3 - View (discuss view related issues [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

9448PekrIf View sucks, well then. But it is a good measure of how it is "usable" in real-life ...13-Jan-10 16:29
9447Henrikgood idea13-Jan-10 11:49
9446DockimbelI think I'll drop View support in Cheyenne completely in the next release and search for a suitable third party graphic library to add.13-Jan-10 11:29
9445DockimbelAnyway, thanks to you and nconvert, I could deliver the new CureCode feature to my customer this morning.13-Jan-10 11:28
9444DockimbelPekr: thanks for the confirmation. Why does it appear in documentation then? 11:26
9443WuJianview layout [text-list data parse read %myfile.txt ""]13-Jan-10 9:09
9442BenBranThanks Graham. view layout compose [text-list (data)] ; worked13-Jan-10 5:10
9441Grahamso you can do this ... get the block first

data: to-block read %myfile.txt

and then compose on the block

view layout compose/only [ text-list (data) ]

13-Jan-10 5:03
9440PekrDoc - Cyphre confirmed bilinear filter is missing in R2 draw. It could be added, if we wish so for R2 updates. In R3, there is new parameter for such purposes, called RESAMPLE13-Jan-10 5:00
9439GrahamVID = Visual Interfaces Dialect.13-Jan-10 4:59
9438Grahameverything inside the layout [ ] is not rebol code .. it's a dialect13-Jan-10 4:59
9437BenBranview layout [text-list "this" "is" "a" "text" "list"] myFile.txt contains "this" "is" "a" "text" "list" how can I: view layout [text-list read %myFile.txt] ? tia13-Jan-10 4:57
9436DockimbelConvolve effect could actually help get Lanczos filter implemented at mezz level with decent speed.13-Jan-10 0:09
9435DockimbelPekr, thanks for NConvert link and for pointing me to Convolve operator, pity it's not mentioned in any of the View doc I know of.13-Jan-10 0:07
9434GeomolI tried resize both under Windown and OS X with same result. No filtering.12-Jan-10 23:58
9433DockimbelLooks like NConvert is a good solution for now. It's simple enough, supports the right filters and is multiplatform.12-Jan-10 23:55
9432GeomolYeah, you're right. Too bad. :-/12-Jan-10 23:46
9431DockimbelLooking at the nconvert solution...12-Jan-10 23:44
9430DockimbelGeomol: same result with your code.12-Jan-10 23:43
9429DockimbelThe original image is the CureCode homepage viewed inside Chrome ( 23:40
9428Dockimbelleft=REBOL, right=IrfanView12-Jan-10 23:39
9427GeomolHm, different to say 100%, if my version is filtered. Some results look ok, others maybe not so good.12-Jan-10 23:39
9426DockimbelThis is what I get with my current code : 23:39
9425DockimbelGeomol: I'll try it right now.12-Jan-10 23:39
9424Pekrdo 23:36
9423GeomolDoc, my version seems filtered to me. Have you tried?12-Jan-10 23:34
9422Pekrbtw - nconvert is 1.8MB one single exe with all filtering capability of xnview inside. Should be cross-platform too IIRC. But - the licence might not fit, I don't know ...12-Jan-10 23:34
9421DockimbelHow do you access CONVOLVE operator? (can't see it in Draw documentation)12-Jan-10 23:33
9420Henrikyou can blur the image before downscaling, but it can smear it more and the image isn't as clear.12-Jan-10 23:33
9419PekrI use lanczos in XnView by default ...12-Jan-10 23:32
9418Pekrcouldn't convolve filter be used somehow?12-Jan-10 23:32
9417DockimbelLanczos (IrfanView) is giving incredible good results.12-Jan-10 23:32
9416GeomolIt seems to be ok without the filter, so maybe some default filter is in action. Let me check...12-Jan-10 23:32
9415DockimbelI'm working with 64x6412-Jan-10 23:31
9414Geomol(or give it as an argument)12-Jan-10 23:31
9413DockimbelThat's almost the code I've made already. The issue is not having BILINEAR or any other good enough filter for thumbnails.12-Jan-10 23:31
9412GeomolChange the 160 to some other value, if you need other size.12-Jan-10 23:31
9411GeomolCall RESIZE with a loaded image. It'll save the img.png file, that'll have x-size of 160. It looks ok here.12-Jan-10 23:30
9410GeomolJust a test:

set 'resize func [img /local sz c1 c3 i2] [ if file? img [img: load-image img]

scale: img/size/x / 160 sz: as-pair 160 round img/size/y / scale c1: 1x0 * sz c3: 0x1 * sz

i2: to-image layout [origin 0 box sz effect [draw [image img 0x0 c1 sz c3]]] save/png %img.png i2 ]

12-Jan-10 23:29
9409DockimbelAh nice! I started looking at to see if a REBOL implementation would be fast enough.12-Jan-10 23:29
9408Grahamcan't you call R3 from R2 ?12-Jan-10 23:29
9407GeomolDoc, I might have a resizer to make thumbs...12-Jan-10 23:28
9406DockimbelIf R2/Draw is not going to be updated, there's no point in bothering him.12-Jan-10 23:26
9405PekrTry contact Cyphre ... or I will ask him ...12-Jan-10 23:25
9404DockimbelWell, the point in using REBOL+my own closely integrated frameworks is to avoid third-party dependencies...12-Jan-10 23:24
9403Pekr... well, just kidding ... I thought it is a one-time job ....12-Jan-10 23:22
9402Pekrget used to what other environments do ;-)12-Jan-10 23:22
9401DockimbelYes, once only, I guess CALL would be ok, just need to install ImageMagic on Windows, test it, then install it on Linux server, test again, then add this package to the list of dependencies to!12-Jan-10 23:20
9400Pekrjust workarounds too ... before Cyphre fixes/extends Draw ... but I doubt any native changes are going to be backported to R2.12-Jan-10 23:20
9399Pekrthere are wrappers to image-magick, no? Or - you could use nconvert from xnview package from command line too ...12-Jan-10 23:19
9398DockimbelYes, I know, I'm really pissed off by the misleading Draw documentation...12-Jan-10 23:18
9397HenrikJust trying to help :-) I could see the use here for launching r3 processes from Cheyenne for limited special functions. I assume the thumbnails are generated once?12-Jan-10 23:17
9396DockimbelNice, so now could you port Cheyenne + CureCode to R3 in one night? If not, I can't see how R3 can help me.12-Jan-10 23:14
9395HenrikFortunately R3 has no problem with this.12-Jan-10 23:13
9394DockimbelI'm finishing attached files management for CureCode with thumbnails generation....too bad, you'll have horrible thumbnails...

Once again with REBOL, stuck at 95% of the goal and no (simple) way to workaround. That's how I usually loose all the time gained by using REBOL instead of another language...Where's that Rant channel? :-)

12-Jan-10 23:08
9393Henrikforget making smooth thumbnails with R2 :-)12-Jan-10 23:03
9392Henrikbilinear only works with scaling up12-Jan-10 23:03
9391DockimbelIf BILINEAR filter is not working or not implemented (while being documented), that would be really a pity to have to code my own bilinear filter in REBOL which would be probably too slow to use, or install a 10MB library like ImageMagic...12-Jan-10 23:02
9390DockimbelDoes anyone know if IMAGE-FILTER BILINEAR is working in Draw? I see no differences with NEAREST mode (which looks horrible when scaling down a big image, even with preserved aspect ratio).12-Jan-10 22:57
9389DockimbelCan't find the DRAW group anymore, so I'm posting here.12-Jan-10 22:55
9388GrahamYes, it seems to be a result of using rebgui's display/parent ...26-Dec-09 0:33
9387GrahamIt's also occuring if I use the close gadget at the top right ..25-Dec-09 23:23
9386GrahamMaybe it's just a rebgui issue ...25-Dec-09 23:19
9385GrahamI wonder if it's the Z order that is the problem25-Dec-09 23:15
9384Henrikthey shouldn't25-Dec-09 23:09
9383GrahamIf you use unview/only window, why should any other windows close down as well?25-Dec-09 23:07
9382Gabrieleset the width and then use size-text23-Dec-09 9:19
9381Grahamie. control the width and let the height expand to as necessary.23-Dec-09 4:35
9380GrahamIn easy-vid, Carl creates layouts of a fixed size, and fits all his text accordingly. Hypernotes creates layouts that are variable in height. How is this done?23-Dec-09 4:34
9379Pekras for me - simple CGI stuff, some automatition tasks, few GUI utils ....20-Dec-09 11:23
9378NicolasWhat do you mostly use rebol for?20-Dec-09 11:20
9377NicolasThis is the first step to creating a zooming user interface20-Dec-09 11:16
9376Pekrcomments here in Altme? No - they can't be deleted ...20-Dec-09 11:15
9375NicolasI guess they can't. Anyway, thanks for your help!20-Dec-09 11:14
9374NicolasCan comments be deleted?20-Dec-09 11:14
9373NicolasREBOL []

window: layout [i: image rate 5 load key escape [halt]]

zoom-in: does [i/size: i/size * 5 / 4] zoom-out: does [i/size: i/size * 4 / 5] down: false alt-down: false

insert-event-func [ probe event/type switch/all event/type [ down [down: true] up [down: false] time [if down [zoom-in]] alt-down [alt-down: true] alt-up [alt-down: false] time [if down [zoom-in] if alt-down [zoom-out]] ] center-face i show window event ]

view/options window [resize]

20-Dec-09 11:12
9372Nicolaswindow: layout [i: image rate 5 load %gtfo.jpg key escape [halt]]

zoom-in: does [i/size: i/size * 5 / 4] zoom-out: does [i/size: i/size * 4 / 5] down: false alt-down: false

insert-event-func [ probe event/type switch/all event/type [ down [down: true] up [down: false] time [if down [zoom-in]] alt-down [alt-down: true] alt-up [alt-down: false] time [if down [zoom-in] if alt-down [zoom-out]] ] center-face i show window event ]

view/options window [resize]

20-Dec-09 11:11
9371NicolasHere's a prototype20-Dec-09 11:11
9370NicolasI'll try that20-Dec-09 11:05
9369Pekryes, you can ... well, but I am not much experienced in that. You need to test event/type for 'time value. But how to get time events there? Maybe setting face/rate: desired-value-per-second could help?20-Dec-09 11:04
9368NicolasCould I flick over to event detection every tenth of a second somehow?20-Dec-09 11:01
9367NicolasYeah, that's the problem.20-Dec-09 10:59
9366Henrikhmm... well, I guess you need to keep that going, while the button is held down, otherwise no events are fired.20-Dec-09 10:59
9365NicolasThanks Henrik20-Dec-09 10:57
9364Henrikdetect on mouse down and stop zooming on mouse up20-Dec-09 10:57
9363NicolasI want to make a program that zooms in on a picture while I hold down the left mouse button and that zooms out when I hold down the right mouse button. Any ideas?20-Dec-09 10:56
9362GrahamThanks I'll give it a go.17-Dec-09 19:30
9361GreggInside a view window, you can remove the face from the pane and append it again, so it's a the top of the z-order. I can't remember trying that with screen-face though.17-Dec-09 19:07
9360GreggI use the Windows API to do it Graham, but I don't have a cross-platform solution.17-Dec-09 19:05
9359Luistop-most example: 15:14
9358GrahamWhat I want to do is keep a separate menu window open so that no matter what other windows are open, the menu window stays on top.17-Dec-09 8:30
9357GrahamAny window ...17-Dec-09 8:27
9356Henrikby forcing it to front, do you mean modal or just moving any window to front? (The kit has a simple function for the last bit)17-Dec-09 8:02
9355GrahamAnyway to set the Z order of windows once they are already up?17-Dec-09 6:00
9354GrahamHow do you force a window to the front? setting the activate flag and show doesn't seem to work17-Dec-09 4:05
9353Henrikthat would be cool14-Dec-09 8:18
9352Grahamshould ask Carl for a copy of the VID related bug reports so that you can fix them in vidext :)14-Dec-09 8:16
9351Henrikgraham, might as well add it to my tracker too.14-Dec-09 7:35
9350Grahamok, submitted14-Dec-09 4:40
9349Grahamhard to find stuff on now ....14-Dec-09 4:37
9348GreggStill RAMBO AFAIK. Unless they've moved things to CureCode.14-Dec-09 4:36
9347Grahamwhat's the current bug tracker for R2 ?14-Dec-09 4:33
9346GrahamThat means we can now write the documentation :)14-Dec-09 4:32
9345GreggI'd say it's a bug Graham.14-Dec-09 4:30
9344amacleodRE: printing vid faces by converting them to images for document printing...

I found that a multiplier of 3 is sufficient for good quality text...maybe 5x for super quality

14-Dec-09 3:01
9343GrahamHard to say it's a bug because there never was any documentation on the LED face14-Dec-09 0:26
9342GrahamIn the first case the led can not be switched using the mouse, but by adding the action block it can !14-Dec-09 0:14
9341GrahamIs this a VID bug??

>> view layout [ led 20x20 ] >> view layout [ led 20x20 [] ]

14-Dec-09 0:09
9340Henrik 8:34
9339Henrikdoesn't support bitmaps yet (have only used it for printing text), but you use it like to-image.11-Dec-09 8:34
9338Henrikalso it doesn't output postscript directly, but dialect words for Geomol's postscript.r dialect.11-Dec-09 8:30
9337HenrikOops, View, not VID. It only depends on faces, not the VID dialect.11-Dec-09 8:29
9336Henrik 8:28
9335Henrikamacleod, it's VID to PS and it works fairly OK. I've used it for printing some statistics tables.11-Dec-09 8:27
9334Maximwith R3, someone is bound to make a client for the windows printing engine :-)11-Dec-09 7:23
9333Maximthe pdf conversion should actually be pretty easy. look it up. pdf maker supports images, vector art... and its a dialect IIRC so it should be a big thing to go from your view layout to this other dialect.11-Dec-09 7:21
9332amacleodThanks for the help Maxim.11-Dec-09 7:20
9331amacleodI played around with it... AGG looks great on screen but prints fuzzy like you said... Increasing resolution looks sharp on printout... I do not know if I should spend time playing with scaling or just biting the bullet and converting output to HTML or pdf ...I had planned on it anyway but as usual what I thought would be a quick one or two day project turns into a week to make it "right"...

But always an opportunity to learn new stuff!

11-Dec-09 7:20
9330Maximphotoshop allows you to change the meta information about dpi without resizing the image... I don't know if there are little tools which you can run command-line that will do it too.11-Dec-09 5:34
9329Maximyou need to set the dpi of the printout to a higher value. I don't know about that solution, but either it supports the dpi value of the input image, when it has one, or you should be able to set it directly.

612 / 72 = 8.5 ;-) so your values are standard video dpis

11-Dec-09 5:27
9328amacleodI was using a print method calling MS image viewer transparently to print without opening up but I as adivised to keep my image at 612x792 to keep it on one do increase 5x now?11-Dec-09 5:23
9327Maximfor printing from REBOL, the best thing is to use one of the variations of the PDF dialects out there and printing that out. there are a few guys around here who have some experience doing this.11-Dec-09 5:22
9326Maximusing anti-aliased images you can lower the resolution without it looking too bad... cause the edge will gray out instead of being jagged blocks. but they will look fuzzy instead.11-Dec-09 5:20
9325Maximnormal printing, uses vectorial information, so the convertion from shapes to points (rasterization) is done directly at print time.11-Dec-09 5:19
9324Maximwhen I was doing an art project, I had to create a printout for a 36 inch wide image... the file was an 508 mb, 300 dpi image.11-Dec-09 5:18
9323Maximyep.11-Dec-09 5:17
9322Maximso if you are creating images for printout, you have to think larger faces with larger font sizes... screen dpi is typically between 72-100 dpi, printers now usually printout at around 600 dpi.... so if you want to have clean images, they should be around 5 to 10 times larger.11-Dec-09 5:17
9321amacleodsacel = scale11-Dec-09 5:17
9320amacleodMaxim, so to display a proper page I would need to increase the sacel of my vid image quite a bit...larger than screen?11-Dec-09 5:16
9319amacleodHow far did Henrik get with his vid to pdf dialect?

My layout is all text except for one small b/w image...

11-Dec-09 5:15
9318Maximthe fonts will be anti-aliased (which is what I meant to say above)... but in any case, the resolution you use on your printer is always much higher than you screen resolution.11-Dec-09 5:15
9317amacleoduse 'draw' to lay it out wll produce better image?11-Dec-09 5:14
9316Maxim(and scale all the graphics involved in your face)11-Dec-09 5:13
9315amacleodvid layout11-Dec-09 5:13
9314Maximeither you use AGG for aliased fonts, or you increase image size so its equal to the dpi you want to print.11-Dec-09 5:13
9313amacleodI'm trying to print a vid face face via conversion to image... what's the best way to get good text quality... the a best font to use... my out put is a little jaggy11-Dec-09 5:11
9312GreggAlso, don't forget SET-FACE.9-Dec-09 23:32
9311DockimbelIt's documented in Core manual: 17:22
9310amacleodGot it! Thanks a lot, Henrik.!

I did not know that about to-logic... not mentioned in "Word browser"

9-Dec-09 15:50
9309Henrikto-logic on a word is always true:

>> to-logic 'true == true >> to-logic 'false == true

9-Dec-09 15:42
9308Henrikreduce blk first9-Dec-09 15:42
9307amacleodhaving trouble with checkbox updating...

this works > chbx1/data: true show chbx1

but if I take the state from a block > blk: [ "String" true] chbx1/data: blk/2 IT DOES NOT WORK. I've also insured its a logic value with> chbx1/data: to-logic blk/2

Any ideas?

9-Dec-09 15:18
9306BrockGoogle query of: HP Touchsmart tx2 Dell XT2 finds lots of info29-Nov-09 23:04
9305BrockYes, the TX2 is what I was actually looking at. I'll have to see if I can find a comparison of the two units.29-Nov-09 23:02
9304GrahamBrock the Touchsmart TX2 is also dual mode ... see the reviews. There's some mention of lag when using the touch but you might be able to live with that.29-Nov-09 22:08
9303GrahamI wanted accurate pen use which needs an active screen, and also touch.29-Nov-09 21:16
9302GrahamBrock .. no. I bought a touchsmart IQnnnn ( 19 inch wide I think ) for someone else but I don't think it was multitouch.29-Nov-09 21:16
9301BrockGraham, did you happen to look at the HP Touchsmart (12.1")? I see it offere at the local big-box stores for about $900 Canadian. Gave it a try and it seemed like a nice machine.29-Nov-09 15:58
9300GrahamThere's some issue with Windows 7 RC1 and the multitouch driver ... so I have put it down while awaiting the official Wndows 7 dvd from Dell.29-Nov-09 10:03
9299HenrikGraham, so your arms get tired yet? :-)29-Nov-09 8:44
9298GrahamIt's the Dell XT2 View apps work fine.28-Nov-09 23:32
9297BrockI'm contemplating getting one and would like to know how well Rebol View apps work with it. I'm assuming they'd work just fine, but don't have the kind of money that I can take a chance ;-)28-Nov-09 23:29
9296BrockWhat laptop is that Graham?28-Nov-09 23:28
9295GrahamMy new laptop with multitouch screen has just arrived .. the surface demos are interesting ... using two - four fingers to manipulate images, or a virtual earth. Now .. it would be nice if R2 or 3 can support this!28-Nov-09 23:11
9294Grahaminteresting ...24-Nov-09 8:37
9293CyphreI think you should be able to receive this event thru system port (not tested). The main problem is that there is a bug in system port so the events (in general) aren't detected unless rebol console is opened. It would be great improvement if this is fixed in new R2 release but you need to push Carl ;)24-Nov-09 8:32
9292GrahamIs there a way to receive wm_gestures ? Will this be added to an enhanced R2 ?24-Nov-09 6:58
9291Maximyep... but an 'interrupt mechanism would be nice to have. it makes a lot of stuff much easier to architecture especially when you have multiple ports to handle and state is complex. you can just add a loop which includes all event handlers and interrupt all of them... check some states and then decide if you re-enable some or all of them, until you decide to stop the loop.

this way, a view event, can also interrupt network xfer for example.

5-Nov-09 11:17
9290Gabrielethe alternative is to use global values / flags. the modal (popup) system in VID does exactly that.5-Nov-09 10:58
9289Gabriele"there is no way for that code to interrupt the event handler" - right, but you're not "outside" the event handler. you're still inside, and it would be easy to look at the return value of that code. that of course makes VID programming more difficult because you always have to remember to return FALSE.5-Nov-09 10:57
9288Maximthe event handling dispatches code related to the event that triggered it. there is no way for that code to interrupt the even handler, especially when the event handler isn't programmed by yourself.

when you add wait [] in a function, there are many reasons why to want that wait to return. in this case, modal operation of some code.

wait is a nested system where a second call to wait doesn't break the first call to wait.

To allow this I had to patch view's wake-event directly, but it works now..

there is no way for a normal action to interrupt event handling a part from closing all windows, which made this modal operation of my code especially complex to build without an interruption mechanism.

I've had other situations like having a systray and view not collaborating, where closing a window ends the app even when the systray is running, or where the window wait keeps running even if all windows are closed and the systray was then hidden as well. a timer event would have easily solved that issue by interrupting appropriate event handlers when it detects some situations.

5-Nov-09 10:53
9287Gabrieleif you are inside wait, you are inside the event handling. so "interrupt a wait outside of its event handling" makes no sense to me.5-Nov-09 10:44
9286Maximdid anyone do a VID compatible tree view control. the only one I can find is the one within from the request-dir.r script.

not that its bad, just probing to see if there are others which would work more quickly for this project where I need it.

5-Nov-09 7:30
9285Maximyeah, I had to patch wake event to add the functionality... would be nice to be able to interrupt a wait outside of its event handling. is this doable in R3?5-Nov-09 0:42
9284Gabrielethe awake handler needs to return TRUE4-Nov-09 9:32
9283Maximex: a button with something like [kill-wait] in its action.4-Nov-09 3:00
9282Maximanyone know how to break a call to wait [] so wait returns?4-Nov-09 2:51
9281JankoI already told this here but I know AGG was used in this higher profile "indie" game: 18:35
9280Cyphrecompound rasterizer: well, this is another type of rasterizer(which has been already implemented into AGG2.4 codebase). I haven't made any perofrmance tests comparing the scanline AA rasterizer we are using but it could be a bit faster because this method shouldn't redraw objects one over another.(ie it renders the image 'flattened') I can't tell you how much faster it could be but the more layers you are using the bigger difference could be seen.31-Oct-09 18:01
9279Cyphrere Cairo: Cairo seems to be popular mainstream. But AGG is used in a lot commercial projects silently so it is hard to tell. The facts are: 1. Cairo is slower than AGG.(when comparing SW rendering) 2. Cairo is a graphics library, AGG is a 'kit' to build graphics libraries.31-Oct-09 17:55
9278PekrFor the purpose of possible View enhancements, we started following document - so please update it, so that your ideas are not lost - 17:46
9277Pekr80-100% improvement sounds too good to be true :-) Would we get any other speedup, e.g. changing to compound rasterizer?31-Oct-09 17:45
9276PekrSo - everybody going the Cairo way nowadays?31-Oct-09 17:44
9275CyphreFrom my last talk with the author of AGG we can use even version 2.5 without any problems. So far R3 AGG implementation is somehow blended between 2.3-2.4 Otherwise it is true the author(Maxim aka McSeem) is not active developing(at least publicly) AGG. But There is still small hard-core team which keeps improving the code with little steps. For example I'd personally would like to try implement completely new AA rasterizer which could make the rendering theoretically faster by 80-100% but this is long time run given my limited time. Next step could be make HW accelerated frontend for AGG. But this is 'pandora box' or 'can of worms' for me as I don't have energy to take care of all possible bugs in all possible GFX cards and setups at the moment :)31-Oct-09 17:37
9274BrianHPreferable, yes :)31-Oct-09 3:23
9273Maximok, its just fun when the author continues to contribute ... it improves without us having to do all the work.31-Oct-09 3:19
9272BrianHWhen last I heard, the guy got a job doing .NET stuff or some such and stopped developing AGG two years ago. Afaik he changed the license from BSD for 2.4 to GPL for 2.5, saying that "all future development" would be to the GPL version. However, the license change was the only difference between 2.4 and 2.5, and there was no future development. All afaik. So, abandoned, but BSD-licensed so who cares?31-Oct-09 3:18
9271Maximseems that AGG hasn't been updated in 2 years! should we fear it is being abandonned?31-Oct-09 2:42
9270GrahamHas anyone written a to-do list manager? There was one on IOS but I don't have the client for that anymore, and my recall is that it was fairly basic.30-Oct-09 19:48
9269MaximAny one have a "disapearing scroller bar problem? i've tracked the bug down to the various redraw funcs in the scrollpane... but can't seem to fix it...

the ridiculous thing is that the bar disapears when you active the window the scrollbar is in! go to/from another window and "sometimes" the scroller knob offset gets set to some improper value, and it disapears.

28-Oct-09 7:47
9268JaneksThe rebface too did the same.22-Oct-09 15:42
9267JaneksI already tried rebview from that package, but it also didn't work saying cannot execute binary file. I guess that it is connected with linux platform - mine is PPC.22-Oct-09 15:41
9266JaneksO'k - I'll try to at least test it.22-Oct-09 15:33
9265DockimbelSome features are locked until you purchase a commercial license from RT.22-Oct-09 15:32
9264DockimbelYou can download it from here : 15:30
9263JaneksAnd it is pitty that on win it works, but not on Linux. :(22-Oct-09 15:29
9262JaneksO'k, but any way - than I need SDK.22-Oct-09 15:28
9261Dockimbel 15:26
9260JaneksWhat is rebface?22-Oct-09 15:16
9259Dockimbel# sdk/tools/rebview -ivwt ** User Error: Bad face in screen pane! ** Near: size-text self22-Oct-09 15:12
9258DockimbelTesting on a linux server with Xlibs installed (but no X server) :

# sdk/tools/rebview ** User Error: Bad face in screen pane! ** Near: size-text self

# sdk/tools/rebface REBOL/View (15-Mar-2008) Copyright 2008 REBOL Technologies REBOL is a Trademark of REBOL Technologies All rights reserved.

Set-Net not provided.


22-Oct-09 15:11
9257JaneksThe same result: ** User Error: REBOL: Cannot connect to X server

** Near: size-text self

22-Oct-09 15:09
9256Janeksthat should mean no install, no window, no viewtop and trace22-Oct-09 15:08
9255Janekslast try rebol -ivwt22-Oct-09 15:07
9254Janeksand fisrt trying to make some hello in ssh22-Oct-09 15:06
9253Janeksapache, but I have also ssh22-Oct-09 15:06
9252DockimbelWhich webserver are you using?22-Oct-09 15:05
9251Janeksthanks22-Oct-09 15:04
9250DockimbelCommand lines switches : >> usage22-Oct-09 15:03
9249Janeksno I haven' t22-Oct-09 15:02
9248Dockimbel<If>22-Oct-09 15:02
9247DockimbelI you have the SDK, you should try with rebface instead of rebview.22-Oct-09 15:02
9246JaneksSory - not -w22-Oct-09 14:57
9245JaneksI had find some descriptions for core in the docs but not for view. Just somewhere found by google in an example that -v or -w, but I know that in win system both of them are working. The -v opens rebview in console mode.22-Oct-09 14:56
9244HenrikI'm not sure how to bring up the list of command line switches22-Oct-09 14:50
9243Janeks??22-Oct-09 14:49
9242HenrikCan't see the command line switches...22-Oct-09 14:48
9241JaneksDoes the command switch -v and -c does not prevent that?22-Oct-09 14:46
9240Henrikthe problem could be that REBOL is trying to open the desktop22-Oct-09 14:45
9239HenrikI don't think that's the problem22-Oct-09 14:45
9238Janekscould it be connected with that fact, that it is ppc version of Rebol & Linux?22-Oct-09 14:40
9237JaneksSo I have all needed libs:

ldd /usr/bin/rebol => /usr/lib/ (0x0ff67000) => /usr/lib/ (0x0fe34000) => /usr/lib/ (0x0fe00000) => /usr/lib/ (0x0fd7f000) => /usr/lib/ (0x0fd16000) => /usr/lib/ (0x0fcdc000) => /usr/lib/ (0x0fbf3000) => /lib/tls/ (0x0fb5a000) => /lib/tls/ (0x0fb36000) => /lib/ (0x0fb03000) => /lib/tls/ (0x0f98f000) => /usr/lib/ (0x0f959000) => /usr/lib/ (0x0f936000) => /usr/lib/ (0x0f910000) => /usr/lib/ (0x0f8e6000) => /usr/lib/ (0x0f8ac000) /lib/ (0x48000000)

Now when i fire it: rebol -v ** User Error: REBOL: Cannot connect to X server

** Near: size-text self

The same with -cs - in that case it just gives second line...

22-Oct-09 14:39
9236Henrikthat shouldn't be necessary. I run it fine on a headless Linode server.22-Oct-09 14:33
9235JaneksOn my server there are no X, they have even no any hardware video connectors.22-Oct-09 14:29
9234JaneksI already added all libs, but it says "Could not connect to X server" :(22-Oct-09 14:26
9233DockimbelSure it can run with rebview but rebview requires Xlibs to be installed.22-Oct-09 14:26
9232Henrikyou need a range of libraries to run it with View. it works fine with View.22-Oct-09 14:20
9231JaneksSo it could not run with rebview? :(22-Oct-09 14:17
9230Dockimbel/Command is not a command line switch, it's a REBOL product : /Command is also included in REBOL/SDK.22-Oct-09 13:06

I am trying to get running SoftInnov's captcha on my Linux. Documentation tels that it is : DRAW based : doesn't require View engine, just DRAW (can run with /Command on UNIX without Xlibs installed). But it seem is not right commandline switch - I am getting any way library errors. Is it the right commandline switch? Or do I need any way those linux libraries? P.S. I also tried -v

22-Oct-09 11:35
9228amacleodI got it4-Oct-09 4:35
9227amacleodnever mind4-Oct-09 4:35
9226amacleodbingo! Thanks...

why does newstuff: copy [] not work here?

4-Oct-09 4:34
9225Maximsame thing... just replace choice by drop down4-Oct-09 4:29
9224amacleodI was hoping to use the 'drop-down' style (not choice) there a difference with the function?4-Oct-09 4:28
9223MaximI left the old "do" trick which allows one to easily scan a face to look up how it works... not sure many realize they can do this.4-Oct-09 4:26
9222Maximyou can also replace face/texts directly I think...4-Oct-09 4:26
9221Maximrebol []

items: []

dark-colors: ["Blach" "Navy Blue" "Blood red"] light-colors: ["Gray" "Cyan" "Pink"]

append items dark-colors

view layout [ drpdn: choice with [texts: items] do [ probe drpdn/init probe drpdn/words probe drpdn/multi probe drpdn/feel ] toggle "hi" "low" [ clear items append items either face/data [light-colors][dark-colors] ] ]

4-Oct-09 4:25
9220Maximit uses texts...4-Oct-09 4:24
9219Grahaminsert clear head mylist/list-data new-data4-Oct-09 4:23
9218MaximI'll write you up an example... its easy you'll see.4-Oct-09 4:16
9217amacleodnew_stuff: copy [] foreach book books [append new_stuff book]

If this is what you mean, I'm doing it...

4-Oct-09 4:13
9216Maximyou should clear the original block you supplied to the drop down list, and then append new items to it. that should work.4-Oct-09 4:11
9215amacleodSorry, not sure what you mean4-Oct-09 4:10
9214Maximyou must clear /append in the same original block :-)4-Oct-09 4:09
9213amacleodHaving trouble changing the data in a drop-down list...

mylist/list-data: new_stuff show mylist

works the first time but not there after

4-Oct-09 4:08
9212BenBransource.... I keep forgetting about that command. thanks for the reminder.29-Sep-09 17:29
9211james_nakOh, I like the feeling when I can say "Oh, that's how it works." And then there's anamonitor. I can't tell you how many times I've gone back and forth with that tool. :-)29-Sep-09 17:25
9210Steeve*the magical key29-Sep-09 17:10
9209Steevei meant you can't guess until you read the documentation of a specific function. 'help and 'source are they magic keys.29-Sep-09 17:09
9208james_nakAre you kidding? It took me a long time before I stopped turning everything into a string with my own functions! :-)29-Sep-09 17:07
9207SteeveIt's the central point with Rebol, when a function is accepting a block as input, you can't guess if it will be processed as pure rebol code, list of data, or as a dialect (mixed data and commands). Data is code, Code is data. Never forget.29-Sep-09 16:56
9206james_nakThanks. That opens my eyes to what I refer to as Rebol Voodoo. One can easily forget the relationship between a dialect and Rebol. Good stuff.29-Sep-09 16:43
9205HenrikBen, see private message.29-Sep-09 16:34
9204BenBranHenrik, that makes sense. I'll look for docs on the 'with word. Thanks.29-Sep-09 16:33
9203BenBranSorry.... should have put the ';; <---- fails' comment next to the line. Hence the rambling questions....29-Sep-09 16:32
9202Henrikit won't work, because the edge is not a dialect keyword outside of 'with.29-Sep-09 16:31
9201SteeveTo see if you can, just try it (in your case it fails).29-Sep-09 16:25
9200BenBranThen is something like this possible? or does the layout function always take input either at that location or the 'edge word as dialect? I guess the question could be... how do we know if we are creating code or dialect and does it matter?

view layout [text 100x100 "Hello" edge: make/edge [size: 25x25 color: 0.0.255 effect: 'bevel]]

29-Sep-09 16:23
9199Steeveyou can see the source of the layout function to have an idea of how the dialect is processed. But layout is an obfuscated function with too much dependencies with other hidden functions. It's rather difficult to have a whole understanding of how it works. It reclaims several years of training.29-Sep-09 15:40
9198BenBranThanks. I'll let the brain gears process this for a while.29-Sep-09 15:37
9197Steevebecause the lo block you constructed contains a dialect, not rebol code. When you call the layout function, the dialect is processed and the values [edge [...]] are translated to code [face/edge: make face/edge [...]]29-Sep-09 15:27
9196Steeveahah, i was waiting for that question29-Sep-09 15:24
9195BenBranquestion: Why did I not have to 'make the edge initally?29-Sep-09 15:24
9194BenBranThanks Steeve. That did the trick.29-Sep-09 15:19
9193Steeveface/edge is an object, not a block29-Sep-09 15:14
9192Steevereplace the lines where: >>face/edge: [...] by >> face/edge: make face/edge [...]29-Sep-09 15:12
9191BenBranHello All, I'm working with events but I'm stuck. Any help is appreciated. here is the code:

rebol [ title: event testing] lo: [ text 100x100 "Hello" edge [size: 25x25 color: 255.0.0 effect: 'bevel] ;; <--edge set here works feel [ engage: func [face action event] [ if event/type = 'down [ face/color: 0.200.0 show face ] if event/type = 'up [ face/color: 0.0.200 show face ] ] over: func [face into pos] [ if equal? into True [ ;; face/edge: [size: 25x25 color: 0.255.0 effect: 'bevel] ;; <-- edge changed here probe face/edge ;; print into ;; show face ;; <-- doesn't render ] ;; if equal? into False [ ;; face/edge: [size: 25x25 color: 0.0.255 effect: 'bevel] ;; <-- edge changed here probe face/edge ;; print into ;; show face ;; <-- doesn't render ] ;; ] detect: func [face event] [] redraw: func [face action offset] [] ] ] view layout lo

29-Sep-09 15:10
9190Henrikif you look at the source, the file vid-funcs.r contains most of these functions.27-Sep-09 8:08
9189HenrikIncidentally, the VID Extension Kit has a lot of functions to help in these situations for finding a specific face.

To for example find the window a face sits in:

root-face face

27-Sep-09 8:05
9188Antonamacleod, I thought all that complication would make you pause. And fair enough. I should say though that I've done the scroll-wheel-handler in the most proper way I can. It seems a pity not to take advantage of its structure. Anyway, it would be nice if you could say what you want to handle alt-click for. I'm still not sure why you want it. If that's clear to me, then I could probably make the new handler for you pretty quickly, as I'm more familiar with my code, obviously.27-Sep-09 7:52
9187Anton(or until there is no parent-face, which means we are at a top-level window face.)27-Sep-09 7:45
9186AntonThat's exactly what I'm doing in scroll-wheel-handler. Starting with the face clicked on, I climb up to the parent-face iteratively until I find an ancestor of the face which is a scroll-panel.27-Sep-09 7:44
9185Grahamdoesn't each face have a value for parent-face ?27-Sep-09 0:23
9184amacleodnot sure how to go about that..26-Sep-09 23:01
9183Grahamwhy not just follow the face up to its parent until you hit the scroll panel and then compare then?26-Sep-09 22:13
9182amacleodI think I see what you are saying, but... Sounds like more than I want to tackle right now... I think I'm going to stick with hacking up scroll-panel.r (since it seems to work)...the whole app feels like a hacked mess anyway so when R3 is ready I'll rewrite it for R3...Where I hope alot of these problems will not exist..

Thank you for the help

26-Sep-09 21:42
9181AntonBasically, you will want to make your own "right-click-handler.r", just copying scroll-wheel-handler.r's code and modifying the event type that is checked for to 'alt-down. Scroll-wheel-handler checks for an Anton-extended VID flag, SCROLL-WHEEL, to determine which face should handle the event. So I might also advise you define your own VID flag to indicate that a face handles alt-click, maybe call it simply ALT-DOWN like the event that triggers it, or CONTEXT-MENU-ACTIVE, or whatever you're doing. Then make sure that the faces you want to respond to your "right-click-handler.r" are flagged with this new flag. That's all, simple!26-Sep-09 16:44
9180AntonAha, I know what's probably happening. The scroll-panel contains a number of subfaces in a face hierarchy. You are probably not clicking on the scroll-panel face, but on one of its subfaces (which are laid on top of it, event-wise). If you look at scroll-panel.r, near the bottom of the rebol header, you will see the face hierarchy, with the two scrollers, the CROP-BOX and the SUBFACE inside the crop-box. The SUBFACE covers most of the area of the scroll-panel, and the two scrollers take some from the sides. You can test this idea by giving the scroll-panel an edge, then alt-clicking on the edge. You should get a positive identification then. But of course, this is probably not very useful to you. What (I assume) you will need to do is, given a face, find out if it is inside a scroll-panel (or inside a particular scroll-panel of yours). This is a little bit complicated, but I have done most of that coding already for mouse roll-wheel scrolling. (See scroll-wheel-handler.r, and demo-scroll-wheel-handler.r for how to use it.)26-Sep-09 16:37
9179amacleodAnton, Your method is not working for me:

alt-event: func [face event] [ if event/type = 'alt-down [ print "alt-click" if face = my-scroll-panel [print "face name = my-scroll-panel"] ] event ] insert-event-func :alt-event

I get "alt-click" but I do not get true for 'if face = my-scroll-panel'

I tried 'my-scroll-panel (word) and "my-scroll-panel" (quotes") also....

26-Sep-09 13:04
9178AntonYes, probably because not all faces in the system are VID faces. A VID face is an extension of system/standard/face with several facets added, including VAR. If the event handler came across a non-VID face, then face/var is an invalid path. So you see, this is an example of why using this method to identify a face is more brittle. You should better use:

face = my-scroll-panel

to determine identity of a face.

26-Sep-09 5:06
9177amacleodAnton, I had the same worry about forking....

this addition/change to scroll-panel.r works:

detect: func [face event][ if event/type = 'alt-down [ if face/var = 'my-scroll-panel [ print "hello"] ] event ]

But this addition to global handler does not:

alt-detect: func [face event][ if event/type = 'alt-down [ if face/var = 'my-scroll-panel [ print "hello"] ] event ] insert-event-func :alt-detect

get error on face/var

25-Sep-09 18:06
9176AntonEh? You really ought not to have to modify the scroll-panel.r file. That's just going to cause problems for you down the line, because you are forking. You should be able to override the default scroll-panel feel in your user code. Just let me know what you're trying to do with that and I'll show how.25-Sep-09 14:47
9175MaximI always setup stuff in the object directly using the with block. I was just amazed that after so long, such a feature is still unknown to me. :-)25-Sep-09 14:22
9174amacleodThanks, I'll try that too Anton.

I was not able to gfet Henricks suggestion to work when placing the event handler in the main only worked when placed in the seperate scroll-panel.r file.

25-Sep-09 14:21
9173AntonI reckon you did know this,. Maxim, but you just forgot about because it's not needed so much. What I do, which is more simple and direct, is just compare face with the word I previously set it to, eg:

my-scroll-panel: scroll-panel

and later in the event handler just

if face = my-scroll-panel [...]

This is just comparing two object references for equality, which is more fundamental and doesn't need any facility of VID.

25-Sep-09 12:41
9172Maximface/var !!! OMG never knew this.... hehe amacleod, there's always stones unturned in REBOL even for us advanced users ;-)24-Sep-09 23:04
9171Henrikthis is done in the LAYOUT function. good one to study:

source layout

24-Sep-09 22:00
9170GrahamMust be a VID thing. Rebgui doesn''t do this AFAIK24-Sep-09 21:59
9169amacleodgood to know24-Sep-09 21:56
9168Henrikbut when you do that, there is no global word set. it can still be useful however, if you desire to recognize a face using different means, like traversing a pane for a specific face.24-Sep-09 21:55
9167Henrikscroll-panel with [var: 'a]24-Sep-09 21:54
9166Henrikoops24-Sep-09 21:54
9165Henrikyou can also set it yourself like this:

scroll-panel [with: 'a]

24-Sep-09 21:54
9164amacleodgreat! Thanks!24-Sep-09 21:54
9163Henrikface/var is set during layout for all faces that have a set-word! attached.24-Sep-09 21:54
9162Henrikno problem24-Sep-09 21:53
9161amacleodIs that because its Anton's style or is that a rebol thing for all faces?24-Sep-09 21:53
9160amacleodI thought about var but I thhought that would be too simple to work... Thanks alot Henrik!24-Sep-09 21:53
9159Henrikof course it does :-)24-Sep-09 21:53
9158amacleodit works...24-Sep-09 21:52
9157amacleodyeah?24-Sep-09 21:51
9156Henrikface/var24-Sep-09 21:51
9155Grahamface = a ??24-Sep-09 21:46
9154amacleodSorry for the possible confusion but its one of anton's styles but did not think it would make a diff.24-Sep-09 21:43
9153amacleodif event/type = 'alt-down [face/style] me 'scroll-panel'

how do i get 'a' or 'b'

24-Sep-09 21:41
9152amacleoda: scroll-panel [blah blah blah b: scroll-panel [blah blah blah

I want to know if I clciked in scroll-panel a or b

24-Sep-09 21:38
9151GrahamWhat name?24-Sep-09 21:35
9150amacleodI'm need to get the name I assigned a face when I alt-click on it. I can get its style, offset, size etc but I do not see a way to get the face's name. More specificly I have multiple scroll-panels and I need to know the one I'm clicking in...24-Sep-09 21:24
9149DockimbelIn case you're wondering about the block after SUPPLY, it's used internally by the LIST style to build an iterating function defining a local context where COUNT refers to the current row and INDEX to the current column. Each horizontally positionned face (purpose of the ACROSS keyword) defined in the LIST layout block, is counted as a column, so: txt 100 txt 100 => 2 columns.24-Sep-09 20:10

Return to Index Page