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

VID question

 [1/4] from: kpeters:otaksoft at: 29-Sep-2007 21:25


Hi ~ I have a layout with an info for every day of a month, named inf1 through inf31 which I use to display daily time tallies. My SQL queries return cursors that do not have a record for days on which there was no work performed, thus a sample cursor might look like this: [ [ 01-Oct-2007 4.5 ] [ 14-Oct-2007 8.0 ] [ 15-Oct-2007 7.5 ] [ 31-Oct-2007 7.5 ] ] So I need a way to assign the 7.5 h to the info named inf31 etc. Delphi has a handy FindControlByName function for this purpose - how is this best done in Rebol? TIA, Kai

 [2/4] from: henrik:webz:dk at: 30-Sep-2007 21:01


On 30/09/2007, at 6.25, Kai Peters wrote:
> Hi ~ > I have a layout with an info for every day of a month, named
<<quoted lines omitted: 8>>
> [ 31-Oct-2007 7.5 ] > ]
Let's explore SET-FACE a bit: set-face inf31 7.5 If this prints 7.5 in your inf31 field, then we can say: foreach row result [set-face to-word join 'inf row/1/day row/2] That should do it. -- Regards, Henrik Mikael Kristensen

 [3/4] from: kpeters:otaksoft at: 30-Sep-2007 12:59


On Sun, 30 Sep 2007 21:01:21 +0200, Henrik Mikael Kristensen wrote:
> foreach row result [set-face to-word join 'inf row/1/day row/2]
Thanks Henrik - exactly what I was hoping for. But now I get: ** Script Error: in expected object argument of type: object port ** Where: set-face ** Near: if all [ access: get in face 'access in access 'set-f when I try this: tally-form: center-face layout [ ...snip... ; hlab1: wdlab "0.0" hlab2: wdlab "0.0" hlab3: wdlab "0.0" hlab4: wdlab "0.0" .. snip .. hlab28: wdlab "0.0" hlab29: wdlab "0.0" hlab30: wdlab "0.0" hlab31: wdlab "0.0" return ; do [ foreach row tallyrecords [ set-face (join 'hlab row/1/day) row/2 ]] ... snip... I can set the text property but that necessitates a face refresh via show and then show complains about wanting an object and not a word... Any ideas? TIA Kai

 [4/4] from: kpeters::otaksoft::com at: 30-Sep-2007 13:01


Oops - no worries: 'to-word is in my code - just not in my post! Kai

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