OR_VIEW problem revisited (OpenInsight Specific)
At 09 NOV 1999 03:59:06PM Don Miller - C3 Inc. wrote:
In a previous posting, I inadvertantly stated that OR_VIEW didn't return to a called program. In fact, it does – INSTANTLY, as it turns out. The problem is that the View Window can't be located if the form on top is Maximized (and maybe not even if it isn't). The ALT+TAB sequence doesn't get to it. Shouldn't it be on-top of the calling form? I assume that it is running in the context of @WINDOW such that it can figure out where to put itself. The view window is always maximized upon startup.
Any ideas?
Don Miller
C3 Inc.
At 09 NOV 1999 05:50PM Carl Pates - Sprezzatura Group wrote:
Hi Don,
The problem is that OR_VIEW is not executed modally - it just has a call to Start_Window, not Dialog_Box
It's actual name is ORMAIN ( or OR_MAIN - check SYSREPOSWINEXES ) and the best way around your problem is to do something like:
Call Or_View ( blargh… )
Loop
While Get_Property( "ORMAIN","HANDLE" )
Call Yield()Repeat
…ask message etc…
You could also set ORMAIN's parent property before the loop and disable your main window so it appears to act modally too..
Regards
Carl Pates
Sprezzatura Group
At 10 NOV 1999 09:02AM Don Miller - C3 Inc. wrote:
Carl ..
Thanks. As usual the Sprezz folks do it better than most. By the way, did you see the post about S/LIST - OIPI and Don Bakke's response? That's a bit of wierdness!!!
Don M.
At 10 NOV 1999 09:24AM Don Bakke wrote:
Don,
If you thought that was weird, listen to this:
With this same client and the HP 2010TN printer we also discovered that if we printed a line with a tab character (i.e. Char(9)), the number of text characters following the tab must be less than 72 or greater than 75. Otherwise, everything past the tab won't print at all. Of course this took a while to figure out. All we knew was that the end users were complaining that the text in their window and the text in the OIPI print preview looked great, but when the document was finally printed certain lines were missing entire sentences. Thankfully we didn't panic and we methodically figured out that this was a specific problem with this printer (even if we used another driver). I've tried the form on three different HP printers and they print perfectly.
I told the client that I would bet that their specific printer was defective. However, they didn't seem interested in replacing it so we had to provide a solution that pre-scanned each line for a tab and then counted the number of characters that followed. If the count was between 72 and 75 we would append 5 spaces. Now the problem doesn't occur anymore…
dbakke@srpcs.com
At 10 NOV 1999 10:17AM Don Miller - C3 Inc. wrote:
Don ..
I'm getting to old for this kind of caca. All I want to do is deliver applications but it seems as though we spend about half our time debugging the runtime environment as it interacts with our stuff. Your example is truly bizarre. By the way, I checked HP's download site and there is no scheduled date for a fix to the driver. A voice call to their tech support line allowed as how there have been several problems reported with this printer / driver. Apparently, it was only tested in Win NT and Win98 (if you can believe that!).
Don M.
At 10 NOV 1999 10:24AM Don Miller - C3 Inc. wrote:
Carl ..
Tried your suggestion of checking the HANDLE property of ORMAIN (which is its name in the Repository), but it always returns a null no matter what. To test it I did:
Call OR_VIEW("",MYSENTENCE)
Loop
ALIVE=GET_PROPERTY("ORMAIN","HANDLE")
While ALIVE
Call Yield()Repeat
The ALIVE variable always comes back null so… it just drops
down to the stuff following the Repeat.
So, I'm back to option 2 - but…
If I can't get_property on ORMAIN's HANDLE, how on earth can I change its PARENT property???
Don M.
At 10 NOV 1999 01:39PM Don Miller - C3 Inc. wrote:
Carl Pates' suggestion was nearly right:
Call Or_View ( blargh… )
Loop
While Get_Property( "ORMAIN","HANDLE" )
Call Yield()
Repeat
but .. you need to check the HANDLE property of ORPRV instead.
That will do it
Don Miller
C3 Inc.
At 10 NOV 1999 02:07PM Carl Pates - Sprezzatura Group wrote:
D'oh!
OR schmor… knew it was something that had letters in it
![]()
At 13 NOV 1999 05:47PM Richard Bright wrote:
Don,
In addition to the info on the yield + call to the handle you might want to disable the print button on the viewer and call print as a separate process. The reason is that if you are using a select list to pre-load the cursor (as I do) the print button on the viewer will result in ALL records being printed (subject to the RLIST statement)
Below is some of my standard code:
If Table then Status=Set_Status(0) ;* Clear Status Rlist("SELECT ":Table:" ":Sort:" ":Select, TARGET_SAVELIST$,AppName:'*':@STATION,
,
) if Get_Status(status_code) then Call MSG(Win,"Cant make select list: ":status_code) End Else Activate_Save_Select(AppName:'*':@STATION) End End or_view(Rpt_Name,) void=Set_Property('ORPRV.PRINT','ENABLED',0) /Loop until preview not active/ WinId=ORPRV" loop while get_property(WinId,"HANDLE") yield() repeat To_Print=' To_Print=MSG(CtrlEntID,'Do you want to print this report?':@FM:'BNY':@FM:@FM:'?') If To_Print then RList_Report= Xlate('SYSREPOSREPORTS',AppName:'*RBLAYOUT*':Rpt_Name,1,'X') If table then Activate_Save_Select(AppName:'*':@STATION) End RList(Rlist_Report,0,
,,
) end *