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

World: r3wp

[View] discuss view related issues

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...
Ammon
14-Mar-2005
[617]
Yes it does.
Graham
14-Mar-2005
[618]
yeah, wraps to another line that you can't see
Robert
14-Mar-2005
[619]
I try it... just a moment.
Chris
14-Mar-2005
[620x2]
Add this to your text-list:
with [append init [iter/para/wrap?: false]]
Robert
14-Mar-2005
[622x2]
Ammon, nice effect: It doesn't update at all :-)) I have to click 
into the text-list than it updates. But the long line is still missing.
But I don't want to wrap it. I just want to see as much as possible 
with the rest being clipped.
Ammon
14-Mar-2005
[624x2]
Did you show it after you updated it?
Try the code Chris gave...
Robert
14-Mar-2005
[626]
Now it updates but no long line. I try Chris' code. Need to go, sorry. 
Bye.