Oh teach me great Fhopha! (OpenInsight Specific)
At 20 OCT 1999 11:46:54AM CT Savell wrote:
1) Why is it that when I pass @record into a subroutine only part of the record data is sent. If on the other had if I first assign @record to a new variable everything is sent?
sub(@record) versus REC - @record; sub(REC)
2) What is the correct format for the COLOR_BY_POS message? I assumed it was the same as FONT_BY_POS. Namely:
text=Send_Message(controlID, "COLOR_BY_POS", column, row, fontstructure)
Remarks For COLOR_BY_POS, the Send_Message function has the following parameters.Parameter Description
column, row When column and row are both positive, applies the fontstructure to the cell; when column is positive and row is 0, applies fontstructure to the entire column; when column is 0 and row is positive applies the fontstructure to the entire row.
fontstructure An @SVM-delimited array. (Refer to the COLOR property in Chapter 4: Properties.)
However if I switch the row column values in: EXAMPLES, PO_ENTRY, CREATE event on the window, nothing happens?
I am trying to create an EditTable with a banded appearance like the old 132 column paper with every other line colored.
Thank you for your wisdom.
Tom
At 20 OCT 1999 01:47PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
No idea why the subroutines wouldn't pass, but as a rule, I generally don't pass @VARS in subroutines. After all, they're global so they'll still be there in the sub.
As for the color, the final structure is backcolor :@VM : forecolor where color is the color as returned from Utility( "Choosecolor").
akaplan@sprezzatura.com
At 21 OCT 1999 09:45AM Don Miller - C3 Inc. wrote:
CT ..
I've noticed that the old-reliable @RECORD doesn't seem to mean much in OI. I've done the following (depending on my needs):
1. Read @RECORD from the disk. This contains the state of the critter as of the last write. Alternatively, you can do a FORWARD_EVENT on the Write event and then read the updated record. I do this for incremental updates (I save @record when it is read in a window variable (@ORIG, typically) and then compare the two.
2. Get_Property(@WINDOW,"RECORD") - which may be incomplete depending on how you are doing updates in the form. Setting the DEFPROP seems to reset the RECORD property while setting the TEXT attribute doesn't.
3. Take a chance and use @RECORD directly (without passing it as a parameter since it is global anyway.
I think Aaron has the stuff you need on Color/Font etc.
Don Miller
C3 Inc.
At 21 OCT 1999 01:06PM CT Savell wrote:
Thanks Don and Aaron for your comments on @Record. I think its the global aspect of @record that is messing things up, especially if there are any interim reads.
As for my color question, I should have added more detail on the color setting in my orginal message. I am doing it correctly: backcolor :@VM : forecolor. My question has to do with switching from coloring the columns to coloring the rows. below is the code extracted from the CREATE event in PO_ENTRY window of the EXAMPLES app. If you go there and switch the row to 1,3,5,7 and set the column to "0" on the Send_Message, it DOES NOT color the row.
I changed the code as follows:
Color=BLUE$:@FM:WHITE$
*Color=WHITE$: @fm: BLUE$
Send_Message(@window: ".ET_PO_LINES", "COLOR_BY_POS", 0, 1, Color)
Send_Message(@window: ".ET_PO_LINES", "COLOR_BY_POS", 0, 3, Color)
Send_Message(@window: ".ET_PO_LINES", "COLOR_BY_POS", 0, 5, Color)
Send_Message(@window: ".ET_PO_LINES", "COLOR_BY_POS", 0, 7, Color)
The "0" in the column variable should mean "all columns."
Again I am trying to get a "banded" EditTable with every other line colored.
Tom
At 21 OCT 1999 08:01PM Frank Tomeo wrote:
Are you also using FONT_BY_POS in the same subroutine? There are combatibility problems when you use both FONT_ and COLOR_BY_POS in the same subroutine, that is why COLOR_BY_POS is not documented in the OI help.
In a current app, I had to set the color to a column first before changing the font anywhere in the edittable or the coloring would not work.
ftomeo@srpcs.com
At 21 OCT 1999 08:07PM Frank Tomeo wrote:
The COLOR_BY_POS parameters that I use are:
rv=Send_Message(edittable, "COLOR_BY_POS", col, row, colorArray)
…where colorArray is an @FM delimited list consisting of:
Background color
Foreground color
Background color (when selected)
Foreground color (when selected)
Hope this helps,
ftomeo@srpcs.com
At 22 OCT 1999 11:35AM CT Savell wrote:
Frank,
Thanks for both your messages.
In response to your comments and questions:
1)"Are you also using FONT_BY_POS in the same subroutine? There are combatibility problems when you use both FONT_ and COLOR_BY_POS in the same subroutine, that is why COLOR_BY_POS is not documented in the OI help."
No I am not using FONT_BY_POS. In fact I quoted the EXAMPLES app bundled with OI. Particularly the PO_ENTRY form CREATE event as code where I could not switch from coloring the columns to coloring the rows.
2) In a current app, I had to set the color to a column first before changing the font anywhere in the edittable or the coloring would not work.
I don't understand. Perhaps this is the problem. Again I am only changing the colors, not the fonts as shown in the PO_ENTRY app of EXAMPLES.
3)The COLOR_BY_POS parameters that I use are:
rv=Send_Message(edittable, "COLOR_BY_POS", col, row, colorArray)
…where colorArray is an @FM delimited list consisting of:
Background color
Foreground color
Background color (when selected)
Foreground color (when selected)
This ColorArray is very interesting. I thought is was just and . What are and used for?
Tom
At 22 OCT 1999 01:18PM Oystein Reigem wrote:
CT
(2) Must confess I haven't really read your question. But I remember problems with setting the colour of whole columns. Single cells and rows are OK, but if you try to colour a whole column, already coloured cells will not change.
- Oystein -
At 22 OCT 1999 09:01PM CT Savell wrote:
Oystein,
Thank you for responding. Actually I have experience the exact opposite from you. The Columns work great, but the rows and individual cells do not work. Again, I reference the CREATE event in PO_ENTRY of the EXAMPLES app, which you have, as hard evidence of this. I don't really care how I do it, I just want to create an EditTable with every other row colored. The mechanism COLOR_BY_POS delivered by REVELATION doesn't appear to do the job.
Thanks again
Tom
At 23 OCT 1999 03:32PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
I create a quick window, with one edit table, called TABLE and one push button. The button's click event runs this basic code (WinID and other declarations removed). Gist is, it prompts you for a foreground and background color and does indeed set every other line.
ForeColor = Utility( 'CHOOSECOLOR', WinID ) BackColor = Utility( 'CHOOSECOLOR', WinID ) For LineNbr =1 to 10 Step 2 UnUsed = Send_Message( WinID : ".TABLE", "COLOR_BY_POS", 0, LineNbr, BackColor : @FM : ForeColor) Next LineNbrThis should work, since it works on my OI.
akaplan@sprezzatura.com
At 25 OCT 1999 12:06AM Don Bakke wrote:
Tom,
and are used as described. That is, if you want specific colors when the row in particular is selected (i.e. has the SELPOS) then you specify that in these positions. and are for when the rows are un-selected.
dbakke@srpcs.com
At 25 OCT 1999 11:42AM CT Savell wrote:
Cool, Now all I have to do is get it to work.
It's weird, I am doing what you and Aaron and the others are descibing but it doesn't seem to work even when I make the changes to Revelation's EXAMPLES app PO_ENTRY, CREATE Event. I am starting to think I have something corrupted in my Version 3.7?
At 25 OCT 1999 12:17PM Oystein Reigem wrote:
Tom,
Do we all agree there's an error in the EXAMPLES PO_LINES CREATE? That the authors switched backcolor and forecolor? That the only banding you'll get is in the colours of the characters (i.e foreground)?
In my own test window I can get both rowwise and columnwise banding to work. (I haven't actually run the one in EXAMPLES.) But I use OI 3.61. That's the newest version of OI I've got installed.
- Oystein -
PS. This is what I do:
Window with two edit tables ET and ET2 (so ET won't have to call home - ha ha). CREATE script:
declare subroutine Send_Message
$insert Colors
$insert Logical
Color=BLUE$:@FM:WHITE$
Send_Message(@window: ".ET", "COLOR_BY_POS", 1, 0, Color)
Send_Message(@window: ".ET", "COLOR_BY_POS", 3, 0, Color)
Send_Message(@window: ".ET", "COLOR_BY_POS", 5, 0, Color)
Send_Message(@window: ".ET", "COLOR_BY_POS", 7, 0, Color)
Send_Message(@window: ".ET2", "COLOR_BY_POS", 0, 1, Color)
Send_Message(@window: ".ET2", "COLOR_BY_POS", 0, 3, Color)
Send_Message(@window: ".ET2", "COLOR_BY_POS", 0, 5, Color)
Send_Message(@window: ".ET2", "COLOR_BY_POS", 0, 7, Color)
RETURN 0
At 25 OCT 1999 12:59PM CT Savell wrote:
Very Interesting,
I created a form with both Oystein's and Aaron's examples and this is what happened, as well as my experience with the Revelation's example:
1) With Oystein's ET and ET2 EditTables with the CREATE event, both tables where initially banded, ET by column and ET2 by ROW. When I typed some text into either ET or ET2 it was white. In other words, this example worked as expected.
2) With Aaron's Button Event code, I was prompted to proved the Forecolor and Backcolor (I think the Utility is cool) but my editTable was not colored. That is, it didn't work.
3) With Revelation's EXAMPLES app PO_ENTRY, CREATE event, I can get the Forecolor and Backcolor to change for Columns and it seems to behave properly. If I switch the columns and rows however, to give banded rows, it does not work at all???
I am using Version 3.7 but I just noticed it says Version 3.4 for Form Designer. Why aren't the version numbers the same? Did I miss something?
At 25 OCT 1999 01:18PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
I'm wondering if you have an incompatible CTL3D.DLL. That could be the reason behind all this.
akaplan@sprezzatura.com
At 25 OCT 1999 05:00PM CT Savell wrote:
OK, could be. One problem however, I don't know what a CTL3D.DLL is? Let alone how to fix it. I did do all the things that I could think of like checking for GFEs and building indicies. One thing I did notice while turning over stones was that my HELP ABOUT message gave different versions in the different modules:
OI for Workgroups main menu=3.7
Form Designer=3.4
System Editor=3.4
C/S Workspace=3.7
Revelation Reporter give the message Unable to find Reporter.exe
UI Workspace=3.7
Deploy=3.4
I loaded everything from the distribution diskettes several times but nothing changed.
How should I check to see if CTL3D.DLL is correct?
Tom
At 25 OCT 1999 05:08PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
The version numbers are probably correct. Send me a mail and I'll mail you an good CTL3D.DLL.
akaplan@sprezzatura.com