• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 40501 end: 40600]

world-name: r3wp

Group: View ... discuss view related issues [web-public]
Henrik:
8-Jul-2008
hmm.. I'm still not sure where it fits or how it's used. But if we 
stick with the chart drawing aspect: It would be possible to do as 
a dialect, and I think it should be inspired by graphviz.
Henrik:
8-Jul-2008
once you have it as a dialect, you can build an interactive editor 
around it, or code graphs up by hand.
Henrik:
8-Jul-2008
I'm just curious where it fits in: I thought it would be a way for 
a nurse to administer treatment to a patient, by following the flow 
chart, but it's a way for a doctor to plan the treatment?
Graham:
8-Jul-2008
it's a way to enforce evidence based treatment.
Graham:
8-Jul-2008
no, just a guide
james_nak:
8-Jul-2008
Thanks Graham for the 3flex link. That's interesting. Perhaps Henrik's 
Relations-Engine might be something you can use. I myself have been 
tinkering around with it and attempting to parse the data to work 
with a chart making program. In my case I am planning on using http://www.maani.us/xml_charts/
.
Graham:
10-Jul-2008
I am trying to encap 3flex but have come across a few problems.  
Anyone done this yet?
Graham:
10-Jul-2008
xml_charts looks interesting but doesn't seem capable of doing what 
I want.  But it might be useful for a website.  Does it do time series?
james_nak:
14-Jul-2008
Has anyone ever seen a view app with several fields and and an area 
 that always minimizes when you hit the return key? In this case, 
I don't want it to do that. I  don't think I' ve ever seen that except 
in this app. What would make it do that?
Henrik:
14-Jul-2008
not sure what you mean. is it like a panel that collapses?
james_nak:
14-Jul-2008
It's actually a contact/address book based on Carl's rolodex ap. 
Basically, where ever you are in interface, when you  hit return 
it minimizes the screen as if you hit the minimize button. Weird.
Gregg:
14-Jul-2008
If it's a custom app, they could be grabbing the enter key and minimizing 
it. But that seems like a really bad idea, so maybe just a glitch?
Sunanda:
17-Jul-2008
There's a version packaged with Carl's devcon 2007 presentation:
Graham:
17-Jul-2008
Carl's latest causes a stack overflow for me
Chris:
17-Jul-2008
Ah, yes -- I turned that one into a VID style...
Graham:
17-Jul-2008
I ran show07 on the first script from Carl and after repeatedly using 
the down arrow, it came up with a stack error near the end of the 
presentation.
Janeks:
21-Jul-2008
I am unsure is it the View problem - my app is eating system resources. 
F.ex. when it is started in task manager it shows near 10mb memory 
use, but after a working day it shows around 70mb and comtinues to 
grow up.

I checked my variables, but it does not seems for me, that some of 
them are not releasing data. But probably I am wrong.
Are there some routine/trick how to trace/debug such situation?

My applications is doing some database checks and if finding certain 
data , then sending e-mail and/or sms.
Henrik:
21-Jul-2008
There are some bugs in View that causes leaks when using networking 
and GUI events at the same time. That's only a very rough description 
of the problem. There are more accurate descriptions of this problem 
in RAMBO.
Henrik:
21-Jul-2008
I had a similar issue with a small database server GUI. It continually 
ate memory until it was at 500 MB. Then I rewrote the application 
to be /Core only and memory usage was as it should be (way below 
500 MB).
amacleod:
22-Jul-2008
I'm trying to use Antons' Scroll-panel style but I'm having some 
trouble. 
Do you "do" the script or it it more involved? 

I tried to follow his style-gallery.r script but there is a lot going 
on in there and got lost. 
I see some kind of "include.r" script. perhaps that is needed?
amacleod:
24-Jul-2008
I got scroll-panel working. I think it was some conflict with cypher's 
tree style which I was also using.
On a related topic...

Is there a way to scroll down teh panel programaticly. (ie: give 
a y axis location and have hte panel jump to that spot) like a link 
on  web page?

