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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Volker
13-Jul-2006
[4485x2]
for an iterated face.
usually the function is put in face/pane. but "face/pane: reduce[:iter-func]" 
works too AFAIK., that would crash 'into-widget because "tabbed? 
child" would now call it.
Graham
13-Jul-2006
[4487]
nothing fancy in my screen
Volker
13-Jul-2006
[4488]
but thats a theoretical possibility. the code does not look like 
it.
Graham
13-Jul-2006
[4489x2]
that's not Ashley's code ..
that was added by someone else to allow tabbing out of group-boxes
Volker
13-Jul-2006
[4491x3]
is the error always in 'into-widget ? Or could it be indirect recursion 
and we have to look somewhere else too?
its not the cvs-version?
svn..
Graham
13-Jul-2006
[4494x2]
Isn't it?
That's where i got it from.
Volker
13-Jul-2006
[4496]
ok. i read "its not ashleys code", thought its from somewhere else.
Graham
13-Jul-2006
[4497]
Yes, it is in the svn
Pekr
13-Jul-2006
[4498x2]
just talking to Cyphre on icq - he will look into problem - he thinks 
there is overall problem with iterator in rebgui ... he tried to 
fix inside/outside drop-list parameter, so now it works, but in outside 
mode it looses hilite .... he will look into it, once he produces 
newer grid update for me ...
he also asks for eventual code example, if there is any, to being 
able to reproduce the problem ...
Graham
13-Jul-2006
[4500x2]
unless find [object! block!] type?/word get in face 'pane [      
       ; [che] -- An iterated faces may of course be tabbable, too. 
I don't handle this case for now, though.  

            return none                                                      
               ; [che]

        ]                                                                
               ; [che]
how does this code work?
Volker
13-Jul-2006
[4502]
looks in the pane and allows only object! and block!. on other things 
it returns none. especially on functions, thats why it uses 'get.
Graham
13-Jul-2006
[4503x2]
needs to be rewritten to be a non recursive function
or perhaps to pass the recursion count so it can exit gracefully...
Volker
13-Jul-2006
[4505x2]
its called from 'next-field too. That recurses too. looks a bit suspicious 
to me at first read. but then the error-m,essage should sometimes 
show it and not always bail out on 'into-widget IMHO.
the face-tree is recursive, so is the function.
Graham
13-Jul-2006
[4507]
and back-field
Volker
13-Jul-2006
[4508]
WHat looks suspicious is: it goes thru the parent-face. but it does 
not exclude the current face.
Graham
13-Jul-2006
[4509x4]
any quick fixes you can  suggest ?
** Internal Error: Stack overflow
** Where: into-widget
** Near: unless find [object! block!] type?/word get
** Press enter to quit...
Got it again.
it happened after I returned to the window after closing another 
window down.
Volker
13-Jul-2006
[4513x2]
Maybe

         unless wrap [siblings: find/tail siblings face]                  
                
->

  either wrap [siblings: head remove find siblings ]  [siblings: find/tail 
  siblings face]
but that is guessing
either wrap [siblings: head remove find siblings face]  [siblings: 
find/tail siblings face]
Graham
13-Jul-2006
[4515]
Maybe I need to make sure I set the focus when I return to the window
Volker
13-Jul-2006
[4516]
needs copy..

either wrap [siblings: head remove find copy siblings face]  [siblings: 
find/tail siblings face
Graham
13-Jul-2006
[4517]
getting closer to reproducing it
Volker
13-Jul-2006
[4518]
resetting focus would be worth a try. or unfocus.
Graham
13-Jul-2006
[4519x3]
5 steps to reproduce
* Internal Error: Stack overflow
** Where: tabbed?
** Near: all [find tabbed face/type face]
** Press enter to quit...
Sorry, different message now
Volker
13-Jul-2006
[4522]
still stack-overflow. filled by lots of 'into-widget or whatever.
Graham
13-Jul-2006
[4523x4]
Try this .. download http://www.compkarori.com/emr/synapse.exe
click on the server button.
This pops up a VID window .. enter some text and then "Accept"
Now shift tab ..and boom!!!
Volker
13-Jul-2006
[4527]
need to reboot windows. cu
Graham
13-Jul-2006
[4528x4]
The problem appears to be that no widget has focus
yet the shift-tab key is processed as though there is ....
Rebol []

do %rebgui.r
user: "Guest"

display "Test" compose/deep [
	field (user) return
	field return
	radio-group data [ 2 1 2 3 ] return

 button "Server" [ inform layout [ field "Type here" button "OK" [ 
 hide-popup ]]]
]
do-events
1. Highlight the first text field
2. Click on the "server" button
3. Highlight the "type here" field to give focus
4. Click on the "OK" button
the rebgui no longer has focus.
Now do tab .. and it crashes with a stack overflow.
Pekr
13-Jul-2006
[4532]
posted to Cyphre on icq ...
Volker
13-Jul-2006
[4533]
Yep, reproducible.
Graham
13-Jul-2006
[4534]
The radio-group is redundant to the example.  You can remove it.