[REBOL] Re: [unset] Memory optimization idea
Hi Ashley, AT> What I was hoping is that there might be an easy way to answer the AT> question, "Which words in the global context are not being used, and can AT> they be unset safely?". The best way is to get the SDK and only include the parts you need with the kernel of your choice. Barring that, I think the savings (aside from VID stuff--use Core or Base if you don't need it) is not worth the effort. "not being used" and "not being used _yet_" are very close but quite different. :) Please let us know if you've done any measurements to see how much memory you save with your efforts! -- Gregg -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: key events... hacking...
Hi Max, MOA> Does the return value indicate if the event should be passed MOA> along to the next event handler? or anything of the like... Yes. You are hooking into an event chain so you must return the event itself. e.g. insert-event-func func [face event] [ print [event/1 event/2 event/3 event/4 event/5 event/6 event/7 event/8] event ] Also, look into remove-event-func if you're doing more than simple single-shot View window stuff. -- Gregg -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Request File
Request-file in Rebol/View 1.2.1.3.1 uses a rebol window whereas betas since then are using the windows native file requester. On WinXP this window is modal and blocks events to the main window, including, it seems, time events. That's an interesting issue. (meaning, I don't have an answer) I will bring it up in rebol-view world, where we are working on rebol/view 1.3 Actually, it might be worth looking how request-file is implemented in View 1.2.1. You most likely can just copy the source to the request-file function into your code and use that in the newer beta I assume you are using. At least it will work. Anton. > On 21-Jan-04, Matt MacDonald wrote: > > > I'm having a problem with the Request File Function. I have a timer > > as an event in the feel of a form. One of the buttons on the form > > launches the request file dialog box. The problem is that while that > > dialog box is up, my timer event is paused. I'm using the timer to > > check for inactive users, so the timer needs to be going at all > > times. Anybody have any suggestions? Here is the code for the timer: > > > ; Probe time hold the timer interval, in my case it is usually 30 > > seconds main-form/rate: probe-int main-form/feel: make > > main-form/feel [ > > engage: func [face action event] > > [ > > if (event/type = 'time) > > [probe-messages probe-type] > > ] > > ] > > I'm not quite sure how your program works, but the timer in the > following keeps going while the file-requester is open... > > view layout [ > button "Request" [x: request-file] > time: field to-string now/time > rate 1 feel [ > engage: func [face action event][ > if event/type = 'time [ > time/text: to-string now/time > show time > ] > ] > ] > ] > > -- > Carl Read -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [unset] Memory optimization idea
It occurred to me that there are a lot of functions (both native! and mezzanine), even with REBOL/Base, that are never used in my scripts. I sometimes 'unset the larger of these to minimize REBOL's memory footprint, which got me to thinking that it might be possible to create a 'func to do this for me. The logic would go something like this: pre-unset funcs: obtain a list of all globally defined functions (use 'what as a template) script post-unset remove-each from funcs where func appears in script remove-each from funcs where func appears in funcs/mezz foreach func funcs [unset 'func] unset 'pre-unset unset 'self recycle Which should work so long as native! func's don't depend on other func's (native! or not). If this concept works, it could then be extended to other (eg. VID) words so long as the script does not create dynamic references (which is rare for non-user defined words in my scripts at least). What I was hoping is that there might be an easy way to answer the question, "Which words in the global context are not being used, and can they be unset safely?". Comments? Regards, Ashley -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: key events... hacking...
so simple! THANKS! Does the return value indicate if the event should be passed along to the next event handler? or anything of the like... -MAx --- "You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun." > -Original Message- > From: Ammon Johnson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 20, 2004 8:19 PM > To: [EMAIL PROTECTED] > Subject: [REBOL] Re: key events... hacking... > > > > Try something like: > > insert-event-func func [ > face event > ][ > If event/type = key [ > ;do something > ] > ] > > > HTH > ~~Ammon ;-> > > > > - Original Message - > From: "Maxim Olivier-Adlhoch" <[EMAIL PROTECTED]> > To: "Rebol-List (E-mail)" <[EMAIL PROTECTED]> > Sent: Tuesday, January 20, 2004 4:23 PM > Subject: [REBOL] key events... hacking... > > > > > > hi gang! > > > > > > Is anyone capable of getting keyboard events for faces which are not > "focused", short of rewriting the whole event handler? > > > > I need to handle shortcuts in a multi-level ui system. The > problem right > now is that if I focus a face, then the caret appears and its > looks mimic a > text field! > > > > I'd just want a way to get keyboard events at their source > and if they > coincide with a specific current setup or context, then an action is > called... > > > > does the key style allow me to do just that, and if so, do > any one of you > have simple useage examples... its been a while since I've > been in keyboard > hassles dept. > > > > thanks in advance! > > > > AND A BIG THAKS TO EVERYONE WHO SHARED A SECRET OR TWO ABOUT VID > ACCELERATION. I am sure many novices and a few veterans > learned at least > one or two tricks. Thats what I wanted, to get that kind of > info shared in > one continous stream. > > > > now may be gerard or cybarite will compile that somewhere ;-) > > > > as if we don't all have enough to do already. > > > > > > CHEERS! > > > > > > > > -MAx > > --- > > "You can either be part of the problem or part of the > solution, but in the > end, being part of the problem is much more fun." > > > > > > -- > > To unsubscribe from this list, just send an email to > > [EMAIL PROTECTED] with unsubscribe as the subject. > > > > > > > > > > > -- > To unsubscribe from this list, just send an email to > [EMAIL PROTECTED] with unsubscribe as the subject. > > -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: key events... hacking...
Try something like: insert-event-func func [ face event ][ If event/type = key [ ;do something ] ] HTH ~~Ammon ;-> - Original Message - From: "Maxim Olivier-Adlhoch" <[EMAIL PROTECTED]> To: "Rebol-List (E-mail)" <[EMAIL PROTECTED]> Sent: Tuesday, January 20, 2004 4:23 PM Subject: [REBOL] key events... hacking... > > hi gang! > > > Is anyone capable of getting keyboard events for faces which are not "focused", short of rewriting the whole event handler? > > I need to handle shortcuts in a multi-level ui system. The problem right now is that if I focus a face, then the caret appears and its looks mimic a text field! > > I'd just want a way to get keyboard events at their source and if they coincide with a specific current setup or context, then an action is called... > > does the key style allow me to do just that, and if so, do any one of you have simple useage examples... its been a while since I've been in keyboard hassles dept. > > thanks in advance! > > AND A BIG THAKS TO EVERYONE WHO SHARED A SECRET OR TWO ABOUT VID ACCELERATION. I am sure many novices and a few veterans learned at least one or two tricks. Thats what I wanted, to get that kind of info shared in one continous stream. > > now may be gerard or cybarite will compile that somewhere ;-) > > as if we don't all have enough to do already. > > > CHEERS! > > > > -MAx > --- > "You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun." > > > -- > To unsubscribe from this list, just send an email to > [EMAIL PROTECTED] with unsubscribe as the subject. > > > > -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Request File
On 21-Jan-04, Matt MacDonald wrote: > I'm having a problem with the Request File Function. I have a timer > as an event in the feel of a form. One of the buttons on the form > launches the request file dialog box. The problem is that while that > dialog box is up, my timer event is paused. I'm using the timer to > check for inactive users, so the timer needs to be going at all > times. Anybody have any suggestions? Here is the code for the timer: > ; Probe time hold the timer interval, in my case it is usually 30 > seconds main-form/rate: probe-int main-form/feel: make > main-form/feel [ > engage: func [face action event] > [ > if (event/type = 'time) > [probe-messages probe-type] > ] > ] I'm not quite sure how your program works, but the timer in the following keeps going while the file-requester is open... view layout [ button "Request" [x: request-file] time: field to-string now/time rate 1 feel [ engage: func [face action event][ if event/type = 'time [ time/text: to-string now/time show time ] ] ] ] -- Carl Read -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] key events... hacking...
hi gang! Is anyone capable of getting keyboard events for faces which are not "focused", short of rewriting the whole event handler? I need to handle shortcuts in a multi-level ui system. The problem right now is that if I focus a face, then the caret appears and its looks mimic a text field! I'd just want a way to get keyboard events at their source and if they coincide with a specific current setup or context, then an action is called... does the key style allow me to do just that, and if so, do any one of you have simple useage examples... its been a while since I've been in keyboard hassles dept. thanks in advance! AND A BIG THAKS TO EVERYONE WHO SHARED A SECRET OR TWO ABOUT VID ACCELERATION. I am sure many novices and a few veterans learned at least one or two tricks. Thats what I wanted, to get that kind of info shared in one continous stream. now may be gerard or cybarite will compile that somewhere ;-) as if we don't all have enough to do already. CHEERS! -MAx --- "You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun." -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Request File
I'm having a problem with the Request File Function. I have a timer as an event in the feel of a form. One of the buttons on the form launches the request file dialog box. The problem is that while that dialog box is up, my timer event is paused. I'm using the timer to check for inactive users, so the timer needs to be going at all times. Anybody have any suggestions? Here is the code for the timer: ; Probe time hold the timer interval, in my case it is usually 30 seconds main-form/rate: probe-int main-form/feel: make main-form/feel [ engage: func [face action event] [ if (event/type = 'time) [probe-messages probe-type] ] ] Thanks everyone, Matt _ Get a FREE online virus check for your PC here, from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: POP3 username issues
Hi Chris, Chris White wrote: > All, > > I know that the form for pop3 access is [ > pop3://username:[EMAIL PROTECTED] ], but my problem is that the username > is in the form [EMAIL PROTECTED] (ie. [EMAIL PROTECTED] ). The > problem with that is I now have 2 @'s in my string, and I believe that > rebol is incorrectly parsing them. Any quick solutions or maybe I just > read something wrong. Thank you in advance for your help! in Rebol, there mostly is a quick and dirty way to do things, which works most of the time, and a more elaborate way for the remaining cases. In your case you should open the port directly, like this: >> p: open [ scheme: 'pop user: "your username" pass: "your password" host: "your mail-host" ] >> length? p == 22 >> first p == {Return-path: <> Envelope-to: [EMAIL PROTECTED] Received: from localhost ([127.0.0.1] ident=ingo) ^-by smrgol.2b1.de with esmtp (Ex... >> close p I hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Document Object Model for REBOL
I think you should have a look at the updated ML dialect from Andrew (Andrew J Martin) Andrew has posted on this list several times. The trouble that I have had with it: * it is too subtle for me to realize how slick it is. * I needed more examples of how to use it than are in the base script. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: POP3 username issues
Maybe yours is different but the userid that I logon to my email is not the email address. Check your other mail programs to see what they have input. For Opera mail which I use, the user account is entered on the Account Properties page. There is a General tab which has the mail address... which is what you are referring to. On the Servers tab there is a Username and password field. These are the ones that you want. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Document Object Model for REBOL
Hi Jason, Daniel, Graham, Gregg Thx to all for the references. I will study this material, and see which part is the best fit for our needs ;) CU ! =christophe -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] POP3 username issues
All, I know that the form for pop3 access is [ pop3://username:[EMAIL PROTECTED] ], but my problem is that the username is in the form [EMAIL PROTECTED] (ie. [EMAIL PROTECTED] ). The problem with that is I now have 2 @'s in my string, and I believe that rebol is incorrectly parsing them. Any quick solutions or maybe I just read something wrong. Thank you in advance for your help! Sincerely, Chris White -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.