And since Cyper's tree widget does not work with Anton's scroll-panel, 
any other tree widget's around?
Graham:
24-Jul-2008
set the offset/y and then do a show
amacleod:
24-Jul-2008
Thanks. I played around with offset but I did not get it to work. 
Ill try again. 

Is there a way to find the offset for specific text in the panel? 
For example -so a search for a string and get back the location in 
the panel?
amacleod:
31-Jul-2008
Still working with Anton's Scroll-panel...

I found a way to "index" the text location in the scroll panel as 
I build the layout. But when I try to set the offset to a specific 
position in the scroll panel I offset the whole "face" and not a 
reposition of the scroller. 
Example- 
I set my_scroll_panel/offset/y: 200

I feel I should be setting the scroller's value but I can  not seem 
to figure out how...
amacleod:
4-Aug-2008
I got Cypher's tree widget to work with Anton's scroll-panel...sort 
of. Problem was tree widget uses cypher's scroll-panel style which 
of course works diferently from Anton's. Now I'm forced to use both 
and the tree scroll-panel does not display sliders correctly. 

I'm going to either need to find a way for the tree list to use Anton's 
scroll-panel or add the extra functionality to cypher's scroll-panel 
style...or start from scratch.
Henrik:
7-Aug-2008
sounds like a focus problem
amacleod:
7-Aug-2008
Yes. I tried a feel/event function to trap the up event on the mouse 
and it restores my scroll functionality but I'm not able to highlight 
now!
amacleod:
7-Aug-2008
I'm able to re-focus the scroll panel within my "clip" function (to 
save the highlighted text) but if I just click in a text area or 
highlight and not save it using hte clip function I can not get scrolling 
back.
BrettH:
8-Aug-2008
I have a similar problem re: scrolling, and I've tried the suggstions 
by amacleod without success, here I've copied a modified version 
of cookbook-scroller in the hope someone can suggest a solution.Hi, 
I'm trying to write a data entry form with many fields, this form 
is longer than a typical
monitor viewing area.

Creating the form is easy, but I cannot work out how to scroll the 
whole form 'up/down'

when the user TAB's out of the last showing field bottom and display 
the 'hidden' fields.

Rebol actually does TAB to the next field and accepts data entry 
but you cannot see it
without manually moving the scroll slider.


How do I programmatically make the form 'move' up/down ? and sync 
the slider ?

 I've tried "all" the example code I can find and none seem to do 
 the trick :-)


In the attached (modified cookbook-scroller.r) program I've added 
a few fields to illustrate the

problem. My need is for rapid data entry and using the mouse is really 
not a option, The program accepts user data, user TABS to navigate 
to next field, form slides as necessary, upon last field, data is 
saved, form cleared, cursor placed at first field, data entry continues.

Thanks for any ideas.

;; ===============================
  rebol ["cookbook-scroller2.r"]
  sub-panel: layout [
        across origin 5
        style label text bold right 60
        backcolor tan
        h2 leaf "Scrolling Sub Panel" return
        label "Name:" f1: field return
        label "Email:" f2: field return
        label "Info:" f3: area wrap return
        label "Month:"
        l1: text-list data system/locale/months return
        label "Day:" s1: slider 200x20 return
        label
        button "Submit"
        button "Cancel" [quit]
    ]

    out: layout [
        across
        h3 "Panel Scrolling Example" return
        space 0
        p1: box 300x300 coal frame black
        s1: scroller 16x300 [scroll-panel-vert p1 s1]
        return
        s2: scroller 300x16 [scroll-panel-horz p1 s2]
        return
    ]

    p1/pane: sub-panel

    scroll-panel-vert: func [pnl bar][
        pnl/pane/offset/y: negate bar/data *
            (max 0 pnl/pane/size/y - pnl/size/y)
        show pnl
    ]

    scroll-panel-horz: func [pnl bar][
        pnl/pane/offset/x: negate bar/data *
            (max 0 pnl/pane/size/x - pnl/size/x)
        show pnl
    ]

    update-panel: func [pnl vbar hbar] [
        pnl/pane/offset: 0x0
        s1/data: s2/data: 0
        vbar/redrag pnl/size/y / pnl/pane/size/y
        hbar/redrag pnl/size/x / pnl/pane/size/x
        show [pnl vbar hbar]
    ]

    update-panel p1 s1 s2
    view out
