Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Please urgently need help rebol/view simple gui

 [1/5] from: akram:bmi:my at: 21-Dec-2005 23:04


Dear Rebol Expert, I'm sorry, I'm a newbie and not proficiently good in programming. I'm doing my school project using Rebol/core software. The machine will pan and tilt by adjusting 'panoffset' and 'tiltoffset' values below. My problem is how can I possible run the rebol and then 'show pop up' and adjust the values at the 'field of text' and confirm with 'ok' button. Could someone please help me to fix the problem or show me the way to do it. Below is the script; make integer! n: 0 comment {change these values} make decimal! panoffset: 0.0 make decimal! tiltoffset: 0.0 Thanks in advanced for the help and very much appreciated. Regards, Akram UniKL British Malaysian Institute, Malaysia

 [2/5] from: rebolek::gmail::com at: 21-Dec-2005 16:32


Hi, you would need to use REBOL/View instead of REBOL/Core to be able to pop up a window, REBOL/Core has no GFX support. Also one comment to your script. You're probably trying to declare that N should be integer! and PANOFFSET decimal! but that's not needed in REBOL. You can write your script as: n: 0 comment {change these values} panoffset: 0.0 tiltoffset: 0.0 In REBOL/core you can use ASK or INPUT panoffset: to decimal! ask "Enter value for panoffset:" (beacuse ASK returns string! you have to convert it to decimal!) Bye, REBolek On 12/21/05, Akram <akram-bmi.edu.my> wrote:
> Dear Rebol Expert, > I'm sorry, I'm a newbie and not proficiently good in programming. I'm
<<quoted lines omitted: 18>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- / Boleslav Brezovsky http://krutek.info \

 [3/5] from: akram:bmi:my at: 22-Dec-2005 0:31


Hi, Thanks so much for the comment, I'll try to fix it immediately. In REBOL/View, what function should I use to be able to pop up the window and to adjust "panoffset" and "tiltoffset". Could someone please help me with the sample script or a REBOL/view tutorial/doc to look into it because I'm really in a tight schedule right now. Regards, Akram

 [4/5] from: volker:nitsch::gmail at: 21-Dec-2005 17:46


On 12/21/05, Akram <akram-bmi.edu.my> wrote:
> Dear Rebol Expert, > I'm sorry, I'm a newbie and not proficiently good in programming. I'm doing
<<quoted lines omitted: 7>>
> make decimal! panoffset: 0.0 > make decimal! tiltoffset: 0.0
n: 0 comment {change these values} panoffset: 0.0 tiltoffset: 0.0 inform layout[ label "pan" pan-face: field form panoffset label "tilt" tilt-face: field form tiltoffset button "Ok" [ panoffset: get-face pan-face tiltoffset: get-face tilt-face hide-popup ] button "cancel" [hide-popup] ] ?? panoffset ?? tiltoffset
> Thanks in advanced for the help and very much appreciated. > Regards,
<<quoted lines omitted: 4>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

 [5/5] from: antonr::lexicon::net at: 22-Dec-2005 4:00


Hi Akram, try this: pan-offset: 0.0 tilt-offset: 0.0 refresh: does [ print ["pan:" pan-offset "tilt:" tilt-offset] ] control-window: center-face layout [ style hscroller scroller 200x20 across label "pan" hscroller [pan-offset: face/data refresh] with [data: pan-offset] return label "tilt" hscroller [tilt-offset: face/data refresh] with [data: tilt-offset] ] view/new control-window do-events The scroller/data is from 0.0 to 1.0 only, so if your pan and tilt values range outside these bounds, you will need to do map those values, eg: pan-offset: face/data * 2 etc. Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted