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

World: r3wp

[View] discuss view related issues

ChristianE
25-Apr-2010
[9791x2]
If you do not have/need text or if you display text only thru agg 
instead of face/text, you can hide the superfluous caret in R2/View 
by setting the face's para to to an origin like -100x-100.
That allows you to FOCUS such faces without having to care about 
caret.
Henrik
25-Apr-2010
[9793]
good tip
BudzinskiC
25-Apr-2010
[9794]
Works great, thanks :)
Anton
25-Apr-2010
[9795]
It should be enough to set the face/text to none.
BudzinskiC
25-Apr-2010
[9796x4]
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
Sorry for that, AltMe was acting up
Anton
25-Apr-2010
[9800x2]
What face or style do you base the face which displays your map on?
Ah - BOX.   print mold svv/vid-styles/box/text ;== none    but it's 
FOCUS which does more than necessary. Check the souce of FOCUS. I 
patched FOCUS so it doesn't have such presumptuous side effects.
BudzinskiC
26-Apr-2010
[9802]
Ah alright, I checked the value of face/text after I already used 
focus on it.
Henrik
26-Apr-2010
[9803]
Anton, nice one.
Graham
29-Apr-2010
[9804x2]
Where would this be coming from ?

    near: [if find [down alt-down] Â act]
    where: 'wake-event

where the original code is

        feel: make feel [
          engage: func [face act evt][
            if find [down alt-down] act [
              focus/no-show face/parent-face
              face/start: evt/offset
            ]
            if find [over away] act [
              face/offset: face/offset + evt/offset - face/start
              clamp face
              show face
            ]
          ]
        ]
It's from Henrik's code ...  but I can't see how something could 
modify the code !   Anyway I've trapped it ... so it's not a problem 
now.
Henrik
29-Apr-2010
[9806]
mine? which code exactly?
Graham
29-Apr-2010
[9807]
it's something you wrote that allows you to pan an image
Henrik
29-Apr-2010
[9808]
ok, the image-pan style?
Graham
29-Apr-2010
[9809x2]
yep
pan-image style
Henrik
29-Apr-2010
[9811]
if you look at that error, there is an extra char in there. it's 
possible that you can find it in the source code and delete it.
Graham
29-Apr-2010
[9812x2]
It's not there .. that's the worry!
so something is corrupting memory
Henrik
29-Apr-2010
[9814]
the char may be invisible. double-checked?
Graham
29-Apr-2010
[9815x3]
yes
Otherwise I'd get the error as soon as I ran the code right?
but it happens after I move the image around a bit
Henrik
29-Apr-2010
[9818]
I'm not sure. The problem is that there is a char which you on a 
mac can accidentally type when holding down alt while pressing space. 
the you get a hard-space char (I think it is). rebol doesn't handle 
it properly always, but it doesn't prevent code from loading.
ChristianE
29-Apr-2010
[9819]
The stray char looks fairly familiar. You're probably have problems 
with cp1252- and utf8-encodings?
Graham
29-Apr-2010
[9820x4]
Ok, let me delete the space and reinsert ...
plain vanilla code ..
Oh .. it's working!
maybe there was something odd invisible??
ChristianE
29-Apr-2010
[9824]
A hard-space then, just as Henrik said.
Graham
29-Apr-2010
[9825]
wonder why it only errors later on ...
ChristianE
29-Apr-2010
[9826]
A hard-space, this can be encoded by UTF-8 as 0xC2 0xA0, 0xC2 is 
#"Â".
Graham
29-Apr-2010
[9827]
Good to know
ChristianE
29-Apr-2010
[9828]
It loads, but is probably mistaken for a word with no value? What 
was the exact error message? Word has no value or so?
Maxim
29-Apr-2010
[9829]
i've had similar errors with PC control codes embeded in a script.
Thorsten
1-May-2010
[9830]
Need a little assitance with a choice button in layout. How might 
it be possible to assign a list of tables from db query to a choice 
button. The query is no problem.  But at the moment i see no way 
to use the result block in the layout definition of the choice button
Henrik
1-May-2010
[9831]
I'm not sure, but try this:

my-data: ["a" "b" "c"]

view layout [choice data my-data]

Entirely untested
Thorsten
1-May-2010
[9832]
Yes, it works. Do you know how this same block can be used to switch 
to according panels?? The current code is like this: 	choice 150x30 
silver edge [size: 1x1 color: orange] data tables [
    		switch value [
    			    "Panel 1" [panels/pane: panel1  show panels]
    				"Panel 2" [panels/pane: panel2  show panels]
    				"Panel 3" [panels/pane: panel3  show panels]	
						]
    		]
Henrik
1-May-2010
[9833x2]
I think that will work, yes, but I would probably do something like:

panel-list: ["Panel 1" panel1 "Panel 2" panel2 "Panel 3" panel3]


choice 150x30 silver data (extract panel-list 2) [panels/pane: select 
panel-list value show panels]
missing a 'get in front of the 'select there.
Thorsten
1-May-2010
[9835]
It seems to pick the right panels from the block, but when the choice 
is made the panel is not refreshed. Perhaps something with the show 
panels??
Henrik
1-May-2010
[9836]
did you add the 'get? otherwise the pane is just set to a word.
Thorsten
1-May-2010
[9837x2]
Yes!
like : choice 150x30 silver data (extract panel-list 2) [panels/pane: 
'get select panel-list value show panels]
Henrik
1-May-2010
[9839]
hoho... you added a lit-word! :-) you need to remove the '. I used 
'get to signify that it was a REBOL function. I should have used 
GET instead. Sorry.
Thorsten
1-May-2010
[9840]
Great, thats it. And, i think it is not your fault, maybe more my 
lack of understanding how lit-words are used in rebol.  Thanks a 
lot!