;; ============
BrettH:
8-Aug-2008
Thanks for your input.


 I removed the Month list type and replaced with  fields. Tab does 
 visit each one in turn, and accepts data enty even tho their not 
 visible. ( until you slide)

eg:
        label "Name:" f1: field return
         label "Email:" f2: field return
         label "Info:" f3: area wrap return
	 label "More info: " f4: field return
	 label "Even more ;" f5: field return


As for the  'offset' info you mention, thats probably the key to 
the problem, and like you I have NO idea how

to get this !!  I've tried various code ideas attached to the TAB 
field exit without success.


I'm not trying to avoid mouse use , I just want to program the data 
entry flow for user comfort, 
the user should still be able  to use the mouse as needed.


I think REBOL is a very interesting product but it does seem to have 
many 'holes' in fundemental GUI handling :-),

on the one hand it offers the very easy to make GUI interface tool, 
then stuffs up drop-down-lists, sliders, TAB control,
etc.
BrettH:
9-Aug-2008
Solved !!! Took a bit of fiddling around, but now the form moves 
down thru the fields

as the user tabs out of a filed, and slides back to first field on 
tab out of last field.
Mouse positioning via scroll bar still working.

I left the trace print code in so you can observe its operation.


See the comments in teh code for the changes I made to cookbook-scroller.r

Now to try it with my own form.

;; ==============================================
rebol ["cookbook-scroller-2-1.r"
       author "Brett Hallett 2008 "
	comment  { 

    Modified  cookbook-scroller.r program  to code automatic scrolling 
    of fields on TAB,

    allows the form to have fields off the viewable page and automatically 
    scroll up/down 
	   as the user leaves a field using TAB.

    -- display field position on TAB -- eg:  print  [ "f1 "  f1/offset] 
     ( for testing only !)

    -- scroll-panel-vert func modified with extra parameter  ( a fields 
    y offset )

    -- compute offset value before calling scroll-panel-vert in out: 
    layout ( stops scroller aborting !)
	  }
	 ]

 sub-panel: layout [
        across origin 5
        style label text bold right 60
        backcolor tan
        h2 leaf "Scrolling Sub Panel" return

        label "Name:" f1: field [ print  [ "f1 "  f1/offset]        scroll-panel-vert 
        p1 s1 f1/offset/y ] return

        label "Email:" f2: field  [ print  ["f2 " f2/offset]          scroll-panel-vert 
        p1 s1 f2/offset/y ] return

        label "Info:" f3: area wrap [ print  ["f3 " f3/offset]     scroll-panel-vert 
        p1 s1 f3/offset/y ] return
	

  label "More info: " f4: field [ print  ["f4 " f4/offset]      scroll-panel-vert 
  p1 s1 f4/offset/y ] return

  label "Even more ;" f5: field [ print   ["f5 " f5/offset ]  scroll-panel-vert 
  p1 s1 f1/offset/y 
							print "write collected data"
							clear-fields sub-panel ] return

  ;; notice how the first field offset is used to set the scroll position 
  on last field exit
	 
        button "Submit" [ print "Press Submit "]
        button "Cancel" [ print "Quit" quit]
    ]

    out: layout [
    
        across
        h3 "Panel Scrolling Example" return
        space 0
        p1: box 300x300 coal frame black

        s1: scroller 16x300 [scroll-panel-vert p1 s1  ( s1/data * (max 0 
        p1/pane/size/y - p1/size/y)) ]
				;; compute offset value before calling scroll-panel-vert
        return
        s2: scroller 300x16 [scroll-panel-horz p1 s2]
        return

    ]

    p1/pane: sub-panel


