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

World: r3wp

[View] discuss view related issues

Ingo
2-Mar-2006
[4305]
Is there anything I can do about the "no 'wait in view handlers" 

I try to use an sqlite call in a button, but sqlite uses wait internally 
...
Volker
2-Mar-2006
[4306x2]
a few nested waits are usually no problem. maybe
sqliting?: false
..
button [

 either sqliting?[alert "sqliting already"][sqliting?: true sqlite 
 sqliting?: false]
]
;if your user clicks very fast.
hmm, the alert adds another wait, view/new?
Ingo
2-Mar-2006
[4308]
My script looks like this

view layout [
   title "Address"
   across
   name-list: list 300x400 [
      text bold 400 [

         person-info: first sql rejoin [{select * from person where guid like 
         "%} face/user-data {%";} ]

         ;person-info: ["1" "ingo" "hohmann" "static test" "" "" ""]
         vals: get person-disp

         repeat i length? person-info [insert clear vals/:i person-info/:i]
         show w
      ]
   ]
   supply [
      count: count + cnt
      face/color: ivory
      face/text: none
      if even? count [face/color: ivory - 50.50.50]
      if none? v: pick list-data count [exit]
      face/text: reform [pick v 4 "-" pick v 2 pick v 3]
      face/user-data: pick v 1
   ]
   sld: slider 16x400 [
      c: max 0 to-integer (length? list-data) * value
      if c <> cnt [cnt: c show name-list]
   ]
   w: box 400x400 with [pane: layout address/make-person-lay]
]


If I click on a list entry, it's like all other entries are removed 
from the list. Wherever I click I always get the same entry, if I 
move the mouse over the list, all other lines are emptied when the 
mouse moves over them.
Using the static test-data everything warks fine
Anton
2-Mar-2006
[4309x4]
I don't think this is an sql problem, but a list problem.
(and also not a problem of WAIT)
I suspect your INSERT CLEAR may be causing a problem.
What's person-disp ?
Ingo
2-Mar-2006
[4313]
person-disp is an object, which contains the strings to be displayed 
in my layout.
Anton
2-Mar-2006
[4314]
Ok.
Ingo
2-Mar-2006
[4315x2]
I get data from the database, copy it into person-disp.
with doing clear insert  the string keeps bound to the layout
Anton
2-Mar-2006
[4317]
I now don't think that's where the problem is occurring. Will make 
a stripped down list.
Ingo
2-Mar-2006
[4318]
I just tried adding a wait in there, and it still works. So you are 
right, it's not the wait ...
Anton
2-Mar-2006
[4319x5]
It's a string copying issue somewhere.
What happens when you copy/deep person-info ? eg.  person-info: copy/deep 
first sql ....
I couldn't reproduce the problem with this:
list-data: [
	["" "hello"]
	["" "there"]
	["" "Ingo"]
	["" "Hohmann"]
]
cnt: 0
view layout [
   title "Address"
   across
   name-list: list 300x400 [
      text bold 400 [

         ;person-info: first sql rejoin [{select * from person where guid 
         like "%} face/user-data {%";} ]

         ;person-info: ["1" "ingo" "hohmann" "static test" "" "" ""]
         ;vals: get person-disp

         ;repeat i length? person-info [insert clear vals/:i person-info/:i]
         ;show w
      ]
   ]
   supply [
      count: count + cnt
      face/color: ivory
      face/text: none
      if even? count [face/color: ivory - 50.50.50]
      if none? v: pick list-data count [exit]
      face/text: reform [pick v 4 "-" pick v 2 pick v 3]
      face/user-data: pick v 1
   ]
   sld: slider 16x400 [
      c: max 0 to-integer (length? list-data) * value
      if c <> cnt [cnt: c show name-list]
   ]
   ;w: box 400x400 with [pane: layout address/make-person-lay]
]
So the problem must occur in the commented sections somewhere.
Ingo
2-Mar-2006
[4324x2]
The same as without copy/deep.
It only occurs when I use the call to sql. And it occurs even if 
I don't use the data returned, e.g. if I add the static data in the 
second person-info: [] line.
Janeks
2-Mar-2006
[4326]
How the Rebol uses default fonts for f.ex. buttons?
Henrik
2-Mar-2006
[4327]
are you trying to change the font?
Janeks
2-Mar-2006
[4328x3]
I am trying to understand why my font encodings is diffrent on my 
job laptop and on my home desktop. Both have the same OS - WinXP. 
Rebol script is the same sitting on the webserver. I did not specified 
any specific font in my script.

