World: r3wp
[View] discuss view related issues
older newer | first last |
Chris 7-Mar-2005 [567] | ; Yep, 'merge instructs the effects engine to compose effects using underlying faces: dots: http://www.ross-gill.com/r/grid-teal.png img: http://www.ross-gill.com/r/find-file.png view center-face layout [ backtile dots image img image img effect [blur blur blur] image img effect [merge blur blur blur] ] |
DideC 7-Mar-2005 [568x3] | 'merge was added in 1.2.8 or 1.2.10. It was by default in 1.2.1 AFAIK |
'fill : to fill a form view layout [box 100x100 effect [draw [pen 255.0.0 fill-pen 0.0.255 polygon 0x0 0x90 90x90 fill 50x50]]] | |
'activate-on-show : like the name said. There is different behaviour with it. I notice that on Win2k, the window come to front but don't take the window focus. sometimes, the window stay behind and just the task button blink (the current active window remain active). But on WinXP, the window become active and take the window focus. Very annoying when you are typing something. I use it to bring a window to top when there is something new (lecture-forum script). I don't w=know how it works on Linux. | |
Ashley 7-Mar-2005 [571] | merge (with Chris's example) behaves differently under 1.2.10 and 1.2.48 (later is correct) fill (DideC's example) dosen't seem to do anything (same result by removing the "fill 50x50" bit) |
DideC 7-Mar-2005 [572x4] | I know that fill is not working on AGG alpha version (problem due to antialias). On what version did you found 'fill not working ? |
what=witch | |
My example give different results : on 1.2.1, 1.2.8 and 1.2.10, fill is OK, but there is not the red line. on 1.2.48, it's ok | |
'min-size : I missed that. Nice thnigs to know :-) | |
Ashley 7-Mar-2005 [576] | Tried on both 1.2.10 and 1.2.48. Note that the lack of a red line on 1.2.10 is due to a known bug with polygon (fixed in 1.2.48). On 1.2.48 I can't see a difference between: a) view layout [box 100x100 effect [draw [pen 255.0.0 fill-pen 0.0.255 polygon 0x0 0x90 90x90 fill 50x50]]] b) view layout [box 100x100 effect [draw [pen 255.0.0 fill-pen 0.0.255 polygon 0x0 0x90 90x90]]] So I'm still not sure what 'fill is supposed to do. ;) |
Vincent 7-Mar-2005 [577] | same on 1.2.1 - DideC, are you sure it's not 'flood? in your example, it's specifing the fill-pen who fills the 'polygon (by default, fill-pen: none) |
DideC 8-Mar-2005 [578x2] | Yes, I'm wrong. 'fill is ignored on 1.2.8 and 1.2.48 : |
view layout [box 100x100 effect [draw [pen 255.0.0 fill-pen 0.0.255 polygon 0x0 0x90 90x90 fill 90x0]]] view layout [box 100x100 effect [draw [pen 255.0.0 fill-pen 0.0.255 fill 0x0 0x90 90x90 90x0]]] | |
Brock 8-Mar-2005 [580] | Not meaning to be a pest ;) , but I could really use some help with the problem I posted above (my latest posts). It's a problem with button text disappearing when using a rebol function. |
Chris 8-Mar-2005 [581x3] | You're correct -- it is 'clear-fields. When you set the text value for the 'application field, it comes directly from the face/text of the last clicked toggle button, ie. it is the same value. When you 'clear-fields the application field, it does 'clear on that value clearing the field and the last clicked toggle. A quick fix would be: if last-sgrp <> "" [application/text: copy last-sgrp] or if last-sgrp <> "" [change clear application/text last-sgrp] ; the latter retains the same string value for the application field... |
(I make that line 49...) | |
; A bonus tip -- each of the tog actions in dex-pane2 are essentially the same. You could clean up as follows: tog-action: [ write clipboard:// join "se sa**/" [ last-sgrp: face/text "ca datp/" get-report-date/delim ] ] dex-pane2: layout [ across label "Search Criteria:" t1: tog "o79" tog-action t2: tog "p23" tog-action t3: tog "o88" tog-action t4: tog "p11" tog-action ] | |
Anton 8-Mar-2005 [584] | Brock, check out the source of CLEAR-FACE, and you will see that it tries to do face/access/clear-face* , therefore you should look at the access object to see what it really does: layout [text with [?? access]] There, you will also see RESET-FACE, which would have also solved your problem because it does a COPY as well. I think COPYing to start with as Chris showed is a safer way, though. |
Brock 8-Mar-2005 [585x3] | Chris and Anton, thanks for taking a look and making the above suggestions. It looks like there is a simple solution mentioned by Chris and I will study the additional suggestions from Anton. Thanks again. |
I didn't get to code cleanup you suggested, but it was on my mind, I didn't want to post it that way - you caught me ;) | |
Chris, looking at your [change clear application/text last-sgrp] suggestion. I don't see any obvious reason I would want to use this method other than it being more REBOLish, and/or avoids falling into the trap of missing the 'copy statement. Can you please suggest why? | |
Anton 9-Mar-2005 [588x4] | When you press a tog, this happens: last-sgrp: t1/text Now t1/text and last-sgrp are pointing to the same string. When new-ticket is done, this happens: application/text: last-sgrp Now t1/text, last-sgrp and application/text are all pointing to the same string. |
These two examples show the difference more clearly: | |
view window: layout [ f: field b: button "clone me" [f/text: b/text show window] button "clear-fields" [clear-fields window show window] ] | |
view window: layout [ f: field b: button "copy me" [f/text: copy b/text show window] button "clear-fields" [clear-fields window show window] ] | |
Brock 9-Mar-2005 [592] | AntonThanks for providing further info on the use of 'copy in this situation. |
Anton 9-Mar-2005 [593x3] | No worries. Usually these problems are result of a missing COPY. The rule is; whenever you set a string, think if it could be modified by anything. |
(not just strings - all series! types actually) | |
Here is another small optimization: s: join rsd/year either delim [ ["/" two-digits rsd/month "/" two-digits rsd/day] ][ [two-digits rsd/month two-digits rsd/day] ] | |
Pekr 9-Mar-2005 [596] | http://www.opentv.com/onair/shopping/- kind of apps which View could excell at. Do you remember Gateway catalog demo? |
Chris 9-Mar-2005 [597] | Brock: where I am tempted to use 'copy, I'm often try and think of any potential benefits of using series modifiers instead. Depends on the situation I suppose... |
Guest 13-Mar-2005 [598] | howto: append a block to list (view) during runtime from a function. how can I address the data from the listobject ? |
Chris 13-Mar-2005 [599x2] | Is there a way to constrain the size of a Draw text object? eg. [pen black text 10x10 200x200 "My Text Here"] |
Guest: that depends on how you are using the List style as it is fairly open-ended. | |
Volker 14-Mar-2005 [601x3] | list or text-list? with list you keep your own data. with text-list append tl/data [lines] show tl/update IIRC |
size of draw-text: you want wrapping? afaik not. there is a complicated handmade way, you make a face of that size with 'wrap and use that to calculate the lines. | |
Max has a function to calculate the wrapping: http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlMYRC | |
Robert 14-Mar-2005 [604x3] | I have a text-list in a layout and I have a simple log-function: log: func [message [string! block!]][ append log-list/data rejoin [now/date "/" now/time " " message] show log-list ] |
If MESSAGE is longer than the width of the text-list MESSAGE isn't shown. Why this? The first two parts NOW/DATE and NOW/TIME are shown. | |
I expected that MESSAGE gets clipped | |
Graham 14-Mar-2005 [607x2] | yeah, but it doesn't. .it just gets dropped from the display |
That has been annoying me for some years. | |
Robert 14-Mar-2005 [609] | Hmm... is there a simple fix, patch available? |
Ammon 14-Mar-2005 [610] | I don't recall ever running into that specific problem before but I know that I've always done more than just SHOWing the text-list after updating its data... |
Robert 14-Mar-2005 [611] | Ok, that's a hint. So Ammon, what have you done? :-)) Shoot it? |
Ammon 14-Mar-2005 [612] | What version of REBOL are you using? |
Robert 14-Mar-2005 [613x2] | Link |
REBOL/Link 1.0.6.3.1 3-Aug-2002 | |
Ammon 14-Mar-2005 [615] | text-list/update |
Chris 14-Mar-2005 [616] | Sounds like a wrapping issue in the iterated faces... |
older newer | first last |