;; scroll-panel-vert modified with extra parameter : fldoffset ( 
the y offset of the TAB'ded out of field )
      scroll-panel-vert: func [pnl bar fldoffset][
        pnl/pane/offset/y: negate fldoffset
	 print ["pnl-vert " pnl/pane/offset/y]
        show pnl

    ]

    scroll-panel-horz: func [pnl bar][

        pnl/pane/offset/x: negate bar/data * (max 0 pnl/pane/size/x - pnl/size/x)
        show pnl
    ]

    update-panel: func [pnl vbar hbar] [
        pnl/pane/offset: 0x0
        s1/data: s2/data: 0
        vbar/redrag pnl/size/y / pnl/pane/size/y
        hbar/redrag pnl/size/x / pnl/pane/size/x
        show [pnl vbar hbar]
    ]
   
    update-panel p1 s1  s2
     view out
BrettH:
11-Aug-2008
Nitt Picker !!  But you right its a bit clunky at the moment, its 
only saving grace its that the data entry field remains in a static 
position !! :-)
BrettH:
16-Aug-2008
I had another look at the scroller problem, and I'm beginning to 
see that it really does not work !
eg:

 == the scroll bar does not 'follow' the offset in the pane even when 
 its new position is calculated and set

        == does not seem to be anyway to adjust the size of the moving bar 
        itself. Unable to find any documentation.

 == even with calculating the length of the (sliding) form against 
 its (viewable) panel length, 
           the offset 'action' for TAB 

           is not consistent in that the last form field is not always viewable 
           by the tab action 

           -- seems to be dependent upon the relationship between form length 
           and panel size which you can adjust manually 

              but thats hardly a useful solution. When you add a field the whole 
              scroller stops working. ( Flaky !)
        == pretty disapointing really.


Whats needed is a scroller that can be defined to operate with any 
pane and automatically following the field tabbing
in that pane without coding required. "Follow the source --Luke!"

Heres the latest code effort !

;;======================================================
rebol ["cookbook-scroller-2-11.r"
       author "Brett Hallett 2008 "
	comment  { 

    Modified  cookbook-scroller.r program  to code automatic scrolling 
    of fields on TAB,

    allows the form to have fields off the viewable page and automatically 
    scroll up/down 
	   as the user leaves a field using TAB.

    -- display field position on TAB -- eg:  print  [ "f1 "  f1/offset] 
     ( for testing only !)

    -- scroll-panel-vert func modified with extra parameter  ( fields 
    y offset )

    -- compute offset value before calling scroll-panel-vert in out: 
    layout
	   -- move trace to func print-pos for easier modification
	  }
	 ]

 sub-panel: layout [  size 300x350
        across origin 0
        style label text bold right 60
        backcolor green
        h2 leaf "Scrolling Sub Panel" return

        label "Name:" f1: field       [ print-pos   "f1 " f1/offset   scroll-panel-vert 
        p1 s1 f1/offset/y ] return

        label "Email:" f2: field        [ print-pos   "f2 " f2/offset   scroll-panel-vert 
        p1 s1 f2/offset/y ] return

        label "Info:" f3: area 199x115 wrap  [ print-pos  "f3 " f3/offset 
          scroll-panel-vert p1 s1 f3/offset/y ] return
	

  label "More info: " f4: field   [ print-pos   "f4 " f4/offset   scroll-panel-vert 
  p1 s1 f4/offset/y ] return

 ;;  label "More info: " f41: field   [ print-pos   "f41 " f41/offset 
   scroll-panel-vert p1 s1 f41/offset/y ] return

  ;;label "More info: " f42: field   [ print-pos   "f42 " f42/offset 
    scroll-panel-vert p1 s1 f42/offset/y ] return

  label "Last  ;" f5: field [ print-pos   "f5 " f5/offset   scroll-panel-vert 
  p1 s1 0 
							print "write collected data"
							clear-fields sub-panel ] return 

 ;; notice how the  offset of zero is used to set the scroll position 
 to top of form on last field exit
	below
	pad 5
	below
    ]

btn-panel: layout [
        across
	 button "Submit" [ print "Press Submit "]
        button "Cancel" [ print "Quit" quit]
	]
	
