World: r3wp
[View] discuss view related issues
older newer | first last |
Louis 18-Oct-2006 [5842] | it = the included scripts |
Henrik 18-Oct-2006 [5843x2] | >> probe disarm try [load http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r] connecting to: www.lexicon.net make object! [ code: 800 type: 'user id: 'message arg1: {Error. Target url: http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r could not be retrieved. Server response: HTTP/1.1 404 Not Found} arg2: none arg3: none near: [load http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r] where: none ] just tested 10 seconds ago |
what does it say when you try that line? maybe it's a faulty proxy | |
Louis 18-Oct-2006 [5845] | Same error as you got. |
Henrik 18-Oct-2006 [5846] | ok, then the files are really gone |
Louis 18-Oct-2006 [5847] | >> exists? http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r connecting to: www.lexicon.net == false Looks like it. |
Anton 18-Oct-2006 [5848x6] | Henrik, thanks for trying. I could go through the usual rigmarole of determining the error (which is quite apparent to me from the above error message. That's my old website, at Lexicon.) *But* I am proud to announce a new include system !! Give this a try: |
head clear find site: select load-thru http://www.rebol.net/reb/index.r [folder "Anton"] %index.r do do-thru/update/args site/do.r [update "gui/style-gallery.r"] | |
The above code should *always work*, providing that I am able to maintain my most current website address at rebol.net . | |
It should work first time. When all is downloaded and run, all the needed files should exist in your cache. If you are happy with the cached version, and want to run directly from the cache, replace the second line with this one: do do-thru/args site/do.r [cache-only "gui/style-gallery.r"] | |
That's not quite right !!! | |
Use this code to check for newer versions and update your cache: head clear find site: select load-thru/update http://www.rebol.net/reb/index.r [folder "Anton"] %index.r do do-thru/update/args site/do.r [update "gui/style-gallery.r"] Use the code below when you are happy with the cached files you have and want to do those only: head clear find site: select load-thru http://www.rebol.net/reb/index.r [folder "Anton"] %index.r do do-thru/args site/do.r [cache-only "gui/style-gallery.r"] | |
Henrik 18-Oct-2006 [5854] | now it works. :-) very nice, anton |
Sunanda 18-Oct-2006 [5855] | Louis <What is the best way to submit this to RT?> Add it as an enhancement request to Rambo: http://www.rebol.net/cgi-bin/rambo.r And thanks for testing the code -- glad it worked.......One enhancemnet suggestion: you may not need the individual "show face" lines if you have a show layout-name at the end. |
Graham 18-Oct-2006 [5856] | Anton, your styles are looking better and better! |
Anton 18-Oct-2006 [5857x3] | Thanks... now that people can actually see it. :) |
Well, it's now over four and a half years since I began with include systems. The first version of the old include system was 17-Feb-2002. | |
I had another one in between which I didn't release. I think I tried to do too much with that one and it got hard to debug. | |
Louis 19-Oct-2006 [5860] | Sunanda, it has been submitted to rambo. Thanks again! |
Graham 19-Oct-2006 [5861x2] | when working with Vid data structures .. it makes sense to me to perhaps to create functions that act on a vid widget to be associated with that widget |
So, if you have a complex large program, you can keep all the functions that act upon/with a widget's data all in one place. | |
Maxim 20-Oct-2006 [5863] | do you mean like creating a style and specifiying the with block? view layout [ style button button with [ print-lbl: func [][print self/text] ] button "do" [face/print-lbl] ] |
Anton 20-Oct-2006 [5864] | (don't need the "self/" by the way). |
Maxim 20-Oct-2006 [5865x2] | I know it was just to make it explicit. |
;-) | |
Anton 20-Oct-2006 [5867] | ok |
Graham 20-Oct-2006 [5868x4] | Yes. |
and no. | |
Your example uses a style ... | |
You might have multiple functions that operate on the widget and you want to hide them as a type of context inside the widget | |
Maxim 20-Oct-2006 [5872] | you don't need to make a style for the with block. I just did this cause I thought you meant that you want the functions to be applied to a broad set of gadgets. this works directly: view layout [ button "do" [face/print-lbl] with [ print-lbl: func [][print self/text] ] ] |
Graham 20-Oct-2006 [5873] | Hmm. Interesting. |
Maxim 20-Oct-2006 [5874] | funny you didn't know about this after so many years of using REBOL ! |
Graham 20-Oct-2006 [5875] | are these functions exposed to the global context? |
Maxim 20-Oct-2006 [5876] | nope. |
Graham 20-Oct-2006 [5877x2] | well.. I'm not too familiar with vid |
Just know enough to get along .. most of the time! | |
Maxim 20-Oct-2006 [5879x2] | basically the with block is like when you supply a block to something like make face! [] |
or more specifically the call to make-face/spec | |
Graham 20-Oct-2006 [5881] | so, without the with they become anonymous functions |
Henrik 20-Oct-2006 [5882] | If the 'with isn't there, it would just be considered the alt-action block for the button. |
Graham 20-Oct-2006 [5883] | does Glayout use the same syntax ? |
Maxim 20-Oct-2006 [5884x8] | yes, I am a slavemaster to VID. |
I harness VID and let it layout like it should. ;-) | |
you could almost say I abuse it ;-) hehe | |
right now I am plugging liquid directly within. yet another layer of abuse... but it works. | |
actually, liquid is currently so tight, its trying to update the gadget before its even displayed... | |
cause it receives an event during the init. | |
is there a sure-fired way to know if a face is currently shown? I don't remember from the top of my head... anyone? | |
would checking for none? parent-face be sufficient? | |
older newer | first last |