I did not find yet anything in docs about what is responsible for 
font encoding.
What I found with AnaMonitor is that arial font is used. 

But it seams that problem is not there. I just downloded that script 
localy and it looks like encoding is changed in script by downloading 
but not font encoding paramer !?

But why it changes when I am downloading to my desktop but not -when 
to my laptop?
O'k I found it - and of course it was not a problem in Rebol.

Somehow I had changed setting Language for non-Unicode programs in 
Regional and Language options Advanced tab.
[unknown: 10]
2-Mar-2006
[4331]
Is there a default uptodate MS-Windows /VID somewhere for view? I 
want to skin /view to be MSWindows.. I know there was once a windows 
skin but was it Win95?
Pekr
3-Mar-2006
[4332x3]
a bug? view layout [ch: choice 100 "a" "b" "c"  btn "zmen" [set-face 
ch "c" show ch]]
face/text is not set in set-face for choice ....
has anyone actually tested particular functions?
Henrik
3-Mar-2006
[4335]
I don't think proper accessors have been made for all the faces yet. 
I know that BOX doesn't work
Pekr
3-Mar-2006
[4336x3]
so why they were included at all, if not finished? :-)
it is not stable release then, but half-implemented ... I got now 
my rebol friend really pissed and I feel for him ;-)
so VID has definitelly issues ... and we are still waiting for "to 
be soon made announcement (tm September 2005)" about what's the plan 
for VID ...
Henrik
3-Mar-2006
[4339x3]
well, it's not hard to implement your own accessors
copy them from another face
correction: "it's not hard" => "it's not hard if you know what you 
are doing" :-)
Pekr
3-Mar-2006
[4342]
I know - it is just that View 1.3.2 is regarded being a stable release 
.... but the thing is, you really can't depend upon proper style 
behavior ... it is really tiresome to still "debug" VID ....
Henrik
3-Mar-2006
[4343]
there's a million things wrong with VID, but right now there isn't 
much to do but work around it
Pekr
3-Mar-2006
[4344x2]
but that is really painfull .... I think some ppl would give-up VID 
freedom for consistency ....
then your work is turning into debuggin and finding workarounds, 
instead of concentrating upon development .... I am not sure other 
toolkits as Qt are so inconsistent ....
Henrik
3-Mar-2006
[4346x3]
the thing is: what can we do about it right now? not much, other 
than either wait, or come up with sneaky solutions on our own. some 
did a solution and made RebGUI. I made LIST-VIEW, because I needed 
it and that's really the only way forward. Carl can't work on 50 
things simultaneously (or can he?) and designing a new VID, I don't 
think Carl can do that in an afternoon.
This is what we have now, and we better make best use of it, no matter 
the shortcomings
besides: read Announce and see if there are some critical VID bugs 
not in RAMBO
Pekr
3-Mar-2006
[4349x3]
well, but that is new info to me, that accessors are not finished, 
yet they are used internally ...
now to do what? report new bug, or to check all styles?
besides that, I have issues with accessor's design anyway :-)
Henrik
3-Mar-2006
[4352]
yep, it's not perfect
DideC
3-Mar-2006
[4353]
Carl is calling for bug to fix and (if possible) the fix for it for 
View 1.3.3.

I f you want it to be solved in next relase, just take some time 
to investigate and implemented missing accessors as you want them 
to work.

I dislike people who just go voting (half an hour) and complain during 
five years against their candidate.
On est jamais mieux servi que par soi même
Pekr
3-Mar-2006
[4354]
accessors should not be introduced if not finished, period ....