main-form: layout [
        across
        h3 "Panel Scrolling Example" return
        space 0
        p1: box 	  300x250 coal frame black

        s1: scroller 16x250 [scroll-panel-vert p1 s1  ( s1/data * (max 0 
        p1/pane/size/y - p1/size/y))  ]
				;; compute offset value before calling scroll-panel-vert
        return
	  p2: box 300x50

    ]
 
print-pos: func [ fld pos ] [ print ["print-pos: "  fld  pos]]


;; scroll-panel-vert modified with extra parameter : fldoffset ( 
the y offset of the TAB'ded out of field )

scroll-panel-vert: func [pnl bar fldoffset][
	
	;; print [ "slider:" ( (max 0 p1/pane/size/y - pnl/size/y))]

        if fldoffset < ( (max 0 p1/pane/size/y - pnl/size/y))  [ pnl/pane/offset/y: 
        negate fldoffset ]
	
	;; print ["pnl-vert " pnl/pane/offset/y  fldoffset]
        show pnl

    ]

update-panel: func [pnl vbar  pnl2] [
        pnl/pane/offset: 0x0
        s1/data:  0
        vbar/redrag pnl/size/y / pnl/pane/size/y
        pnl2/pane/offset: 0x0
        show [pnl vbar pnl2]
    ]
   
    p1/pane: sub-panel
    p2/pane: btn-panel
   
    update-panel p1 s1  p2
  
    view main-form

;; ==========================
Anton:
18-Aug-2008
amacleod, the "selected text prevents scrolling in scroll-panel" 
problem is not the fault of scroll-panel.

demo-scroll-panel.r shows this problem because I didn't want to make 
it too complex, by including the necessary global event handler to 
handle scroll events on non-focused scrolling faces (such as scroll-panels). 
I do have a demo somewhere which has the necessary global event handler 
somewhere... at least style-gallery.r uses it.
Anton:
18-Aug-2008
Are you developing specifically for Windows ? (I just found a bug 
in scroll-wheel-handler.r on linux.)
Anton:
18-Aug-2008
Ok, very good. :)

I thought I might try to analyse the Cyphre's tree + Anton's scroll-panel 
problem you spoke of before.
Did you just happen to make a minimal demo showing the problem ?
amacleod:
18-Aug-2008
I got tree wiget to work but I had to include cypher's scroll panel 
as well. The problem with his slders not rendering I just realized 
was probably due to my not including his other stlyes he uses to 
raw the arrows etc.

Unless you mean to get tree widget to use your style it was just 
a nameing problem if i remembr correctly. 

I went with a different solution and I am no longer using tree widget 
for he app.
Anton:
18-Aug-2008
Ok, you've found another solution for now, but it's still interesting 
to me if there is a problem mixing styles from different authors. 
This 'should' (ought to) be possible without any conflict.
Anton:
18-Aug-2008
In style-gallery.r, if you go to Global Options / Handlers, you can 
enable / disable each of the global event handlers (by pressing a 
toggle button) to see the effect on the user interface dynamically.
Henrik:
18-Aug-2008
I didn't yet study which face directly to set. I assume the text 
area is inside a pane?
Henrik:
18-Aug-2008
the blank area in the bottom right shows a default gray color. the 
color there should probably be none to respect the background.
xavier:
18-Aug-2008
anton i got a problem, it says user-prefs has no value
Anton:
18-Aug-2008
It sounds like you're running a version of View without user prefs, 
or with --noinstall or something (check command line invocation).
amacleod:
19-Aug-2008
Anton,  I notice in your demo-scroll-wheel-handler.r if I add some 
text to the scroll-panel itself (not in a scroll-area) teh scroll 
wheel continues to work but you loose page down.up and arrow key 
function. I guess it looses focus. If you click on hte panel you 
get it back.

Is there a way to retain it without needing to manually resetting 
it?
amacleod:
20-Aug-2008
On anoher note...

Anyone know of any good examples of colorizing (highlighting) sections 
of text within a face. The word browser mentions caret-to offset 
and offset-to-caret being used to map text and creating colored or 
hyperlinked text but the example does not seem to be what I'm looking 
for...
Anton:
20-Aug-2008
amacleod, do you mean adding a TEXT like this:
	scroll-panel [
		text "hello"
	]
and clicking on the text?

The TEXT gains the focus (and can be selected and copied etc.), but 
since the scroll-panel no longer has the focus it doesn't get arrow 
keys etc.
You could make the TEXT inactive by setting its FEEL to none:
	scroll-panel [
		text "hello" feel none
	]

or you could modify its feel to route particular keys such as page-up/page-down 
and arrow keys to the scroll-panel it's in.
	text "hello" feel [
		append last last second :engage bind [
			if find [up down page-up page-down] event/key [

    face/parent-face/parent-face/parent-face/feel/engage face/parent-face/parent-face/parent-face 
    act event
			]
		] first find second :engage 'act
	]
Not particularly easy, but there you go.

I have thought about this issue before, but didn't come up with a 
clear vision of how to handle it properly yet, I think.
amacleod:
20-Aug-2008
Anton, yes that is the issue...


If you add a "feel none" you can no longer highlight and save to 
clipboard which is what I need.

Your more elaborate 'feel' provides the correct action but is there 
a way to make this global or would I need to attach this feel to 
each set of text in a panel?
Anton:
20-Aug-2008
You could easily restylize text, in a single layout spec, like so:
	layout [
		style text text feel [
			; (feel definition as above..)
		]
	]
or for all subsequent layouts:
	stylize/master [
		text: text feel [	
			; (feel definition as above)
		]
	]
Anton:
20-Aug-2008
Note that the feel I've provided above is hardly a general solution. 
It's likely to work only with my scroll-panel as it depends on knowledge 
of scroll-panel internals to do its work. It's a quick hack.
kcollins:
23-Aug-2008
When you double click the file icon on the Desktop, Linux knows exactly 
what file you want to run. When you try to run something from the 
command line, Linux first looks to see if it is a command built in 
to the shell (bash), and then looks for it in each directory in your 
PATH environment variable. Typically, the current directory - "." 
- is not included in the PATH when you install Linux.
kcollins:
23-Aug-2008
You can also specify the location of an executable by an absolute 
or relative path. An absolute path starts at the root, such as /home/kcollins/rebview. 
A relative path is in relation to the current directory. So "./rebview" 
tells the shell to find the executable in the current directory.
kcollins:
23-Aug-2008
Do you have a 32 bit or 64 bit CPU?
kcollins:
23-Aug-2008
I believe the Linux version of REBOL uses a libc6 shared library 
by accessing a specific file at a specific location. By putting a 
64 bit version of that file there, they managed to get it to work. 
I may not have the details quite right, but it was something like 
that.
amacleod:
26-Aug-2008
When opening another  window from within a rebol app via view/new 
is there a way to insure the new window stays on top until closed 
(and perhaps keeps focus so the parent window can not be manipulated?)
amacleod:
26-Aug-2008
thanks.

I thought I saw something the other day talking about keeping a window 
on top but that might have been a face on top...
Graham:
26-Aug-2008
don't use inform ... that will give you a modal window
amacleod:
26-Aug-2008
I always hit a wall with vid.
Most of my gui's need more than vid gives us.
Graham:
26-Aug-2008
VID allows you to setup a basic GUI.  If you need more advanced stuff... 
you need to use View.  That is the problem that Vid3.4 in R3 is going 
to address ( I hope )
amacleod:
1-Sep-2008
Anyone have a few examples on using choose function. I've looked 
at "word borwser" but it does not say much on the refinements...
amacleod:
2-Sep-2008
Is there a way to hold user data in a face. I see a data attribute 
but is htat only for information about the face or can it be used 
to store variables that can be retrieved?
amacleod:
2-Sep-2008
given data dat how do I store it in button_a and retrieve it?
dat: "Bob"
button_a: btn "hello"
ICarii:
2-Sep-2008
button_a: btn "hello" with [data: dat]
ICarii:
2-Sep-2008
so button_a/data will be for the post build access
amacleod:
2-Sep-2008
ok...
Got it...Thanks

I'm building a panel dynamicaly and need to assign data to the face 
as its being built. 
I was not sure of the format: of the with refinement.
amacleod:
2-Sep-2008
back to choose function...
can't get the styl attribute to work. 

If I want my choose menu to be a certain width what syntax do I use?

choose/offset/styl ["One" "Two" "Three"] func [face] [print sec] 
'offset' size = 200] ????
amacleod:
2-Sep-2008
Anton,
That works great..Thanks again.

I was looking for syntax where you describe the layout in hte function 
but I guess that's not how its done. 

Funny how I only saw one example of using choice as a drop down menu 
system. It works perfect for what I need witout hte any bloat. (unless 
you need sub-menus this is fine.

You can even leave out hte window refinement and the menu will drop 
outside the main window. Perfect for when you have a need for a menu 
at the bottom of a window.
Anton:
2-Sep-2008
But note, currently in linux, on KDE at least, the popup window has 
a title bar and borders... A limitation of rebol at the moment.
Louis:
5-Sep-2008
Does ToSystemTray work on a  Linux box?
Henrik:
27-Sep-2008
neat. I'm looking at it through a 256 color remote desktop. Is there 
supposed to be a darker box around the arrow? Maybe it's just an 
artifact of my remote desktop.
Brock:
27-Sep-2008
Anton, that's a great style.
Brock:
27-Sep-2008
Graham, forgive me if I am wrong but I recall you made a simple draw 
program with annotations and undo feature.  Did you ever publish 
it?
Anton:
27-Sep-2008
Henrik, I can't figure out the reason for the "'push has no value" 
error you got above. I had an issue with 'push in some other code 
of mine (dir-utils.r, I think), but there's apparently no push in 
any of the dependencies of text-facet-rendering.r.  The only thing 
I can think of is that some files are out-of-date, or perhaps you 
didn't start with a fresh rebol ? What version did you try running 
? I've tested on View 2.7.6.4.2 and 2.7.6.3.1 on linux.
Anton:
27-Sep-2008
My .... memory is getting worse. This was a dependency bug I caught 
and fixed just 7 days ago. :)
Please try:
amacleod:
1-Oct-2008
Is there a way to append an image object (a box for example) to a 
face that has already been displayed. I'm looking to get  simple 
highlight functionality in an app in which a string is scanned for 
in a series of text faces. 


I've been  able to highlight the search word in each face but if 
I click in any of the text faces the face looses the highlight effect 
sort of like loosing focus on normal highlighting. 
I would like the highlight to remain until no longer needed.
amacleod:
1-Oct-2008
The string is meant to be a search keyword which can change. No predicting 
what one might seach for...
amacleod:
1-Oct-2008
What I got working:

rebol []
pad: 20x30
window: layout [
	bx: box red 0x0
	panel: panel [

  text 400 "Here is a simple example how to use DRAW dialect for into 
  alpha channel of the image. I think with the function make-alpha 
  (bellow in the example) you can draw almost any kind of transparent 
  shape though it is not the fastest method....IMO the possibility 
  to use DRAW pens for alpha channel should be done at Rebol's native 
  level"

  t: text 400 "Here is a simple example how to use DRAW dialect for 
  e-alpha (bellow in the example) you can draw almost any kind of transparent 
  shape though it is not the fastest method....IMO the possiinto alpha 
  channel of the image. I think with the function make-alpha (bellow 
  in the example) you can draw almost any kind of transparent shape 
  though it is not the fastest method....IMO the possibility to use 
  DRAW pens for alpha channel should be done at Rebol's native level"

  text 500 "can draw almost any kind of transparent shape though it 
  is not the fastest method....IMO the possibility to use DRAW pens 
  for alpha channel should be done at Rebol's naHere is a simple example 
  how to use DRAW dialect for into alpha channel of the image. I think 
  with the function make-alpha (bellow in the example) you can draw 
  almost any kind of transparent shape though it is not the fastest 
  method....IMO the possibility to use DRAW pens for alpha channel 
  should be done at Rebol's native level"]

button "Highlight" [foreach face panel/pane [if face/style = 'text 
[
	system/view/focal-face: face

 system/view/highlight-start:  find face/text "into alpha channel 
 of the image"

 system/view/highlight-end: find/tail face/text "into alpha channel 
 of the image"
	show face
	]]]
button "Paint" [foreach face panel/pane [if face/style = 'text [
	;system/view/focal-face: face
	keyword: "transparent"

 ;xy: caret-to-offset face system/view/highlight-start: find face/text 
 k

 ;yx: caret-to-offset face system/view/highlight-end: find/tail face/text 
 k
	xy: caret-to-offset face find face/text keyword
	bx/offset: face/offset + pad + xy 
	bx/size: as-pair (5.9 * length? keyword) 15
	show face
	;unfocus face
	;wait 1
	]]]

]
view window
amacleod:
1-Oct-2008
The first button hilights a string.
The second button "paint" the string in red.

The last painted string in hte last face remains when  clicked in 
the face but the others disappear when clicked. How can I prevent 
that from happening?
Henrik:
1-Oct-2008
if possible, you should append faces in a pane that belongs to the 
text face. you can do that as you want. it's only a matter of regular 
block manipulation and then SHOWing the text face again.
Anton:
4-Oct-2008
Pekr, yes. That is a View rendering bug, not a bug of arrow360 in 
particular.
Anton:
4-Oct-2008
A quite old bug, if I remember correctly.
Henrik:
12-Oct-2008
I'm toying around with a VID dialect for postscript. I've done that 
by copying the VID source for LAYOUT, STYLIZE and all related functions 
in the SYSTEM/VIEW/VID. So far so good, but now I want to implement 
styles, so I can write some layouts and am wondering what the formal 
way would be to add the very first style in what is equivalent to 
SYSTEM/VIEW/VID/VID-STYLES ?
Anton:
13-Oct-2008
Hmm.. interesting. Do you have a base object (eg. similar to svv/vid-face 
?)
Anton:
13-Oct-2008
Not familiar with postscript, I am wondering why you couldn't just 
make a function "to-postscript" that accepts a face argument (similar 
to to-image), instead of reimplementing all of VID.
Henrik:
13-Oct-2008
yes, I have a base face similar to vid-face. I even added it to the 
style list manually to see if that would work, but it doesn't.
Anton:
13-Oct-2008
I suppose you would be cloning face/color, face/text, face/edge rendering 
(whatever you need first) at a simple level, and gradually improving 
it towards perfection afterwards.
Henrik:
13-Oct-2008
I've already fixed top/middle/bottom alignment. Text is placed a 
couple of mm too far to the right.
Henrik:
13-Oct-2008
text wrapping is a different problem...
Henrik:
13-Oct-2008
Remembering from amacleod's multi-highlight problem, detecting where 
wraps are in a text box might be buried in some natives that we can't 
get to.
Henrik:
13-Oct-2008
thanks, I'll have a look
Henrik:
13-Oct-2008
so you essentially rebuild caret-to-offset as a mezzanine?
Graham:
14-Oct-2008
so this produces a single page of postscript?
Henrik:
14-Oct-2008
but it's quite possible that I could deliver a block of layouts...
Graham:
14-Oct-2008
that's what I do at present ... I have a block of layouts
Graham:
14-Oct-2008
and then i generate a single page of postscript from all the layouts
Henrik:
14-Oct-2008
a single page from multiple layouts?
Graham:
14-Oct-2008
inefficient to produce a single postscript file for each layout
Graham:
14-Oct-2008
My method is because I have a single document that goes over many 
pages
Graham:
14-Oct-2008
Anyway, excellent way to get a screen print of a View layout
Henrik:
14-Oct-2008
it's almost stupidly simple. :-) it's one of those things I wish 
I came up with 2-3 years ago. could have saved a lot of work. the 
secret is just to slavishly follow the offsets and sizes already 
generated with VID or RebGUI.
Henrik:
14-Oct-2008
we don't have finer type setting features, but I can live with that, 
as long as I have a simple and quick way to build postscript pages.
40501 / 6460812345...404405[406] 407408...643644645646647